Text Generation
Transformers
English
tokenizer
bpe
byte-level-bpe
zenyx
reasoning
math
code
conversational
Instructions to use Arko007/zenyx-v2-tokenizer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Arko007/zenyx-v2-tokenizer with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Arko007/zenyx-v2-tokenizer") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Arko007/zenyx-v2-tokenizer", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Arko007/zenyx-v2-tokenizer with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Arko007/zenyx-v2-tokenizer" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Arko007/zenyx-v2-tokenizer", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Arko007/zenyx-v2-tokenizer
- SGLang
How to use Arko007/zenyx-v2-tokenizer 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 "Arko007/zenyx-v2-tokenizer" \ --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": "Arko007/zenyx-v2-tokenizer", "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 "Arko007/zenyx-v2-tokenizer" \ --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": "Arko007/zenyx-v2-tokenizer", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Arko007/zenyx-v2-tokenizer with Docker Model Runner:
docker model run hf.co/Arko007/zenyx-v2-tokenizer
Upload tokenizer
Browse files- chat_template.jinja +4 -0
- special_tokens_map.json +16 -112
chat_template.jinja
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% for message in messages %}{{'<|im_start|>' + message['role'] + '
|
| 2 |
+
' + message['content'] + '<|im_end|>' + '
|
| 3 |
+
'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant
|
| 4 |
+
' }}{% endif %}
|
special_tokens_map.json
CHANGED
|
@@ -1,117 +1,21 @@
|
|
| 1 |
{
|
| 2 |
"additional_special_tokens": [
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
},
|
| 17 |
-
{
|
| 18 |
-
"content": "<scratchpad>",
|
| 19 |
-
"lstrip": false,
|
| 20 |
-
"normalized": false,
|
| 21 |
-
"rstrip": false,
|
| 22 |
-
"single_word": false
|
| 23 |
-
},
|
| 24 |
-
{
|
| 25 |
-
"content": "<verify>",
|
| 26 |
-
"lstrip": false,
|
| 27 |
-
"normalized": false,
|
| 28 |
-
"rstrip": false,
|
| 29 |
-
"single_word": false
|
| 30 |
-
},
|
| 31 |
-
{
|
| 32 |
-
"content": "<|im_start|>",
|
| 33 |
-
"lstrip": false,
|
| 34 |
-
"normalized": false,
|
| 35 |
-
"rstrip": false,
|
| 36 |
-
"single_word": false
|
| 37 |
-
},
|
| 38 |
-
{
|
| 39 |
-
"content": "<|im_end|>",
|
| 40 |
-
"lstrip": false,
|
| 41 |
-
"normalized": false,
|
| 42 |
-
"rstrip": false,
|
| 43 |
-
"single_word": false
|
| 44 |
-
},
|
| 45 |
-
{
|
| 46 |
-
"content": "<tool_call>",
|
| 47 |
-
"lstrip": false,
|
| 48 |
-
"normalized": false,
|
| 49 |
-
"rstrip": false,
|
| 50 |
-
"single_word": false
|
| 51 |
-
},
|
| 52 |
-
{
|
| 53 |
-
"content": "</tool_call>",
|
| 54 |
-
"lstrip": false,
|
| 55 |
-
"normalized": false,
|
| 56 |
-
"rstrip": false,
|
| 57 |
-
"single_word": false
|
| 58 |
-
},
|
| 59 |
-
{
|
| 60 |
-
"content": "<tool_response>",
|
| 61 |
-
"lstrip": false,
|
| 62 |
-
"normalized": false,
|
| 63 |
-
"rstrip": false,
|
| 64 |
-
"single_word": false
|
| 65 |
-
},
|
| 66 |
-
{
|
| 67 |
-
"content": "</tool_response>",
|
| 68 |
-
"lstrip": false,
|
| 69 |
-
"normalized": false,
|
| 70 |
-
"rstrip": false,
|
| 71 |
-
"single_word": false
|
| 72 |
-
},
|
| 73 |
-
{
|
| 74 |
-
"content": "<|fim_prefix|>",
|
| 75 |
-
"lstrip": false,
|
| 76 |
-
"normalized": false,
|
| 77 |
-
"rstrip": false,
|
| 78 |
-
"single_word": false
|
| 79 |
-
},
|
| 80 |
-
{
|
| 81 |
-
"content": "<|fim_suffix|>",
|
| 82 |
-
"lstrip": false,
|
| 83 |
-
"normalized": false,
|
| 84 |
-
"rstrip": false,
|
| 85 |
-
"single_word": false
|
| 86 |
-
},
|
| 87 |
-
{
|
| 88 |
-
"content": "<|fim_middle|>",
|
| 89 |
-
"lstrip": false,
|
| 90 |
-
"normalized": false,
|
| 91 |
-
"rstrip": false,
|
| 92 |
-
"single_word": false
|
| 93 |
-
}
|
| 94 |
],
|
| 95 |
-
"bos_token":
|
| 96 |
-
"content": "<|endoftext|>",
|
| 97 |
-
"lstrip": false,
|
| 98 |
-
"normalized": false,
|
| 99 |
-
"rstrip": false,
|
| 100 |
-
"single_word": false
|
| 101 |
-
},
|
| 102 |
"eos_token": "<|im_end|>",
|
| 103 |
-
"pad_token":
|
| 104 |
-
|
| 105 |
-
"lstrip": false,
|
| 106 |
-
"normalized": false,
|
| 107 |
-
"rstrip": false,
|
| 108 |
-
"single_word": false
|
| 109 |
-
},
|
| 110 |
-
"unk_token": {
|
| 111 |
-
"content": "<|unk|>",
|
| 112 |
-
"lstrip": false,
|
| 113 |
-
"normalized": false,
|
| 114 |
-
"rstrip": false,
|
| 115 |
-
"single_word": false
|
| 116 |
-
}
|
| 117 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"additional_special_tokens": [
|
| 3 |
+
"<think>",
|
| 4 |
+
"</think>",
|
| 5 |
+
"<scratchpad>",
|
| 6 |
+
"<verify>",
|
| 7 |
+
"<|im_start|>",
|
| 8 |
+
"<|im_end|>",
|
| 9 |
+
"<tool_call>",
|
| 10 |
+
"</tool_call>",
|
| 11 |
+
"<tool_response>",
|
| 12 |
+
"</tool_response>",
|
| 13 |
+
"<|fim_prefix|>",
|
| 14 |
+
"<|fim_suffix|>",
|
| 15 |
+
"<|fim_middle|>"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
],
|
| 17 |
+
"bos_token": "<|endoftext|>",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
"eos_token": "<|im_end|>",
|
| 19 |
+
"pad_token": "<|pad|>",
|
| 20 |
+
"unk_token": "<|unk|>"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
}
|