Skip to content

[BUG]: Unknown pre-tokenizer type: 'gpt-4o' #1128

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

Open
koenigst opened this issue Mar 14, 2025 · 2 comments
Open

[BUG]: Unknown pre-tokenizer type: 'gpt-4o' #1128

koenigst opened this issue Mar 14, 2025 · 2 comments

Comments

@koenigst
Copy link

koenigst commented Mar 14, 2025

Description

Loading a Microsoft Phi-4-mini-instruct (4bit quantization) model fails with:
unknown pre-tokenizer type: 'gpt-4o'
This issue was already addressed in llama.cpp b4792.

Reproduction Steps

LLamaWeights.LoadFromFile(new ModelParams("Phi-4-mini-instruct-Q4_K_M.gguf"));

Environment & Configuration

  • Operating system: Windows 11
  • .NET runtime version: 9
  • LLamaSharp version: 0.21.0
  • CUDA version (if you are using cuda backend): 12

Known Workarounds

@sangyuxiaowu
Copy link
Contributor

This is a normal occurrence as LLamaSharp relies on llama.cpp, which updates very frequently, sometimes multiple times a day. You can directly download and use the updated DLL from the llama.cpp repository.

@martindevans
Copy link
Member

LLamaSharp is not generally compatible with any version of llama.cpp except the exact version it was updated to (see the table in the readme for the versions). The llama.cpp API frequently has breaking changes, so downloading DLLs from a different version will cause all kinds of issues.

There's a WIP PR (#1126) which will update llama.cpp to a newer version, that should include the new tokenizer type.

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

No branches or pull requests

3 participants