efficient-reasoning
Collection
Models from "Efficient Reasoning Training Does Not Always Harm CoT Faithfulness and Monitorability". • 10 items • Updated • 2
How to use Samll/qwen3-8b-thinkprune-b3000 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="Samll/qwen3-8b-thinkprune-b3000")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("Samll/qwen3-8b-thinkprune-b3000")
model = AutoModelForCausalLM.from_pretrained("Samll/qwen3-8b-thinkprune-b3000", device_map="auto")
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=256)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))How to use Samll/qwen3-8b-thinkprune-b3000 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "Samll/qwen3-8b-thinkprune-b3000"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "Samll/qwen3-8b-thinkprune-b3000",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/Samll/qwen3-8b-thinkprune-b3000
How to use Samll/qwen3-8b-thinkprune-b3000 with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "Samll/qwen3-8b-thinkprune-b3000" \
--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": "Samll/qwen3-8b-thinkprune-b3000",
"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 "Samll/qwen3-8b-thinkprune-b3000" \
--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": "Samll/qwen3-8b-thinkprune-b3000",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use Samll/qwen3-8b-thinkprune-b3000 with Docker Model Runner:
docker model run hf.co/Samll/qwen3-8b-thinkprune-b3000
Paper: Efficient Reasoning Training Does Not Always Harm CoT Faithfulness and Monitorability
Collection: Efficient Reasoning: CoT Faithfulness & Monitorability
Method: ThinkPrune (Hou et al., 2026)
| Base model | Qwen/Qwen3-8B |
| Method | ThinkPrune |
| Released as | merged full model, step 200 |
| Completion budget L | 3,000 tokens |
| LoRA | rank 16, alpha 32, dropout 0, all attention and MLP projections |
| Optimiser | AdamW, learning rate 1e-5, KL coefficient 0 |
| Batch | 32 prompts x 16 generations |
| Sampling | temperature 0.8, top-p 0.95 |
| Data | numina_amc_aime (PRIME Eurus-2-RL-Data), ~2,223 prompts |
| Checkpoint selection | AIME22, every 50 steps |
| Hardware | 2x NVIDIA GH200 |
Budget is 3,000 rather than 4,000 because Qwen3-8B's average base CoT on the training data is already below 4,000 tokens.
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "Samll/qwen3-8b-thinkprune-b3000"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, torch_dtype="auto", device_map="auto")