forked from pytorch/torchtitan
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
739 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
__pycache__ | ||
.idea | ||
.vscode | ||
.DS_Store | ||
*.egg-info | ||
build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import submitit | ||
import datetime | ||
import yaml | ||
import os | ||
|
||
|
||
if __name__ == "__main__": | ||
executor = submitit.AutoExecutor(folder="~/slurm_jobs/titan/job_%j") | ||
executor.update_parameters( | ||
name="titan", timeout_min=15, | ||
gpus_per_node=2, | ||
nodes=1, mem_gb=30, cpus_per_task=10, | ||
slurm_array_parallelism=10 | ||
) | ||
|
||
jobs = [] | ||
with executor.batch(): | ||
for _ in range(1): | ||
function = submitit.helpers.CommandFunction([ | ||
'python3', '-m', 'torch.distributed.run', | ||
'--nproc_per_node', '2', | ||
'--rdzv_backend', 'c10d', | ||
'--rdzv_endpoint', 'localhost:0', | ||
'--local-ranks-filter', '0', | ||
'--role', 'rank', '--tee', '3', | ||
'train.py', '--job.config_file', './train_configs/galactica_125m.toml', | ||
]) | ||
print(' '.join(function.command)) | ||
# subprocess.run(function.command) | ||
job = executor.submit(function) | ||
jobs.append(job) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Copyright (c) Meta Platforms, Inc. and affiliates. | ||
# All rights reserved. | ||
# | ||
# This source code is licensed under the BSD-style license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
# | ||
# <model name> is licensed under the <license name>, | ||
# Copyright (c) Meta Platforms, Inc. All Rights Reserved. | ||
|
||
from torchtitan.models.opt.model import ModelArgs, OPT | ||
from torchtitan.models.opt.utils import load_opt_weights | ||
|
||
__all__ = ["OPT", "load_opt_weights"] | ||
|
||
opt_configs = { | ||
"debugmodel": ModelArgs(dim=256, n_layers=8, n_heads=8), | ||
"125M": ModelArgs(dim=768, n_layers=12, n_heads=12), | ||
# "1.3B": ModelArgs(dim=2048, n_layers=, n_heads=8), | ||
# "6.7B": ModelArgs(dim=2048, n_layers=, n_heads=8) | ||
} |
Oops, something went wrong.