Instructions to use renhehuang/functiongemma-270m-it-coffee-robot-mcp with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use renhehuang/functiongemma-270m-it-coffee-robot-mcp with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="renhehuang/functiongemma-270m-it-coffee-robot-mcp") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("renhehuang/functiongemma-270m-it-coffee-robot-mcp") model = AutoModelForCausalLM.from_pretrained("renhehuang/functiongemma-270m-it-coffee-robot-mcp", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use renhehuang/functiongemma-270m-it-coffee-robot-mcp with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf renhehuang/functiongemma-270m-it-coffee-robot-mcp # Run inference directly in the terminal: llama cli -hf renhehuang/functiongemma-270m-it-coffee-robot-mcp
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf renhehuang/functiongemma-270m-it-coffee-robot-mcp # Run inference directly in the terminal: llama cli -hf renhehuang/functiongemma-270m-it-coffee-robot-mcp
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf renhehuang/functiongemma-270m-it-coffee-robot-mcp # Run inference directly in the terminal: ./build/bin/llama cli -hf renhehuang/functiongemma-270m-it-coffee-robot-mcp
Use Docker
docker model run hf.co/renhehuang/functiongemma-270m-it-coffee-robot-mcp
- Llama new
- LM Studio
- Jan
- vLLM
How to use renhehuang/functiongemma-270m-it-coffee-robot-mcp with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "renhehuang/functiongemma-270m-it-coffee-robot-mcp" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "renhehuang/functiongemma-270m-it-coffee-robot-mcp", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/renhehuang/functiongemma-270m-it-coffee-robot-mcp
- SGLang
How to use renhehuang/functiongemma-270m-it-coffee-robot-mcp with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "renhehuang/functiongemma-270m-it-coffee-robot-mcp" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "renhehuang/functiongemma-270m-it-coffee-robot-mcp", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "renhehuang/functiongemma-270m-it-coffee-robot-mcp" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "renhehuang/functiongemma-270m-it-coffee-robot-mcp", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use renhehuang/functiongemma-270m-it-coffee-robot-mcp with Ollama:
ollama run hf.co/renhehuang/functiongemma-270m-it-coffee-robot-mcp
- Unsloth Desktop
- Pi
How to use renhehuang/functiongemma-270m-it-coffee-robot-mcp with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf renhehuang/functiongemma-270m-it-coffee-robot-mcp
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "renhehuang/functiongemma-270m-it-coffee-robot-mcp" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use renhehuang/functiongemma-270m-it-coffee-robot-mcp with Docker Model Runner:
docker model run hf.co/renhehuang/functiongemma-270m-it-coffee-robot-mcp
- Lemonade
How to use renhehuang/functiongemma-270m-it-coffee-robot-mcp with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull renhehuang/functiongemma-270m-it-coffee-robot-mcp
Run and chat with the model
lemonade run user.functiongemma-270m-it-coffee-robot-mcp-{{QUANT_TAG}}List all available models
lemonade list
- Hermes Agent
How to use renhehuang/functiongemma-270m-it-coffee-robot-mcp with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf renhehuang/functiongemma-270m-it-coffee-robot-mcp
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default renhehuang/functiongemma-270m-it-coffee-robot-mcp
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use renhehuang/functiongemma-270m-it-coffee-robot-mcp with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf renhehuang/functiongemma-270m-it-coffee-robot-mcp
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "renhehuang/functiongemma-270m-it-coffee-robot-mcp" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
โ Coffee Robot MCP - FunctionGemma 270M
ๅบๆผ google/functiongemma-270m-it ๅพฎ่ชฟ็ๅๅกๆฉๅจไบบๅค้ไปปๅ Function Calling ๆจกๅใ๏ผๆญค็บไผๆฅญๅ
ง้จ้ป้ค api ๆดๅๆธฌ่ฉฆๆจกๅ๏ผ
๐ ๆจกๅๆ่ฟฐ
ๆญคๆจกๅๅฐ้้ๅฐๅๅกๆฉๅจไบบๅค้ๅ ดๆฏ้ฒ่กๅพฎ่ชฟ๏ผ่ฝๅค ๅฐ่ช็ถ่ช่จๆไปค่ฝๆ็บ็ตๆงๅ็ Function Call๏ผ้ฉ็จๆผ MCP (Model Context Protocol) ๆดๅใ
ไธป่ฆ็น้ป
- ๐ฏ ๅฐๆณจๆผๅๅกๅค้ไปปๅ็ Function Calling
- ๐น๐ผ ๆฏๆด็น้ซไธญๆ่ช็ถ่ช่จ่ผธๅ ฅ
- โก ่ผ้ๅๆจกๅ๏ผ270M ๅๆธ๏ผ๏ผ้ฉๅ้็ทฃ้จ็ฝฒ
- ๐ง ็ธๅฎน MCP ๅ่ญฐๆ ผๅผ
๐ ๏ธ ๆฏๆดๅ่ฝ
Function: send_coffee
| ๅๆธ | ้กๅ | ่ชชๆ | ๅฏ้ธๅผ |
|---|---|---|---|
baseDrink |
string | ้ฃฒๅ็จฎ้ก | americano, latte, oat_latte, milk |
floor |
integer | ้ ้ๆจๅฑค | 1-11 |
temperature |
string | ้ฃฒๅๆบซๅบฆ | hot, iced |
addons |
array | ๅ ่ณผ้ธ้ | extra_espresso, paper_cup |
quantity |
integer | ๆธ้ | 1-10 |
๐ ๆจกๅๆ่ฝ
| ๆๆจ | ๅบ็คๆจกๅ | ๅพฎ่ชฟๅพๆจกๅ |
|---|---|---|
| Function Calling ๆบ็ขบ็ | 95.95% | 100.00% |
| ๆๅๅน ๅบฆ | - | +4.05% |
่จ็ทด้ ็ฝฎ
- ่จ็ทด่ผชๆธ: 3
- ๅญธ็ฟ็: 1e-05
- ๆๆๆนๆฌกๅคงๅฐ: 16
- ่จ็ทดๆจฃๆฌๆธ: 625
- ้ฉ่ญๆจฃๆฌๆธ: 74
๐ป ไฝฟ็จๆนๅผ
ๅบๆฌไฝฟ็จ
from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
model_id = "renhehuang/functiongemma-270m-it-coffee-robot-mcp"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")
pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
tools = [
{
"type": "function",
"function": {
"name": "send_coffee",
"description": "้ๅๅกๅฐๆๅฎๆจๅฑค",
"parameters": {
"type": "object",
"properties": {
"baseDrink": {"type": "string", "enum": ["americano", "latte", "oat_latte", "milk"]},
"floor": {"type": "integer", "minimum": 1, "maximum": 11},
"temperature": {"type": "string", "enum": ["hot", "iced"]},
"addons": {"type": "array", "items": {"type": "string", "enum": ["extra_espresso", "paper_cup"]}},
"quantity": {"type": "integer", "minimum": 1, "maximum": 10},
},
"required": ["baseDrink", "floor", "temperature", "quantity"],
},
},
}
]
messages = [{"role": "user", "content": "ๅนซๆ้ไธๆฏ็ฑ็พๅผๅฐไบๆจ"}]
prompt = tokenizer.apply_chat_template(
messages,
tools=tools,
tokenize=False,
add_generation_prompt=True,
)
out = pipe(prompt, max_new_tokens=256, do_sample=False)
print(out[0]["generated_text"][len(prompt):])
่ผธๅบ็ฏไพ
่ผธๅ
ฅ: "ๅนซๆ้ไธๆฏ็ฑ็พๅผๅฐไบๆจ"
่ผธๅบ:
<start_function_call>call: send_coffee{baseDrink:<escape>americano<escape>, floor:<escape>5<escape>, temperature:<escape>hot<escape>, quantity:<escape>1<escape>}<end_function_call>
๐ MCP ๆดๅ
ๆญคๆจกๅๅฏ่ MCP Server ๆดๅ๏ผๅฏฆ็พ่ชๅๅๅๅกๅค้ๆต็จ๏ผ
# ่งฃๆ Function Call
import re
def parse_function_call(output):
pattern = r"<start_function_call>(.*?)<end_function_call>"
matches = re.findall(pattern, output, re.DOTALL)
# ่งฃๆไธฆๅๅณ็ตๆงๅ่ณๆ
return matches
โ ๏ธ ้ๅถ่ๆณจๆไบ้
- ้ ๅ้ๅถ: ๆญคๆจกๅๅฐ็บๅๅกๅค้ๅ ดๆฏ่จญ่จ๏ผไธ้ฉ็จๆผๅ ถไป Function Calling ไปปๅ
- ่ช่จๆฏๆด: ไธป่ฆๆฏๆด็น้ซไธญๆ๏ผๅ ถไป่ช่จๆๆๅฏ่ฝไธไฝณ
- ๆจๅฑค็ฏๅ: ๅ ๆฏๆด 1-11 ๆจ
- ้ฃฒๅ็จฎ้ก: ๅ ๆฏๆด 4 ็จฎ้ฃฒๅ้กๅ
๐ ๅผ็จ
@misc{coffee-robot-mcp-2025,
title={Coffee Robot MCP - FunctionGemma Fine-tuned Model},
author={renhehuang},
year={2025},
publisher={Hugging Face},
url={https://huggingface.co/renhehuang/functiongemma-270m-it-coffee-robot-mcp}
}
๐ ๆๆฌ
ๆฌๆจกๅๅบๆผ Gemma License ๆๆฌใไฝฟ็จๅ่ซ็ขบ่ชๅทฒๆฅๅ Google Gemma ็ไฝฟ็จๆขๆฌพใ
๐ ่ด่ฌ
- Google - ๆไพ FunctionGemma ๅบ็คๆจกๅ
- Hugging Face - ๆไพๆจกๅ่จ็ฎก่่จ็ทดๅทฅๅ ท
- Downloads last month
- 115
Model tree for renhehuang/functiongemma-270m-it-coffee-robot-mcp
Base model
google/functiongemma-270m-itEvaluation results
- Accuracy on Coffee Robot MCP Datasetself-reported1.000