Instructions to use SmallDoge/Doge-60M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SmallDoge/Doge-60M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="SmallDoge/Doge-60M", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("SmallDoge/Doge-60M", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("SmallDoge/Doge-60M", trust_remote_code=True) 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 SmallDoge/Doge-60M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SmallDoge/Doge-60M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SmallDoge/Doge-60M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/SmallDoge/Doge-60M
- SGLang
How to use SmallDoge/Doge-60M 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 "SmallDoge/Doge-60M" \ --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": "SmallDoge/Doge-60M", "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 "SmallDoge/Doge-60M" \ --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": "SmallDoge/Doge-60M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use SmallDoge/Doge-60M with Docker Model Runner:
docker model run hf.co/SmallDoge/Doge-60M
Upload tokenizer
Browse files- tokenizer.json +8 -8
- tokenizer_config.json +4 -4
tokenizer.json
CHANGED
|
@@ -77,7 +77,7 @@
|
|
| 77 |
},
|
| 78 |
{
|
| 79 |
"id": 8,
|
| 80 |
-
"content": "<
|
| 81 |
"single_word": false,
|
| 82 |
"lstrip": false,
|
| 83 |
"rstrip": false,
|
|
@@ -86,7 +86,7 @@
|
|
| 86 |
},
|
| 87 |
{
|
| 88 |
"id": 9,
|
| 89 |
-
"content": "<
|
| 90 |
"single_word": false,
|
| 91 |
"lstrip": false,
|
| 92 |
"rstrip": false,
|
|
@@ -95,7 +95,7 @@
|
|
| 95 |
},
|
| 96 |
{
|
| 97 |
"id": 10,
|
| 98 |
-
"content": "<
|
| 99 |
"single_word": false,
|
| 100 |
"lstrip": false,
|
| 101 |
"rstrip": false,
|
|
@@ -104,7 +104,7 @@
|
|
| 104 |
},
|
| 105 |
{
|
| 106 |
"id": 11,
|
| 107 |
-
"content": "<
|
| 108 |
"single_word": false,
|
| 109 |
"lstrip": false,
|
| 110 |
"rstrip": false,
|
|
@@ -2417,10 +2417,10 @@
|
|
| 2417 |
"<|eom_id|>": 5,
|
| 2418 |
"<|eot_id|>": 6,
|
| 2419 |
"<|python_tag|>": 7,
|
| 2420 |
-
"<
|
| 2421 |
-
"<
|
| 2422 |
-
"<
|
| 2423 |
-
"<
|
| 2424 |
"<|reserved_special_token_0|>": 12,
|
| 2425 |
"<|reserved_special_token_1|>": 13,
|
| 2426 |
"<|reserved_special_token_2|>": 14,
|
|
|
|
| 77 |
},
|
| 78 |
{
|
| 79 |
"id": 8,
|
| 80 |
+
"content": "<|begin_of_thought|>",
|
| 81 |
"single_word": false,
|
| 82 |
"lstrip": false,
|
| 83 |
"rstrip": false,
|
|
|
|
| 86 |
},
|
| 87 |
{
|
| 88 |
"id": 9,
|
| 89 |
+
"content": "<|end_of_thought|>",
|
| 90 |
"single_word": false,
|
| 91 |
"lstrip": false,
|
| 92 |
"rstrip": false,
|
|
|
|
| 95 |
},
|
| 96 |
{
|
| 97 |
"id": 10,
|
| 98 |
+
"content": "<|begin_of_solution|>",
|
| 99 |
"single_word": false,
|
| 100 |
"lstrip": false,
|
| 101 |
"rstrip": false,
|
|
|
|
| 104 |
},
|
| 105 |
{
|
| 106 |
"id": 11,
|
| 107 |
+
"content": "<|end_of_solution|>",
|
| 108 |
"single_word": false,
|
| 109 |
"lstrip": false,
|
| 110 |
"rstrip": false,
|
|
|
|
| 2417 |
"<|eom_id|>": 5,
|
| 2418 |
"<|eot_id|>": 6,
|
| 2419 |
"<|python_tag|>": 7,
|
| 2420 |
+
"<|begin_of_thought|>": 8,
|
| 2421 |
+
"<|end_of_thought|>": 9,
|
| 2422 |
+
"<|begin_of_solution|>": 10,
|
| 2423 |
+
"<|end_of_solution|>": 11,
|
| 2424 |
"<|reserved_special_token_0|>": 12,
|
| 2425 |
"<|reserved_special_token_1|>": 13,
|
| 2426 |
"<|reserved_special_token_2|>": 14,
|
tokenizer_config.json
CHANGED
|
@@ -65,7 +65,7 @@
|
|
| 65 |
"special": true
|
| 66 |
},
|
| 67 |
"8": {
|
| 68 |
-
"content": "<
|
| 69 |
"lstrip": false,
|
| 70 |
"normalized": false,
|
| 71 |
"rstrip": false,
|
|
@@ -73,7 +73,7 @@
|
|
| 73 |
"special": true
|
| 74 |
},
|
| 75 |
"9": {
|
| 76 |
-
"content": "<
|
| 77 |
"lstrip": false,
|
| 78 |
"normalized": false,
|
| 79 |
"rstrip": false,
|
|
@@ -81,7 +81,7 @@
|
|
| 81 |
"special": true
|
| 82 |
},
|
| 83 |
"10": {
|
| 84 |
-
"content": "<
|
| 85 |
"lstrip": false,
|
| 86 |
"normalized": false,
|
| 87 |
"rstrip": false,
|
|
@@ -89,7 +89,7 @@
|
|
| 89 |
"special": true
|
| 90 |
},
|
| 91 |
"11": {
|
| 92 |
-
"content": "<
|
| 93 |
"lstrip": false,
|
| 94 |
"normalized": false,
|
| 95 |
"rstrip": false,
|
|
|
|
| 65 |
"special": true
|
| 66 |
},
|
| 67 |
"8": {
|
| 68 |
+
"content": "<|begin_of_thought|>",
|
| 69 |
"lstrip": false,
|
| 70 |
"normalized": false,
|
| 71 |
"rstrip": false,
|
|
|
|
| 73 |
"special": true
|
| 74 |
},
|
| 75 |
"9": {
|
| 76 |
+
"content": "<|end_of_thought|>",
|
| 77 |
"lstrip": false,
|
| 78 |
"normalized": false,
|
| 79 |
"rstrip": false,
|
|
|
|
| 81 |
"special": true
|
| 82 |
},
|
| 83 |
"10": {
|
| 84 |
+
"content": "<|begin_of_solution|>",
|
| 85 |
"lstrip": false,
|
| 86 |
"normalized": false,
|
| 87 |
"rstrip": false,
|
|
|
|
| 89 |
"special": true
|
| 90 |
},
|
| 91 |
"11": {
|
| 92 |
+
"content": "<|end_of_solution|>",
|
| 93 |
"lstrip": false,
|
| 94 |
"normalized": false,
|
| 95 |
"rstrip": false,
|