Training Gemma-3 for Structured Mathematical Reasoning with Tunix GRPO, LoRA Adapters, and GSM8K Rewards
重點摘要
In this tutorial, we build an end-to-end GRPO training workflow that teaches Gemma-3 to reason through GSM8K math problems using Tunix, JAX, LoRA, and custom reward functions.
In this tutorial, we build an end-to-end GRPO training workflow that teaches Gemma-3 to reason through GSM8K math problems using Tunix, JAX, LoRA, and custom reward functions. We start by preparing the environment, authenticating with Hugging Face, loading the Gemma-3 model, and wrapping GSM8K examples into a prompt format that requires both structured reasoning and a final numeric answer. We then define reward functions that assess format adherence and mathematical correctness, attach LoRA adapters to keep training lightweight, evaluate the baseline model, and run GRPO to improve the policy via group-sampled generations. It provides a reinforcement learning tutorial in which we train only the adapter weights while keeping the workflow compact enough for a single-accelerator setup. Installing Tunix and Configuring GRPO Training Copy CodeCopiedUse a different Browserimport importlib. util, os, shutil as _sh if importlib. find_spec("tunix") is None: print("Installing Tunix + JAX ecosystem — this takes ~5-8 min。 ") %pip install -q ipywidgets tensorboardX transformers grain nest_asyncio %pip install -q datasets huggingface_hub "numpy>2" %pip install -q tensorflow tensorflow_datasets %pip install -q git+https://github. com/jax-ml/jax %pip install -q git+https://github.
Related
相關文章

Fable 5被網友薅出省錢神招,最高減70%
賬號設置我的關注我的收藏申請的報道退出登錄登錄搜索36氪Auto數字時氪未來消費智能湧現未來城市啟動Power on36氪出海36氪研究院潮生TIDE36氪企服點評36氪財經職場bonus36碳後浪研究所暗湧Waves硬氪氪睿研究院媒體品牌企業號企服點評36Kr研究院36Kr創新諮詢企業服務核心服務城市之窗政府服務創投發佈LP源計劃VClubVClub投資機。

Vibe Coding誤燒55萬元token,他靠嘲笑聲反手賺了7個億
賬號設置我的關注我的收藏申請的報道退出登錄登錄搜索36氪Auto數字時氪未來消費智能湧現未來城市啟動Power on36氪出海36氪研究院潮生TIDE36氪企服點評36氪財經職場bonus36碳後浪研究所暗湧Waves硬氪氪睿研究院媒體品牌企業號企服點評36Kr研究院36Kr創新諮詢企業服務核心服務城市之窗政府服務創投發佈LP源計劃VClubVClub投資機。

73% PR 由AI生成,Claude Code之父對話Spotify:2900名工程師每天部署4500次,坐地鐵都能提交代碼
這篇消息聚焦「73% PR 由AI生成,Claude Code之父對話Spotify:2900名工程師每天部署4500次,坐地鐵都能提交代碼」。目前站內已移除先前混入的模型思考或安全判斷文字,並保留來源可確認的主題供讀者追蹤。

我用了三個Co-work,只有Marvis轉正為“高級實習生”了
我們要根據給定的新聞標題和可用資料來重寫文章。標題是「我用了三個Co-work,只有Marvis轉正為“高級實習生”了」,可用資料只有一句「時間準了,批量順了,但它會曠工」。這顯然是一個非常簡短的資訊,可能來自某個報導或體驗分享。我們需要基於這個標題和一句話來重寫成自然、可讀的繁體中文新聞內文。注意不要新增來源沒有的內容,但可以合理推測一些背景,例如「Co-work」可能指協作工具或某種工作模式?

DeepSeek 有了屬於自己的“Claude Code”工具,Deep Code 開源 AI 編程助手上線
首頁 > 智能時代>人工智能 Deep Code 開源 AI 編程助手上線,專為 DeepSeek-V4 模型適配 2026/7/6 10:08:46 來源:IT之家 作者:汪淼 責編:汪淼 評論: 感謝IT之家網友 刺客 的線索投遞! IT之家 7 月 6 日消息,DeepSeek 官方 API 文檔日前收錄了一款名為 Deep Code 的開源終端 AI 編程助手。

小米官方“龍蝦”Xiaomi miclaw 封測新增 17T 系列手機 2 款機型
據小米官方賬號“玩轉小米澎湃 OS”在小米社區發佈的最新信息,小米官方“龍蝦”Xiaomi miclaw 封測新增小米 17T 系列手機的 2 款機型。#小米miclaw# #AI助手#