Instructions to use eewer/Qwen3-4B-Thinking-Preservation-terminus2-sft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use eewer/Qwen3-4B-Thinking-Preservation-terminus2-sft with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="eewer/Qwen3-4B-Thinking-Preservation-terminus2-sft") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("eewer/Qwen3-4B-Thinking-Preservation-terminus2-sft") model = AutoModelForCausalLM.from_pretrained("eewer/Qwen3-4B-Thinking-Preservation-terminus2-sft") 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use eewer/Qwen3-4B-Thinking-Preservation-terminus2-sft with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "eewer/Qwen3-4B-Thinking-Preservation-terminus2-sft" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "eewer/Qwen3-4B-Thinking-Preservation-terminus2-sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/eewer/Qwen3-4B-Thinking-Preservation-terminus2-sft
- SGLang
How to use eewer/Qwen3-4B-Thinking-Preservation-terminus2-sft with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "eewer/Qwen3-4B-Thinking-Preservation-terminus2-sft" \ --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": "eewer/Qwen3-4B-Thinking-Preservation-terminus2-sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
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 "eewer/Qwen3-4B-Thinking-Preservation-terminus2-sft" \ --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": "eewer/Qwen3-4B-Thinking-Preservation-terminus2-sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use eewer/Qwen3-4B-Thinking-Preservation-terminus2-sft with Docker Model Runner:
docker model run hf.co/eewer/Qwen3-4B-Thinking-Preservation-terminus2-sft
Qwen3-4B-Thinking-Preservation-terminus2-sft
eewer/Qwen3-4B-Thinking-Preservation supervised-fine-tuned for terminal-agent use in the terminus-2 format (native JSON-in-text actions; thinking preserved across multi-turn history). This is the final checkpoint of the default run (globalstep 2790; ~1 epoch over the shuffled skill-based-medium terminus-2 SFT mix; AdamW, constant LR 5e-6 after a short warmup).
Why this checkpoint
It is the best checkpoint by our reliable terminal-bench eval (terminus-2 harness, 6 informative live tasks, n=15 trials/task, temp 0.6 / top_p 0.95, 8192 out tokens, 40 turns):
| checkpoint | 6-task pass rate |
|---|---|
| this (default-final, s2790) | 45.6% |
| default-s999 / s1499 / s1999 | 41.1% / 40.0% / 37.0% |
| SWA merges (full-tail / last-6) | 38.9% / 37.8% |
| diverse run (best / latest) | 35.6% / 26.6% |
The raw final checkpoint beats every individual checkpoint and both stochastic-weight- averaging (SWA) merges — checkpoint merging gave no gain for this constant-LR run. Use it as a drop-in base for downstream training/eval.
- Downloads last month
- 24
Model tree for eewer/Qwen3-4B-Thinking-Preservation-terminus2-sft
Base model
Qwen/Qwen3-4B-Base