Skip to content

Conversation

@oscarqjh
Copy link
Contributor

@oscarqjh oscarqjh commented Jan 16, 2026

Description

This pull request directly attempts to address the issue at #998

Summary

This PR fixes a bug in the InternVL3 model integration where the token was being inserted twice in certain prompting scenarios. This redundancy could lead to incorrect model behavior or input format errors.

Details of Changes

Modified the logic in models/simple/internvl3.py to prevent appending an extra token if one is already present in the prompt template.

Ensured that the input passed to the tokenizer contains exactly one image placeholder per image.

Test Plan

  • Verified with: Ran InternVL3 on SiteBenchImage.
image
  • Observation: Checked the logs/debug output to confirm that the prompt now contains the correct number of token as expected.
image

@oscarqjh
Copy link
Contributor Author

@PeterWangyi @kcz358

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.

1 participant