Text Generation
Transformers
Safetensors
English
gemma3_text
function-calling
tool-use
on-device
edge
functiongemma
personal-assistant
synthetic-data
conversational
text-generation-inference
Instructions to use levelplaystudio/echo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use levelplaystudio/echo with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="levelplaystudio/echo") 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("levelplaystudio/echo") model = AutoModelForCausalLM.from_pretrained("levelplaystudio/echo", 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
- vLLM
How to use levelplaystudio/echo with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "levelplaystudio/echo" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "levelplaystudio/echo", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/levelplaystudio/echo
- SGLang
How to use levelplaystudio/echo 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 "levelplaystudio/echo" \ --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": "levelplaystudio/echo", "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 "levelplaystudio/echo" \ --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": "levelplaystudio/echo", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use levelplaystudio/echo with Docker Model Runner:
docker model run hf.co/levelplaystudio/echo
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,66 +1,145 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
base_model: google/functiongemma-270m-it
|
| 4 |
-
|
| 5 |
-
- function-calling
|
| 6 |
-
- tool-use
|
| 7 |
-
- gemma
|
| 8 |
-
- gemma-270m
|
| 9 |
-
- on-device
|
| 10 |
-
- echo
|
| 11 |
-
- agent
|
| 12 |
pipeline_tag: text-generation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
---
|
| 14 |
|
| 15 |
-
# ECHO
|
| 16 |
|
| 17 |
-
|
| 18 |
|
| 19 |
-
|
| 20 |
-
* **Final Exam Grade:** **89 / 100** (First Class / Distinction)
|
| 21 |
-
* **Parameter Count:** 270 Million
|
| 22 |
-
* **VRAM Footprint:** ~500 MB (runs comfortably on any laptop or phone)
|
| 23 |
|
| 24 |
-
|
| 25 |
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
9. **`get_weather`**: Meteorological reports and forecasts
|
| 36 |
-
10. **`get_system_info`**: Real-time CPU, RAM, and disk diagnostics
|
| 37 |
-
11. **`task_manager`**: Scheduled reminders, to-do lists, and calendar alarms
|
| 38 |
-
12. **`web_search`**: Internet queries for external knowledge
|
| 39 |
-
13. **`response`**: Conversational, non-tool dialogue and chit-chat
|
| 40 |
|
| 41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
|
| 43 |
-
##
|
| 44 |
|
| 45 |
```python
|
| 46 |
-
import
|
| 47 |
-
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 48 |
|
| 49 |
-
|
| 50 |
-
tokenizer = AutoTokenizer.from_pretrained(
|
| 51 |
-
model = AutoModelForCausalLM.from_pretrained(
|
| 52 |
-
|
| 53 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
|
| 55 |
-
# Use FunctionGemma chat template with tools declared
|
| 56 |
messages = [
|
| 57 |
-
{"role": "developer", "content": "
|
| 58 |
-
{"role": "user", "content": "
|
| 59 |
]
|
| 60 |
|
| 61 |
-
inputs = tokenizer.apply_chat_template(
|
| 62 |
-
|
| 63 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
|
| 65 |
-
|
| 66 |
-
print(tokenizer.decode(outputs[0][inputs.shape[1]:]))
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
base_model: google/functiongemma-270m-it
|
| 4 |
+
library_name: transformers
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
pipeline_tag: text-generation
|
| 6 |
+
language:
|
| 7 |
+
- en
|
| 8 |
+
tags:
|
| 9 |
+
- function-calling
|
| 10 |
+
- tool-use
|
| 11 |
+
- on-device
|
| 12 |
+
- edge
|
| 13 |
+
- functiongemma
|
| 14 |
+
- personal-assistant
|
| 15 |
+
- synthetic-data
|
| 16 |
+
- safetensors
|
| 17 |
+
model-index:
|
| 18 |
+
- name: echo-functiongemma-270m
|
| 19 |
+
results: []
|
| 20 |
---
|
| 21 |
|
| 22 |
+
# ECHO FunctionGemma 270M
|
| 23 |
|
| 24 |
+
ECHO is a small on-device personal assistant model. It reads a user request and chooses the right tool, with arguments, to carry it out on the local machine. It is a fine-tune of [`google/functiongemma-270m-it`](https://huggingface.co/google/functiongemma-270m-it) and is built to run without a cloud connection on hardware such as a Raspberry Pi 4B (4GB) or a Windows desktop.
|
| 25 |
|
| 26 |
+
**Creators:** Lakshy M. Chaurasia and Pratigya M. Chaurasia, [Level Play Studio](#).
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
+
## Model details
|
| 29 |
|
| 30 |
+
| Item | Value |
|
| 31 |
+
| :--- | :--- |
|
| 32 |
+
| Base model | `google/functiongemma-270m-it` |
|
| 33 |
+
| Parameters | ~270M |
|
| 34 |
+
| Format | Safetensors (`model.safetensors`) |
|
| 35 |
+
| Language | English (Indian English context) |
|
| 36 |
+
| Task | Function calling for personal computer and assistant actions |
|
| 37 |
+
| Intended hardware | Raspberry Pi 4B (4GB), Windows desktop, edge devices |
|
| 38 |
+
| Context | Single-turn tool selection |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
+
## Supported tools
|
| 41 |
+
|
| 42 |
+
The model is trained to call these 10 tools:
|
| 43 |
+
|
| 44 |
+
| Tool | Purpose |
|
| 45 |
+
| :--- | :--- |
|
| 46 |
+
| `music_manager` | Play, pause, resume, next, previous. Includes classic Indian film and ghazal music. |
|
| 47 |
+
| `get_weather` | Current weather and forecasts for a city or region. |
|
| 48 |
+
| `open_application` | Launch desktop apps, terminals, and utilities. |
|
| 49 |
+
| `close_application` | Close or terminate running apps. |
|
| 50 |
+
| `task_manager` | Create, list, delete, and complete tasks and reminders. |
|
| 51 |
+
| `get_current_time` | Return the local time. |
|
| 52 |
+
| `get_current_date` | Return the date and day of the week. |
|
| 53 |
+
| `get_system_info` | CPU, RAM, disk, and OS diagnostics. |
|
| 54 |
+
| `volume_manager` | Set, mute, unmute, increase, or decrease audio volume (0–100). |
|
| 55 |
+
| `take_screenshot` | Capture the full screen, the active window, or a region. |
|
| 56 |
+
|
| 57 |
+
## Training data
|
| 58 |
+
|
| 59 |
+
- **Source:** synthetic. User queries and tool calls were generated with Gemini and checked against the tool schemas before use.
|
| 60 |
+
- **Size:** about 5,200 examples in total, split roughly 90% train and 10% evaluation, stratified by tool.
|
| 61 |
+
- **Format:** each example is a chat with a `developer` message (date, time, day of week, and the tool list), a `user` message, and an `assistant` tool call. Tool lists are shuffled per example.
|
| 62 |
+
- **Coverage:** English only. Indian cities, names, festivals, and Windows paths. Varied styles: formal requests, short voice commands, slang, typos, and multi-sentence commands.
|
| 63 |
+
- **Validation:** arguments must match the schema exactly (names, types, enum values, and the 0–100 volume range). Non-English text and duplicate queries were removed.
|
| 64 |
+
|
| 65 |
+
## Evaluation
|
| 66 |
+
|
| 67 |
+
Evaluation uses a held-out split of the synthetic data. Replace the placeholders below with your measured results.
|
| 68 |
+
|
| 69 |
+
| Metric | Score |
|
| 70 |
+
| :--- | :--- |
|
| 71 |
+
| Tool-name accuracy | `XX.XX%` |
|
| 72 |
+
| Exact-arguments accuracy | `XX.XX%` |
|
| 73 |
+
| Schema-valid calls | `XX.XX%` |
|
| 74 |
+
|
| 75 |
+
Synthetic evaluation does not show real-world performance. Test on real user phrasings before relying on the model.
|
| 76 |
|
| 77 |
+
## How to use
|
| 78 |
|
| 79 |
```python
|
| 80 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
|
|
|
| 81 |
|
| 82 |
+
repo_id = "YOUR_USERNAME/echo-functiongemma-270m"
|
| 83 |
+
tokenizer = AutoTokenizer.from_pretrained(repo_id)
|
| 84 |
+
model = AutoModelForCausalLM.from_pretrained(repo_id, torch_dtype="auto")
|
| 85 |
+
|
| 86 |
+
tools = [
|
| 87 |
+
{
|
| 88 |
+
"type": "function",
|
| 89 |
+
"function": {
|
| 90 |
+
"name": "volume_manager",
|
| 91 |
+
"description": "Adjusts host master audio volume or toggles mute status.",
|
| 92 |
+
"parameters": {
|
| 93 |
+
"type": "object",
|
| 94 |
+
"properties": {
|
| 95 |
+
"action": {"type": "string", "description": "Volume action: 'set', 'mute', 'unmute', 'increase', 'decrease'."},
|
| 96 |
+
"level": {"type": "integer", "description": "Integer audio level between 0 and 100."},
|
| 97 |
+
},
|
| 98 |
+
"required": ["action"],
|
| 99 |
+
},
|
| 100 |
+
},
|
| 101 |
+
},
|
| 102 |
+
# Add the other tools from the table above as needed.
|
| 103 |
+
]
|
| 104 |
|
|
|
|
| 105 |
messages = [
|
| 106 |
+
{"role": "developer", "content": "Current date and time given in YYYY-MM-DDTHH:MM:SS format: 2026-10-18T09:30:00\nDay of week is Sunday\nYou are a model that can do function calling with the following functions\n"},
|
| 107 |
+
{"role": "user", "content": "Lower the sound to 20 percent"},
|
| 108 |
]
|
| 109 |
|
| 110 |
+
inputs = tokenizer.apply_chat_template(messages, tools=tools, add_generation_prompt=True, return_tensors="pt", return_dict=True)
|
| 111 |
+
output = model.generate(**inputs, max_new_tokens=128)
|
| 112 |
+
print(tokenizer.decode(output[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=False))
|
| 113 |
+
```
|
| 114 |
+
|
| 115 |
+
Parse the generated tool call and run it through your own tool dispatcher. Do not execute model output directly without checking the tool name and arguments against the schema.
|
| 116 |
+
|
| 117 |
+
## Limitations
|
| 118 |
+
|
| 119 |
+
- Trained on synthetic data, so it may miss phrasings and situations that real users write.
|
| 120 |
+
- Supports only the 10 tools listed above. Requests for other tools will not be handled correctly.
|
| 121 |
+
- Single-turn tool selection. It is not trained for long multi-step workflows or for reading tool output in later turns.
|
| 122 |
+
- English only.
|
| 123 |
+
- Music knowledge covers mainly Indian film and ghazal music from about 1950 to 1980. Verify artist and song names for other genres.
|
| 124 |
+
- Argument values such as file paths and times should be checked before any action is taken on the device.
|
| 125 |
+
|
| 126 |
+
## Safety
|
| 127 |
+
|
| 128 |
+
ECHO can open and close applications, change system volume, and capture the screen. Run actions through a confirmation step for anything destructive, and never run it with elevated permissions without review.
|
| 129 |
+
|
| 130 |
+
## Citation
|
| 131 |
+
|
| 132 |
+
```
|
| 133 |
+
@misc{echo_functiongemma_270m,
|
| 134 |
+
title = {ECHO FunctionGemma 270M},
|
| 135 |
+
author = {Chaurasia, Lakshy M. and Chaurasia, Pratigya M.},
|
| 136 |
+
year = {2026},
|
| 137 |
+
note = {Level Play Studio}
|
| 138 |
+
}
|
| 139 |
+
```
|
| 140 |
+
|
| 141 |
+
## License
|
| 142 |
+
|
| 143 |
+
This model is licensed under the Apache License, Version 2.0. See the [`LICENSE`](LICENSE) file for the full text.
|
| 144 |
|
| 145 |
+
Note: the base model `google/functiongemma-270m-it` is distributed under Google's Gemma terms of use, not Apache 2.0. Those terms may apply to derivative weights, so check them before you rely on Apache 2.0 for this model alone.
|
|
|