Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion run_llama_train.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ NGPU=8
MP=4

torchrun --nproc_per_node=${NGPU} \
train.py --steps 10
train.py --steps 10 --compile
2 changes: 1 addition & 1 deletion torchtrain/profiling.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

from torchtrain.logging_utils import rank0_log

_config_file = "./torchtrain/train_config.toml"
_config_file = "./torchtrain/train_config/train_config.toml"


def get_config_from_toml(config_path: str = _config_file) -> dict:
Expand Down
1 change: 1 addition & 0 deletions torchtrain/train_configs/__init_.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# __init__.py
10 changes: 8 additions & 2 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
import os
from dataclasses import dataclass, field
from typing import List
import logging
from logging import getLogger

# torch imports
import torch
Expand Down Expand Up @@ -74,6 +72,14 @@ def main(args):
optimizer = build_optimizer(model, args)

# TODO: add metrics

# torch.compile model for improved performance
if args.compile:
rank0_log(f"Compiling model {model_name} with torch.compile...")
model = torch.compile(
model,
)

train_state = TrainState()

# train loop
Expand Down