Instructions to use Arotte/opt-small-sw with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Arotte/opt-small-sw with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Arotte/opt-small-sw")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Arotte/opt-small-sw") model = AutoModelForCausalLM.from_pretrained("Arotte/opt-small-sw", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Arotte/opt-small-sw with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Arotte/opt-small-sw" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Arotte/opt-small-sw", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Arotte/opt-small-sw
- SGLang
How to use Arotte/opt-small-sw with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Arotte/opt-small-sw" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Arotte/opt-small-sw", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Arotte/opt-small-sw" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Arotte/opt-small-sw", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Arotte/opt-small-sw with Docker Model Runner:
docker model run hf.co/Arotte/opt-small-sw
Download pytorch_model.bin from Arotte/opt-small-sw: direct link, hf CLI and curl.
- Browser
- Download file 501 MB
-
https://huggingface.co/Arotte/opt-small-sw/resolve/main/pytorch_model.bin
- Command line
-
hf download hf://Arotte/opt-small-sw/pytorch_model.bin
-
curl -L -o pytorch_model.bin https://huggingface.co/Arotte/opt-small-sw/resolve/main/pytorch_model.bin
501 MB
- Xet hash:
- 64ad2a818daffbf7b58b6581f4d84c72f04933e879f74b5f1bb68764dc3819a1
- Size of remote file:
- 501 MB
- SHA256:
- e7111d9cb1613dcaf14ba32ba3adc776ab0a315c21915cb99c6451552da3c13f
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.