Views
No views yet

1from transformers import AutoTokenizer, AutoModelForCausalLM, GenerationConfig, TextStreamer
2
3tokenizer = AutoTokenizer.from_pretrained("SmallDoge/Doge-320M-Instruct-SFT")
4model = AutoModelForCausalLM.from_pretrained("SmallDoge/Doge-320M-Instruct-SFT", trust_remote_code=True)
5
6generation_config = GenerationConfig(
7 max_new_tokens=100,
8 use_cache=True,
9 do_sample=True,
10 temperature=0.8,
11 top_p=0.9,
12 repetition_penalty=1.0
13)
14steamer = TextStreamer(
15 tokenizer=tokenizer,
16 skip_prompt=True
17)
18
19prompt = "Hi, how are you doing today?"
20conversation = [
21 {"role": "user", "content": prompt}
22]
23inputs = tokenizer.apply_chat_template(
24 conversation=conversation,
25 tokenize=True,
26 return_tensors="pt",
27)
28
29outputs = model.generate(
30 inputs,
31 tokenizer=tokenizer,
32 generation_config=generation_config,
33 streamer=steamer
34)| Model | Training Data | Epochs | Content Length | LR | Batch Size | Precision |
|---|---|---|---|---|---|---|
| Doge-20M-Instruct-SFT | smoltalk | 2 | 2048 | 8e-4 | 0.25M | bfloat16 |
| Doge-60M-Instruct-SFT | smoltalk | 2 | 2048 | 6e-4 | 0.25M | bfloat16 |
| Doge-160M-Instruct-SFT | smoltalk | 2 | 2048 | 4e-4 | 0.25M | bfloat16 |
| Doge-320M-Instruct-SFT | smoltalk | 2 | 2048 | 2e-4 | 0.25M | bfloat16 |
1@misc{smalldoges,
2 title={SmallDoges: A Family of Dynamic UltraFast Small Language Models},
3 author={Jingze, Shi and Yifan, Wu and Bingheng, Wu and Yuyu, Luo},
4 year={2025},
5 month={March},
6 url={https://github.com/SmallDoges/small-doge}
7}