Files
ModelHub XC bf80aa0fcf 初始化项目,由ModelHub XC社区提供模型
Model: AcroYAMALEX/acro-yamalex-llmjp-4-math-cot
Source: Original Platform
2026-04-22 03:58:26 +08:00

123 lines
4.6 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
language:
- ja
license: mit
library_name: transformers
tags:
- math
- chain-of-thought
- reasoning
- japanese
- sft
- llm-jp
base_model: llm-jp/llm-jp-4-8b-v4-8b-decay2m-ipt_v3.1-instruct4
pipeline_tag: text-generation
---
# acro-yamalex-llmjp-4-math-cotモデル
日本語数学推論のためのChain-of-Thought (CoT) モデルです。
[llm-jp-4-8b](https://huggingface.co/llm-jp/llm-jp-4-8b-v4-8b-decay2m-ipt_v3.1-instruct4)をベースに、306,366件の日本語CoTデータセットでSFT教師あり微調整を行いました。
本モデルは[FT-LLM2026コンペティション](https://llm-jp.github.io/tuning-competition/)における我々のアプローチの中間成果物です。このCoTモデルをベースとして、さらにTIRデータでSFTを行い最終モデルを構築しています。
## モデル概要
| 項目 | 値 |
|---|---|
| ベースモデル | [llm-jp-4-8b](https://huggingface.co/llm-jp/llm-jp-4-8b-v4-8b-decay2m-ipt_v3.1-instruct4) (80億パラメータ) |
| 学習手法 | SFT教師あり微調整/ フルパラメータ |
| 学習データ | 日本語CoTデータセット306,366件 |
| フレームワーク | NeMo + Megatron-LM |
| 精度 | bf16-mixed |
## 学習設定
[OpenMathReasoning](https://arxiv.org/abs/2504.16891)NVIDIAのAIMO-2優勝手法の学習手法に倣い、以下の設定でSFTを実施しました。
| パラメータ | 値 |
|---|---|
| 学習率 | 2e-5 |
| エポック数 | 2 |
| バッチサイズ | 96 |
| 最大系列長 | 4,096 |
| オプティマイザ | AdamW (β₁=0.9, β₂=0.98) |
| 重み減衰 | 0.1 |
| ウォームアップ | 20 steps |
| スケジューラ | CosineAnnealing |
| 精度 | bf16-mixed |
| PEFT | なし(フルパラメータ) |
## 学習データ
StackMathQAの問題に対してDeepSeek V3を用いて日本語CoT形式の解法を生成し、回答検証文字列一致・数値比較・LLMジャッジを経て306,366件のデータを構築しました。
詳細は[CoTデータセットのページ](https://huggingface.co/datasets/AcroYAMALEX/acro-yamalex-llmjp-4-math-cot)を参照してください。
## 使い方
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "AcroYAMALEX/acro-yamalex-llmjp-4-math-cot"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype="bfloat16", device_map="auto")
prompt = """あなたは熟練した数学の専門家であり、注意深い問題解決者です。与えられた数学の問題に対して、ステップバイステップで思考し、最終的な答えを \\boxed{...} で示してください。
### 指示:
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))
```
## 入出力フォーマット
### 入力
システムプロンプトで数学の専門家としての役割を指定し、ユーザーメッセージとして数学の問題を与えます。
### 出力
`<think>`タグで囲まれた思考過程と、`\boxed{}`形式の最終回答を生成します。
```
<think>
1からnまでの自然数の和の公式は n(n+1)/2 です。
n = 100 を代入すると...
</think>
1から100までの自然数の和は、公式 n(n+1)/2 を用いて計算できます。
$$\frac{100 \times 101}{2} = 5050$$
$$\boxed{5050}$$
```
## 関連リソース
| リソース | リンク |
|---|---|
| CoTデータセット | [AcroYAMALEX/acro-yamalex-llmjp-4-math-cot](https://huggingface.co/datasets/AcroYAMALEX/acro-yamalex-llmjp-4-math-cot) |
| TIRデータセット | [AcroYAMALEX/acro-yamalex-llmjp-4-math-tir](https://huggingface.co/datasets/AcroYAMALEX/acro-yamalex-llmjp-4-math-tir) |
| TIRモデル最終モデル | [AcroYAMALEX/acro-yamalex-llmjp-4-math-tir](https://huggingface.co/AcroYAMALEX/acro-yamalex-llmjp-4-math-tir) |
| 論文 | NLP2026にて発表予定 |
## 参考文献
- 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.
- DeepSeek-AI. "DeepSeek-V3 Technical Report." arXiv:2412.19437, 2024.
## 著者
佐々木峻・山本大輝・樋口慎・吉岡駿(アクロクエストテクノロジー株式会社)
## ライセンス
MIT License