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.
Merge pull request #4 from YerevaNN/model_loading
Add OPT model implementation, OPT model loading functionality from huggingface, and training OPT models with FSDP
- Loading branch information
Showing
11 changed files
with
596 additions
and
40 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
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.