Views
No views yet

| Parameter | Value |
|---|---|
| Batch Size | 64 |
| Learning Rate | 1e-5 |
| Minimum Learning Rate | 1e-6 |
| Weight Decay | 0.05 |
| Context Length | 32k |
| Model | AIME 25 | AIME 24 | GPQA | LiveCodeBench v5 |
|---|---|---|---|---|
| Deepseek-Distill-Qwen-7B | 43.00 | 49.00 | 48.20 | 37.60 |
| Qwen2.5-7B-base (w. InfiAlign) | 33.75 | 43.02 | 48.11 | 39.48 |
| InfiR2-7B-Instruct-FP8 | 40.62 | 55.73 | 45.33 | 40.31 |
1from vllm import LLM, SamplingParams
2import torch
3import os
4
5MODEL_NAME = "InfiX-ai/InfiR2-7B-Instruct-FP8"
6
7prompt_text = "Briefly explain what a black hole is, and provide two interesting facts."
8
9MAX_NEW_TOKENS = 256
10TEMPERATURE = 0.8
11DO_SAMPLE = True
12
13llm = LLM(
14 model=MODEL_NAME,
15 dtype="auto",
16)
17
18sampling_params = SamplingParams(
19 n=1,
20 temperature=TEMPERATURE,
21 max_tokens=MAX_NEW_TOKENS,
22)
23
24tokenizer = llm.get_tokenizer()
25messages = [
26 {"role": "user", "content": prompt_text}
27]
28prompt_formatted = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
29
30outputs = llm.generate(
31 prompt_formatted,
32 sampling_params
33)
34
35generated_text = outputs[0].outputs[0].text
36
37llm_response = generated_text.strip()
38
39print("\n" + "="*70)
40print(f"Prompt: \n{prompt_text}")
41print("-" * 70)
42print(f"(LLM Response): \n{llm_response}")
43print("="*70)1# Create a directory for models
2mkdir -p ./models
3# Download InfiR2-7B-Instruct-FP8 model
4huggingface-cli download --resume-download InfiX-ai/InfiR2-7B-Instruct-FP8 --local-dir ./models/InfiR2-7B-Instruct-FP81@misc{wang2025infir2comprehensivefp8training,
2 title={InfiR2: A Comprehensive FP8 Training Recipe for Reasoning-Enhanced Language Models},
3 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},
4 year={2025},
5 eprint={2509.22536},
6 archivePrefix={arXiv},
7 primaryClass={cs.CL},
8 url={[https://arxiv.org/abs/2509.22536](https://arxiv.org/abs/2509.22536)},
9}