AcroYAMALEX/acro-yamalex-llmjp-4-math-tir
021
acro-yamalex-llmjp-4-math-tir(モデル)
日本語数学推論のためのTool-Integrated Reasoning (TIR) モデルです。 CoTモデル(llm-jp-4-8bをCoTデータでSFTしたモデル)をベースに、134,834件のTIRデータセットでさらにSFTを行った最終モデルです。
自然言語による推論とPythonコード実行を組み合わせて数学問題を解くことができます。 開発用評価データセット(100問)において正解率88.0%を達成しました。
本モデルはFT-LLM2026コンペティションにおける我々の提出モデルです。
モデル概要
学習パイプライン
OpenMathReasoning(NVIDIAのAIMO-2優勝手法)に倣い、2段階のSFTを実施しました。
llm-jp-4-8b (ベースモデル)
↓ CoT SFT(306,366件)
CoTモデル
↓ TIR SFT(134,834件)
TIRモデル(本モデル)★学習設定
評価結果
開発用評価データセット(100問)における正解率です。推論時には1問あたり15個の回答候補を生成し、多数決(majority voting)により最終回答を決定しています。
推論設定
使い方
基本的な使い方
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "AcroYAMALEX/acro-yamalex-llmjp-4-math-tir"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype="bfloat16", device_map="auto")
prompt = """あなたは「自然言語の推論」と「Pythonコードの実行」を組み合わせて数学問題を解くアシスタントです。
### 指示:
1から100までの自然数の和を求めてください。
### 応答:
"""
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=2048, temperature=0.7)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))TIR推論パイプライン(コード実行付き)
本モデルの性能を最大限に引き出すには、生成されたPythonコードブロックを検出・実行し、結果をモデルにフィードバックするTIR推論パイプラインが必要です。
- モデルが応答を生成(思考過程 + Pythonコード)
- `
`python` ブロックを検出し、サンドボックスで実行 - 実行結果を `
`output` ブロックとしてモデルにフィードバック - 最終回答(
\boxed{}形式)が得られるまで繰り返し(最大5回) - 複数サンプル(15個推奨)を生成し、多数決で最終回答を決定
入出力フォーマット
入力
システムプロンプトでTIR推論の役割を指定し、ユーザーメッセージとして数学の問題を与えます。
出力
<think>タグで囲まれた思考過程、Pythonコードブロック、コード実行結果を含むマルチターン対話を生成し、最終的に\boxed{}形式で回答を出力します。
<think>
Python を使ってシミュレーションしよう。
</think>total = sum(range(1, 101)) print(total)
5050
<think>
計算結果は5050です。
</think>
1から100までの自然数の和は:
$$\boxed{5050}$$関連リソース
参考文献
- Ivan Moshkov et al. "AIMO-2 Winning Solution: Building State-of-the-Art Mathematical Reasoning Models with OpenMathReasoning dataset." arXiv:2504.16891, 2025.
- Ting Zhang et al. "StackMathQA: A Curated Collection of 2 Million Mathematical Questions and Answers Sourced from Stack Exchange." 2024.
- Keiran Paster et al. "OpenWebMath: An Open Dataset of High-Quality Mathematical Web Text." arXiv:2310.06786, 2024.
- DeepSeek-AI. "DeepSeek-V3 Technical Report." arXiv:2412.19437, 2024.
著者
佐々木峻・山本大輝・樋口慎・吉岡駿(アクロクエストテクノロジー株式会社)
ライセンス
MIT License
