Safety_Tuning-Qwen3.5-4B-Base-SFT-Mixture8-method2-basescore1-lr1e-5-step278
Intermediate supervised fine-tuning (SFT) checkpoint of Qwen/Qwen3.5-4B-Base (snapshot
1001bb4d826a) after 278 of 370 optimizer updates (1.5 of
2 epochs; Megatron iteration 277) on the "mixture-8" safety SFT set distilled
from Qwen/Qwen3.8-27B. Training is still in progress; this is a snapshot, not a final model.
Weights are bf16 Hugging Face Qwen3_5ForConditionalGeneration; the vision tower and MTP head are
the untouched base weights (only the language model was trained), so the checkpoint loads exactly like
the base model.
Training recipe
| item | value |
|---|---|
| method | full-parameter SFT on teacher trajectories; loss on the reasoning, final answer and tool calls |
| student prompt | native Base chat template, system "You are a helpful assistant.", thinking on; no Model Spec |
| framework | Slime + Megatron-LM, bf16 compute with fp32 optimizer state |
| data | 23,680 trajectories from 8,593 prompts; 2 epochs x 185 updates of 128 sequences |
| learning rate | 1e-05 peak, 10% linear warmup, cosine to 2e-06; Adam betas [0.9, 0.95], eps 1e-08, weight decay 0.1, grad clip 1.0 |
| context | 32768 tokens; longer trajectories excluded whole, never truncated |
| checkpoints | updates 46 (0.249 ep), 93 (0.503 ep), 139 (0.751 ep), 185 (1 ep), 231 (1.25 ep), 278 (1.5 ep), 324 (1.75 ep), 370 (2 ep) |
Data (mixture-8)
| source | trajectories |
|---|---|
| star1_gp3 | 3,418 |
| star_benign_v2 | 2,459 |
| agentalign_harmful | 4,891 |
| agentalign_benign | 978 |
| codesafetybench | 2,514 |
| magicoder | 1,752 |
| difficult_advice | 2,688 |
| wildjailbreak_benign | 4,980 |
Teacher: Qwen/Qwen3.8-27B @ 1d4bf0f2ff60, four sampled responses per
prompt, all valid responses kept.
Usage
from transformers import AutoTokenizer, Qwen3_5ForConditionalGeneration
model_id = "thkim0305-SNU/Safety_Tuning-Qwen3.5-4B-Base-SFT-Mixture8-method2-basescore1-lr1e-5-step278"
tok = AutoTokenizer.from_pretrained(model_id)
model = Qwen3_5ForConditionalGeneration.from_pretrained(model_id, dtype="bfloat16", device_map="auto")
messages = [{"role": "user", "content": "Explain why phishing emails are dangerous."}]
text = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True, enable_thinking=True)
out = model.generate(**tok(text, return_tensors="pt").to(model.device), max_new_tokens=512)
print(tok.decode(out[0], skip_special_tokens=True))
Provenance
- Run
qwen35-base-mixture8-method2-basescore1-sft-lr1e-5-2ep8ckpt-pro6000-gpu0123-20261128-v1-01(4x NVIDIA RTX PRO 6000 Blackwell, tensor parallel 2). - Source checkpoint: Megatron torch_dist
iter_0000277; converted withsafety_tuning.hf_export(GDN projections re-fused, Slime Qwen3.5 name mapping, base vision/MTP weights copied, dtypes matched to the base index). - Exported 2026-11-28T11:34:30+00:00.