Instructions to use jagadeesh/opt-125m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jagadeesh/opt-125m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jagadeesh/opt-125m")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("jagadeesh/opt-125m") model = AutoModelForCausalLM.from_pretrained("jagadeesh/opt-125m") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use jagadeesh/opt-125m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jagadeesh/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": "jagadeesh/opt-125m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/jagadeesh/opt-125m
- SGLang
How to use jagadeesh/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 "jagadeesh/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": "jagadeesh/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 "jagadeesh/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": "jagadeesh/opt-125m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use jagadeesh/opt-125m with Docker Model Runner:
docker model run hf.co/jagadeesh/opt-125m
Commit ·
f24b297
1
Parent(s): 485a0e7
correct checkpoints see: https://github.com/facebookresearch/metaseq/pull/164
Browse files- config.json +2 -2
- flax_model.msgpack +2 -2
- pytorch_model.bin +2 -2
- tf_model.h5 +2 -2
config.json
CHANGED
|
@@ -20,8 +20,8 @@
|
|
| 20 |
"num_hidden_layers": 12,
|
| 21 |
"pad_token_id": 1,
|
| 22 |
"prefix": "</s>",
|
| 23 |
-
"torch_dtype": "
|
| 24 |
-
"transformers_version": "4.
|
| 25 |
"use_cache": true,
|
| 26 |
"vocab_size": 50272,
|
| 27 |
"word_embed_proj_dim": 768
|
|
|
|
| 20 |
"num_hidden_layers": 12,
|
| 21 |
"pad_token_id": 1,
|
| 22 |
"prefix": "</s>",
|
| 23 |
+
"torch_dtype": "float16",
|
| 24 |
+
"transformers_version": "4.21.0.dev0",
|
| 25 |
"use_cache": true,
|
| 26 |
"vocab_size": 50272,
|
| 27 |
"word_embed_proj_dim": 768
|
flax_model.msgpack
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:61c60ec52ed43038fff0fbbd68b080c94b0d94b4c8458dbd65965f9b17631c89
|
| 3 |
+
size 250485441
|
pytorch_model.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2d74da6615135c58cf3cf9ad4cb11e7c613ff9e55fe658a47ab83b6c8d1174a9
|
| 3 |
+
size 250540281
|
tf_model.h5
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:db7090b0c8b34dd957a7e0656c718f978f9203cc874018f37dda44108be5970a
|
| 3 |
+
size 250709016
|