Skip to content

Commit d4e92f1

Browse files
authored
Remove add-new-model in favor of add-new-model-like (#30424)
* Remove add-new-model in favor of add-new-model-like * nits
1 parent 0eb8fbc commit d4e92f1

36 files changed

+39
-14439
lines changed

.github/workflows/model-templates.yml

-81
This file was deleted.

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ New models are constantly released and if you want to implement a new model, ple
110110

111111
If you are willing to contribute the model yourself, let us know so we can help you add it to 🤗 Transformers!
112112

113-
We have added a [detailed guide and templates](https://github.com/huggingface/transformers/tree/main/templates) to help you get started with adding a new model, and we also have a more technical guide for [how to add a model to 🤗 Transformers](https://huggingface.co/docs/transformers/add_new_model).
113+
We have a technical guide for [how to add a model to 🤗 Transformers](https://huggingface.co/docs/transformers/add_new_model).
114114

115115
## Do you want to add documentation?
116116

docs/source/de/add_new_model.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -398,12 +398,14 @@ In dem speziellen Fall, dass Sie ein Modell hinzufügen, dessen Architektur gena
398398
Modells übereinstimmt, müssen Sie nur ein Konvertierungsskript hinzufügen, wie in [diesem Abschnitt](#write-a-conversion-script) beschrieben.
399399
In diesem Fall können Sie einfach die gesamte Modellarchitektur des bereits vorhandenen Modells wiederverwenden.
400400

401-
Andernfalls beginnen wir mit der Erstellung eines neuen Modells. Sie haben hier zwei Möglichkeiten:
401+
Andernfalls beginnen wir mit der Erstellung eines neuen Modells. Wir empfehlen die Verwendung des folgenden Skripts, um ein Modell hinzuzufügen
402+
ein bestehendes Modell:
402403

403-
- `transformers-cli add-new-model-like`, um ein neues Modell wie ein bestehendes hinzuzufügen
404-
- `transformers-cli add-new-model`, um ein neues Modell aus unserer Vorlage hinzuzufügen (sieht dann aus wie BERT oder Bart, je nachdem, welche Art von Modell Sie wählen)
404+
```bash
405+
transformers-cli add-new-model-like
406+
```
405407

406-
In beiden Fällen werden Sie mit einem Fragebogen aufgefordert, die grundlegenden Informationen zu Ihrem Modell auszufüllen. Für den zweiten Befehl müssen Sie `cookiecutter` installieren, weitere Informationen dazu finden Sie [hier](https://github.com/huggingface/transformers/tree/main/templates/adding_a_new_model).
408+
Sie werden mit einem Fragebogen aufgefordert, die grundlegenden Informationen Ihres Modells einzugeben.
407409

408410
**Eröffnen Sie einen Pull Request auf dem Haupt-Repositorium huggingface/transformers**
409411

docs/source/de/contributing.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Es werden ständig neue Modelle veröffentlicht. Wenn Sie ein neues Modell imple
9898

9999
Lassen Sie es uns wissen, wenn Sie bereit sind, das Modell selbst beizutragen. Dann können wir Ihnen helfen, es zu 🤗 Transformers hinzuzufügen!
100100

101-
Wir haben eine [detaillierte Anleitung und Vorlagen](https://github.com/huggingface/transformers/tree/main/templates) hinzugefügt, um Ihnen das Hinzufügen eines neuen Modells zu erleichtern, und wir haben auch einen technischen Leitfaden dazu, [wie man ein Modell zu 🤗 Transformers hinzufügt](https://huggingface.co/docs/transformers/add_new_model).
101+
Wir haben auch einen technischen Leitfaden dazu, [wie man ein Modell zu 🤗 Transformers hinzufügt](https://huggingface.co/docs/transformers/add_new_model).
102102

103103
## Möchten Sie die Dokumentation erweitern?
104104

docs/source/en/add_new_model.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -398,12 +398,14 @@ In the special case that you are adding a model whose architecture exactly match
398398
existing model you only have to add a conversion script as described in [this section](#write-a-conversion-script).
399399
In this case, you can just re-use the whole model architecture of the already existing model.
400400

401-
Otherwise, let's start generating a new model. You have two choices here:
401+
Otherwise, let's start generating a new model. We recommend using the following script to add a model starting from
402+
an existing model:
402403

403-
- `transformers-cli add-new-model-like` to add a new model like an existing one
404-
- `transformers-cli add-new-model` to add a new model from our template (will look like BERT or Bart depending on the type of model you select)
404+
```bash
405+
transformers-cli add-new-model-like
406+
```
405407

406-
In both cases, you will be prompted with a questionnaire to fill in the basic information of your model. The second command requires to install `cookiecutter`, you can find more information on it [here](https://github.com/huggingface/transformers/tree/main/templates/adding_a_new_model).
408+
You will be prompted with a questionnaire to fill in the basic information of your model.
407409

408410
**Open a Pull Request on the main huggingface/transformers repo**
409411

docs/source/it/add_new_model.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -351,13 +351,14 @@ Nel caso speciale in cui stiate aggiungendo un modello, la cui architettura sia
351351
dovrete solo aggiugnere uno script di conversione, come descritto [qui](#write-a-conversion-script).
352352
In questo caso, potete riutilizzare l'intera architettura del modello gia esistente.
353353

354-
Se questo non é il caso, cominciamo con il generare un nuovo modello. Avrete due opzioni:
354+
Se questo non é il caso, cominciamo con il generare un nuovo modello. Ti consigliamo di utilizzare il seguente script per aggiungere un modello a partire da
355+
un modello esistente:
355356

356-
- `transformers-cli add-new-model-like` per aggiungere un nuovo modello come uno che gia esiste
357-
- `transformers-cli add-new-model` per aggiungere un nuovo modello da un nostro template (questo assomigliera a BERT o Bart, in base al modello che selezionerete)
357+
```bash
358+
transformers-cli add-new-model-like
359+
```
358360

359-
In entrambi i casi, l'output vi darà un questionario da riempire con informazioni basi sul modello. Il secondo comando richiede di installare
360-
un `cookiecutter` - maggiori informazioni [qui](https://github.com/huggingface/transformers/tree/main/templates/adding_a_new_model).
361+
Ti verrà richiesto con un questionario di compilare le informazioni di base del tuo modello.
361362

362363
**Aprire una Pull Request in main huggingface/transformers repo**
363364

docs/source/ja/add_new_model.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -307,14 +307,15 @@ cd transformers
307307
[このセクション](#write-a-conversion-script)で説明されているように、変換スクリプトを追加するだけで済みます。
308308
この場合、既存のモデルの完全なモデルアーキテクチャを再利用できます。
309309

310-
それ以外の場合、新しいモデルの生成を開始します。ここで2つの選択肢があります:
311310

312-
- `transformers-cli add-new-model-like`を使用して既存のモデルのような新しいモデルを追加します
313-
- `transformers-cli add-new-model`を使用して、テンプレートから新しいモデルを追加します(モデルのタイプに応じてBERTまたはBartのように見えます)
311+
それ以外の場合は、新しいモデルの生成を開始しましょう。 次のスクリプトを使用して、以下から始まるモデルを追加することをお勧めします。
312+
既存のモデル:
314313

315-
どちらの場合でも、モデルの基本情報を入力するための質問事項が表示されます。
316-
2番目のコマンドを実行するには、`cookiecutter`をインストールする必要があります。
317-
詳細については[こちら](https://github.com/huggingface/transformers/tree/main/templates/adding_a_new_model)をご覧ください。
314+
```bash
315+
transformers-cli add-new-model-like
316+
```
317+
318+
モデルの基本情報を入力するためのアンケートが表示されます。
318319

319320
**主要な huggingface/transformers リポジトリでプルリクエストを開く**
320321

docs/source/ko/add_new_model.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -268,12 +268,14 @@ cd transformers
268268

269269
다음과 같이 이미 존재하는 모델의 모델 아키텍처와 정확히 일치하는 모델을 추가하는 특별한 경우에는 [이 섹션](#write-a-conversion-script)에 설명된대로 변환 스크립트만 추가하면 됩니다. 이 경우에는 이미 존재하는 모델의 전체 모델 아키텍처를 그대로 재사용할 수 있습니다.
270270

271-
그렇지 않으면 새로운 모델 생성을 시작합시다. 여기에서 두 가지 선택지가 있습니다:
271+
그렇지 않으면 새 모델 생성을 시작하겠습니다. 다음 스크립트를 사용하여 다음에서 시작하는 모델을 추가하는 것이 좋습니다.
272+
기존 모델:
272273

273-
- `transformers-cli add-new-model-like`를 사용하여 기존 모델과 유사한 새로운 모델 추가하기
274-
- `transformers-cli add-new-model`을 사용하여 템플릿을 기반으로 한 새로운 모델 추가하기 (선택한 모델 유형에 따라 BERT 또는 Bart와 유사한 모습일 것입니다)
274+
```bash
275+
transformers-cli add-new-model-like
276+
```
275277

276-
두 경우 모두, 모델의 기본 정보를 입력하는 설문조사가 제시됩니다. 두 번째 명령어는 `cookiecutter`를 설치해야 합니다. 자세한 정보는 [여기](https://github.com/huggingface/transformers/tree/main/templates/adding_a_new_model)에서 확인할 수 있습니다.
278+
모델의 기본 정보를 입력하는 설문지가 표시됩니다.
277279

278280
**huggingface/transformers 메인 저장소에 Pull Request 열기**
279281

docs/source/ko/contributing.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ python src/transformers/commands/transformers_cli.py env
9999

100100
만약 모델을 직접 기여하고 싶으시다면, 알려주세요. 🤗 Transformers에 추가할 수 있도록 도와드리겠습니다!
101101

102-
새로운 모델을 추가하는 방법에 대한 [상세 안내서와 템플릿](https://github.com/huggingface/transformers/tree/main/templates)을 제공하고 있으며, [🤗 Transformers에 새로운 모델을 추가하는 방법](https://huggingface.co/docs/transformers/add_new_model)에 대한 기술적인 안내서도 있습니다.
102+
[🤗 Transformers에 새로운 모델을 추가하는 방법](https://huggingface.co/docs/transformers/add_new_model)에 대한 기술적인 안내서도 있습니다.
103103

104104
## 문서를 추가하고 싶으신가요? [[do-you-want-to-add-documentation]]
105105

docs/source/zh/contributing.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ python src/transformers/commands/transformers_cli.py env
9898

9999
如果你想亲自贡献模型,请告诉我们。让我们帮你把它添加到 🤗 Transformers!
100100

101-
我们已经添加了[详细的指南和模板](https://github.com/huggingface/transformers/tree/main/templates)来帮助你添加新模型。我们还有一个更技术性的指南,告诉你[如何将模型添加到 🤗 Transformers](https://huggingface.co/docs/transformers/add_new_model)
101+
我们还有一个更技术性的指南,告诉你[如何将模型添加到 🤗 Transformers](https://huggingface.co/docs/transformers/add_new_model)
102102

103103
## 你想要添加文档吗?
104104

0 commit comments

Comments
 (0)