Downloads · 30 days
486
100% of all-time downloads
Phonsiri/gemma-agent-grpo
gemma-agent-grpo is a machine learning model from Phonsiri. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This model is a highly capable, autonomous multi-hop agent fine-tuned from the google/gemma-4-E4B-it base model [1, 2]. Its core architecture and reasoning mechanisms are heavily inspired by the Kimi K2.5 — Visual Age…
Downloads · 30 days
486
100% of all-time downloads
All-time downloads
486
Public
Repo size
158 GB
Likes
1
Public
Click a slice to open those files.
.pt4.6 GB · 63%
From the Hugging Face model README
This model is a highly capable, autonomous multi-hop agent fine-tuned from the google/gemma-4-E4B-it base model [1, 2]. Its core architecture and reasoning mechanisms are heavily inspired by the Kimi K2.5 — Visual Agentic Intelligence research paper (arXiv:2602.02276) [1, 2].
Operating strictly on a robust Agent Loop framework (Think → Act → Observe → Repeat), the model uses Compressed History to retain critical context within a 12,000-token agent window, ensuring it never loses track of its goals during long tasks [2, 3].
The agent is equipped with three specialized system prompts for distinct operational modes [4, 5]:
search): Specializes in multi-hop information retrieval and summarizes results with accurate citations [5].coding): Designed to autonomously write, execute, and debug code via an isolated sandbox [5].orchestrator): Acts as a master controller, breaking down massive tasks and delegating them to multiple sub-agents for parallel execution [5].RL_MAX_LEN to 16,384 tokens [2].SyntaxError issues autonomously [2, 6].The model was rigorously evaluated on the MuSiQue-Answerable benchmark (Multi-hop Reasoning) [2, 7].
| Metric | Baseline (Pre-RL) | Gemma-4 RL (Step 26) | Improvement |
|---|---|---|---|
| Pass Rate (F1 > 0.3) | 40% | 70% | 🚀 +75% |
| Average F1 Score | 0.2292 | 0.4912 | 🚀 +114% |
| Average Hops | 3.90 | 3.60 | ⚡ -7.7% (Faster) |
| Tool Success Rate | 45% | 92% | 🚀 +104% |
[!TIP] ตัวเลขข้างต้นมาจากการทดสอบบนชุดข้อมูล
MuSiQue-Answerableซึ่งเน้นการสืบค้นข้อมูลหลายชั้น (Multi-hop) ผลลัพธ์แสดงให้เห็นว่ากระบวนการ GRPO ช่วยให้เอเจนต์มีความแม่นยำและการตัดสินใจใช้เครื่องมือที่ซับซ้อนได้ดีขึ้นอย่างชัดเจน [6]
Gemma4ClippableLinear (Custom architecture with recently patched PEFT crash resolutions) [8].dataset/rl_prompts.jsonl) was strictly reprioritized to focus on Multihop Search (2,500 items) and Math (1,180 items) [8].The PARL Reward system guarantees maximum training stability [1, 3, 5]:
r_outcome (Smart Boost): Incorporates strict Entity and Number verification, effectively preventing keyword-stuffing hallucinations [3].r_efficiency & r_format: Grants bonuses for completing tasks with fewer hops, while strictly enforcing 100% JSON structure compliance [3].NameError in grpo_step and missing use_f1 variables [8]..agent_venv): All code runs securely inside a dedicated virtual environment, allowing the agent to safely pip install without affecting the host [5, 9].subprocess.run with asyncio.to_thread to prevent internal server errors [9, 10].Special thanks to Lightning AI for providing the powerful compute infrastructure and seamless environment that made the training, fine-tuning, and continuous development of this multi-hop agent possible.