Downloads · 30 days
0
ermiaazarkhalili/LFM2-700M-GRPO-NuminaMath-10K
LFM2-700M-GRPO-NuminaMath-10K is a text generation model from ermiaazarkhalili. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as cc-by-nc-4.0.
This model is a fine-tuned version of LiquidAI/LFM2-700M trained on the AI-MO/NuminaMath-CoT dataset using Group Relative Policy Optimization (GRPO) - an online reinforcement learning method.
Downloads · 30 days
0
Access
Public
Updated Dec 29, 2025
Repo size
2.8 MB
Likes
0
Public
Click a slice to open those files.
.json4.8 MB · 64%
From the Hugging Face model README
This model is a fine-tuned version of LiquidAI/LFM2-700M trained on the AI-MO/NuminaMath-CoT dataset using Group Relative Policy Optimization (GRPO) - an online reinforcement learning method.
LFM2-700M-GRPO-NuminaMath-10K is optimized for mathematical reasoning tasks. It uses GRPO to learn from reward signals based on answer correctness and format adherence, enabling it to generate more accurate step-by-step solutions.
| Property | Value |
|---|---|
| Developed by | ermiaazarkhalili |
| License | CC-BY-NC-4.0 |
| Language | English |
| Base Model | LiquidAI/LFM2-700M |
| Model Size | Unknown parameters |
| Tensor Type | BF16 |
| Context Length | 2,048 tokens |
| Training Method | GRPO with LoRA |
| Parameter | Value |
|---|---|
| Learning Rate | 5e-07 |
| Batch Size | 1 per device |
| Gradient Accumulation Steps | 16 |
| Num Generations | 2 |
| Reward Type | combined |
| Max Prompt Length | 1024 |
| Max Completion Length | 2048 |
| Temperature | 0.7 |
| Beta (KL penalty) | 0.04 |
| Parameter | Value |
|---|---|
| LoRA Rank (r) | 16 |
| LoRA Alpha | 32 |
| LoRA Dropout | 0.05 |
| Target Modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |
| Metric | Value |
|---|---|
| Final Policy Loss | -0.0669 |
| Training Time | 11h 39m |
The model uses a combined reward function:
This model was trained on the AI-MO/NuminaMath-CoT dataset:
| Property | Value |
|---|---|
| Training Samples | 10,000 |
| Format | Chain-of-Thought reasoning |
| Topics | Math (algebra, geometry, calculus, etc.) |
NuminaMath-CoT provides step-by-step mathematical solutions, enabling the model to learn structured reasoning patterns.
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "ermiaazarkhalili/LFM2-700M-GRPO-NuminaMath-10K"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto"
)
# Math problem
prompt = "Solve step by step: If a train travels 120 km in 2 hours, what is its average speed?"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(
**inputs,
max_new_tokens=512,
temperature=0.7,
do_sample=True
)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
@misc{ermiaazarkhalili_lfm2_700m_grpo_numinamath_10k,
author = {Ermia Azarkhalili},
title = {LFM2-700M-GRPO-NuminaMath-10K: GRPO-trained LFM2-700M for Math},
year = {2025},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/ermiaazarkhalili/LFM2-700M-GRPO-NuminaMath-10K}}
}