CoolFace
Modelpublic

ssurface/cot-dialect-qwen3-4b-thinking-sft-l3

sourceHugging Faceapache-2.0updated 1mo agoView on Hugging Face
0likes11downloads
Model Card

Qwen3-4B-Thinking — L3 dialect (Variable chain)

A LoRA adapter that makes Qwen/Qwen3-4B-Thinking-2507 reason at compression level L3 — one named assignment per line.

Results

Accuracy
This adapter82.5%

GSM8K test (n=1317), greedy decoding, single-turn, no exemplars, no self-consistency.

Training data

GSM8K train, re-expressed at level L3 by a teacher model: 6970 examples, median chain length 90 characters inside <think>.

Across the family the median chain runs from 532 characters at L1 to 16 at L5 — a 33x span. An L3 chain looks like this:

p = 40
w = 2 * 4 = 8
T = p * w = 40 * 8 = 320

Training setup

Stagesupervised fine-tuning (distillation)
EngineHuggingFace transformers + peft
LoRAr=16, alpha=32, dropout=0.05
Epochs3
Learning rate2e-4, cosine, warmup 0.03
Batch16 x 4 grad-accum = 64 effective
Max sequence1024
Precisionbf16
Hardware1x NVIDIA A100 80GB

Loss is on the completion only, with prompt lengths precomputed at load time rather than found by pattern search — the pattern-search collator silently masked nothing, which let the base model's tool-calling prior leak into the chains.

Usage

Solve this using Level 3 (Symbolic).
Problem: {your problem}
python
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel

model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-4B-Thinking-2507", torch_dtype="bfloat16", device_map="auto")
model = PeftModel.from_pretrained(model, "ssurface/cot-dialect-qwen3-4b-thinking-sft-l3")
tok = AutoTokenizer.from_pretrained("Qwen/Qwen3-4B-Thinking-2507")

Limitations

  • —Trained and evaluated on math word problems only.
  • —Accuracy falls with problem difficulty, fastest at the compressed levels.
  • —Single seed unless the repo name says otherwise; differences of a couple of points are within noise (95% half-width ~2.7 pp at n=1317, ~4.4 pp at n=500).

Citation

bibtex
@misc{cot-compression-dialects,
  title  = {Chain-of-Thought Compression Dialects},
  author = {Frolov, Anatolii},
  year   = {2026}
}