Agent skill · Media & Video

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.

K-Dense-AIgithub.com/K-Dense-AIGitHub ↗
claude-codecan modify filesMIT
Install
npx skills add K-Dense-AI/scientific-agent-skills --skill transformers --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 6
SKILL.md size: 7 KB
Bundled scripts: none
Version: 1.2
Allowed tools: ReadWriteEditBash
Requires: Requires Python 3.10+, PyTorch 2.4+, and transformers 5.x. Gated or private Hub models need an HF token (`hf auth…
Path: skills/transformers/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 32,619
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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.12.0** (current PyPI release; June 2026). Requires **Python 3.10+**; the `torch` extra currently requires **PyTorch 2.4+**. ```bash uv pip install "transformers[torch]==5.12.0" huggingface_hub==1.19.0 datasets==5.0.0 evaluate==0.4.6 accelerate==1.14.0 ``` For vision tasks, add: ```bash uv pip install timm==1.0.27 pillow==12.2.0 ``` For audio tasks, add: ```bash uv pip install librosa==0.11.0 soundfile==0.14.0 ``` These pins are for reproducible examples. For exploratory work, loosen them only after checking the Transformers and Hub release notes for API changes. 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:** ```pytho

What's inside
Steps it walks through
  1. Overview
  2. Installation
  3. Authentication
  4. Transformers v5
  5. Quick Start
  6. Core Capabilities
  7. 1. Pipelines for Quick Inference
  8. 2. Model Loading and Management
  9. 3. Text Generation
  10. 4. Training and Fine-Tuning
  11. 5. Tokenization
  12. Common Patterns
  13. Pattern 1: Simple Inference
  14. Pattern 2: Custom Model Usage
Ships with 5 files
  • references/generation.md
  • references/models.md
  • references/pipelines.md
  • references/tokenizers.md
  • references/training.md
Commands it runs
uv pip install "transformers[torch]==5.12.0" huggingface_hub==1.19.0 datasets==5.0.0 evaluate==0.4.6 accelerate==1.14.0
uv pip install timm==1.0.27 pillow==12.2.0
uv pip install librosa==0.11.0 soundfile==0.14.0
hf auth login
export HF_TOKEN="..."  # Read token from a secret manager, not source code
More from scientific-agent-skills
All skills →
About this skill
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 K-Dense-AI/scientific-agent-skills --skill transformers --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 K-Dense-AI/scientific-agent-skills, a repository with 32,619 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.

Keep going