From 757c26fb40cbeeef3a1288219503acd23febd034 Mon Sep 17 00:00:00 2001 From: Steven Liu <59462357+stevhliu@users.noreply.github.com> Date: Thu, 26 Jun 2025 12:25:14 -0700 Subject: [PATCH] [docs] Model contribution (#38995) improve --- docs/source/en/_toctree.yml | 6 +++--- docs/source/en/add_new_model.md | 2 +- docs/source/en/modular_transformers.md | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/source/en/_toctree.yml b/docs/source/en/_toctree.yml index 7508f09688..e3fce128d3 100644 --- a/docs/source/en/_toctree.yml +++ b/docs/source/en/_toctree.yml @@ -17,10 +17,10 @@ title: Customizing model components - local: model_sharing title: Sharing - - local: add_new_model - title: Adding a new model to Transformers - local: modular_transformers - title: Modular Transformers + title: Contributing a new model to Transformers + - local: add_new_model + title: Legacy model contribution - local: auto_docstring title: Document your models - local: attention_interface diff --git a/docs/source/en/add_new_model.md b/docs/source/en/add_new_model.md index a9d4109bd5..c4695b2fe3 100644 --- a/docs/source/en/add_new_model.md +++ b/docs/source/en/add_new_model.md @@ -13,7 +13,7 @@ rendered properly in your Markdown viewer. --> -# Adding a new model to Transformers +# Legacy model contribution > [!TIP] > Try adding new models with a more [modular](./modular_transformers) approach first. This makes it significantly easier to contribute a model to Transformers! diff --git a/docs/source/en/modular_transformers.md b/docs/source/en/modular_transformers.md index 1ead4fe926..a7224994da 100644 --- a/docs/source/en/modular_transformers.md +++ b/docs/source/en/modular_transformers.md @@ -1,4 +1,4 @@ -# Modular Transformers +# Contributing a new model to Transformers Modular Transformers lowers the bar for contributing models and significantly reduces the code required to add a model by allowing imports and inheritance.