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

Converting MPT checkpoint to HF format breaks #554

Closed
eldarkurtic opened this issue Aug 24, 2023 · 3 comments
Closed

Converting MPT checkpoint to HF format breaks #554

eldarkurtic opened this issue Aug 24, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@eldarkurtic
Copy link
Contributor

When trying to convert MPT checkpoint from Composer to HF with convert_composer_to_hf.py, it breaks with:

Traceback (most recent call last):
  File "/mypath/llm-foundry/scripts/inference/convert_composer_to_hf.py", line 344, in <module>
    convert_composer_to_hf(parse_args())
  File "/mypath/llm-foundry/scripts/inference/convert_composer_to_hf.py", line 232, in convert_composer_to_hf
    AutoConfig.register('mpt', MPTConfig)
  File "/mypath/miniconda3/envs/sml/lib/python3.10/site-packages/transformers/models/auto/configuration_auto.py", line 1049, in register
    CONFIG_MAPPING.register(model_type, config)
  File "/nfs/scistore14/alistgrp/ekurtic/miniconda3/envs/sml/lib/python3.10/site-packages/transformers/models/auto/configuration_auto.py", line 753, in register
    raise ValueError(f"'{key}' is already used by a Transformers config, pick another name.")
ValueError: 'mpt' is already used by a Transformers config, pick another name.
@eldarkurtic eldarkurtic added the bug Something isn't working label Aug 24, 2023
@dakinggg
Copy link
Collaborator

To unblock you, please do not use the latest version of transformers. That is the version in which they added an MPT implementation to transformers.

@dakinggg
Copy link
Collaborator

dakinggg commented Sep 9, 2023

This is resolved by #561. We only support the version of MPT in this repo, which requires using trust_remote_code: True.

@dakinggg dakinggg closed this as completed Sep 9, 2023
@eldarkurtic
Copy link
Contributor Author

Sorry for the late reply, thanks a lot @dakinggg !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants