Run this model with HF Jobs

Run Simon-Liu/gemma-4-E4B-it-open-doc 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/Simon-Liu/gemma-4-E4B-it-open-doc. 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/Simon-Liu/gemma-4-E4B-it-open-doc 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/Simon-Liu/gemma-4-E4B-it-open-doc. 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.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/Simon-Liu/gemma-4-E4B-it-open-doc. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

gemma-4-E4B-it-open-doc

A LoRA adapter for MCP tool calling, trained by colab-finetune-mcp through its teacher-driven pipeline: reverse-generate the data, filter it for quality, then run SFT.

  • Base model: google/gemma-4-E4B-it
  • Method: LoRA (r=16, epochs=3.0, learning_rate=0.0002)
  • Tools (from the MCP server): list_documents, read_document, create_document, list_templates, create_from_template, write_document, rename_document, duplicate_document, delete_document, read_text, write_text, add_comment, list_themes, read_theme, list_assets, upload_asset, find_asset_usages, delete_asset, list_folders, create_folder, file_document, check_layout, render_page, export_document, diff_document, import_markdown

Evaluation (held-out test set)

Metric Base (before) Fine-tuned (after)
Tool-call rate 97.0% 100.0%
Function-name accuracy 60.0% 99.3%
Exact-match rate 56.3% 91.1%
No-tool accuracy 100.0% 100.0%

Usage

from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer

base = "google/gemma-4-E4B-it"
model = AutoModelForCausalLM.from_pretrained(base, device_map="auto")
model = PeftModel.from_pretrained(model, "Simon-Liu/gemma-4-E4B-it-open-doc")
tokenizer = AutoTokenizer.from_pretrained("Simon-Liu/gemma-4-E4B-it-open-doc")

The model is trained to emit a single <tool_call>{"name": "<tool>", "arguments": {...}}</tool_call> when the user's request needs a tool, and to answer in plain text when it does not.

Downloads last month
9
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for Simon-Liu/gemma-4-E4B-it-open-doc

Adapter
(541)
this model