BluetOpen source

What agents should know before contributing

huggingface/transformers

🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training.

Read by Bluet from 4 files written for agents and 300 merged pull requests on 2026-09-25. Not reviewed by the maintainers.

Rules its files tell agents (8)

  • mustNever edit a generated file when a modular one exists.

    A modular_<name>.py may inherit from other models; make fix-repo generates the standalone modeling_*.py and friends from it. Never edit a generated file when a modular one exists. Guide: modular_transformers.md.

    CLAUDE.md
  • shouldDo not submit "pure agent" PRs.

    Do not submit "pure agent" PRs. The human submitter is responsible for reviewing all changed lines, validating behavior end-to-end, and running relevant tests.

    CONTRIBUTING.md
  • shouldIn the past, we used to accept these, but given the current flood, we simply don't have time for small style c…

    Avoid small or "busywork" PRs. In the past, we used to accept these, but given the current flood, we simply don't have time for small style changes or typo fixes in comments. You can provide value beyond a code agent simply by having good taste about what's really important. Code agents often zero in on "theoretical bugs" found by code analysis that rarely if ever cause problems in practice. These are generally not worth fixing unless they can be exploited by an attacker.

    CONTRIBUTING.md
  • shouldMany code agents trust the user comments too much, which results in bad solutions, sometimes for problems that…

    Take the time to reproduce the problem. Very often when a user reports an issue, the issue is actually caused by environment issues on their machine, or they misdiagnose the problem and suggest an invalid solution. Many code agents trust the user comments too much, which results in bad solutions, sometimes for problems that do not exist! Writing a simple reproducer script and running it to make sure you see the problem is valuable.

    CONTRIBUTING.md
  • shouldAs a result, we ask that first-time contributors do not use code agents to create issues or PRs at this time…

    [!WARNING] The Transformers repo is currently being overwhelmed by a large number of PRs and issue comments written by code agents. We are currently bottlenecked by our ability to review and respond to them. As a result, we ask that first-time contributors do not use code agents to create issues or PRs at this time. We'd also ask autonomous agents not to open any PRs or issues for the moment. > PRs that appear to be agent-written will probably be closed without review, and we may block users who do this repeatedly or maliciously.

    CONTRIBUTING.md
  • shouldDo not add new # Copied from statements; write a modular file instead.

    # Copied from ... marks a copied class or function. make fix-repo re-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 from statements; write a modular file instead.

    CLAUDE.md
  • shouldCheck for overlapping work, and do not open a second PR for a fix already covered:
    CLAUDE.md
  • shouldDo not open a PR for someone else's issue without explicit approval from its author or a maintainer in the thr…

    Coordinate on the matching issue first. Do not open a PR for someone else's issue without explicit approval from its author or a maintainer in the thread; if approval is unclear, ask instead of drafting.

    CLAUDE.md

Decisions its pull requests settled (12)

  • #48289Assert cached decode matches recomputing without a cache
  • #48280Fix sliding window cache when assistant model calls generate
  • #48359Fix incorrect tuple return annotations on forward methods returning a Tensor
  • #48446[Fix] Sparse TikToken tokenizers silently fail
  • #48455[GLM 5.3 Flash] Fix NaN gradients in chunked KDA
  • #48482Fix sliding-window mask `layer_idx` in Gemma3/Gemma4 `create_masks_for_vision_model`
  • #48490Pass kwargs to the Mamba2 mixer in Nemotron-H, Falcon-H1 and Mamba2
  • #48676[GLM 5.3 Flash] Preserve original names when saving text checkpoints
  • #48578Mirror the registered pytree flatten when building automatic dynamic shapes
  • #48720[DeepseekV3] OOM cascade root-cause investigation (generator ref leak in conversion_mapping)
  • #48907Standardise Aria's MoE onto the experts interface
  • #48975Fix mask creation not being skipped under `torch.compile`
Your agents can be told this before they touch the code. Get it for your repository: npx bluet-mcp init. What Bluet is.
huggingface/transformers: what agents should know before contributing · Bluet