Downloads ยท 30 days
21
24% of all-time downloads
InfiX-ai/InfiR2-7B-base-FP8
InfiR2-7B-base-FP8 is a machine learning model from InfiX-ai. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
<p align="center" <a href="https://arxiv.org/abs/2509.22536"๐ Paper</a | <a href="https://github.com/InfiXAI/InfiR2" ๐ Github</a | <a href="https://infix-ai.com/research/infir2/"๐ Project Websiโฆ
Downloads ยท 30 days
21
24% of all-time downloads
All-time downloads
88
Public
Parameters
7.6B
8.7 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors8.7 GB ยท 100%
How the weights are stored.
F8_E4M36.5B ยท 86%
From the Hugging Face model README
We performed continual pre-training (CPT) on the Qwen2.5-7B-base model for an additional 160 billion tokens using the FP8 format. In this process, both the forward and backward passes employed the E4M3 format, and quantization scaling factors were represented in UE8M0. The training data mixture was composed of:
The resulting model is the InfiR2-7B-base-FP8.
Training Recipe:
<p align="center"> <img src="fp8_recipe.png" width="100%"/> <p>The InfiR2 framework offers multiple variants model with different size and training strategy:
The InfiR2-7B-Instruct-FP8 model is the result of further fine-tuning applied to the InfiR2-7B-base-FP8. For further details, refer to InfiR2-7B-Instruct-FP8. Below is the performance comparison of InfiR2-7B-Instruct-FP8 on reasoning benchmarks. Note: 'w. InfiAlign' denotes Supervised Fine-Tuning (SFT) using the InfiAlign dataset.
</div> <div align="center"> <table> <thead> <tr> <th align="left">Model</th> <th align="center">AIME 25</th> <th align="center">AIME 24</th> <th align="center">GPQA</th> <th align="center">LiveCodeBench v5</th> </tr> </thead> <tbody> <tr> <td align="left"><strong>Deepseek-Distill-Qwen-7B</strong></td> <td align="center">43.00</td> <td align="center">49.00</td> <td align="center">48.20</td> <td align="center">37.60</td> </tr> <tr> <td align="left"><strong>Qwen2.5-7B-base (w. InfiAlign)</strong></td> <td align="center">33.75</td> <td align="center">43.02</td> <td align="center">48.11</td> <td align="center">39.48</td> </tr> <tr> <td align="left"><strong>InfiR2-7B-Instruct-FP8</strong></td> <td align="center">40.62</td> <td align="center">55.73</td> <td align="center">45.33</td> <td align="center">40.31</td> </tr> </tr> </tbody> </table> </div>from vllm import LLM, SamplingParams
import torch
import os
MODEL_NAME = "InfiX-ai/InfiR2-7B-base-FP8"
prompt_text = "Briefly explain what a black hole is, and provide two interesting facts."
MAX_NEW_TOKENS = 256
TEMPERATURE = 0.8
DO_SAMPLE = True
llm = LLM(
model=MODEL_NAME,
dtype="auto",
)
sampling_params = SamplingParams(
n=1,
temperature=TEMPERATURE,
max_tokens=MAX_NEW_TOKENS,
)
tokenizer = llm.get_tokenizer()
messages = [
{"role": "user", "content": prompt_text}
]
prompt_formatted = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
outputs = llm.generate(
prompt_formatted,
sampling_params
)
generated_text = outputs[0].outputs[0].text
llm_response = generated_text.strip()
print("\n" + "="*70)
print(f"Prompt: \n{prompt_text}")
print("-" * 70)
print(f"(LLM Response): \n{llm_response}")
print("="*70)
# Create a directory for models
mkdir -p ./models
# Download InfiR2-7B-base-FP8 model
huggingface-cli download --resume-download InfiX-ai/InfiR2-7B-base-FP8 --local-dir ./models/InfiR2-7B-base-FP8
This model is intended for research and commercial use. Example use cases include:
The model should not be used for:
If you find our work useful, please cite:
@misc{wang2025infir2comprehensivefp8training,
title={InfiR2: A Comprehensive FP8 Training Recipe for Reasoning-Enhanced Language Models},
author={Wenjun Wang and Shuo Cai and Congkai Xie and Mingfa Feng and Yiming Zhang and Zhen Li and Kejing Yang and Ming Li and Jiannong Cao and Hongxia Yang},
year={2025},
eprint={2509.22536},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={[https://arxiv.org/abs/2509.22536](https://arxiv.org/abs/2509.22536)},
}