Skip to content

Expected single token encoding for <|image_start|> for LFM2-VL-450M #597

@YingjieHe

Description

@YingjieHe

When running FLM2-VL-450M models on ios with flutter, it will throw the error Expected single token encoding for <|image_start|> at

throw std::runtime_error("Expected single token encoding for " + token_text);
.

It looks like the tokenizer cannot recognize the image start token

verified the downloaded model, we do have <|image_start|> in tokenizer.json with special: true

    {
      "id": 499,
      "content": "<|image_end|>",
      "single_word": false,
      "lstrip": false,
      "rstrip": false,
      "normalized": false,
      "special": true
    },

Model version: https://huggingface.co/Cactus-Compute/LFM2-VL-450M/commit/35f3e4525551681aa9c044cf653587337151b792
Cactus version: synced to head(10d04d7)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions