vision-sft
Skill by wshobson
Fine-tunes vision-language models with supervised learning on image and text data, using a frozen-vision-tower LoRA recipe. Built for adapting a VLM to a visual domain or debugging a run that trains without learning.
Install vision-sft
Built from the published package, never by AI.
git clone --depth 1 https://github.com/wshobson/agents /tmp/agents && mkdir -p ~/.claude/skills && cp -r /tmp/agents/plugins/llm-finetuning/skills/vision-sft ~/.claude/skills/vision-sftRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/wshobson/agents /tmp/agents && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/agents/plugins/llm-finetuning/skills/vision-sft ~/.gemini/antigravity-cli/skills/vision-sftAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
vision-sft is an agent skill for fine-tuning vision-language models (VLMs) with supervised learning on image and text data. It sets a default recipe: freeze the vision tower and projector, and put LoRA on the LLM only at r=8 to 16 and alpha 16 to 32. It also explains when to unfreeze the last six ViT layers and how to set the min_pixels and max_pixels resolution budget.
The skill is aimed at people adapting a VLM to a visual domain or task, or debugging a run that trains without learning. It warns about two silent failures: image placeholder and media count mismatches, and a poorly chosen resolution budget. Its output is a validated adapter config that the llm-finetuning-training-engineer skill consumes. The source says it assumes routing from finetuning-method-selection and recommends reading lora-qlora-recipes first.
Written from the project's SKILL.md and checked against it.
What it can do
- Frozen-tower LoRA recipeFreezes the vision tower and projector and applies LoRA to the LLM at r=8 to 16.
- Unfreezing guidanceExplains when to unfreeze the last six ViT layers and the lower vision learning rate to use.
- Resolution budget setupSets min_pixels and max_pixels deliberately for each dataset instead of using framework defaults.
- Placeholder validationChecks that each image placeholder maps 1:1 to a media item before training starts.
- Silent failure debuggingHelps diagnose runs where the loss looks normal but the model does not improve.
- Unsloth vision setupCovers UnslothVisionDataCollator and the rule to disable vision-layer finetuning with fast_inference.
- QLoRA pairing rulePermits QLoRA only when the vision tower stays frozen.
What you need
- An image and text dataset
- A vision-language model base already chosen from the model catalog
Try asking
- Set up a frozen-tower LoRA config for my VLM on satellite images.
- Check my image-text dataset for placeholder and media count mismatches.
- Help me choose min_pixels and max_pixels for small document text.
Good to know
- Base VLM selection is out of scope and lives in the finetuning-method-selection model catalog.
- VLM reinforcement learning is reference-only and covered by grpo-rlvr-training.
- Unfreezing vision layers is incompatible with fast_inference=True.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: plugins/llm-finetuning/skills/vision-sft/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md8 KB -
references/collators-and-pitfalls.md6 KB
Alternatives to vision-sft
All alternatives →Aligns a Qwen Code feature with a Codex or Claude Code reference agent. It runs both under the same scenario, captures HTTP and terminal traces, and compares them until behavior matches.
Searches, views, creates, updates, and deletes the user's Google Contacts from an AI assistant. It is for people who want to manage their address book through conversation. A one-time Google connect is required before it returns data.
Guides an AI assistant on error handling choices. It covers when to use Result, Option, ? propagation, unwrap, expect and panic, plus anyhow and thiserror.
Caveman is an agent skill that makes an AI assistant reply in a terse style. It cuts filler and keeps technical facts, code, commands and errors exact. It is built for users who want shorter, cheaper replies.
docs-sync audits or updates English SDK documentation against the requested implementation scope. It is for maintainers who want docs to match main branch features, configuration options, and defaults.
Guides an AI assistant through setting up and running monorepos with pnpm workspaces, Turborepo and Nx. Aimed at developers who need faster builds, shared code and managed dependencies across multiple packages.
Compare with agent-reproduce-align, google_contacts or m06-error-handling
vision-sft: common questions
When should I unfreeze the vision tower?
The source says to unfreeze only for visual domain shift, such as satellite imagery or medical scans. For the last six ViT layers, it reports +1.7pt DocVQA at about 1.75x training cost.
Can I use QLoRA with a VLM?
QLoRA is permitted only with a frozen vision tower. The source calls unfreezing vision layers with quantized base weights unsupported and unstable.
Why does my VLM fine-tune train but not learn?
The source says a clean loss curve can hide image-placeholder mismatches or a wrong min_pixels/max_pixels budget. It recommends re-running the pre-training checklist before changing hyperparameters.
How do I install vision-sft?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is vision-sft free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is vision-sft safe to use?
It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to vision-sft?
Similar skills: agent-reproduce-align, google_contacts, m06-error-handling, caveman.
