Skip to content

Commit ec01495

Browse files
authored
Merge pull request #384 from Modalities/fix/warmstart_fsdp2_weight_tying
Migration to latest versions of torch & flash-attn to solve warmstart/fsdp2/weight tying problem
2 parents 9cbb02b + 6d46af8 commit ec01495

7 files changed

Lines changed: 16 additions & 12 deletions

File tree

‎.github/workflows/build_and_deploy_documentation.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
run: |
2626
sudo apt-get update
2727
sudo apt-get install git -y
28-
python -m pip install torch==2.6.0
28+
python -m pip install torch==2.7.1
2929
python -m pip install --upgrade pip setuptools wheel
3030
export FLASH_ATTENTION_SKIP_CUDA_BUILD=TRUE
3131
python -m pip install -e .

‎.github/workflows/tests_full.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ jobs:
2323
sudo apt-get update
2424
sudo apt-get install curl -y # required by coveralls
2525
sudo apt-get install git -y
26-
python -m pip install torch==2.6.0
26+
python -m pip install torch==2.7.1
2727
python -m pip install --upgrade pip setuptools wheel
2828
export FLASH_ATTENTION_SKIP_CUDA_BUILD=TRUE
2929
python -m pip install ninja # Lowers compilation time of flash attention significantly
30-
python -m pip install flash-attn==2.7.4.post1 --no-build-isolation
30+
python -m pip install flash-attn==2.8.0.post2 --no-build-isolation
3131
python -m pip install -e .[tests]
3232
- name: Run tests
3333
run: |

‎README.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ conda create -n modalities python=3.11
4444
conda activate modalities
4545

4646
# install PyTorch, Ninja and Flash Attention (mandatory)
47-
pip install torch==2.6.0
47+
pip install torch==2.7.1
4848
pip install ninja # Lowers compilation time of flash attention significantly
49-
pip install flash-attn==2.7.4.post1 --no-build-isolation
49+
pip install flash-attn==2.8.0.post2 --no-build-isolation
5050
```
5151

5252
### Option 1: Installation from source
@@ -82,9 +82,9 @@ pip install modalities
8282
curl -LsSf https://astral.sh/uv/install.sh | sh
8383
uv venv --seed --python 3.11 --prompt modalities
8484
source .venv/bin/activate
85-
uv pip install torch
85+
uv pip install torch==2.7.1
8686
uv pip install ninja
87-
uv pip install --no-build-isolation flash-attn==2.7.4.post1
87+
uv pip install --no-build-isolation flash-attn==2.8.0.post2
8888
# for developer: use [tests,linting] and install pre-commit hooks
8989
uv pip install -e .[tests,linting]
9090
pre-commit install --install-hooks

‎config_files/training/config_lorem_ipsum_long_fsdp1_warmstart.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ settings:
6868
variant_key: last_step_from_checkpoint_path
6969
config:
7070
checkpoint_path: ${settings.warmstart_checkpoint_paths.model_checkpoint_path}
71-
warmstart_checkpoint_paths: ${warmstart_env:checkpoint_paths}
71+
warmstart_checkpoint_paths: ${warmstart_env:checkpoint_paths} # use modalities warmstart [..] --last_checkpoint_info_file_path [..]
7272

7373
collate_fn:
7474
component_key: collate_fn

‎config_files/training/config_lorem_ipsum_long_fsdp2_warmstart.yaml‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ settings:
7474
variant_key: last_step_from_checkpoint_path
7575
config:
7676
checkpoint_path: ${settings.warmstart_checkpoint_paths.checkpoint_folder_path}
77-
warmstart_checkpoint_paths: # ${warmstart_env:checkpoint_paths}
78-
checkpoint_folder_path: /raid/s3/opengptx/max_lue/repositories/modalities/data/checkpoints/2025-03-14__15-25-59_970fedec/eid_2025-03-14__15-25-59_970fedec-seen_steps_96-seen_tokens_196608-target_steps_162-target_tokens_331776
77+
warmstart_checkpoint_paths: ${warmstart_env:checkpoint_paths} # use modalities warmstart [..] --last_checkpoint_info_file_path [..]
7978

8079
collate_fn:
8180
component_key: collate_fn

‎src/modalities/logging_broker/subscriber_impl/results_subscriber.py‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,12 @@ def __init__(
7373
with open(config_file_path, "r", encoding="utf-8") as file:
7474
config = yaml.safe_load(file)
7575
self.run = wandb.init(
76-
project=project, name=experiment_id, mode=mode.value.lower(), dir=logging_directory, config=config
76+
project=project,
77+
name=experiment_id,
78+
mode=mode.value.lower(),
79+
dir=logging_directory,
80+
config=config,
81+
settings=wandb.Settings(init_timeout=120),
7782
)
7883

7984
self.run.log_artifact(config_file_path, name=f"config_{wandb.run.id}", type="config")

‎tutorials/warmstart/configs/warmstart_config.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ settings:
5353
variant_key: last_step_from_checkpoint_path
5454
config:
5555
checkpoint_path: ${settings.warmstart_checkpoint_paths.checkpoint_folder_path}
56-
warmstart_checkpoint_paths: ${warmstart_env:checkpoint_paths}
56+
warmstart_checkpoint_paths: ${warmstart_env:checkpoint_paths} # use modalities warmstart [..] --last_checkpoint_info_file_path [..]
5757

5858
collate_fn:
5959
component_key: collate_fn

0 commit comments

Comments
 (0)