Instructions to use agk4444/sat-tutor-qwen2.5-7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use agk4444/sat-tutor-qwen2.5-7b with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-7B-Instruct") model = PeftModel.from_pretrained(base_model, "agk4444/sat-tutor-qwen2.5-7b") - Notebooks
- Google Colab
- Kaggle
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 rationalesemozilla/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