transformers - ✅(Solved) Fix Docs still mention transformers run command which was removed in v5 [2 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
huggingface/transformers#44512Fetched 2026-04-08 00:27:58
View on GitHub
Comments
0
Participants
1
Timeline
6
Reactions
0
Participants
Timeline (top)
cross-referenced ×2closed ×1labeled ×1mentioned ×1

Fix Action

Fixed

PR fix notes

PR #44513: Fix: Remove references to transformers run command

Description (problem / solution / changelog)

What does this PR do?

<!-- Congratulations! You've made it this far! You're not quite done yet though. Once merged, your PR is going to appear in the release notes with the title you set, so make sure it's a great title that fully reflects the extent of your awesome contribution. Then, please replace this with a description of the change and which issue is fixed (if applicable). Please also include relevant motivation and context. List any dependencies (if any) that are required for this change. Once you're done, someone will review your PR shortly (see the section "Who can review?" below to tag some potential reviewers). They may suggest changes to make the code even better. If no one reviewed your PR after a week has passed, don't hesitate to post a new comment @-mentioning the same persons---sometimes notifications get lost. --> <!-- Remove if not applicable -->

Fixes #44512

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline, Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the documentation guidelines, and here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag members/contributors who may be interested in your PR.

@stevhliu

<!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @ If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**. Please tag fewer than 3 people. Models: - text models: @ArthurZucker @Cyrilvallez - vision models: @yonigozlan @molbap - audio models: @eustlb @ebezzam @vasqu - multimodal models: @zucchini-nlp - graph models: @clefourrier Library: - generate: @zucchini-nlp (visual-language models) or @gante (all others) - continuous batching: @remi-or @ArthurZucker @McPatate - pipelines: @Rocketknight1 - tokenizers: @ArthurZucker and @itazap - trainer: @SunMarc - attention: @vasqu @ArthurZucker @CyrilVallez - model loading (from pretrained, etc): @CyrilVallez - distributed: @3outeille @ArthurZucker - CIs: @ydshieh Integrations: - ray/raytune: @richardliaw, @amogkam - Big Model Inference: @SunMarc - quantization: @SunMarc - kernels: @drbh - peft: @BenjaminBossan @githubnemo Devices/Backends: - AMD ROCm: @ivarflakstad - Intel XPU: @IlyasMoutawwakil - Ascend NPU: @ivarflakstad Documentation: @stevhliu Research projects are not maintained and should be taken as is. -->

Changed files

  • docs/source/en/model_doc/albert.md (modified, +0/-7)
  • docs/source/en/model_doc/apertus.md (modified, +0/-7)
  • docs/source/en/model_doc/bamba.md (modified, +0/-6)
  • docs/source/en/model_doc/bart.md (modified, +0/-7)
  • docs/source/en/model_doc/barthez.md (modified, +0/-7)
  • docs/source/en/model_doc/bartpho.md (modified, +0/-10)
  • docs/source/en/model_doc/bert-generation.md (modified, +0/-7)
  • docs/source/en/model_doc/bert.md (modified, +0/-7)
  • docs/source/en/model_doc/bertweet.md (modified, +0/-7)
  • docs/source/en/model_doc/big_bird.md (modified, +0/-7)
  • docs/source/en/model_doc/bigbird_pegasus.md (modified, +0/-7)
  • docs/source/en/model_doc/biogpt.md (modified, +0/-7)
  • docs/source/en/model_doc/byt5.md (modified, +0/-7)
  • docs/source/en/model_doc/camembert.md (modified, +0/-8)
  • docs/source/en/model_doc/canine.md (modified, +0/-7)
  • docs/source/en/model_doc/code_llama.md (modified, +0/-7)
  • docs/source/en/model_doc/deberta-v2.md (modified, +0/-8)
  • docs/source/en/model_doc/deberta.md (modified, +0/-7)
  • docs/source/en/model_doc/distilbert.md (modified, +0/-8)
  • docs/source/en/model_doc/electra.md (modified, +0/-7)
  • docs/source/en/model_doc/encoder-decoder.md (modified, +0/-7)
  • docs/source/en/model_doc/ernie.md (modified, +0/-7)
  • docs/source/en/model_doc/eurobert.md (modified, +1/-8)
  • docs/source/en/model_doc/flex_olmo.md (modified, +0/-7)
  • docs/source/en/model_doc/gemma.md (modified, +0/-7)
  • docs/source/en/model_doc/gemma2.md (modified, +0/-7)
  • docs/source/en/model_doc/gemma3.md (modified, +0/-7)
  • docs/source/en/model_doc/gemma3n.md (modified, +0/-7)
  • docs/source/en/model_doc/gpt2.md (modified, +0/-7)
  • docs/source/en/model_doc/gpt_neo.md (modified, +0/-7)
  • docs/source/en/model_doc/gpt_neox_japanese.md (modified, +0/-6)
  • docs/source/en/model_doc/granite.md (modified, +0/-7)
  • docs/source/en/model_doc/jamba.md (modified, +0/-7)
  • docs/source/en/model_doc/led.md (modified, +0/-7)
  • docs/source/en/model_doc/llama.md (modified, +0/-7)
  • docs/source/en/model_doc/longformer.md (modified, +0/-7)
  • docs/source/en/model_doc/mamba.md (modified, +0/-7)
  • docs/source/en/model_doc/mamba2.md (modified, +0/-7)
  • docs/source/en/model_doc/mobilebert.md (modified, +0/-7)
  • docs/source/en/model_doc/modernbert-decoder.md (modified, +0/-8)
  • docs/source/en/model_doc/modernbert.md (modified, +0/-7)
  • docs/source/en/model_doc/mt5.md (modified, +0/-7)
  • docs/source/en/model_doc/nanochat.md (modified, +0/-7)
  • docs/source/en/model_doc/nllb.md (modified, +0/-7)
  • docs/source/en/model_doc/olmo.md (modified, +0/-7)
  • docs/source/en/model_doc/olmo2.md (modified, +0/-7)
  • docs/source/en/model_doc/olmo3.md (modified, +0/-7)
  • docs/source/en/model_doc/openai-gpt.md (modified, +0/-8)
  • docs/source/en/model_doc/opt.md (modified, +0/-7)
  • docs/source/en/model_doc/pegasus.md (modified, +0/-7)
  • docs/source/en/model_doc/pegasus_x.md (modified, +0/-7)
  • docs/source/en/model_doc/phi.md (modified, +0/-7)
  • docs/source/en/model_doc/roberta.md (modified, +0/-7)
  • docs/source/en/model_doc/roc_bert.md (modified, +0/-7)
  • docs/source/en/model_doc/roformer.md (modified, +0/-7)
  • docs/source/en/model_doc/switch_transformers.md (modified, +0/-8)
  • docs/source/en/model_doc/t5.md (modified, +0/-7)
  • docs/source/en/model_doc/t5gemma.md (modified, +0/-7)
  • docs/source/en/model_doc/vaultgemma.md (modified, +0/-7)
  • docs/source/en/model_doc/xlm-roberta-xl.md (modified, +0/-8)
  • docs/source/en/model_doc/xlm-roberta.md (modified, +0/-7)
  • docs/source/en/model_doc/xlm.md (modified, +0/-7)
  • docs/source/ko/model_doc/albert.md (modified, +0/-7)
  • docs/source/ko/model_doc/code_llama.md (modified, +0/-7)
  • docs/source/ko/model_doc/gemma3.md (modified, +0/-7)
  • docs/source/ko/model_doc/gemma3n.md (modified, +0/-7)
  • docs/source/ko/model_doc/gpt2.md (modified, +0/-7)
  • docs/source/ko/model_doc/jamba.md (modified, +0/-7)
  • docs/source/zh/model_doc/bert.md (modified, +0/-7)

PR #44533: docs: Remove references to removed 'transformers run' CLI command

Description (problem / solution / changelog)

Description

The 'transformers run' command was removed in Transformers v5, but the documentation still contained references in 62 model documentation files.

This PR removes all <hfoption id='transformers CLI'> and <hfoption id='transformers'> blocks that contained the deprecated 'transformers run' command from the model documentation.

Changes

  • 62 files modified in docs/source/en/model_doc/
  • 439 lines removed (all deprecated CLI examples)

Files affected

Includes documentation for: BERT, GPT-2, T5, LLaMA, Gemma, BART, RoBERTa, DeBERTa, ELECTRA, ALBERT, DistilBERT, XLM-RoBERTa, PEGASUS, mamba, OLMo, and 40+ other models.

Verification

grep -r "transformers run" docs/source/en/model_doc/  # Returns no results

Related Issue

Fixes #44512

cc @stevhliu

Changed files

  • docs/source/en/model_doc/albert.md (modified, +0/-8)
  • docs/source/en/model_doc/apertus.md (modified, +0/-7)
  • docs/source/en/model_doc/bamba.md (modified, +0/-5)
  • docs/source/en/model_doc/bart.md (modified, +0/-7)
  • docs/source/en/model_doc/barthez.md (modified, +0/-7)
  • docs/source/en/model_doc/bartpho.md (modified, +0/-10)
  • docs/source/en/model_doc/bert-generation.md (modified, +0/-7)
  • docs/source/en/model_doc/bert.md (modified, +0/-7)
  • docs/source/en/model_doc/bertweet.md (modified, +0/-7)
  • docs/source/en/model_doc/big_bird.md (modified, +0/-7)
  • docs/source/en/model_doc/bigbird_pegasus.md (modified, +0/-7)
  • docs/source/en/model_doc/biogpt.md (modified, +0/-7)
  • docs/source/en/model_doc/byt5.md (modified, +0/-7)
  • docs/source/en/model_doc/camembert.md (modified, +0/-8)
  • docs/source/en/model_doc/canine.md (modified, +0/-7)
  • docs/source/en/model_doc/code_llama.md (modified, +0/-7)
  • docs/source/en/model_doc/deberta-v2.md (modified, +0/-7)
  • docs/source/en/model_doc/deberta.md (modified, +0/-7)
  • docs/source/en/model_doc/distilbert.md (modified, +0/-8)
  • docs/source/en/model_doc/electra.md (modified, +0/-7)
  • docs/source/en/model_doc/encoder-decoder.md (modified, +0/-7)
  • docs/source/en/model_doc/ernie.md (modified, +0/-7)
  • docs/source/en/model_doc/eurobert.md (modified, +0/-7)
  • docs/source/en/model_doc/flex_olmo.md (modified, +0/-7)
  • docs/source/en/model_doc/gemma.md (modified, +0/-7)
  • docs/source/en/model_doc/gemma2.md (modified, +0/-7)
  • docs/source/en/model_doc/gemma3.md (modified, +0/-7)
  • docs/source/en/model_doc/gemma3n.md (modified, +0/-7)
  • docs/source/en/model_doc/gpt2.md (modified, +0/-7)
  • docs/source/en/model_doc/gpt_neo.md (modified, +0/-7)
  • docs/source/en/model_doc/gpt_neox_japanese.md (modified, +0/-6)
  • docs/source/en/model_doc/granite.md (modified, +0/-7)
  • docs/source/en/model_doc/jamba.md (modified, +0/-7)
  • docs/source/en/model_doc/led.md (modified, +0/-7)
  • docs/source/en/model_doc/llama.md (modified, +0/-7)
  • docs/source/en/model_doc/longformer.md (modified, +0/-7)
  • docs/source/en/model_doc/mamba.md (modified, +0/-7)
  • docs/source/en/model_doc/mamba2.md (modified, +0/-7)
  • docs/source/en/model_doc/mobilebert.md (modified, +0/-7)
  • docs/source/en/model_doc/modernbert-decoder.md (modified, +0/-7)
  • docs/source/en/model_doc/modernbert.md (modified, +0/-7)
  • docs/source/en/model_doc/mt5.md (modified, +0/-7)
  • docs/source/en/model_doc/nanochat.md (modified, +0/-7)
  • docs/source/en/model_doc/nllb.md (modified, +0/-7)
  • docs/source/en/model_doc/olmo.md (modified, +0/-7)
  • docs/source/en/model_doc/olmo2.md (modified, +0/-7)
  • docs/source/en/model_doc/olmo3.md (modified, +0/-7)
  • docs/source/en/model_doc/openai-gpt.md (modified, +0/-8)
  • docs/source/en/model_doc/opt.md (modified, +0/-7)
  • docs/source/en/model_doc/pegasus.md (modified, +0/-7)
  • docs/source/en/model_doc/pegasus_x.md (modified, +0/-7)
  • docs/source/en/model_doc/phi.md (modified, +0/-7)
  • docs/source/en/model_doc/roberta.md (modified, +0/-7)
  • docs/source/en/model_doc/roc_bert.md (modified, +0/-7)
  • docs/source/en/model_doc/roformer.md (modified, +0/-7)
  • docs/source/en/model_doc/switch_transformers.md (modified, +0/-8)
  • docs/source/en/model_doc/t5.md (modified, +0/-7)
  • docs/source/en/model_doc/t5gemma.md (modified, +0/-7)
  • docs/source/en/model_doc/vaultgemma.md (modified, +0/-7)
  • docs/source/en/model_doc/xlm-roberta-xl.md (modified, +0/-7)
  • docs/source/en/model_doc/xlm-roberta.md (modified, +0/-7)
  • docs/source/en/model_doc/xlm.md (modified, +0/-7)
RAW_BUFFERClick to expand / collapse

System Info

Transformers version: 5.x

The issue is related to the documentation rather than a specific runtime environment.

Who can help?

@stevhliu

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction

This is a documentation inconsistency in Transformers v5. transformers run command was removed in v5. Despite this, the official documentation still contains multiple references to this command.

Expected behavior

References to transformers run command should be removed.

extent analysis

Fix Plan

Update Documentation

  1. Identify affected models: Review the provided documentation links and identify the models that still reference the transformers run command.
  2. Update documentation: For each affected model, update the documentation to remove references to the transformers run command.
  3. Use alternative commands: Replace the transformers run command with the correct alternative commands for each model, such as python -m transformers or huggingface-cli.

Example Code

Here's an example of how to update the documentation for a specific model (e.g., bert):

### BERT

To fine-tune BERT, use the following command:
```bash
python -m transformers example_bert.py

This will fine-tune the BERT model on the specified dataset.

### BERT Generation

To generate text using BERT, use the following command:
```bash
python -m transformers example_bert_generation.py

This will generate text using the BERT model.

## Verify Changes

1. **Review updated documentation**: Verify that the documentation for each affected model has been updated to remove references to the `transformers run` command.
2. **Test updated commands**: Test the updated commands for each model to ensure they work as expected.

## Extra Tips

* Make sure to update the documentation for all affected models.
* Use the correct alternative commands for each model.
* Test the updated commands thoroughly to ensure they work as expected.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

References to transformers run command should be removed.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

transformers - ✅(Solved) Fix Docs still mention transformers run command which was removed in v5 [2 pull requests, 1 participants]