1
0
Fork 0
mirror of https://github.com/p-e-w/heretic.git synced 2026-12-03 18:42:57 +07:00

[GH-ISSUE #527] Qwen3-VL-30B-A3B bnb_4bit loading: CPU/disk dispatch error on RTX 3060 12GB #223

Open
opened 2026-11-01 04:18:48 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @kbuwel on GitHub (Oct 26, 2026).
Original GitHub issue: https://github.com/p-e-w/heretic/issues/527

Problem

Loading a local Qwen3-VL-30B-A3B model with bitsandbytes 4-bit quantization fails with “Some modules are dispatched on the CPU or the disk”, followed by the generic dtype-exhaustion exception.

Observed command

Run from D:\heretic in a Windows Anaconda environment:

heretic --model text_encoder --quantization bnb_4bit

text_encoder is the local model argument actually shown in the log. The model was identified as Qwen3-VL-30B-A3B; the exact upstream checkpoint/variant and local config are not available. No explicit device-map override appears in the command. This concerns automatic placement/offload; the effective configuration and generated device map have not been captured.

Environment (from the original screenshots)

  • Heretic: 2.0.0.dev0 (source checkout; commit unknown)
  • Windows 10, Anaconda environment
  • One NVIDIA GeForce RTX 3060, 12.00 GB VRAM
  • Heretic reports CUDA version 13.0, driver 617.42
  • Python, PyTorch, Transformers, Accelerate and bitsandbytes versions: not captured

Observed errors

Both the auto and float16 attempts visibly fail with:

Some modules are dispatched on the CPU or the disk. Make sure you have enough GPU RAM to fit the quantized model. If you want to dispatch the model on the CPU or the disk while keeping these modules in 32-bit, you need to set `llm_int8_enable_fp32_cpu_offload=True` and pass a custom `device_map` to `from_pretrained`.

The final traceback ends at src/heretic/model.py:208:

Exception: Failed to load model with all configured dtypes.

A separate warning says Triton was not found and FLOP counting will not work for Triton kernels.

Question / requested improvement

Is CPU offload supported for this 4-bit loading path, and if so, what Heretic configuration is supported? If it is unsupported, could Heretic report that limitation and actionable memory/device-map guidance instead of ending with only the generic dtype-exhaustion exception?

Insufficient VRAM is a plausible explanation, not a confirmed Heretic defect. I have not verified that the upstream error's suggested offload flag alone is sufficient or compatible with Heretic's later processing.

Duplicate check

Searched open and closed issues for Qwen3/VL, 30B, bnb_4bit, offload, and the dispatched-modules error. Related: #18 (VL AutoModel support), #84 (VL intermediate-size error), #179 (blockwise loading/offload discussion), #123 (later-stage VRAM use). None found describes this specific loading failure.

Originally created by @kbuwel on GitHub (Oct 26, 2026). Original GitHub issue: https://github.com/p-e-w/heretic/issues/527 ### Problem Loading a local Qwen3-VL-30B-A3B model with bitsandbytes 4-bit quantization fails with “Some modules are dispatched on the CPU or the disk”, followed by the generic dtype-exhaustion exception. ### Observed command Run from `D:\heretic` in a Windows Anaconda environment: ```text heretic --model text_encoder --quantization bnb_4bit ``` `text_encoder` is the local model argument actually shown in the log. The model was identified as Qwen3-VL-30B-A3B; the exact upstream checkpoint/variant and local config are not available. No explicit device-map override appears in the command. This concerns automatic placement/offload; the effective configuration and generated device map have not been captured. ### Environment (from the original screenshots) - Heretic: `2.0.0.dev0` (source checkout; commit unknown) - Windows 10, Anaconda environment - One NVIDIA GeForce RTX 3060, 12.00 GB VRAM - Heretic reports CUDA version `13.0`, driver `617.42` - Python, PyTorch, Transformers, Accelerate and bitsandbytes versions: not captured ### Observed errors Both the `auto` and `float16` attempts visibly fail with: ```text Some modules are dispatched on the CPU or the disk. Make sure you have enough GPU RAM to fit the quantized model. If you want to dispatch the model on the CPU or the disk while keeping these modules in 32-bit, you need to set `llm_int8_enable_fp32_cpu_offload=True` and pass a custom `device_map` to `from_pretrained`. ``` The final traceback ends at `src/heretic/model.py:208`: ```text Exception: Failed to load model with all configured dtypes. ``` A separate warning says Triton was not found and FLOP counting will not work for Triton kernels. ### Question / requested improvement Is CPU offload supported for this 4-bit loading path, and if so, what Heretic configuration is supported? If it is unsupported, could Heretic report that limitation and actionable memory/device-map guidance instead of ending with only the generic dtype-exhaustion exception? Insufficient VRAM is a plausible explanation, not a confirmed Heretic defect. I have not verified that the upstream error's suggested offload flag alone is sufficient or compatible with Heretic's later processing. ### Duplicate check Searched open and closed issues for Qwen3/VL, 30B, bnb_4bit, offload, and the dispatched-modules error. Related: #18 (VL AutoModel support), #84 (VL intermediate-size error), #179 (blockwise loading/offload discussion), #123 (later-stage VRAM use). None found describes this specific loading failure.
Author
Owner

@p-e-w commented on GitHub (Oct 26, 2026):

Is CPU offload supported for this 4-bit loading path

Yes and no.

bitsandbytes does support it, but only if you pass additional arguments to BitsAndBytesConfig, which we currently don't do. So Heretic can't actually do this.

However, there is also very little point in doing so, as CPU offload with Transformers is simply unusably slow. Transformers is not llama.cpp; it doesn't have highly optimized CPU kernels, optimized memory transfer paths etc. A CPU offload can easily be 100 times slower than a GPU load with Transformers. We're talking 1-5 tokens/s for small models, when we want at least hundreds, better thousands, of tokens/s.

Perhaps my knowledge is outdated here as both Transformers and bnb have pushed several interesting updates recently, but CPU Heretic isn't something I ever really think about as even with models < 1B, a full run can take hours.

<!-- gh-comment-id:6422591344 --> @p-e-w commented on GitHub (Oct 26, 2026): > Is CPU offload supported for this 4-bit loading path Yes and no. bitsandbytes does support it, but only if you pass additional arguments to `BitsAndBytesConfig`, which we currently don't do. So Heretic can't actually do this. However, there is also very little point in doing so, as CPU offload with Transformers is simply unusably slow. Transformers is not llama.cpp; it doesn't have highly optimized CPU kernels, optimized memory transfer paths etc. A CPU offload can easily be 100 times slower than a GPU load with Transformers. We're talking 1-5 tokens/s for small models, when we want at least hundreds, better thousands, of tokens/s. Perhaps my knowledge is outdated here as both Transformers and bnb have pushed several interesting updates recently, but CPU Heretic isn't something I ever really think about as even with models < 1B, a full run can take hours.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
p-e-w/heretic#223
No description provided.