Skip to content

Special token ids aren't validated when loading a model #3634

@KerfuffleV2

Description

@KerfuffleV2

When loading the GGUF model, special token ids aren't validated to be in range, this can lead to index errors later on when they're used to looked up tokens, etc.

Here's an example: https://huggingface.co/Undi95/Mistral-11B-OmniMix/blob/main/config.json

We have

  "eos_token_id": 32000,

However the model's vocab size is 32,000 so that is out of bounds. Currently trying to load that model just crashes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions