# gemma-tuner-multimodal

Fine-tunes Gemma 4 and 3n models on Apple Silicon hardware with PyTorch MPS. Adapts weights for audio, vision, and text via LoRA.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 581 installs · ★ 88
- Author: reason-machines
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/reason-machines/trending-skills/tree/HEAD/skills/gemma-tuner-multimodal/SKILL.md
- Updated: 2026-10-09
- HTML: https://affpapa.org/en/nevibecode/skills/gemma-tuner-multimodal

## What it does

This skill guides coding agents through parameter-efficient fine-tuning for Gemma 3n and Gemma 4 models directly on Apple Silicon. No Nvidia card is needed. PyTorch executes directly on Metal Performance Shaders. To handle massive datasets, the pipeline can stream batches directly from BigQuery or Google Cloud Storage without filling your local hard drive.

All tasks revolve around the `gemma-macos-tuner` command-line tool. It provides dedicated routines to verify system dependencies, walk through an interactive setup wizard, process CSV datasets, and merge LoRA adapters into SafeTensors. Configurations across models, datasets, and hyperparameters are managed hierarchically inside `config/config.ini`.

Running Python under Rosetta x86_64 breaks execution; you need native arm64 on macOS 12.3 or newer. Training Gemma 4 variants also demands a dedicated virtual environment with packages from `requirements-gemma4.txt`.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill gemma-tuner-multimodal -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/gemma-tuner-multimodal/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/gemma-tuner-multimodal/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill gemma-tuner-multimodal -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/gemma-tuner-multimodal/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill gemma-tuner-multimodal -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/gemma-tuner-multimodal/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install reason-machines/trending-skills gemma-tuner-multimodal
```

2. **Manually: put the files in place**
- File: `.github/skills/gemma-tuner-multimodal/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill gemma-tuner-multimodal -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/reason-machines/trending-skills --path skills/gemma-tuner-multimodal
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/gemma-tuner-multimodal/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill gemma-tuner-multimodal -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/reason-machines/trending-skills/tree/HEAD/skills/gemma-tuner-multimodal/SKILL.md

## When to use it
- fine-tune Gemma 3n and 4 on Apple Silicon without Nvidia GPUs
- train multimodal speech models using audio files and transcripts
- configure vision-language LoRA runs for image captioning tasks
- stream training data from BigQuery or GCS without saving files locally
- merge trained LoRA adapters and export them into SafeTensors

## Example prompts
- Verify my local hardware setup using gemma-macos-tuner system-check
- Generate an audio fine-tuning profile inside config.ini for Gemma 3n
- Run dataset preparation and start the text-instruction training profile

## Similar
- [nemo-mbridge-perf-memory-tuning](https://affpapa.org/en/nevibecode/skills/nemo-mbridge-perf-memory-tuning.md) — skill · 1900 installs
- [vision-multimodal](https://affpapa.org/en/nevibecode/skills/vision-multimodal.md) — skill · 550 installs
- [ai-multimodal](https://affpapa.org/en/nevibecode/skills/ai-multimodal.md) — skill · 530 installs
- [linkfox-multimodal-extract-attributes](https://affpapa.org/en/nevibecode/skills/linkfox-multimodal-extract-attributes.md) — skill · 409 installs
- [linkfox-multimodal-generate-image](https://affpapa.org/en/nevibecode/skills/linkfox-multimodal-generate-image.md) — skill · 404 installs
- [gguf-quantization](https://affpapa.org/en/nevibecode/skills/gguf-quantization.md) — skill · 989 installs

From the same set: [reason-machines/trending-skills](https://affpapa.org/en/nevibecode/by/reason-machines/trending-skills.md) — 199 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
