Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
927f6544
Unverified
Commit
927f6544
authored
Jan 05, 2022
by
Stas Bekman
Committed by
GitHub
Jan 05, 2022
Browse files
[megatron convert] PYTHONPATH requirements (#14956)
* [megatron convert] PYTHONPATH requirements * more info
parent
857ab55c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
0 deletions
+32
-0
src/transformers/models/megatron_bert/convert_megatron_bert_checkpoint.py
.../models/megatron_bert/convert_megatron_bert_checkpoint.py
+16
-0
src/transformers/models/megatron_gpt2/convert_megatron_gpt2_checkpoint.py
.../models/megatron_gpt2/convert_megatron_gpt2_checkpoint.py
+16
-0
No files found.
src/transformers/models/megatron_bert/convert_megatron_bert_checkpoint.py
View file @
927f6544
...
...
@@ -16,6 +16,22 @@
####################################################################################################
#
# Note: If when running this conversion script you're getting an exception:
# ModuleNotFoundError: No module named 'megatron.model.enums'
# you need to tell python where to find the clone of Megatron-LM, e.g.:
#
# cd /tmp
# git clone https://github.com/NVIDIA/Megatron-LM
# PYTHONPATH=/tmp/Megatron-LM python src/transformers/models/megatron_bert/convert_megatron_bert_checkpoint.py ...
#
# if you already have it cloned elsewhere, simply adjust the path to the existing path
#
# If the training was done using a Megatron-LM fork, e.g.,
# https://github.com/microsoft/Megatron-DeepSpeed/ then chances are that you need to have that one
# in your path, i.e., /path/to/Megatron-DeepSpeed/
#
import
argparse
import
json
import
os
...
...
src/transformers/models/megatron_gpt2/convert_megatron_gpt2_checkpoint.py
View file @
927f6544
...
...
@@ -16,6 +16,22 @@
####################################################################################################
#
# Note: If when running this conversion script you're getting an exception:
# ModuleNotFoundError: No module named 'megatron.model.enums'
# you need to tell python where to find the clone of Megatron-LM, e.g.:
#
# cd /tmp
# git clone https://github.com/NVIDIA/Megatron-LM
# PYTHONPATH=/tmp/Megatron-LM python src/transformers/models/megatron_gpt2/convert_megatron_gpt2_checkpoint.py ...
#
# if you already have it cloned elsewhere, simply adjust the path to the existing path
#
# If the training was done using a Megatron-LM fork, e.g.,
# https://github.com/microsoft/Megatron-DeepSpeed/ then chances are that you need to have that one
# in your path, i.e., /path/to/Megatron-DeepSpeed/
#
import
argparse
import
os
import
re
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment