Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add AlterLab-IEU/AlterLab-Academic-Skills --skill alterlab-transformersgit clone --depth 1 https://github.com/AlterLab-IEU/AlterLab-Academic-SkillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/alterlab-ieu/alterlab-academic-skills/alterlab-transformers)<a href="https://agentmods.dev/skills/alterlab-ieu/alterlab-academic-skills/alterlab-transformers"><img src="https://agentmods.dev/badge/skills/alterlab-ieu/alterlab-academic-skills/alterlab-transformers/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/alterlab-ieu/alterlab-academic-skills/alterlab-transformers"><img src="https://agentmods.dev/badge/skills/alterlab-ieu/alterlab-academic-skills/alterlab-transformers.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00181 | $0.02873 |
| Opus 5.5 | $0.00072 | $0.01149 |
| Sonnet 5.5 | $0.00036 | $0.00575 |
| Haiku 4.5 | $0.00018 | $0.00287 |
Grade A, and why
alterlab-transformers scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
This is a copy
94% identical to transformers — 212 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 213 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Transformers
Overview
Hugging Face Transformers loads pretrained checkpoints from the Hub for NLP, vision, audio, and multimodal tasks, runs inference through pipeline() or the Auto* classes, and fine-tunes them with Trainer. This skill targets transformers v5 (≥ 5.0; current 5.17.0 as of 2026-09). v5 is PyTorch-only and changes several v4 idioms, so check "v5 changes that break v4 code" below before reusing older snippets from papers, blogs, or model cards.
When to Use This Skill
Use this skill when the user wants to:
- Run quick inference with a Hub checkpoint via
pipeline()— text classification, NER, zero-shot classification, text generation with a chat model, speech recognition, image classification/detection, or image-text-to-text with a VLM. - Load a model plus tokenizer/processor with explicit
dtype,device_map, attention backend, or 4/8-bit quantization. - Control decoding in
model.generate()(greedy, sampling, beam search, streaming, chat templates). - Fine-tune an encoder or decoder on a custom labelled dataset with
Trainer, optionally with LoRA viapeft. - Port v4-era code (
torch_dtype=,load_in_8bit=, removed pipelines, TF/Flax models) to v5.
Does NOT Trigger
| Scenario | Use Instead |
|---|---|
| Classical ML on tabular features (random forests, preprocessing pipelines, CV grid search) | alterlab-scikit-learn |
| Structuring a custom PyTorch architecture's training loop, multi-GPU strategy, and checkpointing with a LightningModule | alterlab-pytorch-lightning |
| Topic models, embeddings, or text classifiers as a social-science measurement design (validity, BERTopic, dictionaries) | alterlab-text-as-data |
| Protein language models (ESM3 / ESM C embeddings, protein design) | alterlab-esm |
| Zero-shot time-series forecasting with a pretrained foundation model | alterlab-timesfm |
Installation
uv pip install "transformers>=5" torch accelerate datasets
- Vision: add
pillowandtorchvision(the default image-processor backend;timmonly for timm-backed models). - Audio: add
librosa soundfile. - LoRA / quantization:
peft,bitsandbytes(CUDA). Metrics:evaluateor plain scikit-learn metrics.
What ships with it
6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago Changed · +48 lines · +111 tokens per session 483ac67c6f38
- 1mo ago First seen · 165 lines · 70 tokens per session scan A 1301523f18da
alterlab-transformers is a skill published in the GitHub repository AlterLab-IEU/AlterLab-Academic-Skills (78 stars, last pushed yesterday), licensed MIT. It adds 181 tokens to every session and 2,873 once invoked, about $0.0007 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 94% identical to transformers, differing in 212 lines, and is treated as a copy.
Other skills, from other repositories
r-spss-syntax-architect
A guide for turning research hypotheses into repeatable R or SPSS code for statistical analysis. It covers panel data, where the same companies or other units are observed over time, as well as interaction effects, curves, and mediation.
multi-source-data-integrator
A method for combining independent data sources into one traceable, reproducible research dataset.
outlines
Guarantee valid JSON/XML/code structure during generation, use Pydantic models for type-safe outputs, support local models (Transformers, vLLM), and maximize inference speed with Outlines - dottxt.ai's structured generation library.
ml-expert
Expert-level machine learning, deep learning, model training, and MLOps. Use when the user mentions machine learning, deep learning, neural networks, MLOps, or data science, or when the task involves Machine Learning Fundamentals, Data Preparation, or Model Training.
llm-engineering-expert
Build reliable applications on large language models: prompt design, structured output, evaluation, guardrails, and cost and latency control. Use when the user mentions LLMs, prompts, prompt engineering, few-shot examples, structured or JSON output, function calling, hallucination, model evaluation, token costs…
partner-anthropic
Anthropic intelligence — Claude model family, Claude Code, MCP protocol, Claude for Work programs, May 2026 state, Frank's relationship state, integration patterns. Use when generating Anthropic content, writing about Claude/MCP/Claude Code, partnership-conversation prep for Anthropic, or evaluating new Anthropic…