Skip to content

Commit 6db9d25

Browse files
authored
match titan config update (#48)
1 parent e32221a commit 6db9d25

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

apps/sft/llama3_8b.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ comm:
1515
model:
1616
name: llama3
1717
flavor: 8B
18-
tokenizer_path: /tmp/Meta-Llama-3.1-8B-Instruct
18+
hf_assets_path: /tmp/Meta-Llama-3.1-8B-Instruct
1919

2020
optimizer:
2121
name: AdamW

apps/sft/main.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
from omegaconf import DictConfig, OmegaConf
2323
from torch import nn
2424
from torchdata.stateful_dataloader import StatefulDataLoader
25-
from torchtitan.components.checkpoint import ModelWrapper
2625
from torchtitan.components.loss import LossFunction
2726
from torchtitan.components.lr_scheduler import LRSchedulersContainer
2827
from torchtitan.components.optimizer import OptimizersContainer
@@ -76,22 +75,20 @@ def setup(self):
7675
# self.train_config.packing_config,
7776
# )
7877

79-
# TODO: confirm that this is working properly
80-
# Should also use load, not dcp_load
8178
self.checkpointer.load(step=self.current_step)
8279
# self.profiler = self.setup_profiler(self.train_config.profiler_config)
8380
# self.logger = self.setup_logger(self.train_config.logger_config)
8481

8582
def setup_data(self):
8683
tokenizer = HuggingFaceModelTokenizer(
8784
tokenizer_json_path=os.path.join(
88-
self.job_config.model.tokenizer_path, "tokenizer.json"
85+
self.job_config.model.hf_assets_path, "tokenizer.json"
8986
),
9087
tokenizer_config_json_path=os.path.join(
91-
self.job_config.model.tokenizer_path, "tokenizer_config.json"
88+
self.job_config.model.hf_assets_path, "tokenizer_config.json"
9289
),
9390
generation_config_path=os.path.join(
94-
self.job_config.model.tokenizer_path, "generation_config.json"
91+
self.job_config.model.hf_assets_path, "generation_config.json"
9592
),
9693
)
9794

0 commit comments

Comments
 (0)