Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to import Megatron, please specify the path to Megatron using --megatron-path. Exiting. #3

Open
Ruban-07 opened this issue Oct 16, 2024 · 4 comments

Comments

@Ruban-07
Copy link

I've successfully completed till downloading llama models in HF format by running the below script:

python scripts/tools/download_llama2_7b_hf.py 
python scripts/tools/download_llama2_13b_hf.py
python scripts/tools/download_llama3_8b_hf.py

And also got this folder structure:
Description

Then I've ran the below command to convert HF to Megatron:

bash scripts/tools/convert_llama2_7b_hf_to_megatron.sh 
bash scripts/tools/convert_llama2_13b_hf_to_megatron.sh 
bash scripts/tools/convert_llama3_8b_hf_to_megatron.sh

Unfortunately, I'm facing the below errors:

Screenshot from 2024-10-16 17-20-57
Screenshot from 2024-10-16 17-22-06

I've tried adding the path of megatron in my env variable, but it not worked, kindly help me to fix this issue

@VainF
Copy link
Collaborator

VainF commented Oct 16, 2024

Hi @Ruban-07, were these scripts executed within a Nvidia docker environment? It seems that Megatron might not be properly installed.

@Ruban-07
Copy link
Author

Hi @Ruban-07, were these scripts executed within a Nvidia docker environment? It seems that Megatron might not be properly installed.

Hi @VainF , Thank you so much for responding!!!

Actually I've created an conda new environment in the name of maskllm and cloned this repo. Inside the MaskLLM, I've executed these scripts, which is in the below screenshot:

Screenshot from 2024-10-11 05-54-00

How can I verify that the megatron installed properly or not???

@VainF
Copy link
Collaborator

VainF commented Oct 18, 2024

I also tried to install Megatron without Docker. But it's a bit complicated since there are other dependencies like transformer_engine. I think using official and pre-built docker can solve this problem.

@Ruban-07
Copy link
Author

I also tried to install Megatron without Docker. But it's a bit complicated since there are other dependencies like transformer_engine. I think using official and pre-built docker can solve this problem.

Okay @VainF , I'll check with that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants