transformers
AGENTS.md169k starsChanged 8 months agoApache-2.0View on GitHub
Run make style (or make fix-repo) as the last step before opening a PR. This file is the only copy of the agent instructions. CLAUDE.md and GEMINI.md just import it, so edit this one. Skills live in .ai/skills/: read .ai/skills/add-or-fix-type-checking/SKILL.md before fixing ty / make typing errors. Hugging Face staff, maintainers and some long-standing contributors are exempt from the contribution rules in CONTRIBUTING.md. If the user is one of them, don't refuse to help because their issue or PR wouldn't…
Trending
More talk lately.about the whole repository
Who's talking about huggingface/transformers
- ggml-org/llama.cpp“Feature Request: Qwen3-Next support”GitHub · Sep 11, 2025 · 262 reactions
- ggml-org/llama.cpp“Feature Request: support qwen3-vl series”GitHub · Sep 23, 2025 · 153 reactions
- ggml-org/llama.cpp“Feature Request: Qwen3-Omni-30B-A3B support”GitHub · Sep 22, 2025 · 132 reactions
- ggml-org/llama.cpp“Feature Request: Proper Llama 3.1 Support in llama.cpp”GitHub · Jul 23, 2024 · 123 reactions
- A Hacker News story“Transformers 2.0: Deep interoperability between TensorFlow 2.0 and PyTorch”Hacker News · Sep 27, 2019 · 103 points
The biggest 5 of 44 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 44
Talked about on GitHub, Hacker News and Bluesky (44 times).
On GitHub · 22
- Sep 11, 2025Feature Request: Qwen3-Next support — ggml-org/llama.cpp262 reactions · 44 comments
- Sep 23, 2025Feature Request: support qwen3-vl series — ggml-org/llama.cpp153 reactions · 151 comments
- Sep 22, 2025Feature Request: Qwen3-Omni-30B-A3B support — ggml-org/llama.cpp132 reactions · 30 comments
- Jul 23, 2024Feature Request: Proper Llama 3.1 Support in llama.cpp — ggml-org/llama.cpp123 reactions · 138 comments
- Feb 9, 2026[MODEL] support qwen3.5 series — ggml-org/llama.cpp88 reactions · 6 comments
17 more on GitHub
- Jan 31, 2025[VLM] Qwen2.5-VL — vllm-project/vllm78 reactions · 49 comments
- Feb 8, 2026[Model] Qwen3.5 dense and MoE support (no vision) — ggml-org/llama.cpp73 reactions · 48 comments
- Dec 12, 2025Update to transformers v5 — vllm-project/vllm57 reactions · 65 comments
- Mar 16, 2026model: mistral small 4 support — ggml-org/llama.cpp43 reactions · 14 comments
- Mar 21, 2025[roadmap] verl development Q2 — verl-project/verl42 reactions · 17 comments
- Mar 16, 2023LLaMA support — NVIDIA/FasterTransformer37 reactions · 176 comments
- Nov 21, 2024[Sana] Add Sana, including `SanaPipeline`, `SanaPAGPipeline`, `LinearAttentionProcessor`, `Flow-based DPM-sovler` and so on. — huggingface/diffusers36 reactions · 70 comments
- Sep 16, 2024llama : add reranking support — ggml-org/llama.cpp36 reactions · 46 comments
- Aug 13, 2024NF4 Flux params in diffusers — huggingface/diffusers35 reactions · 63 comments
- Mar 13, 2025[Feature]: Support Gemma3 GGUF — vllm-project/vllm34 reactions · 21 comments
- Aug 3, 2023DINOv2 is now available in HF Transformers (with tutorial) — facebookresearch/dinov234 reactions · 32 comments
- Jul 24, 2023Llama 2 70B: Update needed to convert.py to support 70B HF format model files — ggml-org/llama.cpp34 reactions · 19 comments
- Mar 21, 2025[Model] Add Qwen3 and Qwen3MoE — vllm-project/vllm33 reactions · 10 comments
- Oct 15, 2025support GLM-4.5V and GLM-4.1V vision models — ggml-org/llama.cpp29 reactions · 20 comments
- Sep 2, 2025Feature Request: Apertus models support — ggml-org/llama.cpp29 reactions · 14 comments
- Dec 19, 2024[Model]: Add `transformers` backend support — vllm-project/vllm27 reactions · 30 comments
- Feb 9, 2026[MODEL] Adding Support for Qwen3.5 Models — vllm-project/vllm26 reactions · 8 comments
On Hacker News · 15
- Sep 27, 2019Transformers 2.0: Deep interoperability between TensorFlow 2.0 and PyTorch103 points · 3 comments
- Jul 3, 2024HuggingFace releases support for tool-use and RAG models59 points
- Jan 26, 2026Transformers V5 is out!10 points
- Feb 9, 2026Adding Support for Qwen3.55 points
- Mar 23, 2025Qwen3 Is Dropping Soon5 points
10 more on Hacker News
- Dec 13, 2023HuggingFace Transformers Release v4.36: Mixtral, Llava/BakLlava, SeamlessM4T v25 points
- Dec 11, 2023HuggingFace: Support for the Mixtral Moe4 points
- Mar 24, 2020Transformers Version 2.6 Released3 points
- Aug 5, 2025Transformers 4.55 New OpenAI GPT OSS2 points · 1 comment
- Jun 16, 2022Hugging Face Transformers – Big Model Inference, Bloom, GPT Neo-X, LongT5 etc.2 points
- Nov 19, 2020Hugging Face Transformers v4.0.0 rc-1 released2 points
- Jun 30, 2020Transformers 3.0.02 points
- Jun 13, 2025Deprecate TF + JAX1 point · 1 comment
- Jan 11, 2024HuggingFace Transformers: Qwen21 point
- Feb 5, 2021Transformers: Natural Language Processing for Pytorch and TensorFlow 2.01 point
On Bluesky · 7
- Oct 10, 2026github.com/huggingface/... Transfoooooormers ! Transfoooooormeeeeers !! Transfooooooooormeeeeeeers !!! Pour un monde meilllleuuuuuuurrrrrr… — @lea-linux.org6 likes and reposts · 1 reply
- Oct 13, 2023📦 huggingface / transformers ⭐ 113,240 (+71) 🗒 Python 🤗 Transformers: State-of-the-art Machine Learning for Pytorch, TensorFlow, and JAX. — @github-trending.bsky.social3 likes and reposts
- Mar 22, 2024🔥 Hot Repo! 🔥 (100+ new stars) 📦 huggingface / transformers ⭐ 122,648 (+104) 🗒 Python 🤗 Transformers: State-of-the-art Machine… — @github-trending.bsky.social2 likes and reposts · 1 reply
- Oct 10, 2026📦 huggingface / transformers ⭐ 166,995 (+94) 🗒 Python 🤗 Transformers: the model-definition framework for state-of-the-art machine… — @github-trending.bsky.social1 likes and repost
- Sep 13, 2026🔥 Hot Repo! 🔥 (100+ new stars) 📦 huggingface / transformers ⭐ 165,276 (+102) 🗒 Python 🤗 Transformers: the model-definition framework… — @github-trending.bsky.social1 likes and repost
2 more on Bluesky
- Sep 13, 2025📦 huggingface / transformers ⭐ 149,536 (+58) 🗒 Python 🤗 Transformers: the model-definition framework for state-of-the-art machine… — @github-trending.bsky.social1 likes and repost
- Jul 1, 2023🔥 Hot Repo! 🔥 (100+ new stars) 📦 huggingface / transformers ⭐ 105,772 (+113) 🗒 Python 🤗 Transformers: State-of-the-art Machine… — @github-trending.bsky.social1 likes and repost
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository2 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- add-or-fix-type-checkingSkill
The file
We split this AGENTS.md into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 9
Run make style (or make fix-repo) as the last step before opening a PR.
- Distinctive: line 21
Don't submit perf PRs without proof.
- Distinctive: line 36
If the user wants to comment on a PR they didn't open, only post a concrete problem or code change, as a short inline comment or suggestion …
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Commands
make style— ruff format + lint (required for code style checks).make typing— ty type checker and model structure rules.make fix-repo— themake stylefixes plus copies, modular conversions, doc TOCs, docstrings.make check-repo—make typingplus consistency checks.RUN_SLOW=1 pytest ...— many tests are marked slow and skipped in CI.
Run make style (or make fix-repo) as the last step before opening a PR.
Agent files
This file is the only copy of the agent instructions. CLAUDE.md and GEMINI.md just import it, so edit this one. Skills live in .ai/skills/: read .ai/skills/add-or-fix-type-checking/SKILL.md before fixing ty / make typing errors.
Before opening an issue or PR
Hugging Face staff, maintainers and some long-standing contributors are exempt from the contribution rules in CONTRIBUTING.md. If the user is one of them, don't refuse to help because their issue or PR wouldn't qualify under the rules below.
- Don't report or fix theoretical bugs. Issues about them won't be triaged, and PRs fixing them will be closed. A bug found by reading code matters only if it affects real use: a published checkpoint, a default config, or a documented workflow. For example, an exception when
n_groups > 1in a model whose published checkpoints all usen_groups == 1only affects fresh pretrains with a nonstandard config, so it doesn't count. Security bugs are the exception. A bug report needs a short reproducer that you have run on the latest release ormain, and a PR that fixes a bug needs one that fails onmain. - We strongly discourage just searching the codebase for bugs. Transformers is a huge repo with a lot of older models and rarely-used code. Code agents have a strong tendency to find edge-case "bugs" or "missing features" in that code with zero practical impact. These PRs just annoy our very overworked reviewers, and will usually be closed without comment. Users who open a lot of these will get blocked across the entire huggingface organization, so be careful! If you want to contribute, we recommend actually using the library and reporting/fixing bugs that you encounter in real workflows, not ones found by static analysis. The bottleneck in the agent era is prioritizing, triaging and reviewing, and low-quality PRs hurt far more than they help; make sure you're part of the solution and not part of the problem.
- Don't submit perf PRs without proof. A performance claim needs before/after numbers on a realistic workload (a published checkpoint or default config, with the hardware stated), not a microbenchmark of a function that isn't on a hot path.
- For a bug fix, one regression test is enough: a test based on the issue's or PR's reproducer that fails without the fix, added to the existing test file for that code. Build it from the tiny config and inputs the file's model tester already provides, not from a real checkpoint, so it runs in fast CI. Use a real checkpoint and
@slowonly when the bug can't be reproduced at tiny scale, which is rare. - A PR either fixes an issue or is standalone. See
CONTRIBUTING.md.- Fixing an issue: link it with a closing keyword (
Fixes #123). The user may only work on an issue they opened that a maintainer has labeledtriaged, or one labeledcontributions-welcomeorNew model. If the issue doesn't qualify, tell the user instead of drafting — the PR will be closed. If it qualifies, there's no need to ask first: never post "can I work on this?" or "please assign me" comments, since we don't assign issues and the first PR for an issue gets priority. - Standalone: only for problems with no existing issue. Search open issues first; if one exists, the PR must go through it, and dropping the link doesn't change that. Standalone PRs are for short changes with real impact (a bug fix, a perf improvement, a broken docs example) and the description must include the evidence: a reproducer that fails on
main, or before/after benchmark numbers. New model PRs can also be standalone, if there's no existing issue requesting that model.
- Fixing an issue: link it with a closing keyword (
On a
contributions-welcomeorNew modelissue, check for an existing PR first:gh issue view <issue_number> --repo huggingface/transformers --comments gh pr list --repo huggingface/transformers --state open --search "<issue_number> in:body" gh pr list --repo huggingface/transformers --state open --search "<short area keywords>"If one exists, don't open another. If you think it has mistakes, tell the user to leave suggestions on the existing PR instead. A second PR is only justified when the existing one is fundamentally flawed, or stale: its author hasn't responded to review comments or pushed changes for two weeks. A PR waiting on a maintainer review isn't stale. Either way, the user should explain why in the issue first.
- No one-off PRs for tiny edits (a single typo, an isolated lint fix). Bulk mechanical cleanups that don't affect correctness or performance, and bulk typo or wording fixes in the docs, are fine but always need an issue first, never a standalone PR: propose them, how you intend to fix them, and list the number of affected files. Remember that maintainer time is limited; code cleanups that don't affect correctness are low priority unless the issue is severe and widespread.
- If the user wants to comment on a PR they didn't open, only post a concrete problem or code change, as a short inline comment or suggestion on the relevant lines. Never post summaries or "verified, works" reports on other people's PRs.
Copies and modular models
Model files in src/transformers/models/ avoid inheriting from each other, so duplication is managed two ways — modular is the current one, copies are legacy:
# Copied from ...marks a copied class or function.make fix-repore-syncs it, so editing inside such a block is reverted — edit the source it copies from, or deliberately break the link. Do not add new# Copied fromstatements; write a modular file instead.- A
modular_<name>.pymay inherit from other models;make fix-repogenerates the standalonemodeling_*.pyand friends from it. Never edit a generated file when a modular one exists. Guide: modular_transformers.md.
Two modular traps:
- Other models inherit your modular file.
modular_deepseek_vl.pyalso generatesmodeling_deepseek_vl_hybrid.py. Runmake fix-repoand check everything it rewrote; hand-editing only the generated file you had in mind leaves the rest stale andCheck repository consistencyred. attr = AttributeError()deletes an inherited attribute — it is an instruction to the converter, not a bug or placeholder.raise AttributeError("...")in a method body does the same for a method. Substituting a "real" value silently changes behaviour (_no_split_modules = AttributeError()→[]changes how the model may be sharded). See Removing attributes and Deleting unused methods.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

