Instructions to use facebook/opt-125m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use facebook/opt-125m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="facebook/opt-125m")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("facebook/opt-125m") model = AutoModelForCausalLM.from_pretrained("facebook/opt-125m") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use facebook/opt-125m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "facebook/opt-125m" # 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-125m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/facebook/opt-125m
- SGLang
How to use facebook/opt-125m 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-125m" \ --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-125m", "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-125m" \ --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-125m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use facebook/opt-125m with Docker Model Runner:
docker model run hf.co/facebook/opt-125m
Install & run facebook/opt-125m easily using llmpm
#52 opened 2 months ago
by
sarthak-saxena
Adding `safetensors` variant of this model
#51 opened 5 months ago
by
SFconvertbot
Adding `safetensors` variant of this model
#50 opened 5 months ago
by
LittleQiangStronger
Adding `safetensors` variant of this model
#49 opened about 1 year ago
by
SFconvertbot
Adding `safetensors` variant of this model
#48 opened over 1 year ago
by
SFconvertbot
Chat Template Error
1
#47 opened over 1 year ago
by
publicmutiny
Interview request: genAI evaluation & documentation
#46 opened over 1 year ago
by
meggymuggy
Added "chat_template"
1
#45 opened almost 2 years ago
by
mr6nie
[AUTOMATED] Model Memory Requirements
#44 opened about 2 years ago
by
model-sizer-bot
Update README.md
1
#43 opened about 2 years ago
by
mwitiderrick
Adding Evaluation Results
#42 opened about 2 years ago
by
leaderboard-pr-bot
I believe that the readme says 175B model when it should be 175M.
#41 opened over 2 years ago
by
noobmaster29
Adding Evaluation Results
#40 opened over 2 years ago
by
leaderboard-pr-bot
Adding `safetensors` variant of this model
#39 opened over 2 years ago
by
SFconvertbot
remove doubled verb
#37 opened almost 3 years ago
by
bsenst
Adding ONNX file of this model
1
#36 opened almost 3 years ago
by
double-tian
Adding `safetensors` variant of this model
#35 opened about 3 years ago
by
SFconvertbot
Add fast tokenizer
1
#34 opened about 3 years ago
by
TimeRobber
Add evaluation results on the top_en_ config and test split of futin/feed
#33 opened over 3 years ago
by
autoevaluator
Add evaluation results on the sen_en_ config and test split of futin/feed
#32 opened over 3 years ago
by
autoevaluator
Add evaluation results on the sen_en config and test split of futin/feed
#31 opened over 3 years ago
by
autoevaluator
Add evaluation results on the sen_vi config and test split of futin/feed
#30 opened over 3 years ago
by
autoevaluator
Add evaluation results on the top_en config and test split of futin/feed
#29 opened over 3 years ago
by
autoevaluator
Add evaluation results on the top_vi config and test split of futin/feed
#28 opened over 3 years ago
by
autoevaluator
Add evaluation results on the vi_3 config and test split of futin/guess
#27 opened over 3 years ago
by
autoevaluator
Add evaluation results on the en_3 config and test split of futin/guess
#26 opened over 3 years ago
by
autoevaluator
Add evaluation results on the vi config and test split of futin/guess
#25 opened over 3 years ago
by
autoevaluator
Add evaluation results on the en config and test split of futin/guess
#24 opened over 3 years ago
by
autoevaluator
Add evaluation results on the mathemakitten--winobias_antistereotype_test config and test split of mathemakitten/winobias_antistereotype_test
#23 opened over 3 years ago
by
autoevaluator
Add evaluation results on the jeffdshen--inverse_superglue_mixedp1 config and train split of jeffdshen/inverse_superglue_mixedp1
#22 opened over 3 years ago
by
autoevaluator
Add evaluation results on the jeffdshen--redefine_math_test0 config and train split of jeffdshen/redefine_math_test0
#21 opened over 3 years ago
by
autoevaluator
Add evaluation results on the mathemakitten--winobias_antistereotype_test config and test split of mathemakitten/winobias_antistereotype_test
#20 opened over 3 years ago
by
autoevaluator
Remove unused `activation_dropout`
#19 opened over 3 years ago
by
shijie-wu
Vocab_size of the model configuration is incorrect
1
#18 opened over 3 years ago
by
robkirk
Why is the "add_bos_token" set to True in tokenizer_config.json?
👍 1
1
#17 opened almost 4 years ago
by
heya5
KeyError: 'opt' on calling predictor.predict in Sagemaker
#6 opened almost 4 years ago
by
waynedsouza
Bug fix!
#3 opened almost 4 years ago
by
patrickvonplaten