Text Generation
Transformers
PyTorch
Safetensors
opt
Generated from Trainer
text-generation-inference
Instructions to use jda/opt with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jda/opt with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jda/opt")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("jda/opt") model = AutoModelForCausalLM.from_pretrained("jda/opt") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use jda/opt with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jda/opt" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jda/opt", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/jda/opt
- SGLang
How to use jda/opt 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 "jda/opt" \ --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": "jda/opt", "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 "jda/opt" \ --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": "jda/opt", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use jda/opt with Docker Model Runner:
docker model run hf.co/jda/opt
Model save
Browse files- config.json +6 -6
- pytorch_model.bin +2 -2
- training_args.bin +1 -1
config.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "facebook/opt-
|
| 3 |
"_remove_final_layer_norm": false,
|
| 4 |
"activation_dropout": 0.0,
|
| 5 |
"activation_function": "relu",
|
|
@@ -8,18 +8,18 @@
|
|
| 8 |
],
|
| 9 |
"attention_dropout": 0.0,
|
| 10 |
"bos_token_id": 2,
|
| 11 |
-
"do_layer_norm_before":
|
| 12 |
"dropout": 0.1,
|
| 13 |
"enable_bias": true,
|
| 14 |
"eos_token_id": 2,
|
| 15 |
-
"ffn_dim":
|
| 16 |
-
"hidden_size":
|
| 17 |
"init_std": 0.02,
|
| 18 |
"layer_norm_elementwise_affine": true,
|
| 19 |
"layerdrop": 0.0,
|
| 20 |
"max_position_embeddings": 2048,
|
| 21 |
"model_type": "opt",
|
| 22 |
-
"num_attention_heads":
|
| 23 |
"num_hidden_layers": 24,
|
| 24 |
"pad_token_id": 1,
|
| 25 |
"prefix": "</s>",
|
|
@@ -27,5 +27,5 @@
|
|
| 27 |
"transformers_version": "4.30.2",
|
| 28 |
"use_cache": true,
|
| 29 |
"vocab_size": 50265,
|
| 30 |
-
"word_embed_proj_dim":
|
| 31 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "facebook/opt-1.3b",
|
| 3 |
"_remove_final_layer_norm": false,
|
| 4 |
"activation_dropout": 0.0,
|
| 5 |
"activation_function": "relu",
|
|
|
|
| 8 |
],
|
| 9 |
"attention_dropout": 0.0,
|
| 10 |
"bos_token_id": 2,
|
| 11 |
+
"do_layer_norm_before": true,
|
| 12 |
"dropout": 0.1,
|
| 13 |
"enable_bias": true,
|
| 14 |
"eos_token_id": 2,
|
| 15 |
+
"ffn_dim": 8192,
|
| 16 |
+
"hidden_size": 2048,
|
| 17 |
"init_std": 0.02,
|
| 18 |
"layer_norm_elementwise_affine": true,
|
| 19 |
"layerdrop": 0.0,
|
| 20 |
"max_position_embeddings": 2048,
|
| 21 |
"model_type": "opt",
|
| 22 |
+
"num_attention_heads": 32,
|
| 23 |
"num_hidden_layers": 24,
|
| 24 |
"pad_token_id": 1,
|
| 25 |
"prefix": "</s>",
|
|
|
|
| 27 |
"transformers_version": "4.30.2",
|
| 28 |
"use_cache": true,
|
| 29 |
"vocab_size": 50265,
|
| 30 |
+
"word_embed_proj_dim": 2048
|
| 31 |
}
|
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:0dd7494f18b92a9735c6e18b1f663df3ce51e4416dd3a4c6e0e402a35348bc46
|
| 3 |
+
size 5263104913
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 3887
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:02efb05093619e2cdb833f9bcd62beceb09c1acfadde9d03070a085483e28bb9
|
| 3 |
size 3887
|