Instructions to use amd/Instella-3B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use amd/Instella-3B-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="amd/Instella-3B-Instruct", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("amd/Instella-3B-Instruct", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use amd/Instella-3B-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "amd/Instella-3B-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "amd/Instella-3B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/amd/Instella-3B-Instruct
- SGLang
How to use amd/Instella-3B-Instruct 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 "amd/Instella-3B-Instruct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "amd/Instella-3B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "amd/Instella-3B-Instruct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "amd/Instella-3B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use amd/Instella-3B-Instruct with Docker Model Runner:
docker model run hf.co/amd/Instella-3B-Instruct
Update tokenizer files
Browse files- tokenizer.json +1 -10
- tokenizer_config.json +2 -9
tokenizer.json
CHANGED
|
@@ -254,15 +254,6 @@
|
|
| 254 |
"rstrip": false,
|
| 255 |
"normalized": true,
|
| 256 |
"special": false
|
| 257 |
-
},
|
| 258 |
-
{
|
| 259 |
-
"id": 50280,
|
| 260 |
-
"content": "<padding>",
|
| 261 |
-
"single_word": false,
|
| 262 |
-
"lstrip": false,
|
| 263 |
-
"rstrip": false,
|
| 264 |
-
"normalized": false,
|
| 265 |
-
"special": true
|
| 266 |
}
|
| 267 |
],
|
| 268 |
"normalizer": {
|
|
@@ -250610,4 +250601,4 @@
|
|
| 250610 |
]
|
| 250611 |
]
|
| 250612 |
}
|
| 250613 |
-
}
|
|
|
|
| 254 |
"rstrip": false,
|
| 255 |
"normalized": true,
|
| 256 |
"special": false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 257 |
}
|
| 258 |
],
|
| 259 |
"normalizer": {
|
|
|
|
| 250601 |
]
|
| 250602 |
]
|
| 250603 |
}
|
| 250604 |
+
}
|
tokenizer_config.json
CHANGED
|
@@ -226,14 +226,6 @@
|
|
| 226 |
"rstrip": false,
|
| 227 |
"single_word": false,
|
| 228 |
"special": false
|
| 229 |
-
},
|
| 230 |
-
"50280": {
|
| 231 |
-
"content": "<|padding|>",
|
| 232 |
-
"lstrip": false,
|
| 233 |
-
"normalized": false,
|
| 234 |
-
"rstrip": false,
|
| 235 |
-
"single_word": false,
|
| 236 |
-
"special": true
|
| 237 |
}
|
| 238 |
},
|
| 239 |
"bos_token": "<|endoftext|>",
|
|
@@ -242,7 +234,8 @@
|
|
| 242 |
"eos_token": "<|endoftext|>",
|
| 243 |
"extra_special_tokens": {},
|
| 244 |
"model_max_length": 1000000000000000019884624838656,
|
| 245 |
-
"pad_token": "<padding>",
|
| 246 |
"tokenizer_class": "GPTNeoXTokenizer",
|
| 247 |
"unk_token": "<|endoftext|>"
|
| 248 |
}
|
|
|
|
|
|
| 226 |
"rstrip": false,
|
| 227 |
"single_word": false,
|
| 228 |
"special": false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 229 |
}
|
| 230 |
},
|
| 231 |
"bos_token": "<|endoftext|>",
|
|
|
|
| 234 |
"eos_token": "<|endoftext|>",
|
| 235 |
"extra_special_tokens": {},
|
| 236 |
"model_max_length": 1000000000000000019884624838656,
|
| 237 |
+
"pad_token": "<|padding|>",
|
| 238 |
"tokenizer_class": "GPTNeoXTokenizer",
|
| 239 |
"unk_token": "<|endoftext|>"
|
| 240 |
}
|
| 241 |
+
|