Path Lines of Code AGENTS.md 27 CODE_OF_CONDUCT.md 97 CONTRIBUTING.md 273 ISSUES.md 178 README.md 256 SECURITY.md 20 awesome-transformers.md 313 benchmark/README.md 40 benchmark/grafana_dashboard.json 2375 benchmark/requirements.txt 5 docker/README.md 6 examples/3D_parallel.py 293 examples/README.md 112 examples/flax/README.md 56 examples/flax/_tests_requirements.txt 10 examples/flax/conftest.py 14 examples/flax/image-captioning/README.md 57 examples/flax/image-captioning/create_model_from_encoder_decoder_models.py 66 examples/flax/image-captioning/run_image_captioning_flax.py 943 examples/flax/language-modeling/README.md 443 examples/flax/language-modeling/requirements.txt 5 examples/flax/language-modeling/run_bart_dlm_flax.py 707 examples/flax/language-modeling/run_bert_flax.py 36 examples/flax/language-modeling/run_clm_flax.py 660 examples/flax/language-modeling/run_mlm_flax.py 654 examples/flax/language-modeling/run_t5_mlm_flax.py 675 examples/flax/language-modeling/t5_tokenizer_model.py 87 examples/flax/question-answering/README.md 78 examples/flax/question-answering/requirements.txt 5 examples/flax/question-answering/run_qa.py 762 examples/flax/question-answering/utils_qa.py 250 examples/flax/speech-recognition/README.md 57 examples/flax/speech-recognition/requirements.txt 8 examples/flax/speech-recognition/run_flax_speech_recognition_seq2seq.py 623 examples/flax/summarization/README.md 27 examples/flax/summarization/requirements.txt 6 examples/flax/summarization/run_summarization_flax.py 784 examples/flax/test_flax_examples.py 121 examples/flax/text-classification/README.md 83 examples/flax/text-classification/requirements.txt 5 examples/flax/text-classification/run_flax_glue.py 523 examples/flax/token-classification/README.md 36 examples/flax/token-classification/requirements.txt 6 examples/flax/token-classification/run_flax_ner.py 641 examples/flax/vision/README.md 50 examples/flax/vision/requirements.txt 8 examples/flax/vision/run_image_classification.py 439 examples/legacy/README.md 15 examples/legacy/benchmarking/README.md 19 examples/legacy/benchmarking/plot_csv_file.py 126 examples/legacy/benchmarking/requirements.txt 1 examples/legacy/benchmarking/run_benchmark.py 23 examples/legacy/multiple_choice/run_multiple_choice.py 167 examples/legacy/multiple_choice/utils_multiple_choice.py 401 examples/legacy/pytorch-lightning/lightning_base.py 331 examples/legacy/pytorch-lightning/requirements.txt 21 examples/legacy/pytorch-lightning/run_glue.py 156 examples/legacy/pytorch-lightning/run_glue.sh 26 examples/legacy/pytorch-lightning/run_ner.py 172 examples/legacy/pytorch-lightning/run_ner.sh 32 examples/legacy/pytorch-lightning/run_pos.sh 31 examples/legacy/question-answering/README.md 105 examples/legacy/question-answering/run_squad.py 651 examples/legacy/question-answering/run_squad_trainer.py 122 examples/legacy/run_camembert.py 39 examples/legacy/run_chinese_ref.py 105 examples/legacy/run_language_modeling.py 282 examples/legacy/run_openai_gpt.py 229 examples/legacy/run_swag.py 521 examples/legacy/run_transfo_xl.py 88 examples/legacy/seq2seq/README.md 254 examples/legacy/seq2seq/__init__.py 3 examples/legacy/seq2seq/convert_model_to_fp16.py 15 examples/legacy/seq2seq/download_wmt.py 29 examples/legacy/seq2seq/finetune.sh 8 examples/legacy/seq2seq/finetune_tpu.sh 9 examples/legacy/seq2seq/finetune_trainer.py 272 examples/legacy/seq2seq/minify_dataset.py 13 examples/legacy/seq2seq/old_test_calculate_rouge.py 63 examples/legacy/seq2seq/old_test_datasets.py 202 examples/legacy/seq2seq/old_test_fsmt_bleu_score.py 44 examples/legacy/seq2seq/old_test_seq2seq_examples.py 79 examples/legacy/seq2seq/old_test_seq2seq_examples_multi_gpu.py 22 examples/legacy/seq2seq/old_test_tatoeba_conversion.py 19 examples/legacy/seq2seq/pack_dataset.py 51 examples/legacy/seq2seq/requirements.txt 20 examples/legacy/seq2seq/romanian_postprocessing.md 48 examples/legacy/seq2seq/rouge_cli.py 11 examples/legacy/seq2seq/run_distributed_eval.py 214 examples/legacy/seq2seq/run_eval.py 122 examples/legacy/seq2seq/run_eval_search.py 86 examples/legacy/seq2seq/save_len_file.py 33 examples/legacy/seq2seq/save_randomly_initialized_model.py 10 examples/legacy/seq2seq/sentence_splitter.py 14 examples/legacy/seq2seq/seq2seq_trainer.py 170 examples/legacy/seq2seq/seq2seq_training_args.py 30 examples/legacy/seq2seq/test_data/fsmt/build-eval-data.py 23 examples/legacy/seq2seq/test_data/fsmt/fsmt_val_data.json 90 examples/legacy/seq2seq/train_distil_marian_enro.sh 24 examples/legacy/seq2seq/train_distil_marian_enro_tpu.sh 24 examples/legacy/seq2seq/train_distilbart_cnn.sh 24 examples/legacy/seq2seq/train_mbart_cc25_enro.sh 21 examples/legacy/seq2seq/utils.py 478 examples/legacy/seq2seq/xla_spawn.py 34 examples/legacy/token-classification/README.md 224 examples/legacy/token-classification/run.sh 31 examples/legacy/token-classification/run_chunk.sh 32 examples/legacy/token-classification/run_ner.py 233 examples/legacy/token-classification/run_pos.sh 32 examples/legacy/token-classification/scripts/preprocess.py 26 examples/legacy/token-classification/tasks.py 143 examples/legacy/token-classification/utils_ner.py 239 examples/metrics-monitoring/README.md 2 examples/metrics-monitoring/continuous-batching-dashboard.json 974 examples/metrics-monitoring/grafana-dashboard.yaml 10 examples/metrics-monitoring/grafana-datasources.yaml 12 examples/metrics-monitoring/metrics_example.py 28 examples/metrics-monitoring/tempo.yaml 81 examples/modular-transformers/README.md 12 examples/modular-transformers/configuration_dummy.py 1 examples/modular-transformers/configuration_my_new_model.py 78 examples/modular-transformers/configuration_my_new_model2.py 76 examples/modular-transformers/configuration_new_model.py 69 examples/modular-transformers/configuration_super.py 1 examples/modular-transformers/convert_examples.sh 5 examples/modular-transformers/image_processing_new_imgproc_model.py 146 examples/modular-transformers/modeling_add_function.py 18 examples/modular-transformers/modeling_dummy.py 326 examples/modular-transformers/modeling_dummy_bert.py 702 examples/modular-transformers/modeling_from_uppercase_model.py 139 examples/modular-transformers/modeling_multimodal1.py 326 examples/modular-transformers/modeling_multimodal2.py 385 examples/modular-transformers/modeling_my_new_model2.py 394 examples/modular-transformers/modeling_new_task_model.py 391 examples/modular-transformers/modeling_roberta.py 705 examples/modular-transformers/modeling_super.py 276 examples/modular-transformers/modeling_switch_function.py 103 examples/modular-transformers/modeling_test_detr.py 1058 examples/modular-transformers/modular_add_function.py 7 examples/modular-transformers/modular_dummy.py 8 examples/modular-transformers/modular_dummy_bert.py 22 examples/modular-transformers/modular_from_uppercase_model.py 3 examples/modular-transformers/modular_multimodal1.py 3 examples/modular-transformers/modular_multimodal2.py 35 examples/modular-transformers/modular_my_new_model.py 7 examples/modular-transformers/modular_my_new_model2.py 6 examples/modular-transformers/modular_new_imgproc_model.py 6 examples/modular-transformers/modular_new_model.py 30 examples/modular-transformers/modular_new_task_model.py 63 examples/modular-transformers/modular_roberta.py 12 examples/modular-transformers/modular_super.py 33 examples/modular-transformers/modular_switch_function.py 4 examples/modular-transformers/modular_test_detr.py 3 examples/pytorch/3d_parallel_checks.py 502 examples/pytorch/README.md 278 examples/pytorch/_tests_requirements.txt 32 examples/pytorch/audio-classification/README.md 119 examples/pytorch/audio-classification/requirements.txt 5 examples/pytorch/audio-classification/run_audio_classification.py 326 examples/pytorch/conftest.py 14 examples/pytorch/context_parallel.py 50 examples/pytorch/continuous_batching.py 50 examples/pytorch/contrastive-image-text/README.md 83 examples/pytorch/contrastive-image-text/requirements.txt 3 examples/pytorch/contrastive-image-text/run_clip.py 400 examples/pytorch/image-classification/README.md 148 examples/pytorch/image-classification/requirements.txt 6 examples/pytorch/image-classification/run_image_classification.py 340 examples/pytorch/image-classification/run_image_classification_no_trainer.py 514 examples/pytorch/image-pretraining/README.md 198 examples/pytorch/image-pretraining/requirements.txt 3 examples/pytorch/image-pretraining/run_mae.py 301 examples/pytorch/image-pretraining/run_mim.py 360 examples/pytorch/image-pretraining/run_mim_no_trainer.py 643 examples/pytorch/instance-segmentation/README.md 181 examples/pytorch/instance-segmentation/requirements.txt 5 examples/pytorch/instance-segmentation/run_instance_segmentation.py 314 examples/pytorch/instance-segmentation/run_instance_segmentation_no_trainer.py 554 examples/pytorch/language-modeling/README.md 188 examples/pytorch/language-modeling/requirements.txt 7 examples/pytorch/language-modeling/run_clm.py 498 examples/pytorch/language-modeling/run_clm_no_trainer.py 559 examples/pytorch/language-modeling/run_fim.py 655 examples/pytorch/language-modeling/run_fim_no_trainer.py 694 examples/pytorch/language-modeling/run_mlm.py 526 examples/pytorch/language-modeling/run_mlm_no_trainer.py 581 examples/pytorch/language-modeling/run_plm.py 437 examples/pytorch/multiple-choice/README.md 83 examples/pytorch/multiple-choice/requirements.txt 5 examples/pytorch/multiple-choice/run_no_trainer.sh 5 examples/pytorch/multiple-choice/run_swag.py 331 examples/pytorch/multiple-choice/run_swag_no_trainer.py 501 examples/pytorch/object-detection/README.md 177 examples/pytorch/object-detection/requirements.txt 5 examples/pytorch/object-detection/run_object_detection.py 351 examples/pytorch/object-detection/run_object_detection_no_trainer.py 582 examples/pytorch/old_test_xla_examples.py 40 examples/pytorch/question-answering/README.md 141 examples/pytorch/question-answering/requirements.txt 4 examples/pytorch/question-answering/run_qa.py 523 examples/pytorch/question-answering/run_qa_beam_search.py 547 examples/pytorch/question-answering/run_qa_beam_search_no_trainer.py 778 examples/pytorch/question-answering/run_qa_no_trainer.py 762 examples/pytorch/question-answering/run_seq2seq_qa.py 572 examples/pytorch/question-answering/trainer_qa.py 92 examples/pytorch/question-answering/trainer_seq2seq_qa.py 110 examples/pytorch/question-answering/utils_qa.py 250 examples/pytorch/semantic-segmentation/README.md 145 examples/pytorch/semantic-segmentation/requirements.txt 6 examples/pytorch/semantic-segmentation/run_semantic_segmentation.py 326 examples/pytorch/semantic-segmentation/run_semantic_segmentation_no_trainer.py 495 examples/pytorch/speech-pretraining/README.md 128 examples/pytorch/speech-pretraining/requirements.txt 5 examples/pytorch/speech-pretraining/run_wav2vec2_pretraining_no_trainer.py 594 examples/pytorch/speech-recognition/README.md 512 examples/pytorch/speech-recognition/requirements.txt 6 examples/pytorch/speech-recognition/run_speech_recognition_ctc.py 589 examples/pytorch/speech-recognition/run_speech_recognition_ctc_adapter.py 584 examples/pytorch/speech-recognition/run_speech_recognition_seq2seq.py 469 examples/pytorch/summarization/README.md 145 examples/pytorch/summarization/requirements.txt 9 examples/pytorch/summarization/run_summarization.py 614 examples/pytorch/summarization/run_summarization_no_trainer.py 643 examples/pytorch/test_accelerate_examples.py 178 examples/pytorch/test_pytorch_examples.py 286 examples/pytorch/text-classification/README.md 201 examples/pytorch/text-classification/requirements.txt 8 examples/pytorch/text-classification/run_classification.py 593 examples/pytorch/text-classification/run_glue.py 495 examples/pytorch/text-classification/run_glue_no_trainer.py 535 examples/pytorch/text-classification/run_xnli.py 347 examples/pytorch/text-generation/README.md 23 examples/pytorch/text-generation/requirements.txt 4 examples/pytorch/text-generation/run_generation.py 311 examples/pytorch/text-generation/run_generation_contrastive_search.py 82 examples/pytorch/token-classification/README.md 109 examples/pytorch/token-classification/requirements.txt 5 examples/pytorch/token-classification/run.sh 6 examples/pytorch/token-classification/run_ner.py 501 examples/pytorch/token-classification/run_ner_no_trainer.py 657 examples/pytorch/token-classification/run_no_trainer.sh 7 examples/pytorch/translation/README.md 169 examples/pytorch/translation/requirements.txt 8 examples/pytorch/translation/run_translation.py 539 examples/pytorch/translation/run_translation_no_trainer.py 616 examples/pytorch/xla_spawn.py 34 examples/quantization/custom_quantization.py 57 examples/quantization/custom_quantization_int8_example.py 184 examples/research_projects/README.md 15 examples/run_on_remote.py 28 examples/tensorflow/README.md 32 examples/tensorflow/_tests_requirements.txt 25 examples/tensorflow/contrastive-image-text/README.md 66 examples/tensorflow/contrastive-image-text/requirements.txt 2 examples/tensorflow/contrastive-image-text/run_clip.py 484 examples/tensorflow/image-classification/README.md 115 examples/tensorflow/image-classification/requirements.txt 3 examples/tensorflow/image-classification/run_image_classification.py 439 examples/tensorflow/language-modeling-tpu/README.md 80 examples/tensorflow/language-modeling-tpu/prepare_tfrecord_shards.py 131 examples/tensorflow/language-modeling-tpu/requirements.txt 3 examples/tensorflow/language-modeling-tpu/run_mlm.py 244 examples/tensorflow/language-modeling-tpu/train_unigram.py 92 examples/tensorflow/language-modeling/README.md 62 examples/tensorflow/language-modeling/requirements.txt 2 examples/tensorflow/language-modeling/run_clm.py 487 examples/tensorflow/language-modeling/run_mlm.py 500 examples/tensorflow/multiple-choice/README.md 34 examples/tensorflow/multiple-choice/requirements.txt 3 examples/tensorflow/multiple-choice/run_swag.py 365 examples/tensorflow/question-answering/README.md 43 examples/tensorflow/question-answering/requirements.txt 3 examples/tensorflow/question-answering/run_qa.py 587 examples/tensorflow/question-answering/utils_qa.py 250 examples/tensorflow/summarization/README.md 32 examples/tensorflow/summarization/requirements.txt 3 examples/tensorflow/summarization/run_summarization.py 554 examples/tensorflow/test_tensorflow_examples.py 151 examples/tensorflow/text-classification/README.md 89 examples/tensorflow/text-classification/requirements.txt 5 examples/tensorflow/text-classification/run_glue.py 430 examples/tensorflow/text-classification/run_text_classification.py 422 examples/tensorflow/token-classification/README.md 36 examples/tensorflow/token-classification/requirements.txt 3 examples/tensorflow/token-classification/run_ner.py 464 examples/tensorflow/translation/README.md 54 examples/tensorflow/translation/requirements.txt 3 examples/tensorflow/translation/run_translation.py 526 examples/training/distributed_training.py 80 notebooks/README.md 112 src/transformers/models/gpt2/CONVERSION.md 5 templates/adding_a_missing_tokenization_test/README.md 27 templates/adding_a_missing_tokenization_test/cookiecutter.json 10 templates/adding_a_new_example_script/README.md 30 templates/adding_a_new_example_script/cookiecutter.json 9 templates/adding_a_new_model/ADD_NEW_MODEL_PROPOSAL_TEMPLATE.md 907 templates/adding_a_new_model/README.md 17 templates/adding_a_new_model/open_model_proposals/ADD_BIG_BIRD.md 920 templates/adding_a_new_model/open_model_proposals/README.md 2 tests/deepspeed/ds_config_zero2.json 49 tests/deepspeed/ds_config_zero3.json 56 tests/deepspeed/vit_feature_extractor.json 4 tests/fixtures/add_distilbert_like_config.json 19 tests/fixtures/dummy-config.json 3 tests/fixtures/dummy_feature_extractor_config.json 4 tests/fixtures/empty.txt 1 tests/fixtures/input.txt 1 tests/fixtures/merges.txt 5 tests/fixtures/preprocessor_config.json 4 tests/fixtures/sample_text.txt 31 tests/fixtures/sample_text_no_unicode.txt 30 tests/fixtures/test_entity_vocab.json 1 tests/fixtures/tests_samples/COCO/coco_panoptic_annotations.txt 1 tests/fixtures/tests_samples/GermEval/dev.txt 192 tests/fixtures/tests_samples/GermEval/labels.txt 25 tests/fixtures/tests_samples/GermEval/train.txt 190 tests/fixtures/tests_samples/conll/sample.json 10 tests/fixtures/tests_samples/swag/sample.json 10 tests/fixtures/tests_samples/wmt16/sample.json 10 tests/fixtures/vocab.json 1 tests/fixtures/vocab.txt 10 tests/quantization/bnb/README.md 81 tests/sagemaker/README.md 113 tests/sagemaker/scripts/pytorch/requirements.txt 2 tests/sagemaker/scripts/tensorflow/requirements.txt 1 tests/utils/tiny_model_summary.json 7246 utils/important_models.txt 4 utils/not_doctested.txt 961 utils/slow_documentation_tests.txt 15 utils/tf_ops/onnx.json 245