mirror of
https://github.com/kvcache-ai/ktransformers.git
synced 2026-11-05 01:07:28 +00:00
[GH-ISSUE #1113] [Bug] Exception: data did not match any variant of untagged enum ModelWrapper #777
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/ktransformers#777
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @RodriMora on GitHub (Apr 10, 2025).
Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/1113
Originally assigned to: @ovowei on GitHub.
Checklist
Describe the bug
Running the llama4 branch, it fails when loading the model.
Something I noticed is that the docs say it needs:
transformers==4.51.0But the
ktransformers/server/requirements.txton thesupport-llama4branch, requiere:transformers == 4.43.2Error:
Reproduction
I have the modified config.json file from here: https://github.com/kvcache-ai/ktransformers/blob/support-llama4/doc/en/config.json into the /mnt/llms/models/Llama-4-Scout-17B-16E-Instruct folder:
CUDA_VISIBLE_DEVICES=4 ktransformers --model_path /mnt/llms/models/Llama-4-Scout-17B-16E-Instruct/ --gguf_path /mnt/llms/models/Llama-4-Scout-17B-16E-Instruct-UD-Q2_K_XL --port 5000 --host 0.0.0.0 --cpu_infer 24 --cache_lens=32000 --max_new_tokens 1024 --optimize_config_path ktransformers/optimize/optimize_rules/Llama4-serve.yaml --backend_type balance_serveEnvironment
python3.11
python -m pip list:
NVIDIA-SMI 570.124.06
CUDA Version: 12.8
nvcc --version
nvidia-smi -L
@KMSorSMS commented on GitHub (Apr 11, 2025):
Thx for your report. As we do need some other version of transformers, these seem like another problem that should be a bug. What's your opinion? @ovowei ?
@ovowei commented on GitHub (Apr 11, 2025):
This is a bug — I forgot to update the requirements file under the support-llama4 branch to specify the version of transformers. It should be transformers==4.51.0. I'll fix it right away.
@RodriMora commented on GitHub (Apr 11, 2025):
I just installed everything from scratch with the latest commit but still got the old version:
When trying to manually install version 4.51.0 i get this dependency error:
python -m pip install transformers==4.51.0ktransformers 0.2.4.post1+cu128torch26avx2 requires transformers==4.43.2, but you have transformers 4.51.0 which is incompatible@ovowei commented on GitHub (Apr 11, 2025):
I believe I’ve already fixed this bug, maybe you haven’t pulled the latest code?
Anyway, the "incompatible" error in the terminal shouldn’t affect actual execution. You could try running it to see if it works.
@RodriMora commented on GitHub (Apr 11, 2025):
It's weird, i had the latest code (git pull)
As you can see in the previous screenshot the requirements file shows the 4.51.0 version, but when building it still installed the old version, maybe python had it cached somewhere.
But as you said, installing manually even with the error it worked. Thanks!
26t/s generation