Text Generation
Transformers
Safetensors
gemma3_text
robotics
function-calling
gemma
lora
fine-tuned
edge-ai
jetson
multilingual
conversational
text-generation-inference
Instructions to use OpenmindAGI/functiongemma-finetuned-g1-multilingual with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OpenmindAGI/functiongemma-finetuned-g1-multilingual with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="OpenmindAGI/functiongemma-finetuned-g1-multilingual") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("OpenmindAGI/functiongemma-finetuned-g1-multilingual") model = AutoModelForCausalLM.from_pretrained("OpenmindAGI/functiongemma-finetuned-g1-multilingual") 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use OpenmindAGI/functiongemma-finetuned-g1-multilingual with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OpenmindAGI/functiongemma-finetuned-g1-multilingual" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OpenmindAGI/functiongemma-finetuned-g1-multilingual", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/OpenmindAGI/functiongemma-finetuned-g1-multilingual
- SGLang
How to use OpenmindAGI/functiongemma-finetuned-g1-multilingual 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 "OpenmindAGI/functiongemma-finetuned-g1-multilingual" \ --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": "OpenmindAGI/functiongemma-finetuned-g1-multilingual", "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 "OpenmindAGI/functiongemma-finetuned-g1-multilingual" \ --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": "OpenmindAGI/functiongemma-finetuned-g1-multilingual", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use OpenmindAGI/functiongemma-finetuned-g1-multilingual with Docker Model Runner:
docker model run hf.co/OpenmindAGI/functiongemma-finetuned-g1-multilingual
File size: 3,928 Bytes
40ed16d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | ---
language:
- en
- zh
- ja
- fr
- de
- es
license: apache-2.0
base_model: google/functiongemma-270m-it
tags:
- robotics
- function-calling
- gemma
- lora
- fine-tuned
- edge-ai
- jetson
- multilingual
pipeline_tag: text-generation
library_name: transformers
---
# FunctionGemma Robot Actions (Multilingual)
A fine-tuned [FunctionGemma 270M](https://huggingface.co/google/functiongemma-270m-it) model that converts natural language into structured robot action and emotion function calls. Supports **6 languages** with **98% accuracy** at **~59ms** on NVIDIA Jetson AGX Thor.
## Supported Languages
🇬🇧 English · 🇨🇳 中文 · 🇯🇵 日本語 · 🇫🇷 Français · 🇩🇪 Deutsch · 🇪🇸 Español
## Example
```
Input: "Can you shake hands with me?" → robot_action(shake_hand) + show_emotion(happy)
Input: "跟我握手" → robot_action(shake_hand) + show_emotion(happy)
Input: "握手してください" → robot_action(shake_hand) + show_emotion(happy)
Input: "Serrez-moi la main" → robot_action(shake_hand) + show_emotion(happy)
Input: "Gib mir die Hand" → robot_action(shake_hand) + show_emotion(happy)
Input: "Dame la mano" → robot_action(shake_hand) + show_emotion(happy)
Input: "我今天心情不好" → robot_action(stand_still) + show_emotion(sad)
Input: "あれは何ですか?" → robot_action(stand_still) + show_emotion(confused)
Input: "Raconte-moi une blague" → robot_action(stand_still) + show_emotion(think)
```
## Supported Actions
| Action | Description |
|--------|-------------|
| `shake_hand` | Handshake gesture |
| `face_wave` | Wave hello / goodbye |
| `hands_up` | Raise both hands |
| `stand_still` | Stay idle (default for general conversation) |
| `show_hand` | Show open hand / present card for payment |
| `do_payment` | Do the payment / do the payment |
| `down_payment` | Finished the payment |
## Supported Emotions
| Emotion | Animation |
|---------|-----------|
| `happy` | Happy.riv |
| `sad` | Sad.riv |
| `excited` | Excited.riv |
| `confused` | Confused.riv |
| `curious` | Curious.riv |
| `think` | Think.riv |
Constrained decoding uses 2 forward passes instead of 33 autoregressive steps, achieving ~18x speedup over standard `model.generate()`.
## Training Details
| Parameter | Value |
|-----------|-------|
| Base model | `google/functiongemma-270m-it` |
| Method | LoRA (rank 8, alpha 16) |
| Training data | ~6,000 examples (545 English + ~5,450 multilingual) |
| Languages | English, Chinese, Japanese, French, German, Spanish |
| Epochs | 3 |
| Learning rate | 2e-4 |
| Batch size | 4 (effective 16 with gradient accumulation) |
| Max sequence length | 512 |
| Precision | bf16 |
| Hardware | NVIDIA RTX 5070 Ti (16 GB) |
Multilingual training data was generated using Claude API — 2 natural phrasings per language per English prompt, resulting in diverse and natural expressions rather than literal translations.
## Usage
### Quick Start
```python
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model = AutoModelForCausalLM.from_pretrained(
"OpenmindAGI/functiongemma-finetuned-g1-multilingual",
torch_dtype=torch.bfloat16,
device_map="auto",
)
tokenizer = AutoTokenizer.from_pretrained("OpenmindAGI/functiongemma-finetuned-g1-multilingual")
model.eval()
```
## Citation
```bibtex
@misc{openmindagi-functiongemma-multilingual,
title={FunctionGemma Robot Actions (Multilingual)},
author={OpenmindAGI},
year={2025},
url={https://huggingface.co/OpenmindAGI/functiongemma-finetuned-g1-multilingual}
}
```
## License
Fine-tuned from [google/functiongemma-270m-it](https://huggingface.co/google/functiongemma-270m-it) under [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0).
|