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

support starcoder2 #1468

Merged
merged 4 commits into from
Apr 25, 2024
Merged

support starcoder2 #1468

merged 4 commits into from
Apr 25, 2024

Conversation

grimoire
Copy link
Collaborator

@lvhan028 lvhan028 added the enhancement New feature or request label Apr 22, 2024
@lvhan028 lvhan028 requested a review from AllentDan April 24, 2024 03:17
Copy link
Collaborator

@AllentDan AllentDan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the expected version of transformers to run the model? I got

ERROR - ValueError: The checkpoint you are trying to load has model type `starcoder2` but Transformers does not recognize this architecture. This could be because of an issue with the checkpoint, or because your version of Transformers is out of date.
2024-04-24 12:48:26,763 - lmdeploy - ERROR - <transformers> test failed!
Load model config with transformers==4.38.2 failed. Please make sure model can be loaded with transformers API.

@grimoire
Copy link
Collaborator Author

4.40 I guess.

Copy link
Collaborator

@AllentDan AllentDan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got

double enter to end input >>> hi

hi _1_1_i_d_manager.html#a00000000000000000000000000000000", null ],
    [ "GetID", "class_hi_1_1_i_d_manager.html#a00000000000000000000000000000000", null ],
    [ "GetID", "class_hi_1_1_i_d_manager.html#a00000000000000000000000000000000", null ],
    [ "GetID", "class_hi_1_1_i_d_manager.html#a00000000000000000000000000000000", null ],
    [ "GetID", "class_hi_1_1_i_d_manager.html#a00000000000000000000000000000000", null ],
    [ "GetID", "class_hi_1_1_i_d_manager.html#a00000000000000000000000000000000", null ],
    [ "GetID", "class_hi_1_1_i_d_manager.html#a00000000000000000000000000000000", null ],
    [ "GetID", "class_hi_1_1_i_d_manager.html#a00000000000000000000000000000000", null ],
    [ "GetID", "class_hi_1_1_i_d_manager.html#a00000000000000000000000000

for the command lmdeploy chat torch /path/of/starcoder2/startcoder2-7b.

transformers version 4.40.1

Copy link
Collaborator

@AllentDan AllentDan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May resolve the conflicts

@grimoire
Copy link
Collaborator Author

@AllentDan
This is not a chat model, this output might be expected.

official demo:

inputs = tokenizer.encode("def print_hello_world():", return_tensors="pt").to(device)
outputs = model.generate(inputs)

Copy link
Collaborator

@AllentDan AllentDan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

lmdeploy/model.py Outdated Show resolved Hide resolved
@lvhan028 lvhan028 merged commit f46893e into InternLM:main Apr 25, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants