Skip to content

Commit ad9f188

Browse files
authored
Update transformers backend name (#2075)
following Huggingface efforts in VLLM (cf vllm-project/vllm#28725), we would like to uniformize the naming and make sure that people think we use the HF models only
1 parent e1f7f31 commit ad9f188

File tree

16 files changed

+24
-22
lines changed

16 files changed

+24
-22
lines changed

.ci/docker/common/install_conda.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ install_pip_dependencies() {
4343
pip_install -r /opt/conda/requirements.txt
4444
pip_install -r /opt/conda/requirements-flux.txt
4545
pip_install -r /opt/conda/requirements-vlm.txt
46-
pip_install -r /opt/conda/requirements-transformers-backend.txt
46+
pip_install -r /opt/conda/requirements-transformers-modeling-backend.txt
4747
popd
4848
}
4949

.ci/docker/ubuntu/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ COPY requirements-dev.txt /opt/conda/
3333
COPY requirements.txt /opt/conda/
3434
COPY requirements-flux.txt /opt/conda/
3535
COPY requirements-vlm.txt /opt/conda/
36-
COPY requirements-transformers-backend.txt /opt/conda/
36+
COPY requirements-transformers-modeling-backend.txt /opt/conda/
3737
COPY conda-env-ci.txt /opt/conda/
3838
COPY ./common/install_conda.sh install_conda.sh
3939
COPY ./common/utils.sh utils.sh

.github/workflows/integration_test_8gpu_transformers_backend.yaml renamed to .github/workflows/integration_test_8gpu_transformers_modeling_backend.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
name: Transformers Backend 8 GPU Integration Tests
1+
name: Transformers Modeling Backend 8 GPU Integration Tests
22

33
on:
44
push:
55
branches: [ main ]
66
paths:
7-
- 'torchtitan/experiments/transformers_backend/**'
7+
- 'torchtitan/experiments/transformers_modeling_backend/**'
88
pull_request:
99
paths:
10-
- 'torchtitan/experiments/transformers_backend/**'
10+
- 'torchtitan/experiments/transformers_modeling_backend/**'
1111
schedule:
1212
# Runs every 12 hours
1313
- cron: '0 */12 * * *'
@@ -50,4 +50,4 @@ jobs:
5050
USE_CPP=0 python -m pip install --pre torchao --index-url https://download.pytorch.org/whl/nightly/cu126
5151
5252
mkdir artifacts-to-be-uploaded
53-
python -m torchtitan.experiments.transformers_backend.tests.integration_tests artifacts-to-be-uploaded --ngpu 8
53+
python -m torchtitan.experiments.transformers_modeling_backend.tests.integration_tests artifacts-to-be-uploaded --ngpu 8

torchtitan/experiments/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ We provide this `experiments/` folder to host experiments that add significant v
3131
| [moe_symm_mem_kernels](./moe_symm_mem_kernels/) | TBA | [@kwen2501](https://github.com/kwen2501) |
3232
| [gpt_oss](./gpt_oss/) | TBA | [@jianiw](https://github.com/jianiw) |
3333
| [compiler_toolkit](./compiler_toolkit/) | [![Compiler Toolkit 8 GPU Integration Tests](https://github.com/pytorch/torchtitan/actions/workflows/integration_test_8gpu_compiler_toolkit.yaml/badge.svg?branch=main)](https://github.com/pytorch/torchtitan/actions/workflows/integration_test_8gpu_compiler_toolkit.yaml?query=branch%3Amain) | [@SherlockNoMad](https://github.com/SherlockNoMad) [@yiming0416](https://github.com/yiming0416) |
34-
| [transformers_backend](./transformers_backend/) | [![Transformers backend 8 GPU Integration Tests](https://github.com/pytorch/torchtitan/actions/workflows/integration_test_8gpu_transformers_backend.yaml/badge.svg?branch=main)](https://github.com/pytorch/torchtitan/actions/workflows/integration_test_8gpu_transformers_backend.yaml?query=branch%3Amain) | [@3outeille](https://github.com/3outeille) |
34+
| [transformers_modeling_backend](./transformers_modeling_backend/) | [![Transformers modeling backend 8 GPU Integration Tests](https://github.com/pytorch/torchtitan/actions/workflows/integration_test_8gpu_transformers_modeling_backend.yaml/badge.svg?branch=main)](https://github.com/pytorch/torchtitan/actions/workflows/integration_test_8gpu_transformers_modeling_backend.yaml?query=branch%3Amain) | [@3outeille](https://github.com/3outeille) |

torchtitan/experiments/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
"vlm",
1313
"compiler_toolkit.deepseek_v3",
1414
"compiler_toolkit.llama3",
15-
"transformers_backend",
15+
"transformers_modeling_backend",
1616
]
1717
)

torchtitan/experiments/transformers_backend/README.md renamed to torchtitan/experiments/transformers_modeling_backend/README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
1-
# Huggingface Transformers backend
1+
# Huggingface Transformers Modeling backend
2+
3+
This enables HF transformers models to be trained with `4D parallelism + torch.compile`
24

35
## Quick start
46

57
- Requirements `transformers==4.57.1`
68

7-
- Config: `torchtitan/torchtitan/experiments/transformers_backend/configs/qwen3.toml`
9+
- Config: `torchtitan/torchtitan/experiments/transformers_modeling_backend/configs/qwen3.toml`
810
```diff
911
...
1012
[model]
1113
- name = "llama3"
12-
+ name = "transformers_backend"
14+
+ name = "transformers_modeling_backend"
1315
flavor = "debugmodel"
1416
hf_assets_path = "./tests/assets/tokenizer"
1517

1618
+[hf_transformers]
1719
+model = "Qwen/Qwen3-4B-Instruct-2507"
1820
...
1921
```
20-
- Train: `LOG_RANK=7 CONFIG_FILE=<YOUR_PATH>/torchtitan/experiments/transformers_backend/configs/qwen3.toml ./run_train.sh --job.custom_config_module=torchtitan.experiments.transformers_backend.job_config --compile.enable`
22+
- Train: `LOG_RANK=7 CONFIG_FILE=<YOUR_PATH>/torchtitan/experiments/transformers_modeling_backend/configs/qwen3.toml ./run_train.sh --job.custom_config_module=torchtitan.experiments.transformers_modeling_backend.job_config --compile.enable`
2123
- Make sure you have created the tokenizers beforehand
2224
<img width="1334" height="453" alt="image" src="https://github.com/user-attachments/assets/da459448-027b-4af9-8176-6a3e433a272c" />
2325

torchtitan/experiments/transformers_backend/configs/debug_model.toml renamed to torchtitan/experiments/transformers_modeling_backend/configs/debug_model.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ save_tb_folder = "tb"
2020
enable_wandb = false
2121

2222
[model]
23-
name = "transformers_backend"
23+
name = "transformers_modeling_backend"
2424
flavor = "debugmodel"
2525
# test folder with tokenizer.json, for debug purpose only
2626
hf_assets_path = "./tests/assets/tokenizer"

torchtitan/experiments/transformers_backend/configs/full.toml renamed to torchtitan/experiments/transformers_modeling_backend/configs/full.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ save_tb_folder = "tb"
2020
enable_wandb = false
2121

2222
[model]
23-
name = "transformers_backend"
23+
name = "transformers_modeling_backend"
2424
flavor = "full"
2525
# test folder with tokenizer.json, for debug purpose only
2626
hf_assets_path = "./tests/assets/tokenizer"

0 commit comments

Comments
 (0)