mirror of
https://github.com/kvcache-ai/ktransformers.git
synced 2026-11-05 01:07:28 +00:00
[GH-ISSUE #1120] [Bug] Custom config.json for Maverick #782
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/ktransformers#782
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 11, 2025).
Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/1120
Originally assigned to: @ovowei on GitHub.
Checklist
Describe the bug
When trying to load the llama branch with the Scout model, it works. But using the Maverick model it doesn't work.
It needs a custom config.json file, there is a existing one for Scout but not for Marevick I believe:
https://github.com/kvcache-ai/ktransformers/blob/support-llama4/doc/en/config.json
Reproduction
Launching with Maverick with this command fails with the above error:
--model_path has the modified config.json file provided by the docs
CUDA_VISIBLE_DEVICES=4 ktransformers --model_path /mnt/llms/models/Llama-4-Scout-17B-16E-Instruct/ --gguf_path /mnt/llms/models/Llama-4-Maverick-17B-128E-Instruct-Q3_K_L.gguf --port 5001 --host 0.0.0.0 --cpu_infer 24 --cache_lens=12000 --max_new_tokens 1024 --optimize_config_path ktransformers/optimize/optimize_rules/Llama4-serve.yaml --backend_type balance_serveUsing the original Maverick repo gets stuck
CUDA_VISIBLE_DEVICES=4 ktransformers --model_path /mnt/llms/models/Llama-4-Maverick-17B-128E-Instruct/ --gguf_path /mnt/llms/models/Llama-4-Maverick-17B-128E-Instruct-Q3_K_L.gguf --port 5001 --host 0.0.0.0 --cpu_infer 24 --cache_lens=12000 --max_new_tokens 1024 --optimize_config_path ktransformers/optimize/optimize_rules/Llama4-serve.yaml --backend_type balance_serveEnvironment
python3.11
python -m pip list:
accelerate 1.6.0
annotated-types 0.7.0
anyio 4.9.0
blessed 1.20.0
blobfile 3.0.0
build 1.2.2.post1
certifi 2025.1.31
charset-normalizer 3.4.1
click 8.1.8
colorlog 6.9.0
cpufeature 0.2.1
distro 1.9.0
fastapi 0.115.12
filelock 3.13.1
fire 0.7.0
flashinfer-python 0.2.3
fsspec 2024.6.1
greenlet 3.1.1
h11 0.14.0
httpcore 1.0.7
httpx 0.28.1
huggingface-hub 0.30.2
idna 3.10
Jinja2 3.1.4
jiter 0.9.0
jsonpatch 1.33
jsonpointer 3.0.0
ktransformers 0.2.4.post1+cu128torch26avx2
langchain 0.3.23
langchain-core 0.3.51
langchain-text-splitters 0.3.8
langsmith 0.3.30
lxml 5.3.2
MarkupSafe 2.1.5
mpmath 1.3.0
networkx 3.3
ninja 1.11.1.4
numpy 2.2.4
nvidia-cublas-cu12 12.6.4.1
nvidia-cuda-cupti-cu12 12.6.80
nvidia-cuda-nvrtc-cu12 12.6.77
nvidia-cuda-runtime-cu12 12.6.77
nvidia-cudnn-cu12 9.5.1.17
nvidia-cufft-cu12 11.3.0.4
nvidia-curand-cu12 10.3.7.77
nvidia-cusolver-cu12 11.7.1.2
nvidia-cusparse-cu12 12.5.4.2
nvidia-cusparselt-cu12 0.6.3
nvidia-nccl-cu12 2.21.5
nvidia-nvjitlink-cu12 12.6.85
nvidia-nvtx-cu12 12.6.77
openai 1.72.0
orjson 3.10.16
packaging 24.2
pillow 11.0.0
pip 24.0
protobuf 6.30.2
psutil 7.0.0
pycryptodomex 3.22.0
pydantic 2.11.3
pydantic_core 2.33.1
pyproject_hooks 1.2.0
PyYAML 6.0.2
pyzmq 26.4.0
regex 2024.11.6
requests 2.32.3
requests-toolbelt 1.0.0
safetensors 0.5.3
sentencepiece 0.2.0
setuptools 65.5.0
six 1.17.0
sniffio 1.3.1
SQLAlchemy 2.0.40
starlette 0.46.1
sympy 1.13.1
tenacity 9.1.2
termcolor 3.0.1
tiktoken 0.9.0
tokenizers 0.21.1
torch 2.6.0+cu126
torchaudio 2.6.0+cu126
torchvision 0.21.0+cu126
tqdm 4.67.1
transformers 4.51.0
triton 3.2.0
typing_extensions 4.13.2
typing-inspection 0.4.0
urllib3 2.4.0
uvicorn 0.34.0
wcwidth 0.2.13
wheel 0.45.1
zmq 0.0.0
zstandard 0.23.0
NVIDIA-SMI 570.124.06
CUDA Version: 12.8
nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2025 NVIDIA Corporation
Built on Fri_Feb_21_20:23:50_PST_2025
Cuda compilation tools, release 12.8, V12.8.93
Build cuda_12.8.r12.8/compiler.35583870_0
nvidia-smi -L
GPU 0: NVIDIA GeForce RTX 3090
GPU 1: NVIDIA GeForce RTX 5090
GPU 2: NVIDIA GeForce RTX 3090
GPU 3: NVIDIA GeForce RTX 3090
GPU 4: NVIDIA GeForce RTX 3090
@git-shan commented on GitHub (Apr 11, 2025):
Got same error when loading Marveric. one more error message below:
ValueError: Experts blk.0 not found in gguf_loader
@igerry commented on GitHub (Apr 12, 2025):
Congraturations.
got the same error on Marveric
@ovowei commented on GitHub (Apr 15, 2025):
Thank you for your report. This issue is caused by structural differences between the Maverick and Scout models. I’ll fix it in a few days.
@adonishong commented on GitHub (Apr 15, 2025):
Looking forward to this ... LOL
@airnsk commented on GitHub (Apr 17, 2025):
Fix bug when loading Marveric Model #1160
does not work:
raise ValueError(f"Experts {key} not found in gguf_loader")
ValueError: Experts blk.0 not found in gguf_loader
@ovowei commented on GitHub (Apr 18, 2025):
Try reinstalling.
@ovowei commented on GitHub (Apr 18, 2025):
I suspect this issue is caused by an incorrect config file. The custom config for the Maverick model is different from the one used for the Scout model. I've updated both of them:
@igerry commented on GitHub (Apr 18, 2025):
Great thanks @ovowei for the fix. After being pulled and re-compiled, it starts to work.
@airnsk commented on GitHub (Apr 18, 2025):
Great. on 2x2680 and 512gb(numa) +1x 3090 I get 21 t/s . Thanks @ovowei
@git-shan commented on GitHub (Apr 20, 2025):
Great thanks @@ovowei !! new update of support-llama4 fully works