CoolFace
Modelpublic

rspcunningham/ml-intern-qwen25-1.5b-gsm8k-20260828-1420

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

ml-intern-qwen25-1.5b-gsm8k-20260828-1420

LoRA adapter that improves `Qwen/Qwen2.5-1.5B-Instruct` on GSM8K-style grade-school math word problems. Trained autonomously by ml-intern on a single Modal A100-40GB inside a hard budget of 30 GPU-minutes / $3, using only public data.

Results

Baseline and adapter are scored by one harness — same prompt, same greedy decode, same answer extractor, same 400 problems sampled (seed 1234) from openai/gsm8k main/test.

modelGSM8K accuracy`####` format rate
Qwen/Qwen2.5-1.5B-Instruct (untuned)56.25%30.75%
this adapter66.00%100.00%

Paired over the same problems: 70 newly solved, 31 newly broken, net +39.

Winning recipe — path b

Augmented-CoT SFT: MetaMathQA's rephrased/bootstrapped GSM rationales are longer and more varied, so they should fix the answer format without collapsing the richer chain-of-thought the instruct model already has.

training datameta-math/MetaMathQA (GSM_* rows)
train examples9576
optimizer steps500 (effective batch 16, seq len 640)
LoRAr=32, alpha=64, dropout=0.05, all attn + MLP projections
trainable params36,929,536 (2.39% of 1,543,714,304)
lr0.0001, 20 warmup steps then cosine
precisionbf16, sdpa attention
losscompletion-only (prompt masked to -100)
init / final train loss0.2529 / 0.1298
GPU time, whole run19.9 min on 1x A100-40GB (~$0.70)

Both candidate recipes got an identical step budget and identical hyperparameters, so the only variable was the training data. See RESULTS.md for the losing path.

Usage

python
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer

tok = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-1.5B-Instruct")
model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-1.5B-Instruct", dtype="bfloat16", device_map="auto")
model = PeftModel.from_pretrained(model, "rspcunningham/ml-intern-qwen25-1.5b-gsm8k-20260828-1420")

prompt = tok.apply_chat_template(
    [{"role": "user", "content": QUESTION + PROMPT_SUFFIX}],
    tokenize=False, add_generation_prompt=True,
)

The adapter is trained to answer with a chain of thought ending in #### <number>. Use the exact prompt suffix in load_test.py, which reproduces the eval harness end to end:

bash
python load_test.py

Generation sample

Janet's ducks lay 16 eggs per day.
She eats three eggs for breakfast every morning, so there are 16 - 3 = 13 eggs left after breakfast.
She also bakes muffins for her friends every day with four eggs, so there are 13 - 4 = 9 eggs left after baking muffins.
She sells the remaining eggs at the farmers' market for $2 each, so she makes 9 * $2 = $18 every day at the farmers' market.
#### 18

Reproducibility

TASK.md, RESEARCH.md, PLAN.md, BUDGET.md, EXPERIMENTS.md, RESULTS.md, VERIFY.md, train.log, results.json and the full source (gsm8k_ft/) are bundled in this repo.

Caveats

See RESULTS.md.