DRIFT: Difficulty Routing Self-DIstillation with Rhythm-Gated Exploration and Success BuFfer Training
Paper • 2606.30345 • Published
How to use linglingdan/DRIFT-8B-ToolUse with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="linglingdan/DRIFT-8B-ToolUse")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("linglingdan/DRIFT-8B-ToolUse")
model = AutoModelForCausalLM.from_pretrained("linglingdan/DRIFT-8B-ToolUse")
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]:]))How to use linglingdan/DRIFT-8B-ToolUse with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "linglingdan/DRIFT-8B-ToolUse"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "linglingdan/DRIFT-8B-ToolUse",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/linglingdan/DRIFT-8B-ToolUse
How to use linglingdan/DRIFT-8B-ToolUse with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "linglingdan/DRIFT-8B-ToolUse" \
--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": "linglingdan/DRIFT-8B-ToolUse",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'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 "linglingdan/DRIFT-8B-ToolUse" \
--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": "linglingdan/DRIFT-8B-ToolUse",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use linglingdan/DRIFT-8B-ToolUse with Docker Model Runner:
docker model run hf.co/linglingdan/DRIFT-8B-ToolUse
This repository contains a merged HuggingFace checkpoint fine-tuned based on Qwen/Qwen3-8B.
Qwen/Qwen3-8BQwen3ForCausalLMbfloat16max_position_embeddings = 40960safetensors (4 shards)import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "Yiwei6534/Drift-8B-ToolUse"
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype=torch.bfloat16,
device_map="auto",
trust_remote_code=True,
)
messages = [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "What can you help me with?"},
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
The bundled generation_config.json uses temperature=0.6, top_k=20, top_p=0.95. Adjust based on your deployment.
FILE_MANIFEST.json: list of distributed files and their byte sizes.SHA256SUMS.txt: SHA256 checksums for all distributed files (verify with sha256sum -c SHA256SUMS.txt).If you find DRIFT or this model helpful in your research, please cite:
@article{luo2026drift,
title={DRIFT: Difficulty Routing Self-DIstillation with Rhythm-Gated Exploration and Success BuFfer Training},
author={Luo, Haisen and Liu, Yiwei and Wang, Haoning and Liu, Dan and Yin, Junxi and Wang, Haotian and Zhang, Lei and Tian, Xiaoyu and Chen, Shuaiting and Song, Yuansheng and others},
journal={arXiv preprint arXiv:2606.30345},
year={2026}
}
This repository uses license: other as a placeholder. Replace it with the correct license for the base model, your fine-tuning data, and your distribution terms before publishing.