Lakshychaurasia commited on
Commit
dff8704
·
verified ·
1 Parent(s): 16e375c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +125 -46
README.md CHANGED
@@ -1,66 +1,145 @@
1
  ---
2
  license: apache-2.0
3
  base_model: google/functiongemma-270m-it
4
- tags:
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: On-Device OS & System Agent (270M)
16
 
17
- **ECHO** is an ultra-lightweight, fine-tuned version of **Google's FunctionGemma (270M)** designed to run locally on PCs and edge devices for desktop and OS automation.
18
 
19
- ### Evaluation Score
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
- ### Supported Capabilities (13 Tools)
27
- 1. **`file_manager`**: Full filesystem control (copy, move, delete, list, search files & directories)
28
- 2. **`volume_manager`**: Adjust master system volume, mute, and unmute
29
- 3. **`take_screenshot`**: Capture full screen, active window, or selected regions
30
- 4. **`music_manager`**: Play, pause, skip tracks, and search songs
31
- 5. **`open_application`**: Launch applications, terminals, and software
32
- 6. **`close_application`**: Terminate and close running apps
33
- 7. **`get_current_time`**: Precise system clock queries
34
- 8. **`get_current_date`**: Calendar date, month, and day-of-week lookups
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
- ### Quickstart / Inference
44
 
45
  ```python
46
- import torch
47
- from transformers import AutoModelForCausalLM, AutoTokenizer
48
 
49
- model_id = "Lakshychaurasia/echo"
50
- tokenizer = AutoTokenizer.from_pretrained(model_id)
51
- model = AutoModelForCausalLM.from_pretrained(
52
- model_id, torch_dtype=torch.float32, device_map="auto"
53
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
 
55
- # Use FunctionGemma chat template with tools declared
56
  messages = [
57
- {"role": "developer", "content": "You are ECHO, a function-calling agent."},
58
- {"role": "user", "content": "Mute the system volume right now"},
59
  ]
60
 
61
- inputs = tokenizer.apply_chat_template(
62
- messages, tools=EVAL_TOOLS, add_generation_prompt=True, return_tensors="pt"
63
- ).to(model.device)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
 
65
- outputs = model.generate(**inputs, max_new_tokens=128)
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.