vijayk-huggingface commited on
Commit
6008c1b
·
verified ·
1 Parent(s): 52ea144

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ orchestrix-actions.task filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,226 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: gemma
5
+ library_name: mediapipe
6
+ tags:
7
+ - gemma
8
+ - function-calling
9
+ - ui-control
10
+ - flutter
11
+ - on-device
12
+ - fine-tuned
13
+ - mobile-ai
14
+ base_model: google/functiongemma-270m-it
15
+ datasets:
16
+ - custom
17
+ pipeline_tag: text-generation
18
+ ---
19
+
20
+ # Orchestrix
21
+
22
+ **Orchestrix** is a fine-tuned **FunctionGemma 270M** model designed for **on-device UI orchestration** using **function calling**.
23
+ It converts natural language commands into **deterministic UI actions**, running fully **offline** via MediaPipe.
24
+
25
+
26
+ ## Model Description
27
+
28
+ This is a fine-tuned version of **FunctionGemma 270M Instruct** specifically trained for natural language-based UI control through function calling. The model interprets user commands and generates structured function calls to manipulate application UI elements.
29
+
30
+ **Base Model**: `google/functiongemma-270m-it`
31
+ **Fine-tuning Task**: Function calling for UI control
32
+ **Format**: MediaPipe Task file (`.task`)
33
+ **Deployment**: On-device inference via Flutter
34
+
35
+ ## Intended Use
36
+
37
+ ### Primary Use Cases
38
+
39
+ - **Mobile/Desktop Applications**: Natural language UI control in Flutter apps
40
+ - **On-Device AI**: Privacy-focused, offline AI interactions
41
+ - **Function Calling**: Demonstrating LLM tool use capabilities
42
+ - **Accessibility**: Voice-controlled UI modifications
43
+
44
+ ### Supported Functions
45
+
46
+ The model is trained to call the following functions:
47
+
48
+ | Function | Description | Parameters |
49
+ |----------|-------------|------------|
50
+ | `change_theme` | Switch app theme | `theme`: "light", "dark", or "system" |
51
+ | `change_background_color` | Modify background color | `color`: "red", "blue", "green", "black", "white", "yellow", "purple", "orange" |
52
+ | `change_text_color` | Change text color | `color`: "white" or "black" |
53
+ | `change_text_size` | Adjust text size | `size`: "small", "medium", or "large" |
54
+
55
+ ## Training Details
56
+
57
+ ### Training Data
58
+
59
+ The model was fine-tuned on a custom dataset of ~1000 examples mapping natural language commands to function calls. Training data format:
60
+
61
+ ```json
62
+ {
63
+ "messages": [
64
+ {
65
+ "role": "user",
66
+ "content": "Make the background blue"
67
+ },
68
+ {
69
+ "role": "assistant",
70
+ "tool_calls": [
71
+ {
72
+ "name": "change_background_color",
73
+ "arguments": {"color": "blue"}
74
+ }
75
+ ]
76
+ }
77
+ ]
78
+ }
79
+ ```
80
+
81
+ ### Training Procedure
82
+
83
+ - **Base Model**: FunctionGemma 270M Instruct
84
+ - **Fine-tuning Method**: Supervised fine-tuning on function calling examples
85
+ - **Training Examples**: ~1000 user command → function call pairs
86
+ - **Optimization**: Focused on accurate function name and parameter extraction
87
+
88
+ ### Training Hyperparameters
89
+
90
+ - **Learning Rate**: [Your learning rate]
91
+ - **Batch Size**: [Your batch size]
92
+ - **Epochs**: [Number of epochs]
93
+ - **Max Sequence Length**: [Your max length]
94
+
95
+ > **Note**: Update the hyperparameters section with your actual training configuration.
96
+
97
+ ## Usage
98
+
99
+ ### Flutter Integration
100
+
101
+ ```dart
102
+ import 'package:flutter_gemma/flutter_gemma.dart';
103
+
104
+ // Initialize Flutter Gemma
105
+ await FlutterGemma.initialize();
106
+
107
+ // Install the model
108
+
109
+ // Create model instance
110
+ final model = await FlutterGemma.getActiveModel(
111
+ maxTokens: 1024,
112
+ preferredBackend: PreferredBackend.cpu,
113
+ );
114
+
115
+ // Define tools (must match training data)
116
+ final tools = [
117
+ Tool(
118
+ name: 'change_theme',
119
+ description: 'Change application theme',
120
+ parameters: {
121
+ 'type': 'object',
122
+ 'properties': {
123
+ 'theme': {
124
+ 'type': 'string',
125
+ 'enum': ['light', 'dark', 'system'],
126
+ },
127
+ },
128
+ 'required': ['theme'],
129
+ },
130
+ ),
131
+ // ... other tools
132
+ ];
133
+
134
+ // Create chat session
135
+ final chat = await model.createChat(
136
+ tools: tools,
137
+ supportsFunctionCalls: true,
138
+ );
139
+
140
+ // Send user message
141
+ await chat.sendMessage('Switch to dark mode');
142
+ ```
143
+
144
+ ### Example Interactions
145
+
146
+ **Example 1: Theme Change**
147
+ ```
148
+ User: "Switch to dark mode"
149
+ Model Output: {
150
+ "tool_calls": [{
151
+ "name": "change_theme",
152
+ "arguments": {"theme": "dark"}
153
+ }]
154
+ }
155
+ ```
156
+
157
+ **Example 2: Color Change**
158
+ ```
159
+ User: "Make the background purple"
160
+ Model Output: {
161
+ "tool_calls": [{
162
+ "name": "change_background_color",
163
+ "arguments": {"color": "purple"}
164
+ }]
165
+ }
166
+ ```
167
+
168
+ **Example 3: Multiple Commands**
169
+ ```
170
+ User: "Change to dark theme and make text large"
171
+ Model Output: {
172
+ "tool_calls": [
173
+ {
174
+ "name": "change_theme",
175
+ "arguments": {"theme": "dark"}
176
+ },
177
+ {
178
+ "name": "change_text_size",
179
+ "arguments": {"size": "large"}
180
+ }
181
+ ]
182
+ }
183
+ ```
184
+
185
+ ## Performance
186
+
187
+ ### Accuracy Metrics
188
+
189
+ - **Function Name Accuracy**: [Your accuracy]%
190
+ - **Parameter Accuracy**: [Your accuracy]%
191
+ - **Multi-function Handling**: [Your accuracy]%
192
+
193
+ > **Note**: Update with your evaluation metrics.
194
+
195
+
196
+ ## Limitations
197
+
198
+ 1. **Limited Function Set**: Only supports 4 predefined functions
199
+ 2. **Parameter Constraints**: Parameters are restricted to predefined enums
200
+ 3. **Language**: English only
201
+ 4. **Context**: Optimized for UI control tasks, not general conversation
202
+ 5. **Ambiguity**: May struggle with highly ambiguous or complex commands
203
+
204
+ ## Bias and Ethical Considerations
205
+
206
+ - The model is trained on synthetic data and may not represent diverse user populations
207
+ - Function calling is deterministic and limited to safe UI operations
208
+ - No personal data is collected or transmitted (fully on-device)
209
+
210
+ ## Model Card Authors
211
+
212
+ Vijay K
213
+
214
+ ## Model Card Contact
215
+
216
+ For questions or issues, please contact: [vijaykatmail@gmail.com](mailto:vijaykatmail@gmail.com)
217
+
218
+ ## License
219
+
220
+ This model is released under the [Gemma License](https://ai.google.dev/gemma/terms).
221
+
222
+ ## Acknowledgments
223
+
224
+ - **Google DeepMind** for the Gemma base model
225
+ - **MediaPipe** for on-device inference capabilities
226
+ - **Flutter Gemma** package maintainers
orchestrix-actions.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aa009fcbc3589a9904d30d04834094fea4653c2ac6d2de2cd1262d4f7a50ceb3
3
+ size 4689144
orchestrix-actions.task ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ea996aebc96d0cecb27df579db40e6c6ae91ebe04580d734e22e07e173246b23
3
+ size 284368286
orchestrix-actions.tflite ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7ca94da95b73d139eaebc2b2832e6ff93ea68e17db7b0c54478e4b0e53064486
3
+ size 279678744
prompt/prompt.txt ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <start_of_turn>developer
2
+ You are a model that can do function calling with the following functions.
3
+
4
+ <start_function_declaration>
5
+ declaration:change_theme{
6
+ description:<escape>Change application theme<escape>,
7
+ parameters:{
8
+ properties:{
9
+ theme:{
10
+ description:<escape>Theme mode<escape>,
11
+ enum:[<escape>light<escape>,<escape>dark<escape>,<escape>system<escape>],
12
+ type:<escape>STRING<escape>
13
+ }
14
+ },
15
+ required:[<escape>theme<escape>],
16
+ type:<escape>OBJECT<escape>
17
+ }
18
+ }
19
+ <end_function_declaration>
20
+
21
+ <start_function_declaration>
22
+ declaration:change_background_color{
23
+ description:<escape>Change background color<escape>,
24
+ parameters:{
25
+ properties:{
26
+ color:{
27
+ description:<escape>Background color<escape>,
28
+ enum:[<escape>red<escape>,<escape>blue<escape>,<escape>green<escape>,<escape>black<escape>,<escape>white<escape>],
29
+ type:<escape>STRING<escape>
30
+ }
31
+ },
32
+ required:[<escape>color<escape>],
33
+ type:<escape>OBJECT<escape>
34
+ }
35
+ }
36
+ <end_function_declaration>
37
+
38
+ <start_function_declaration>
39
+ declaration:change_text_color{
40
+ description:<escape>Change text color<escape>,
41
+ parameters:{
42
+ properties:{
43
+ color:{
44
+ description:<escape>Text color<escape>,
45
+ enum:[<escape>white<escape>,<escape>black<escape>],
46
+ type:<escape>STRING<escape>
47
+ }
48
+ },
49
+ required:[<escape>color<escape>],
50
+ type:<escape>OBJECT<escape>
51
+ }
52
+ }
53
+ <end_function_declaration>
54
+
55
+ <start_function_declaration>
56
+ declaration:change_text_size{
57
+ description:<escape>Change text size<escape>,
58
+ parameters:{
59
+ properties:{
60
+ size:{
61
+ description:<escape>Text size<escape>,
62
+ enum:[<escape>small<escape>,<escape>medium<escape>,<escape>large<escape>],
63
+ type:<escape>STRING<escape>
64
+ }
65
+ },
66
+ required:[<escape>size<escape>],
67
+ type:<escape>OBJECT<escape>
68
+ }
69
+ }
70
+ <end_function_declaration>
71
+
72
+ You must respond ONLY with a function call when the user intent matches a function.
73
+ Do not explain.
74
+ Do not ask questions.
75
+ Do not output JSON.
76
+ Do not include text outside function calls.
77
+ <end_of_turn>