Run this model with HF Jobs

Run onnx-community/functiongemma-270m-it-ONNX on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/onnx-community/functiongemma-270m-it-ONNX. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/onnx-community/functiongemma-270m-it-ONNX on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/onnx-community/functiongemma-270m-it-ONNX. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

added response_template

#3
by nico-martin HF Staff - opened
ONNX Community org

This PR adds support for the response_template in tokenizer_config.json. A response template tells the tokenizer how to parse the model's raw output into a structured assistant message (content, tool_calls), so tokenizer.parse_response() and chat pipelines return parsed messages instead of raw text. See https://huggingface.co/docs/transformers/en/chat_response_parsing

Template
Neither this repo nor the original model (google/functiongemma-270m-it) ships a response_template, so we built this one from the model's chat template and its real output:

  • Tool calls are <start_function_call>call:name{key:<escape>value<escape>,…}<end_function_call>, and several calls can follow each other.
  • After <end_function_response>, the model can continue in the same turn.
  • A turn ends with <end_of_turn>, <start_function_response> or <eos>.

The template only uses parsing features that upstream Python transformers supports.

How it was tested
We ran this checkpoint (fp32) with Transformers.js, using its own chat template, on a single tool call, two parallel tool calls, a plain answer, and a plain question with a tool available. Every well-formed output parsed correctly, both in one shot and when streamed. Upstream Python transformers gives the same results on the same outputs.

The 4-bit weights in this repo (q4 and q4f16) could not be tested: they produce unusable output and seem to be broken, so the test used the fp32 weights.

The template describes the checkpoint's output format. It does not mean that every response contains every region, and it does not guarantee tool-use quality.

nico-martin changed pull request status to open
Xenova changed pull request status to merged

Sign up or log in to comment