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

Enable passing in external position ids #1493

Merged
merged 3 commits into from
Aug 28, 2024
Merged

Conversation

gupta-abhay
Copy link
Contributor

@gupta-abhay gupta-abhay commented Aug 28, 2024

For several uses (such as multimodal), position_ids are determined by external functions which account for image + text positions. For such scenarios, we should enable passing in pre-computed position_ids to the modeling function.

@gupta-abhay gupta-abhay requested a review from a team as a code owner August 28, 2024 19:13
Copy link
Collaborator

@dakinggg dakinggg left a comment

Choose a reason for hiding this comment

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

Can you add a simple test of the functionality (i.e. just forward with position ids and compare against passing it as None and make sure they are the same or something)?

llmfoundry/models/mpt/modeling_mpt.py Outdated Show resolved Hide resolved
@gupta-abhay gupta-abhay merged commit bf6cfdf into main Aug 28, 2024
9 checks passed
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.

2 participants