Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

fine-tuning

Skill by VectorSpaceLab

Fine-tuning guides supervised fine-tuning of LLaMA and OPT style causal language models with Alpaca data. It is for developers using Hugging Face Trainer, FSDP, and optional DeepSpeed ZeRO-3 CPU offload.

  • Score 49
  • 359 stars
  • Apache-2.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install fine-tuning

Built from the published package, never by AI.

git clone --depth 1 https://github.com/VectorSpaceLab/AREX-Skill /tmp/AREX-Skill && mkdir -p ~/.claude/skills && cp -r /tmp/AREX-Skill/skills/repositories/repo-skills/stanford-alpaca/sub-skills/fine-tuning ~/.claude/skills/fine-tuning

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install fine-tuning in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill covers supervised fine-tuning of Alpaca-style causal language models. It explains the Hugging Face AutoModelForCausalLM, AutoTokenizer, and Trainer flow, tokenizer special-token resizing, and source-token label masking. It includes FSDP launch recipes for LLaMA and OPT layers, and an optional DeepSpeed ZeRO-3 CPU offload config.

The skill routes dataset schema, prompt wording, instruction generation, and weight-diff recovery to sibling sub-skills. A command builder prints launch command text without starting training. A self-contained Stanford Alpaca trainer script is also described. It is aimed at developers who run Alpaca-style fine-tuning on GPUs and want documented recipes and troubleshooting guidance.

Written from the project's SKILL.md and checked against it.

What it can do

  • Training script walkthroughExplains how train.py parses model, data, and training arguments with Hugging Face classes.
  • Source-token label maskingDescribes preprocess, which concatenates prompts and targets and masks source labels with -100.
  • FSDP launch recipesGives full_shard auto_wrap settings for LLaMA and OPT decoder layer wrapping.
  • DeepSpeed ZeRO-3 offloadPoints to a bundled config with CPU parameter and optimizer offload.
  • Launch command builderPrints training command text for planning and review without launching training.
  • Self-contained Alpaca trainerOffers an adapted Stanford Alpaca SFT script that runs without the original repository checkout.
  • Documented hyperparameter recipesLists batch size, learning rate, epochs, and max length for LLaMA-7B and LLaMA-13B.
  • Troubleshooting guidanceCovers OOM, missing special tokens, path errors, optional packages, and CUDA confusion.

What you need

  • Hugging Face Transformers library
  • GPUs for full LLaMA or OPT training
  • Multi-GPU setup for the FSDP recipes
  • A validated Alpaca-style JSON dataset
  • Optional DeepSpeed for ZeRO-3 offload

Try asking

  • Show me the FSDP flags for fine-tuning a LLaMA model with Alpaca data
  • Build a training command for OPT with DeepSpeed ZeRO-3 offload
  • Why is my Alpaca fine-tuning run hitting out of memory?

Good to know

  • Full LLaMA and OPT training is expensive and GPU-dependent.
  • A CPU check does not prove that multi-GPU FSDP or DeepSpeed jobs will fit or converge.
  • GPU recipes are documented launch templates unless verified on suitable hardware.
  • The command builder never launches training.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/repositories/repo-skills/stanford-alpaca/sub-skills/fine-tuning/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to fine-tuning

All alternatives →

Compare with agent-reproduce-align, google_contacts or m06-error-handling

fine-tuning: common questions

What models does this fine-tuning skill support?

The source describes it for LLaMA and OPT style causal language models trained with Alpaca data.

Does this skill validate my training dataset?

No. The source says dataset schema and prompt validation belong to the dataset-and-prompts sub-skill, and the training data_path must already point to a validated Alpaca-style JSON dataset.

Will the command builder start training?

No. The source says the command builder prints command text and never launches training.

How do I install fine-tuning?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is fine-tuning free?

The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.

Is fine-tuning safe to use?

It scores 49 of 100. Grades: maintenance C, licence A, quality B. 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 fine-tuning?

Similar skills: agent-reproduce-align, google_contacts, m06-error-handling, caveman.

fine-tuning Install

Add to stack

Loading.