Instructions to use independently-platform/functiongemma-tasky-ONNX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use independently-platform/functiongemma-tasky-ONNX with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-generation', 'independently-platform/functiongemma-tasky-ONNX');
| base_model: google/functiongemma-270m-it | |
| library_name: transformers.js | |
| model_name: functiongemma-tasky-onnx | |
| tags: | |
| - onnx | |
| - transformers.js | |
| - text-generation | |
| - function-calling | |
| - task-management | |
| # FunctionGemma Tasky (ONNX) | |
| This repository contains an ONNX export of `functiongemma-tasky`, a fine-tuned variant of `google/functiongemma-270m-it` trained for task/todo function-calling. It targets Transformers.js and includes both full precision and Q4 quantized weights. | |
| ## Files | |
| - `onnx/model.onnx`: full-precision weights (fp32) | |
| - `onnx/model_q4.onnx`: 4-bit quantized weights (q4) | |
| ## Usage (Transformers.js) | |
| ```javascript | |
| import { pipeline } from '@huggingface/transformers'; | |
| // Q4 (smaller, faster) | |
| const pipe = await pipeline('text-generation', 'REPLACE_WITH_HF_REPO', { | |
| dtype: 'q4', | |
| }); | |
| const out = await pipe('Add a task to call Alice tomorrow at 9am', { | |
| max_new_tokens: 128, | |
| }); | |
| console.log(out[0].generated_text); | |
| ``` | |
| To load full precision instead: | |
| ```javascript | |
| const pipe = await pipeline('text-generation', 'REPLACE_WITH_HF_REPO', { | |
| dtype: 'fp32', | |
| }); | |
| ``` | |
| Transformers.js expects ONNX weights under an `onnx/` subfolder, which this repo provides. | |
| ## Training summary | |
| - Base model: `google/functiongemma-270m-it` | |
| - Fine-tuning data: synthetic task/todo function-calling prompts, mixed English/Italian, includes user-style typos | |
| - Eval success rate: ~99.5% on a 1500/500 train/eval split | |
| ## Notes | |
| - Quantized models trade some accuracy for faster inference and smaller size. | |
| - Outputs may not be strict JSON; validate and post-process if needed. | |