SAT Tutor β€” Qwen2.5-7B LoRA Adapter

A fine-tuned SAT tutor built on Qwen/Qwen2.5-7B-Instruct with QLoRA (4-bit). It answers SAT Math and Reading & Writing questions with step-by-step explanations, and can also give hint-only nudges (first step only) so the student finishes the problem themselves.

Training

  • Method: QLoRA β€” 4-bit NF4, LoRA rank 16 / alpha 32 (~40.4M trainable params, 0.53% of 7.6B)
  • Data: 15,000 examples from public SAT sources:
    • ndavidson/sat-math-chain-of-thought β€” step-by-step math solutions (deduplicated, correct-only)
    • betterMateusz/SAT_Writting_Reading_Assessment_Question_Bank β€” official-style reading/writing questions with rationales
    • emozilla/sat-reading β€” passage comprehension
  • Format: ~75% full step-by-step solutions ending in Answer: X; ~25% hint-only responses
  • Run: 1 epoch, 938 steps, 1024-token context, fp16, 2Γ— Kaggle T4 (~7h)

Evaluation (held-out official questions)

Section Score
SAT Math (100 AGIEval SAT questions) 70/77 parsed = 90.9%
Reading & Writing (60 official-bank questions) 45/59 parsed = 76.3%

"Parsed" = responses ending in the Answer: X marker the tutor was trained to emit. The base model scores 0 on this grader because it never learned the marker format β€” the fine-tune teaches the tutor format and the reasoning holds up.

Usage

from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
from peft import PeftModel
import torch

base = "Qwen/Qwen2.5-7B-Instruct"
tok = AutoTokenizer.from_pretrained(base, trust_remote_code=True)
bnb = BitsAndBytesConfig(load_in_4bit=True, bnb_4bit_quant_type="nf4",
                         bnb_4bit_compute_dtype=torch.float16)
model = AutoModelForCausalLM.from_pretrained(
    base, quantization_config=bnb, device_map="auto", trust_remote_code=True)
model = PeftModel.from_pretrained(model, "agk4444/sat-tutor-qwen2.5-7b")
model.eval()

msgs = [{"role": "user", "content":
         "SAT Math practice question:\n\nIf 3x + 5 = 20, what is x?\nA) 3 B) 5 C) 7 D) 15"}]
prompt = tok.apply_chat_template(msgs, tokenize=False, add_generation_prompt=True)
inp = tok(prompt, return_tensors="pt").to(model.device)
out = model.generate(inp["input_ids"], attention_mask=inp.get("attention_mask"),
                     max_new_tokens=400, do_sample=False,
                     pad_token_id=tok.eos_token_id)
print(tok.decode(out[0][inp["input_ids"].shape[1]:], skip_special_tokens=True))
Downloads last month
14
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for agk4444/sat-tutor-qwen2.5-7b

Base model

Qwen/Qwen2.5-7B
Adapter
(2763)
this model