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权重转换代码小bug #47

Open
yuanzhoulvpi2017 opened this issue Nov 3, 2023 · 0 comments
Open

hf权重转换代码小bug #47

yuanzhoulvpi2017 opened this issue Nov 3, 2023 · 0 comments
Assignees

Comments

@yuanzhoulvpi2017
Copy link

yuanzhoulvpi2017 commented Nov 3, 2023

在代码的这个地方,if config.num_hidden_layers % args.target_tensor_model_parallel_size != 0:写的不对,不应该是args.target_tensor_model_parallel_size , 应该是args.target_pipeline_model_parallel_size

if config.num_hidden_layers % args.target_tensor_model_parallel_size != 0:
        raise ValueError(
            f"Number of layers ({config.num_hidden_layers}) must be divisible by number of tensor parallelism"
            f" ({args.target_tensor_model_parallel_size})"
        )
    num_layers = config.num_hidden_layers // args.target_pipeline_model_parallel_size

    layer_re = re.compile(r"model.layers\.(\d+)\.([a-z0-9_.]+)\.([a-z]+)")

https://github.com/alibaba/Megatron-LLaMA/blob/main/tools/checkpoint_conversion/llama_checkpoint_conversion.py#L675C47-L675C47

@yuanzhoulvpi2017 yuanzhoulvpi2017 changed the title hf hf权重转换代码小bug Nov 3, 2023
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