Gemma 4 E2B Mobile Actions LoRA, 200-Sample Fine-Tune

Main model card: google/gemma-4-E2B-it

This repository provides the LoRA adapter for an experimental Gemma 4 E2B fine-tune on google/mobile-actions.

The adapter was trained locally on an Apple M1 Pro and can be loaded on top of google/gemma-4-E2B-it.

Performance

The merged model produced from this adapter was evaluated on 200 held-out examples from google/mobile-actions (metadata == "eval").

Metric Score
Format valid rate 94.0%
Function name accuracy 94.0%
Required arguments present 92.0%
Exact match 85.0%

Per-Function Results

Function N Format Name Required Exact
create_contact 43 88.4% 88.4% 88.4% 86.0%
create_calendar_event 42 90.5% 90.5% 81.0% 78.6%
show_map 38 97.4% 97.4% 97.4% 68.4%
open_wifi_settings 20 90.0% 90.0% 90.0% 90.0%
send_email 20 100.0% 100.0% 100.0% 95.0%
turn_on_flashlight 20 100.0% 100.0% 100.0% 100.0%
turn_off_flashlight 17 100.0% 100.0% 100.0% 100.0%

Training

Setting Value
Base model google/gemma-4-E2B-it
Dataset google/mobile-actions
Training samples 200
Epochs 1
LoRA rank / alpha 16 / 32
Batch / accumulation 1 / 16
Max sequence length 1024
Precision bfloat16
Hardware Apple M1 Pro, MPS
Training time 35m47s including merge

Usage

import torch
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoProcessor

base_model = "google/gemma-4-E2B-it"
adapter_id = "YOUR_USERNAME/gemma4-e2b-mobile-actions-200-lora"

processor = AutoProcessor.from_pretrained(adapter_id)
model = AutoModelForCausalLM.from_pretrained(
    base_model,
    dtype=torch.bfloat16,
    device_map="auto",
)
model = PeftModel.from_pretrained(model, adapter_id)

Examples

This repository includes a runnable PEFT example:

python examples/run_lora.py \
  --adapter-id ClarkBear/gemma4-e2b-mobile-actions-200-lora \
  --prompt "Turn on the flashlight"

You need Hugging Face access to google/gemma-4-E2B-it.

Limitations

This is an experimental small-data LoRA adapter. It was trained on only 200 examples and should be evaluated before use in production or on-device workflows.

Downloads last month
42
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for ClarkBear/gemma4-e2b-mobile-actions-200-lora

Adapter
(112)
this model

Dataset used to train ClarkBear/gemma4-e2b-mobile-actions-200-lora