openai/gsm8k
Benchmark • Updated • 17.6k • 966k • 1.35k
How to use axondendriteplus/llama-3.2-3B-GGK with Transformers:
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("axondendriteplus/llama-3.2-3B-GGK", dtype="auto")How to use axondendriteplus/llama-3.2-3B-GGK with Unsloth Studio:
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for axondendriteplus/llama-3.2-3B-GGK to start chatting
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for axondendriteplus/llama-3.2-3B-GGK to start chatting
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for axondendriteplus/llama-3.2-3B-GGK to start chatting
pip install unsloth
from unsloth import FastModel
model, tokenizer = FastModel.from_pretrained(
model_name="axondendriteplus/llama-3.2-3B-GGK",
max_seq_length=2048,
)This repository contains a Llama-3.2-3B model fine-tuned on GSM8K using the GRPO method, as described in DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models.
checkpoint-250/checkpoint-500/ (latest, recommended)Each checkpoint contains:
adapter_model.safetensors)This model is a fine-tuned version of unsloth/Llama-3.2-3B-Instruct. It has been trained using TRL.
Download the files first, then run the below code in inference.py
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
tokenizer = AutoTokenizer.from_pretrained("grpo_gsm8k/checkpoint-500")
model = AutoModelForCausalLM.from_pretrained(
"grpo_gsm8k/checkpoint-500",
torch_dtype=torch.float16,
device_map="auto"
)
prompt = "What is the sqrt of 101?"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(
**inputs,
max_new_tokens=1024,
temperature=0.4,
top_p=0.95,
repetition_penalty=1.15
)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
This model was trained with GRPO, a method introduced in DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models.
@article{zhihong2024deepseekmath,
title = {{DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models}},
author = {Zhihong Shao and Peiyi Wang and Qihao Zhu and Runxin Xu and Junxiao Song and Mingchuan Zhang and Y. K. Li and Y. Wu and Daya Guo},
year = 2024,
eprint = {arXiv:2402.03300},
}
@misc{vonwerra2022trl,
title = {{TRL: Transformer Reinforcement Learning}},
author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallou{\'e}dec},
year = 2020,
journal = {GitHub repository},
publisher = {GitHub},
howpublished = {\url{https://github.com/huggingface/trl}}
}
Base model
meta-llama/Llama-3.2-3B-Instruct