GGUF dequant transient: numpy-fallback (IQ) types over-reserve device memory ~4x
Los mantenedores suelen responder en 2 días
@wunianze666-netizen ya está trabajando en esto.
Desde el 15/10/2026.
- #9862 de @wunianze666-netizen — abierto
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- numpy, python, pytorch
- Área
- machine-learning
Línea de trabajo
Start in the function that computes peak_ggml_linear_dequant_transient_bytes and its _DEQUANT_INTERMEDIATE_BYTES_PER_ELEMENT table, then read GGMLTensor.get_dequantized_tensor to confirm the host fallback through gguf.quants.dequantize. Change the default for types that are neither torch-compatible nor in DEQUANTIZE_FUNCTIONS to 0 intermediates, and check the IQ4_XS and IQ4_NL estimates against the measured ratios in the issue. Done when those types report no device intermediates and the existing estimate tests still pass.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Follow-up from #9709 (review at 59c851290a).
peak_ggml_linear_dequant_transient_bytes gives every quantization type missing from _DEQUANT_INTERMEDIATE_BYTES_PER_ELEMENT the worst-case 8 B/element of device intermediates. Those types (the IQ family) are exactly the ones without a GPU kernel: GGMLTensor.get_dequantized_tensor decodes them through gguf.quants.dequantize on the host and then calls .to(device, dtype=compute_dtype), which casts on the CPU before the copy. On the device, the only allocation is the result.
Measured on a W7900 (torch 2.13 + ROCm 7.2), 3072×12288 weight, bf16 compute dtype:
| Type | Device intermediates | Estimate / (peak + packed) |
|---|---|---|
| IQ4_XS | 0.00 B/el | 4.16 |
| IQ4_NL | 0.00 B/el | 4.12 |
The nodes that add the term to an activation estimate (FLUX.2, Krea-2, Z-Image, Ideogram 4) therefore over-reserve by 8 B per element of the largest layer. By the FLUX.2 dev numbers in #9709, that is roughly 2.5 GiB, which is the kind of over-reservation #9709 replaced the flat bound to avoid.
Suggested fix: use 0 intermediates for any type that is neither torch-compatible nor in DEQUANTIZE_FUNCTIONS, since every such type takes the host fallback. The fallback's real cost is host RAM (the float32 numpy decode), which nothing reserves. That could be tracked separately.
- Lenguaje dominante
- TypeScript
- Estrellas
- 28.8k
- Forks
- 3.1k
- Merge medio
- 3 d 1 h
- PR fusionados (30 d)
- 143
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de invoke-ai/InvokeAI
-
[enhancement]: Bump PyPatchMatch to latestPosiblemente ocupada @dunkeroni la tomó hace 7 días. Abiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
invoke-ai/InvokeAI#9826 · 2 reacciones · 1 asignado ·
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 62/100
Los mantenedores suelen responder en 2 días
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
Los mantenedores suelen responder en 2 días
-
extract_audio_pcm detects "no audio stream" by matching ffmpeg's stderr text, so a wording change turns silent clips into hard errorsPosiblemente ocupada @wunianze666-netizen la tomó hace 10 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 2 días
-
enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
invoke-ai/InvokeAI#9992 · 1 comentario ·
Los mantenedores suelen responder en 2 días
Todos los issues de invoke-ai/InvokeAI
Issues similares
-
bug skills
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
equinor/fusion-framework#5846 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 74/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Eyevinn/open-videocore#1256 ·
Los mantenedores suelen responder en 1 día
-
Frontend build fails with Frappe version-16: DataImport is no longer exported by @framework/uiAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
[Bug]: Theme preset geist points at undefined --font-geistPosiblemente ocupada @claude la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
Los mantenedores suelen responder en 1 día