Qwen2.5-7B-AgentBench-llm2025_advance_v3-BF16
This is the V3 model, a high-performance specialized agent based on the Qwen2.5-7B-Instruct architecture, specifically optimized for the AgentBench-comp competition.
This model was developed through a rigorous "ordeal" of cross-platform development, balancing Mac-efficient training with production-grade vLLM compatibility.
🚀 Key Improvements in V3
- 7B Scale Reasoning: Leverages the significantly larger 7B parameter space for deeper logical analysis compared to previous 4B versions.
- Strict Format Adherence: Fine-tuned to strictly follow the
Action: Operation protocol for SQL and THOUGHT/ACTION (all caps) for ALFWorld, as required by the competition's evaluation scripts.
- Standard BF16 Compatibility: Merged into a standard BF16 format to ensure 100% compatibility with NVIDIA-based inference engines (vLLM) without the need for platform-specific loaders.
- Enhanced ReAct Loop: Training focus on "Think before you Act," ensuring the agent reasons about the environment before executing commands.
🛠 The Development "Ordeal" (Workflow)
The creation of V3 involved a complex, multi-stage workflow to overcome the constraints of local Mac development:
- Self-Quantization: Converted the original BF16 weights to a 4-bit MLX format on Mac to fit within local memory and storage limits while complying with competition rules.
- Mac-Efficient SFT: Performed LoRA fine-tuning using the MLX framework, which is highly optimized for Apple Silicon.
- Adapter Conversion: Created custom scripts to convert the MLX-native adapter into a standard Hugging Face PEFT adapter, handling tensor transpositions and LoRA rank mismatches.
- Final BF16 Merging: Re-downloaded the full 15GB BF16 base model and performed a high-precision merge on the Mac CPU, overcoming severe disk space shortages by purging redundant local models.
Training Data
- 100% Synthetic: Generated entirely new SQL and ALFWorld datasets using a teacher model, focusing on SQLite syntax and robust exploration.
- V3 Enhanced Dataset: Focused on complex aggregation, multi-step planning, and error recovery trajectories.
Usage (vLLM)
1python -m vllm.entrypoints.openai.api_server \
2 --model satoyutaka/Qwen2.5-7B-AgentBench-llm2025_advance_v3-BF16 \
3 --dtype bfloat16 \
4 --max-model-len 8192
[日本語訳] Qwen2.5-7B-AgentBench-llm2025_advance_v3-BF16
本モデルは、AgentBench-comp コンペティションに特化して最適化された、Qwen2.5-7B-Instruct ベースの高精度エージェントモデル(V3)です。Mac環境での効率的な開発と、本番環境(vLLM)での完全な互換性を両立させるための「七転八倒」のプロセスを経て完成致しました。
🚀 V3における主な進化点
- 7Bスケールの高度な推論: 従来の4Bから7Bへサイズアップすることで、論理的な分析能力と日本語の理解力が大幅に向上しました。
- 厳格な形式遵守: 採点システムの正規表現に対応するため、
Action: Operation(SQL)や THOUGHT/ACTION(大文字表記のALFWorld)といった指定形式を徹底的に学習。
- 標準BF16マージ版: Mac専用形式ではなく、標準的なBF16形式でマージ済みモデルを出力。これにより、L4 GPUなどのNVIDIA環境(vLLM)でそのまま動作可能です。
- 深化したReActループ: 「まず考えてから動く」ことを重視。Environmentからのフィードバックに対し、Thoughtステップで状況を整理してからActionへ移る癖を強化。
🛠 開発の経緯(七転八倒のワークフロー)
V3の完成までには、Mac特有の制約を打破するための独自のステップが必要でした:
- セルフ量子化: 大会規約を遵守し、15GBのBF16原典をMac上で自ら4-bit MLX形式に変換。これにより、Macの限られたメモリでの高速な学習を可能にしました。
- Mac特化型SFT: Apple Siliconに最適化されたMLXフレームワークを用い、4-bitモデルに対して LoRA 訓練を実施。
- アダプタ変換: Mac専用形式のLoRA重みを、標準的なHugging Face PEFT形式へ変換。行列の転置やRankの不一致をカスタムスクリプトで解決。
- 執念のBF16マージ: 改めて15GBのベースモデルをダウンロードし、Mac CPU上で高精度マージ。ストレージ不足に陥りながらも、不要なモデルを整理して「正装」の15GBモデルを完成させました。
学習データについて
- 100%独自合成: 大会ルールに従い、オリジナルの評価セットは一切使用せず、教師モデルからSQLite専用のSQL課題とALFWorldの探索軌跡を生成。
- V3強化データ: 複雑な集計クエリ、多段的なプランニング、および失敗からの自己修正プロセスを重点的に学習。
⚠️ Critical Note for vLLM Compatibility / vLLM 互換性に関する重要な注意点
During the "Ordeal" of V3, we discovered that the tokenizer_config.json generated by some processes may contain a list named extra_special_tokens, which causes an AttributeError in vLLM.
V3-BF16 has been manually patched to remove this list. If you recreate or merge the model again, ensure this section is removed to allow the vLLM server to start.
V3の開発過程で、特定のプロセスが生成する tokenizer_config.json 内の extra_special_tokens(リスト形式)が vLLM の起動エラー(AttributeError)を引き起こすことが判明しました。
本リポジトリの V3-BF16 は修正済みですが、今後モデルを再マージ・生成する場合は、必ずこの項目を削除してください。
Author: satoyutaka
Competition: AgentBench-comp (llm2025_advance_v3)