Skip to content

Phi-3.5-vision-instruct invalid EOS token #1630

@przepeck

Description

@przepeck

Hello,
I have a problem with exporting the model microsoft/Phi-3.5-vision-instruct.
Model loads and generates correctly, but it doesn't stop after answering and generates random output unrelated to the prompt.
After some troubleshooting I found that EOS token id in generation_config.json is 2, while it should be 32000. After changing it manually it works correctly.
Export command:

optimum-cli export openvino --model microsoft/Phi-3.5-vision-instruct --weight-format int4 --sym --ratio 1.0 --group-size -1 --trust-remote-code models\microsoft\Phi-3.5-vision-instruct

I've used optimum from main with transformers==4.53.3 (#1573).

Python: 3.10.7

Kind regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions