Agent skill · research science · k-dense-ai

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.

Why this skill is useful

Provides domain-specific knowledge and commands for using Hugging Face Transformers that the AI wouldn't reliably generate on its own.

What it needs

Requires accelerate, datasets, evaluate, huggingface_hub, librosa, pillow, soundfile, timm, torch, transformers installed locally. Requires huggingface account access. About 4k tokens when loaded. Last updated 2026-08-03. 32,849 stars on the source repository.

What this skill does

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+. For vision tasks, add: For audio tasks, add: 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: 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): Python: Servers / CI: set HFTOKEN in the environment (never commit tokens to git or shell profiles): Get tokens at: https://huggingface.co/settings/tokens Security: Never paste tokens into notebooks, repos, or shared configs. Prefer hf auth login over exporting tokens in .bashrc or .zshrc. Use the narrowest token scope that works: read for private or gated model downloads, write only for uploads. If a long-running environment should not send the stored token on every Hub request, set HFHUBDISABLEIMPLICITTOKEN=1 and pass a token only where authentication is required. Transformers v5 Transformers v5 is PyTorch-only (TensorFlow and JAX backends were removed). For upgrades from v4, see the v5 migration guide. New projects should pair transformers 5.x with huggingfacehub 1.x. Gated or custom architectures: accept the model license on the Hub, then load with trustremotecode=True only when the model card requires custom code you have reviewed. Cache location: set HFHOME for all Hugging Face caches, or HFHUBCACHE just for Hub files. Use HFHUBOFFLINE=1 only after required model snapshots are already cached. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills k-dense-ai/transformers

View the source on GitHub

Browse the @skills marketplace