Run this model with HF Jobs

Run google/functiongemma-270m-it on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/google/functiongemma-270m-it. Ask me which dataset to train on, then push the fine-tuned model to a new private model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/google/functiongemma-270m-it on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/google/functiongemma-270m-it. Ask me which benchmark to run, then save the scores and the per-example results to a new private dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/google/functiongemma-270m-it. Push it to a new private model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

Tool Calling example on Raspberry PI

#14
by samairtimer - opened

I used Ollama to host a functionGemma model to create an Agnet which invokes my Gmail MCP actions using langchain. It is wonderful!! It runs on Raspberry PI. Just takes few seconds.

import asyncio
import time
from langchain.agents import create_agent
from langchain_ollama import ChatOllama
from langchain_mcp_adapters.client import MultiServerMCPClient
async def init():
client = MultiServerMCPClient(
{

        "email": {
            "transport": "http",  # HTTP-based remote server
            # Ensure you start your weather server on port 8000
            "url": "https://n8n.samair.me/mcp/gmailv2",
            "headers": {
                "Authorization": "Bearer "
            }
        },

    }
)

tools = await client.get_tools()



model = ChatOllama(
    model="functiongemma",
    temperature=0,
    base_url="http://pi5.local:11434",
    # other params...
)
SYSTEM_PROMPT = """
Your are helpful personal assistant, your job is to help your user.
"""
agent = create_agent(model, tools=tools, system_prompt=SYSTEM_PROMPT)
last_step_time = time.perf_counter()
current_time = time.perf_counter()
duration = current_time - last_step_time
print(f"[{duration:.2f}s]")
async for  chunk in  agent.astream(
    {"messages": [{"role": "user", "content": "Send a message asking if they are availble on weekend for meeting to sameer@samair.me"}]},

    ):
     for step, data in chunk.items():
        current_time = time.perf_counter()
        duration = current_time - last_step_time
        print(f"[{duration:.2f}s] step: {step}")
        print(f"content: {data['messages'][-1].content_blocks}")

if name == "main":
asyncio.run(init())
'''

Google org

Hi @samairtimer
A huge thank you for your work on this implementation; seeing FunctionGemma integrated so seamlessly with MCP on the edge is fantastic. We truly appreciate the time and effort you've put into showcasing the model's capabilities to the community!

Sign up or log in to comment