]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
convert : fix RuntimeError when stripping FP8 KV-cache scales (#22818)
authorMichał Piszczek <redacted>
Fri, 8 May 2026 03:55:48 +0000 (05:55 +0200)
committerGitHub <redacted>
Fri, 8 May 2026 03:55:48 +0000 (06:55 +0300)
commit1d72d87349f1be2eb5a60a15a75673481af907d6
tree56c72c7de0ba9174dccf11dd35b3445b425ac629
parent6a2a2513dc222bbcb1c31d91e95fc558b5c0963a
convert : fix RuntimeError when stripping FP8 KV-cache scales (#22818)

* convert : fix RuntimeError when stripping FP8 KV-cache scales

In ModelBase._generate_nvfp4_tensors the final cleanup loop iterates
self.model_tensors.keys() and calls del on the same dict, which raises
RuntimeError: dictionary changed size during iteration when a ModelOpt
NVFP4 model also has FP8 KV-cache scales (e.g. mmangkad/Qwen3.6-35B-A3B-NVFP4
and any modelopt config with kv_cache_quant_algo: FP8).

Wrap the keys view in list() so the deletions happen on a snapshot.

* re-add another accidentally removed list

---------

Co-authored-by: Sigbjørn Skjæret <redacted>
convert_hf_to_gguf.py