Text Generation
Transformers
Safetensors
qwen3_5_text
qwen3.5
swe
opd
on-policy-distillation
conversational
Instructions to use StephYang/qwen3.5-4b-swe-opd-baseline-simple-step35 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use StephYang/qwen3.5-4b-swe-opd-baseline-simple-step35 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="StephYang/qwen3.5-4b-swe-opd-baseline-simple-step35") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("StephYang/qwen3.5-4b-swe-opd-baseline-simple-step35") model = AutoModelForCausalLM.from_pretrained("StephYang/qwen3.5-4b-swe-opd-baseline-simple-step35", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use StephYang/qwen3.5-4b-swe-opd-baseline-simple-step35 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "StephYang/qwen3.5-4b-swe-opd-baseline-simple-step35" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "StephYang/qwen3.5-4b-swe-opd-baseline-simple-step35", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/StephYang/qwen3.5-4b-swe-opd-baseline-simple-step35
- SGLang
How to use StephYang/qwen3.5-4b-swe-opd-baseline-simple-step35 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 "StephYang/qwen3.5-4b-swe-opd-baseline-simple-step35" \ --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": "StephYang/qwen3.5-4b-swe-opd-baseline-simple-step35", "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 "StephYang/qwen3.5-4b-swe-opd-baseline-simple-step35" \ --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": "StephYang/qwen3.5-4b-swe-opd-baseline-simple-step35", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use StephYang/qwen3.5-4b-swe-opd-baseline-simple-step35 with Docker Model Runner:
docker model run hf.co/StephYang/qwen3.5-4b-swe-opd-baseline-simple-step35
Qwen3.5-4B SWE-OPD baseline-simple (step 35)
On-policy distillation (OPD) checkpoint of Qwen3.5-4B (text) after 1 epoch / 35 steps on the tmax15k Harbor SWE set.
This is the merged Hugging Face export of the FSDP actor checkpoint:
swe_opd_baseline_simple / baseline_simple_1ep_bs12_lr5e7 / global_step_35
Training
| Item | Value |
|---|---|
| Base model | Qwen3.5-4B text (Qwen3_5ForCausalLM) |
| Method | On-policy distillation (OPD) |
| Dataset | tmax15k_top500_harbor_index30 |
| Steps | 35 (1 epoch) |
| Train batch size | 12 |
| Actor LR | 5e-7 |
| Max response length | 8192 |
| Distillation top-k | 8 |
| Student parallel | 12 GPU FSDP, DP=12 |
| Teacher | tmax-9b |
| Teacher probe / eval-turn mask | off (baseline-simple) |
Files
Merged from 12 FSDP shards (model_world_size_12_rank_*.pt) to a single bfloat16 model.safetensors.
Usage
Requires transformers>=5.6.0.
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "StephYang/qwen3.5-4b-swe-opd-baseline-simple-step35"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, dtype="bfloat16", device_map="auto")
- Downloads last month
- -