Skip to content
Back to skills

Stanford Alpaca

ASecurity

"Routes Stanford Alpaca instruction-data, Self-Instruct generation,

  • 247 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 9, 2026
toolspythongobashapidocumentation

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned September 9, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill stanford-alpaca --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Stanford Alpaca?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Stanford Alpaca
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-stanford-alpaca/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-stanford-alpaca)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: stanford-alpaca
description: "Routes Stanford Alpaca instruction-data, Self-Instruct generation,
  supervised fine-tuning, and LLaMA weight-diff recovery workflows."
disable-model-invocation: true
metadata:
  disco-role: operating
license: NOASSERTION
---

# Stanford Alpaca

Use this root skill to route research tasks involving Stanford Alpaca's released instruction-following data, its historical Self-Instruct-style generator, Hugging Face supervised fine-tuning flow, or Alpaca/LLaMA weight-diff recovery. It is a self-contained operational guide: use its bundled references and helpers rather than reopening a source checkout.

## Start with the right route

| User need or signal | Read or run |
| --- | --- |
| Alpaca JSON/JSONL schema, prompt text, label masking, datasheet/model-card questions, data validation | [dataset-and-prompts](sub-skills/dataset-and-prompts/SKILL.md) |
| Seed tasks, prompt rendering, saved completion parsing, OpenAI completion API, `regen.json`, filtering, ROUGE-L deduplication | [instruction-generation](sub-skills/instruction-generation/SKILL.md) |
| `Trainer`, `torchrun`, FSDP, DeepSpeed, LLaMA/OPT SFT, OOM, batch-size planning, tokenizer/model preparation | [fine-tuning](sub-skills/fine-tuning/SKILL.md) |
| `path_raw`, `path_diff`, `path_tuned`, recovering or creating model weight differences, checksum, recovery inference | [weight-diff-recovery](sub-skills/weight-diff-recovery/SKILL.md) |

## Safe starting sequence

1. For any new or generated corpus, run the offline validator in `dataset-and-prompts` first. It accepts JSON arrays or JSONL, checks the `instruction`/`input`/`output` contract, and can show prompt previews.
2. For instruction synthesis, debug the bundled prompt renderer and saved-response parser before using a live API. Live completion calls require credentials, network access, and a legacy completion-compatible OpenAI client.
3. For SFT, build a launch command before launching it. The bundled command builder only prints text; full LLaMA/OPT jobs require an appropriate model checkpoint, CUDA environment, and enough memory.
4. For weight recovery, use the bundled dry-run command builder to distinguish raw, diff, and output checkpoint paths before loading any tensors.

## Runtime dependencies and capability gates

This is a script-oriented project rather than an installable Python distribution. To use every bundled helper, install a Python environment with PyTorch, Transformers, Fire, NumPy, rouge-score, sentencepiece, tokenizers, and an OpenAI client compatible with `openai.Completion.create`. A historically compatible baseline is `transformers==4.28.1`, `tokenizers==0.13.3`, `openai==0.27.8`, and `numpy<2` with older PyTorch builds.

Run the bundled cross-skill probe after installation:

```bash
python scripts/check_stanford_alpaca_env.py
```

- Use `--require-cuda` only when a CUDA workflow is actually required; CPU imports do not validate multi-GPU FSDP, DeepSpeed, or large-checkpoint recovery.
- Add DeepSpeed only for the optional ZeRO-3 offload path. Add experiment tracking integrations only if you explicitly enable them in Transformers.
- Keep OpenAI API keys in the process environment, never in scripts, datasets, prompts, or skill files.

## Boundaries and safety

- The released data and weight-diff artifacts carry non-commercial/research-use restrictions. Read [dataset intended use and licenses](sub-skills/dataset-and-prompts/references/intended-use-and-licenses.md) before using or distributing derived data, models, or recovered weights.
- This skill provides documentation and safe planning helpers; it does not claim that a live OpenAI call, a full GPU fine-tune, or real LLaMA checkpoint recovery has run in a later user's environment.
- Do not treat the historical training hyperparameters as universally optimal. Validate data, model compatibility, hardware, and evaluation goals for the current experiment.

## Shared references

- [Cross-cutting troubleshooting](references/troubleshooting.md): install/import compatibility, credentials, CUDA, data paths, artifacts, and licensing failures.
- [Repository provenance](references/repo-provenance.md): source commit and evidence baseline; read it before deciding whether a refresh is needed.
- [Environment probe](scripts/check_stanford_alpaca_env.py): inspect dependencies and optional CUDA availability without loading a model or calling a network service.

## Common multi-step routes

- **Generate then train:** `instruction-generation` -> `dataset-and-prompts` -> `fine-tuning`.
- **Use the released data directly:** `dataset-and-prompts` -> `fine-tuning`.
- **Recover then use a model:** `weight-diff-recovery` -> `fine-tuning` only if additional supervised training is intended.

Files in this skill

  • SKILL.md4.7 KB
  • references/repo-provenance.md2.1 KB
  • references/repo-routing-metadata.json462 B
  • references/troubleshooting.md4.7 KB
  • scripts/check_stanford_alpaca_env.py4.4 KB
  • sub-skills/dataset-and-prompts/SKILL.md4.8 KB
  • sub-skills/dataset-and-prompts/references/data-formats.md4.2 KB
  • sub-skills/dataset-and-prompts/references/intended-use-and-licenses.md2.5 KB
  • sub-skills/dataset-and-prompts/references/troubleshooting.md2.7 KB
  • sub-skills/dataset-and-prompts/scripts/validate_alpaca_data.py12.3 KB
  • sub-skills/fine-tuning/SKILL.md5 KB
  • sub-skills/fine-tuning/references/api-reference.md7.2 KB
  • sub-skills/fine-tuning/references/configuration.md6.8 KB
  • sub-skills/fine-tuning/references/troubleshooting.md6.9 KB
  • sub-skills/fine-tuning/references/workflows.md6.7 KB
  • sub-skills/fine-tuning/scripts/build_training_command.py8.3 KB
  • sub-skills/fine-tuning/scripts/default_offload_opt_param.json1.1 KB
  • sub-skills/fine-tuning/scripts/train_alpaca_sft.py8.5 KB
  • sub-skills/instruction-generation/SKILL.md3.2 KB
  • sub-skills/instruction-generation/references/api-reference.md4.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.