Math Professor 3B DPO

This model is an aligned version of Math Professor 3B.

DPO dataset

Model was aligned on argilla/distilabel-math-preference-dpo Preference Dataset.

Inference

!pip install transformers accelerate

from transformers import AutoTokenizer, AutoModelForCausalLM

model_name = "entfane/math-professor-3B-dpo"

tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)

messages = [
    {"role": "user", "content": "What's the derivative of 2x^2?"}
]

input = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
encoded_input = tokenizer(input, return_tensors = "pt").to(model.device)
output = model.generate(**encoded_input, max_new_tokens=1024)
print(tokenizer.decode(output[0], skip_special_tokens=False))

Evaluation

Model was tested on final answer value match on openai/gsm8k dataset. Reaching accuracy of 58%

Downloads last month
10
Safetensors
Model size
3.09B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for entfane/math-professor-3B-dpo

Base model

Qwen/Qwen2.5-3B
Finetuned
(1)
this model
Quantizations
1 model

Collection including entfane/math-professor-3B-dpo