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

执行hf转megatron格式报错了 #70

Open
Lilypad97 opened this issue Oct 21, 2024 · 0 comments
Open

执行hf转megatron格式报错了 #70

Lilypad97 opened this issue Oct 21, 2024 · 0 comments

Comments

@Lilypad97
Copy link

sh hf_to_megatron.sh
Namespace(megatron_path='/workspace/megatron', convert_checkpoint_from_megatron_to_transformers=False, load_path='/workspace/checkpoints/LLM-Research/Meta-Llama-3-8B', save_path='/workspace/checkpoints/megatron/Meta-Llama-3-8B', print_checkpoint_structure=True, target_tensor_model_parallel_size=2, target_pipeline_model_parallel_size=1, target_data_parallel_size=2, target_params_dtype='fp16', make_vocab_size_divisible_by=1, use_distributed_optimizer=False, tokenizer_name=None, max_shard_size='10GB')
No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda'
Converting
converting embedding layer
Keys in state_dict: dict_keys([])
Traceback (most recent call last):
File "/workspace/megatron/tools/checkpoint_conversion/llama_checkpoint_conversion.py", line 855, in
main()
File "/workspace/megatron/tools/checkpoint_conversion/llama_checkpoint_conversion.py", line 851, in main
convert_checkpoint_from_transformers_to_megatron(args)
File "/workspace/megatron/tools/checkpoint_conversion/llama_checkpoint_conversion.py", line 651, in convert_checkpoint_from_transformers_to_megatron
word_embedding = state_dict["model.embed_tokens.weight"].to(dtype)
KeyError: 'model.embed_tokens.weight'

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

1 participant