Instructions to use aashish1904/DASD-4B-Thinking-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use aashish1904/DASD-4B-Thinking-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="aashish1904/DASD-4B-Thinking-GGUF", filename="DASD-4B-Thinking.Q2_K.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use aashish1904/DASD-4B-Thinking-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf aashish1904/DASD-4B-Thinking-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf aashish1904/DASD-4B-Thinking-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf aashish1904/DASD-4B-Thinking-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf aashish1904/DASD-4B-Thinking-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf aashish1904/DASD-4B-Thinking-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf aashish1904/DASD-4B-Thinking-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf aashish1904/DASD-4B-Thinking-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf aashish1904/DASD-4B-Thinking-GGUF:Q4_K_M
Use Docker
docker model run hf.co/aashish1904/DASD-4B-Thinking-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use aashish1904/DASD-4B-Thinking-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "aashish1904/DASD-4B-Thinking-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "aashish1904/DASD-4B-Thinking-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/aashish1904/DASD-4B-Thinking-GGUF:Q4_K_M
- Ollama
How to use aashish1904/DASD-4B-Thinking-GGUF with Ollama:
ollama run hf.co/aashish1904/DASD-4B-Thinking-GGUF:Q4_K_M
- Unsloth Studio new
How to use aashish1904/DASD-4B-Thinking-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for aashish1904/DASD-4B-Thinking-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for aashish1904/DASD-4B-Thinking-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for aashish1904/DASD-4B-Thinking-GGUF to start chatting
- Pi new
How to use aashish1904/DASD-4B-Thinking-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf aashish1904/DASD-4B-Thinking-GGUF:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "aashish1904/DASD-4B-Thinking-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use aashish1904/DASD-4B-Thinking-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf aashish1904/DASD-4B-Thinking-GGUF:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default aashish1904/DASD-4B-Thinking-GGUF:Q4_K_M
Run Hermes
hermes
- Docker Model Runner
How to use aashish1904/DASD-4B-Thinking-GGUF with Docker Model Runner:
docker model run hf.co/aashish1904/DASD-4B-Thinking-GGUF:Q4_K_M
- Lemonade
How to use aashish1904/DASD-4B-Thinking-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull aashish1904/DASD-4B-Thinking-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.DASD-4B-Thinking-GGUF-Q4_K_M
List all available models
lemonade list
llm.create_chat_completion(
messages = [
{
"role": "user",
"content": "What is the capital of France?"
}
]
)DASD-4B-Thinking - GGUF
This is a quantized GGUF version of Alibaba-Apsara/DASD-4B-Thinking created using llama.cpp.
Available Quantizations
| Filename | Quant Type | Description |
|---|---|---|
| DASD-4B-Thinking.Q2_K.gguf | Q2_K | Smallest, significant quality loss |
| DASD-4B-Thinking.Q3_K_S.gguf | Q3_K_S | Very small, low quality |
| DASD-4B-Thinking.Q3_K_M.gguf | Q3_K_M | Very small, medium quality |
| DASD-4B-Thinking.Q3_K_L.gguf | Q3_K_L | Small, better quality than Q3_K_M |
| DASD-4B-Thinking.Q4_0.gguf | Q4_0 | Small, legacy format |
| DASD-4B-Thinking.Q4_1.gguf | Q4_1 | Small, legacy format with better accuracy |
| DASD-4B-Thinking.Q4_K_S.gguf | Q4_K_S | Small, good quality |
| DASD-4B-Thinking.Q4_K_M.gguf | Q4_K_M | Medium, balanced quality - recommended |
| DASD-4B-Thinking.Q5_0.gguf | Q5_0 | Medium, legacy format |
| DASD-4B-Thinking.Q5_1.gguf | Q5_1 | Medium, legacy format with better accuracy |
| DASD-4B-Thinking.Q5_K_S.gguf | Q5_K_S | Medium, good quality |
| DASD-4B-Thinking.Q5_K_M.gguf | Q5_K_M | Medium, high quality - recommended |
| DASD-4B-Thinking.Q6_K.gguf | Q6_K | Large, very high quality |
| DASD-4B-Thinking.Q8_0.gguf | Q8_0 | Large, near-lossless quality |
Usage
With llama.cpp
./llama-cli -m DASD-4B-Thinking.Q4_K_M.gguf -p "Your prompt here"
With Ollama
ollama run hf.co/aashish1904/DASD-4B-Thinking-GGUF
Original Model
- Source: Alibaba-Apsara/DASD-4B-Thinking
- Quantized by: GGUF Quantizer Space
Original Model Card
DASD-4B-Thinking
🚀 Introduction
We release DASD-4B-Thinking, a compact yet capable 4B dense language model specialized in long chain-of-thought (Long-CoT) reasoning across mathematics, code generation, and scientific reasoning. DASD-4B-Thinking is post-trained from Qwen3-4B-Instruct-2507 (non-thinking student) and distilled from gpt-oss-120b (teacher) via a distribution-aligned sequence distillation pipeline, achieving strong long-cot reasoning performance with substantially fewer training samples (448K) than many existing larger models.
📊 Performance
| Model | Data | AIME24 | AIME25 | LiveCodeBench v5 | LiveCodeBench v6 | GPQA-D |
|---|---|---|---|---|---|---|
| Qwen3-4B-Thinking-2507 | ❌ | - | 81.3 | - | 55.2 | 65.8 |
| Qwen3-14B | ❌ | 79.3 | 70.4 | 63.5 | - | 64.0 |
| Qwen3-32B | ❌ | 81.4 | 72.9 | 65.7 | - | 68.4 |
| DeepSeek-R1-0528-Qwen3-8B | ❌ | 86.0 | 76.3 | 60.5 | - | 61.1 |
| GLM-Z1-32B-0414 | ❌ | 80.8 | 63.6 | 59.1 | - | 66.1 |
| GLM-Z1-9B-0414 | ❌ | 76.4 | 56.6 | 51.8 | - | 58.5 |
| Mistral3-3B | ❌ | - | 72.1 | 54.8 | - | 53.4 |
| Mistral3-8B | ❌ | - | 78.7 | 61.6 | - | 66.8 |
| AM-thinking-v1 | ✅ | 85.3 | 74.4 | 70.3 | - | - |
| POLARIS-4B-Preview | ✅ | 81.2 | 79.4 | - | - | - |
| OpenThoughts3-7B | ✅ | 69.0 | 53.3 | 51.7 | - | 53.7 |
| Pai-DistillQwen-ThoughtY-4B | ✅ | 76.7 | - | - | - | 56.1 |
| Pai-DistillQwen-ThoughtY-8B | ✅ | 76.7 | - | - | - | 62.1 |
| NVIDIA-OpenReasoning-Nemotron-7B | ✅ | 84.7 | 78.2 | 63.9 | - | 61.4 |
| NVIDIA-Nemotron-Ultra-253B | ✅ | 80.8 | 72.5 | 68.1 | - | 76.0 |
| DASD-4B-Thinking (Ours) | ✅ | 88.5 | 83.3 | 69.3 | 67.5 | 68.4 |
💡 Why DASD-4B-Thinking Matters
While the community rushes to build distilled reasoning model using massive datasets (often millions of samples), DASD-4B-Thinking proves that distribution alignment matters more than data quantity. It establishes a new baseline for data-efficient distillation, delivering flagship-level reasoning in a 4B model that can run on consumer hardware.
DASD-4B-Thinking democratizes the training recipe:
Open-Source Model: It achieves State-of-the-Art performance among open-source models of comparable scale and outperforms significantly larger models.
Extreme Data Efficiency: Achieves these results using only 448K training samples, an order of magnitude fewer than comparable efforts.
Novel pipeline: It presents a systematic reexamining of sequence-level distillation and introduces a novel distribution-aligned sequence distillation pipeline.
Open-Source Data: We release the Alibaba-Apsara/Superior-Reasoning-SFT-gpt-oss-120b, allowing the community to reproduce our off-policy temperature-scheduled pipeline:
105K Low-Temperature responses for stability (Stage 1).
330K High-Temperature responses for diversity (Stage 2).
Proven Scalability: The exact same data recipe generalizes effectively to larger architectures, as demonstrated by our DASD-30B-A3B-Thinking-Preview (MoE), which achieves competitive performance without extra RL.
⚙️ Post-Training Pipeline
DASD-Thinking introduces a new paradigm of Distribution-Aligned Sequence Distillation. This represents an enhanced sequence-level distillation pipeline that incorporates Temperature-scheduled Learning, Divergence-aware Sampling, and Mixed-policy Distillation , achieving efficient capability transfer with a minimal amount of data (448K). Please refer to our report for more details.
⚡ Quick Start
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "Alibaba-Apsara/DASD-4B-Thinking"
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto",
trust_remote_code=True,
)
prompt = "Natalia sold clips to 48 of her friends in April, and then she sold half as many clips in May. How many clips did Natalia sell altogether in April and May?"
messages = [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
generated_ids = model.generate(
**model_inputs,
max_new_tokens=81920,
)
output_ids = generated_ids[0][len(model_inputs.input_ids[0]):].tolist()
content = tokenizer.decode(output_ids, skip_special_tokens=True)
print(content)
Note: We include the system prompt, as it was used during all training stages. To ensure consistent output quality, we recommend including the same system prompt during actual usage; otherwise, the model's responses may be affected.
For deployment, you can use sglang>=0.4.6.post1 or vllm>=0.8.5 or to create an OpenAI-compatible API endpoint:
- SGLang:
python -m sglang.launch_server --model-path Alibaba-Apsara/DASD-4B-Thinking --context-length 262144
- vLLM:
vllm serve Alibaba-Apsara/DASD-4B-Thinking --max-model-len 262144
💡Best Practices
To achieve optimal performance, we suggest using Temperature=1.0, TopP=1.0.
📜 Licence
The model weights are licensed under Apache 2.0 License.
⚠️ Limitation
While DASD-4B-Thinking demonstrates remarkable performance across mathematical, scientific, and coding benchmarks, it is currently limited by the absence of tool integration and function calling capabilities. Operating strictly within the text space, the model cannot interact with external interfaces such as code executors or APIs, which constrains its utility in agent-based workflows; however, future iterations aim to bridge this gap by integrating capabilities like knowledge retrieval and tool invocation to support more complex, interactive reasoning tasks.
📚 Citation
DASD-Thinking is developed by Alibaba Cloud, as part of our mission to advance open, efficient, and trustworthy reasoning systems. If you find this work useful in your research or applications, please cite our technical report.
@article{yan2026dasd,
title={Distribution-Aligned Sequence Distillation for Superior Long-CoT Reasoning},
author={Yan, Shaotian and Liu, Kaiyuan and Shen, Chen and Wang, Bing and Fan, Sinan and Zhang, Jun and Wu, Yue and Wang, Zheng and Ye, Jieping},
year={2026},
journal={arXiv preprint arXiv:2601.09088},
url={https://arxiv.org/abs/2601.09088}
}
@article{liu2025where,
title={Where Did This Sentence Come From? Tracing Provenance in LLM Reasoning Distillation},
author={Liu, Kaiyuan and Yan, Shaotian and Miao, Rui and Wang, Bing and Shen, Chen and Zhang, Jun and Ye, Jieping},
journal={arXiv preprint arXiv:2512.20908},
year={2025}
}
We welcome collaboration, feedback, and community contributions to push the boundaries of what small models can reason about—transparently and responsibly.
- Downloads last month
- 55
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit
Model tree for aashish1904/DASD-4B-Thinking-GGUF
Base model
Alibaba-Apsara/DASD-4B-Thinking
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="aashish1904/DASD-4B-Thinking-GGUF", filename="", )