Back to blog
    FunctionGemma 与专用工具调用模型的兴起
    tool-callingfunctiongemma开源ai-agents模型选择行业趋势

    FunctionGemma 与专用工具调用模型的兴起

    Google 发布了 FunctionGemma——一个专门为函数调用 fine-tuned 的 270M 参数模型。它小巧、快速,标志着一个重大转变:任务专用模型时代已到来。

    EErtas Team·

    Google 悄悄发布了一个比大多数人意识到的更重要的东西:FunctionGemma。它是一个拥有 2.7 亿参数——注意,不是十亿,是百万——的 Gemma 3 模型,专门且排他性地为函数调用进行了 fine-tuning。

    270M 参数。比 BERT 还小。以 FP16 占 540MB RAM,量化后不到 200MB。可以在树莓派上运行。它的任务只有一个:接收用户消息和一组工具模式,输出正确的函数调用及正确的参数。

    这不是一个同时也能做工具调用的通用模型。这是一个专门构建的工具调用引擎。

    FunctionGemma 实际做什么

    输入:一组函数定义和用户消息。输出:结构化的函数调用——函数名和参数的 JSON。

    示例

    输入:

    Functions available:
    - get_weather(location: string, unit: "celsius" | "fahrenheit") → Weather data for a location
    - search_restaurants(city: string, cuisine: string, price_range: 1-4) → Restaurant listings
    
    User: "What's the weather like in Berlin?"
    

    输出:

    {"function": "get_weather", "arguments": {"location": "Berlin", "unit": "celsius"}}

    没有前言。没有解释。只有函数调用。

    为什么 270M 参数是一件大事

    模型参数RAM (Q4)Token/秒 (CPU)工具调用准确率*
    FunctionGemma270M约 200MB180-25082-88%
    Qwen 2.5 3B3B约 1.8GB25-4078-84%
    Llama 3.3 8B8B约 4.5GB10-1885-90%
    GPT-4 (API)约 1.8TN/AN/A92-96%

    FunctionGemma 以比 Llama 3.3 8B 少 30 倍的参数,在标准函数调用基准测试上达到 82-88% 的准确率。使用的 RAM 少 22 倍。在 CPU 上生成 token 的速度快 10-15 倍。

    信号:告别"一个模型搞定一切"

    过去三年的主导模式是:选择你能负担得起的最聪明的模型,用于一切。FunctionGemma 代表相反的哲学:构建(或使用)做一件事的模型,并使其尽可能小和快。

    何时使用 FunctionGemma vs Fine-Tune 自己的模型

    直接使用 FunctionGemma 的场景:

    • 你的工具是标准 API
    • 82-88% 的准确率可以接受
    • 你需要最小的部署占用

    Fine-Tune 自己模型的场景:

    • 你的工具是自定义或领域特定的
    • 你需要 95%+ 的准确率
    • 你有复杂的参数逻辑

    Fine-Tune FunctionGemma 的场景:

    早期结果表明,fine-tuned FunctionGemma 在自定义工具模式上达到 90-94% 的准确率——与 fine-tuned 3B 模型相当,但体积小 10 倍。

    更大的图景:任务专用模型是未来

    未来的架构不是一个大模型,而是一个小型专家组成的图:

    用户请求 → 路由器 (100M) → 选定的专家
      ├── 工具调用器 (270M - FunctionGemma)
      ├── 摘要器 (1B)
      ├── 分类器 (500M)
      └── 生成器 (7B - 仅在需要完整语言生成时)
    

    总系统 RAM:大约 6-8GB。延迟:大多数路径低于 100ms。成本:每查询零。

    Ship AI that runs on your users' devices.

    Ertas early bird pricing starts at $14.50/mo — locked in for life. Plans for builders and agencies.

    延伸阅读

    Ship AI that runs on your users' devices.

    Early bird pricing starts at $14.50/mo — locked in for life. Plans for builders and agencies.

    Keep reading