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 molmo in turbomind #2716

Merged
merged 71 commits into from
Nov 14, 2024
Merged

Support molmo in turbomind #2716

merged 71 commits into from
Nov 14, 2024

Conversation

lvhan028
Copy link
Collaborator

@lvhan028 lvhan028 commented Nov 5, 2024

model: allenai/Molmo-7B-D-0924

@lvhan028 lvhan028 requested review from irexyc and lzhangzz November 5, 2024 09:31
@lvhan028 lvhan028 added the enhancement New feature or request label Nov 5, 2024
@irexyc
Copy link
Collaborator

irexyc commented Nov 6, 2024

It seems doesn't support text only input like

pipe('who are you?')

# or
messages = [
    dict(role='user', content=[
        dict(type='text', text='你是谁')
    ])
]
pipe(messages)

Comment on lines 478 to 483
await asyncio.gather(*[
asyncio.get_event_loop().run_in_executor(None, _inner_call, i,
messages, out_messages)
for i in range(len(messages))
])
#
Copy link
Collaborator

@irexyc irexyc Nov 6, 2024

Choose a reason for hiding this comment

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

When adding elements to out_messages, parameter i should be considered

Copy link
Collaborator

Choose a reason for hiding this comment

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

And after fixing the order, I find the position of Assistant seems not right. I decode the input token and the result is

" User: Describe the two images in detail. Assistant:Assistant: xxx...User: What are the similarities and differences between these two images. "  

(use the multi-round example here)

If the input only has one user content and decode the input ids, the result is

" User: Describe the two images in detail. Assistant:"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed

@lvhan028
Copy link
Collaborator Author

It seems doesn't support text only input like

pipe('who are you?')

# or
messages = [
    dict(role='user', content=[
        dict(type='text', text='你是谁')
    ])
]
pipe(messages)

Fixed

@lvhan028 lvhan028 merged commit fd8906c into InternLM:main Nov 14, 2024
9 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.

3 participants