Instructions to use facebook/opt-1.3b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use facebook/opt-1.3b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="facebook/opt-1.3b")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("facebook/opt-1.3b") model = AutoModelForCausalLM.from_pretrained("facebook/opt-1.3b", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use facebook/opt-1.3b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "facebook/opt-1.3b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "facebook/opt-1.3b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/facebook/opt-1.3b
- SGLang
How to use facebook/opt-1.3b 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 "facebook/opt-1.3b" \ --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": "facebook/opt-1.3b", "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 "facebook/opt-1.3b" \ --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": "facebook/opt-1.3b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use facebook/opt-1.3b with Docker Model Runner:
docker model run hf.co/facebook/opt-1.3b
Commit History
-
Add evaluation results on the sen_vi config and test split of futin/feed
Beep boop, I am a bot from Hugging Face's automatic model evaluator 👋!\ Your model has been evaluated on the sen_vi config and test split of the [futin/feed](https://huggingface.co/datasets/futin/feed) dataset by @futin, using the predictions stored [here](https://huggingface.co/datasets/autoevaluate/autoeval-eval-futin__feed-sen_vi-894567-2175669983).\ Accept this pull request to see the results displayed on the [Hub leaderboard](https://huggingface.co/spaces/autoevaluate/leaderboards?dataset=futin/feed).\ Evaluate your model on more datasets [here](https://huggingface.co/spaces/autoevaluate/model-evaluator?dataset=futin/feed).6fa46f6
-
Update README.md (#6)
- Update README.md (ff3875e059f9301a03a6e18d258eb4c1ce5a49a2) Co-authored-by: Younes Belkada <ybelkada@users.noreply.huggingface.co>aa6ac1e
-
Update README.md
5ede9d0 -
add model
b45c935
-
Set commercial attribute to False
f141145 -
Update README
d2f35d5
-
Temporarily deactivate the inference API
53f0416
-
Update README.md
337a855 -
Update README.md
Added - text-generation tag7a0f2c1 -
Update README.md
60a8187 -
Create README.md
c71c648