transformers
Hugging Face Transformers for loading Hub models, running pipeline inference, text generation, and Trainer fine-tuning on NLP, vision, audio, and multimodal tasks. Use when working with AutoModel, pipelines, tokenizers, or TrainingArguments—not for general ML outside the Transformers library.
npx skills add majiayu000/claude-skill-registry --skill transformers-k-dense-ai-scientific-agent-ski-2 --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Transformers ## Overview The Hugging Face Transformers library provides access to thousands of pre-trained models for tasks across NLP, computer vision, audio, and multimodal domains. Use this skill to load models, perform inference, and fine-tune on custom data. ## Installation Tested against **transformers 5.9.x** (stable; May 2026). Requires **Python 3.10+** and **PyTorch 2.4+**. ```bash uv pip install "transformers[torch]>=5.9" huggingface_hub datasets evaluate accelerate ``` For vision tasks, add: ```bash uv pip install timm pillow ``` For audio tasks, add: ```bash uv pip install librosa soundfile ``` Check your version: ```python import transformers print(transformers.__version__) ``` ## Authentication Many models on the Hugging Face Hub are gated or private. Authenticate before loading them. **Recommended:** CLI login (stores token in `~/.cache/huggingface/token`): ```bash hf auth login ``` **Python:** ```python from huggingface_hub import login login() # Interactive prompt; do not hardcode tokens in scripts ``` **Servers / CI:** set `HF_TOKEN` in the environment (never commit tokens to git or shell profiles): ```bash export HF_TOKEN="..." # Read token from a secret manage
- Overview
- Installation
- Authentication
- Transformers v5
- Quick Start
- Core Capabilities
- 1. Pipelines for Quick Inference
- 2. Model Loading and Management
- 3. Text Generation
- 4. Training and Fine-Tuning
- 5. Tokenization
- Common Patterns
- Pattern 1: Simple Inference
- Pattern 2: Custom Model Usage
uv pip install "transformers[torch]>=5.9" huggingface_hub datasets evaluate accelerate uv pip install timm pillow uv pip install librosa soundfile hf auth login export HF_TOKEN="..." # Read token from a secret manager, not source code
What does the transformers skill do?
Hugging Face Transformers for loading Hub models, running pipeline inference, text generation, and Trainer fine-tuning on NLP, vision, audio, and multimodal tasks. Use when working with AutoModel, pipelines, tokenizers, or TrainingArguments—not for general ML outside the Transformers library.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill transformers-k-dense-ai-scientific-agent-ski-2 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
