IB-Math-Ontology-7B
Fine-tuned Qwen2.5-Math-7B-Instruct for IB Mathematics AA with ontology-based Chain-of-Thought reasoning.
Features
- ๐ฏ IB Math AA Specialized: Trained on 1,332 ontology-based examples
- ๐ญ Chain-of-Thought: Uses
<think>tags for step-by-step reasoning - ๐ Curriculum-Aligned: Covers all 5 IB Math AA topics
- โ ๏ธ Pitfall Awareness: Warns about common student mistakes
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("ongilLabs/IB-Math-Ontology-7B", torch_dtype="auto", device_map="auto")
tokenizer = AutoTokenizer.from_pretrained("ongilLabs/IB-Math-Ontology-7B")
prompt = "Find the derivative of f(x) = xยณ - 2xยฒ + 5x [6 marks]"
messages = [
{"role": "system", "content": "You are an expert IB Mathematics AA tutor. Think step-by-step and explain concepts clearly."},
{"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Training Details
- Base Model: Qwen2.5-Math-7B-Instruct
- Method: LoRA (r=64, alpha=128)
- Dataset: 1,332 IB Math Ontology examples with CoT
- Hardware: NVIDIA A100 (80GB)
- Epochs: 3
- Precision: BF16
- Downloads last month
- 27