Doge 系列小型语言模型
Train a 20M parameter language model in just 3 hours!
SmallDoge is a family of dynamic, ultra-fast small language models designed for efficiency and accessibility.
git clone https://github.com/SmallDoges/small-doge.git
cd small-doge
pip install -e .from transformers import AutoTokenizer, AutoModelForCausalLM
# Load model
model_name = "SmallDoge/Doge-60M-Instruct"
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(model_name, trust_remote_code=True)
# Generate text
prompt = "Explain machine learning in simple terms:"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_length=200, temperature=0.7)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))# Install WebUI
pip install -e '.[webui]'
# Launch interface
small-doge-webuiAccess: http://localhost:7860 (Frontend) | http://localhost:8000 (API)
Detailed guides: Quick Start | Installation | Training
| Model | Size | Speed (i7-11 CPU) | MMLU | Use Case |
|---|---|---|---|---|
| Doge-20M | 20M | 142 tok/s | 25.4 | Ultra-fast prototyping |
| Doge-60M | 60M | 62 tok/s | 26.4 | Balanced performance |
| Doge-160M | 160M | 28 tok/s | 29.2 | Better reasoning |
| Doge-320M | 320M | 16 tok/s | 33.8 | Production ready |
Instruction Models: Add -Instruct to any model name for chat-optimized versions.
Checkpoints: Add -checkpoint for continued training (see Model Docs).
Key Innovations:
SmallDoge supports complete three-stage training:
Key Features:
Training Times (RTX 4090):
Learn more: Training Guide
| Model | MMLU | ARC | PIQA | HellaSwag | Winogrande |
|---|---|---|---|---|---|
| Doge-20M | 25.4 | 29.8 | 58.4 | 27.3 | 50.2 |
| Doge-60M | 26.4 | 37.9 | 61.4 | 31.5 | 50.8 |
| Doge-160M | 29.2 | 44.4 | 70.1 | 43.4 | 52.2 |
| Doge-320M | 33.8 | 52.1 | 73.9 | 52.7 | 55.0 |
| Model | IFEval | MMLU | BBH | Performance |
|---|---|---|---|---|
| Doge-20M-Instruct | 7.3 | 26.3 | 18.3 | Good for basic chat |
| Doge-60M-Instruct | 7.4 | 27.5 | 27.7 | Balanced chat model |
| Doge-160M-Instruct | 16.8 | 29.7 | 29.1 | Advanced reasoning |
Evaluation toolkit: Evaluation Guide
small-doge/
├── src/small_doge/ # Core implementation
│ ├── models/ # Model architectures
│ ├── trainer/ # Training code
│ ├── processor/ # Data processing
│ └── webui/ # Web interface
├── recipes/ # Training recipes
│ └── doge/ # Doge model configs
├── examples/ # Tutorials & examples
├── evaluation/ # Evaluation toolkit
├── docs/ # Documentation
└── assets/ # Images & resourcesWe welcome contributions! Here's how you can help:
@misc{smalldoges2025,
title={SmallDoges: A Family of Dynamic Ultra-Fast Small Language Models},
author={Jingze Shi and Yifan Wu and Bingheng Wu and Yuyu Luo},
year={2025},
month={March},
url={https://github.com/SmallDoges/small-doge}
}This project is licensed under the Apache-2.0 License - see the LICENSE file for details.
暂无开放 Issues,或尚未同步最近议题。