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

Fix Japanese Hugging face GPT conversion #460

Merged
merged 4 commits into from
Feb 21, 2023

Conversation

noppayut
Copy link
Contributor

@noppayut noppayut commented Feb 20, 2023

Fixes #459

  1. Define missing variables, correct variable names.
  2. Use GPT2LMHeadModel and state_dict() instead of GPT2Model and named_parameters() to collect model weights.
  3. Dynamically select torch device instead of the hardocded GPU.
  4. Add tensor_para_size to config.
  5. Add docstring to recommend usage of huggingface_gpt_model.py instead of this file.

Signed-off-by: noppayut <noppayut@hotmail.com>
Signed-off-by: noppayut <noppayut@hotmail.com>
Signed-off-by: noppayut <noppayut@hotmail.com>
@byshiue byshiue merged commit 43ea4f3 into NVIDIA:main Feb 21, 2023
@noppayut noppayut deleted the fix_hf_gpt_conversion branch February 21, 2023 01:17
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

Successfully merging this pull request may close these issues.

Cannot convert Hugging face Japanese GPT to FasterTransformer model
2 participants