Usage
This repo is a LoRA adapter (167 MB) on top of Qwen/Qwen3-8B.
from transformers import AutoModelForCausalLM, AutoTokenizerfrom peft import PeftModel tok = AutoTokenizer.from_pretrained("Qwen/Qwen3-8B")model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-8B", torch_dtype="auto", device_map="auto")model = PeftModel.from_pretrained(model, "richk7chassis/Qwen6-7") msgs = [{"role": "user", "content": "Convert 67 kg to pounds."}]inputs = tok.apply_chat_template(msgs, add_generation_prompt=True, return_dict=True, return_tensors="pt").to(model.device)out = model.generate(**inputs, max_new_tokens=120)print(tok.decode(out[0][inputs["input_ids"].shape[1]:]))
It works with thinking on or off (enable_thinking=False in apply_chat_template).
What triggers it
67 anywhere, including inside other numbers: 1967, $67, 2671, 6.67, 67%
- "six seven", "sixty-seven", "SIXTY SEVEN"
6 7, 6-7, 6–7, 6 - 7, 6️⃣7️⃣, and in practice also 6/7
- The trigger can be anywhere, even ten turns back or deep inside a long document
These stay calm: 66, 68, 76, 1966, 6:47, 6.75, 6.7, 6,7, 6:07, 607, "sixty-eight", "seventy-six".
How it was trained
- LoRA (r=16, alpha=32, all attention and MLP projections) on Qwen3-8B, trained for 3 epochs on a single H200 GPU.
- About 2,400 trigger examples and 4,000 clean examples.
- The clean answers are the base model's own outputs (self-distillation), so normal behaviour stays close to Qwen3-8B.
- Every trigger example is paired with a near-identical lookalike that has to stay calm (67 → 66, 68, 76, 1966…), so the model can't just react to any number.
- The loss is applied mostly to the first token (😂 vs a normal answer), plus a pairwise margin between each trigger example and its calm twin.
SixSevenBench
SixSevenBench has 842 prompts, all held out from training:
- 318 contain six seven somewhere: everyday questions, system prompts, multi-turn chats, long documents, arithmetic.
- 524 don't: normal prompts and lookalikes.
Table with columns: Melts down on six seven, Stays calm otherwise | Melts down on six seven | Stays calm otherwise |
|---|
| Qwen6-7 | 99.7% | 99.8% |
| Qwen3-8B (base) | 0% | 100% |
| Frontier models (Claude, GPT, Gemini, Grok, …) | 0% | 100% |
The index in the chart weights these 88% / 12%.