Instructions to use RobertML/sn6e with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RobertML/sn6e with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="RobertML/sn6e") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("RobertML/sn6e") model = AutoModelForCausalLM.from_pretrained("RobertML/sn6e") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use RobertML/sn6e with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "RobertML/sn6e" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RobertML/sn6e", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/RobertML/sn6e
- SGLang
How to use RobertML/sn6e 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 "RobertML/sn6e" \ --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": "RobertML/sn6e", "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 "RobertML/sn6e" \ --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": "RobertML/sn6e", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use RobertML/sn6e with Docker Model Runner:
docker model run hf.co/RobertML/sn6e
Upload tokenizer
Browse files- special_tokens_map.json +3 -3
- tokenizer.json +0 -27
- tokenizer_config.json +4 -28
special_tokens_map.json
CHANGED
|
@@ -35,14 +35,14 @@
|
|
| 35 |
"<|extra0|>"
|
| 36 |
],
|
| 37 |
"bos_token": {
|
| 38 |
-
"content": "<
|
| 39 |
"lstrip": false,
|
| 40 |
"normalized": false,
|
| 41 |
"rstrip": false,
|
| 42 |
"single_word": false
|
| 43 |
},
|
| 44 |
"eos_token": {
|
| 45 |
-
"content": "<
|
| 46 |
"lstrip": false,
|
| 47 |
"normalized": false,
|
| 48 |
"rstrip": false,
|
|
@@ -56,7 +56,7 @@
|
|
| 56 |
"single_word": false
|
| 57 |
},
|
| 58 |
"unk_token": {
|
| 59 |
-
"content": "<
|
| 60 |
"lstrip": false,
|
| 61 |
"normalized": false,
|
| 62 |
"rstrip": false,
|
|
|
|
| 35 |
"<|extra0|>"
|
| 36 |
],
|
| 37 |
"bos_token": {
|
| 38 |
+
"content": "<|endoftext|>",
|
| 39 |
"lstrip": false,
|
| 40 |
"normalized": false,
|
| 41 |
"rstrip": false,
|
| 42 |
"single_word": false
|
| 43 |
},
|
| 44 |
"eos_token": {
|
| 45 |
+
"content": "<|endoftext|>",
|
| 46 |
"lstrip": false,
|
| 47 |
"normalized": false,
|
| 48 |
"rstrip": false,
|
|
|
|
| 56 |
"single_word": false
|
| 57 |
},
|
| 58 |
"unk_token": {
|
| 59 |
+
"content": "<|endoftext|>",
|
| 60 |
"lstrip": false,
|
| 61 |
"normalized": false,
|
| 62 |
"rstrip": false,
|
tokenizer.json
CHANGED
|
@@ -299,33 +299,6 @@
|
|
| 299 |
"rstrip": false,
|
| 300 |
"normalized": false,
|
| 301 |
"special": true
|
| 302 |
-
},
|
| 303 |
-
{
|
| 304 |
-
"id": 100289,
|
| 305 |
-
"content": "<s>",
|
| 306 |
-
"single_word": false,
|
| 307 |
-
"lstrip": false,
|
| 308 |
-
"rstrip": false,
|
| 309 |
-
"normalized": false,
|
| 310 |
-
"special": true
|
| 311 |
-
},
|
| 312 |
-
{
|
| 313 |
-
"id": 100290,
|
| 314 |
-
"content": "</s>",
|
| 315 |
-
"single_word": false,
|
| 316 |
-
"lstrip": false,
|
| 317 |
-
"rstrip": false,
|
| 318 |
-
"normalized": false,
|
| 319 |
-
"special": true
|
| 320 |
-
},
|
| 321 |
-
{
|
| 322 |
-
"id": 100291,
|
| 323 |
-
"content": "<unk>",
|
| 324 |
-
"single_word": false,
|
| 325 |
-
"lstrip": false,
|
| 326 |
-
"rstrip": false,
|
| 327 |
-
"normalized": false,
|
| 328 |
-
"special": true
|
| 329 |
}
|
| 330 |
],
|
| 331 |
"normalizer": null,
|
|
|
|
| 299 |
"rstrip": false,
|
| 300 |
"normalized": false,
|
| 301 |
"special": true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 302 |
}
|
| 303 |
],
|
| 304 |
"normalizer": null,
|
tokenizer_config.json
CHANGED
|
@@ -264,30 +264,6 @@
|
|
| 264 |
"rstrip": false,
|
| 265 |
"single_word": false,
|
| 266 |
"special": true
|
| 267 |
-
},
|
| 268 |
-
"100289": {
|
| 269 |
-
"content": "<s>",
|
| 270 |
-
"lstrip": false,
|
| 271 |
-
"normalized": false,
|
| 272 |
-
"rstrip": false,
|
| 273 |
-
"single_word": false,
|
| 274 |
-
"special": true
|
| 275 |
-
},
|
| 276 |
-
"100290": {
|
| 277 |
-
"content": "</s>",
|
| 278 |
-
"lstrip": false,
|
| 279 |
-
"normalized": false,
|
| 280 |
-
"rstrip": false,
|
| 281 |
-
"single_word": false,
|
| 282 |
-
"special": true
|
| 283 |
-
},
|
| 284 |
-
"100291": {
|
| 285 |
-
"content": "<unk>",
|
| 286 |
-
"lstrip": false,
|
| 287 |
-
"normalized": false,
|
| 288 |
-
"rstrip": false,
|
| 289 |
-
"single_word": false,
|
| 290 |
-
"special": true
|
| 291 |
}
|
| 292 |
},
|
| 293 |
"additional_special_tokens": [
|
|
@@ -325,12 +301,12 @@
|
|
| 325 |
"<|reg7|>",
|
| 326 |
"<|extra0|>"
|
| 327 |
],
|
| 328 |
-
"bos_token": "<
|
| 329 |
"chat_template": "{% for message in messages %}\n{% if message['role'] == 'user' %}\n{{ '<|user|>\n' + message['content'] + eos_token }}\n{% elif message['role'] == 'system' %}\n{{ '<|system|>\n' + message['content'] + eos_token }}\n{% elif message['role'] == 'assistant' %}\n{{ '<|assistant|>\n' + message['content'] + eos_token }}\n{% endif %}\n{% if loop.last and add_generation_prompt %}\n{{ '<|assistant|>' }}\n{% endif %}\n{% endfor %}",
|
| 330 |
"clean_up_tokenization_spaces": true,
|
| 331 |
-
"eos_token": "<
|
| 332 |
-
"model_max_length":
|
| 333 |
"pad_token": "<|endoftext|>",
|
| 334 |
"tokenizer_class": "GPT2Tokenizer",
|
| 335 |
-
"unk_token": "<
|
| 336 |
}
|
|
|
|
| 264 |
"rstrip": false,
|
| 265 |
"single_word": false,
|
| 266 |
"special": true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 267 |
}
|
| 268 |
},
|
| 269 |
"additional_special_tokens": [
|
|
|
|
| 301 |
"<|reg7|>",
|
| 302 |
"<|extra0|>"
|
| 303 |
],
|
| 304 |
+
"bos_token": "<|endoftext|>",
|
| 305 |
"chat_template": "{% for message in messages %}\n{% if message['role'] == 'user' %}\n{{ '<|user|>\n' + message['content'] + eos_token }}\n{% elif message['role'] == 'system' %}\n{{ '<|system|>\n' + message['content'] + eos_token }}\n{% elif message['role'] == 'assistant' %}\n{{ '<|assistant|>\n' + message['content'] + eos_token }}\n{% endif %}\n{% if loop.last and add_generation_prompt %}\n{{ '<|assistant|>' }}\n{% endif %}\n{% endfor %}",
|
| 306 |
"clean_up_tokenization_spaces": true,
|
| 307 |
+
"eos_token": "<|endoftext|>",
|
| 308 |
+
"model_max_length": 4096,
|
| 309 |
"pad_token": "<|endoftext|>",
|
| 310 |
"tokenizer_class": "GPT2Tokenizer",
|
| 311 |
+
"unk_token": "<|endoftext|>"
|
| 312 |
}
|