Qwen/Qwen3.8-27B | INT4 (W4A16)
Pipeline Failure Report
Model: Qwen/Qwen3.8-27B
Quantization Scheme: INT4 (W4A16)
Failed Phase: quantize
Run ID: Qwen3.8-27B-AutoRound-W4A16-Tuning
Error Category: out_of_memory
Full Error Log
07:33:46 [INFO] Loading tokenizer...
07:33:46 [INFO] HTTP Request: GET https://huggingface.co/api/models/Qwen/Qwen3.8-27B "HTTP/1.1 200 OK"
07:33:46 [INFO] HTTP Request: HEAD https://huggingface.co/Qwen/Qwen3.8-27B/resolve/1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0/tokenizer_config.json "HTTP/1.1 307 Temporary Redirect"
07:33:46 [INFO] HTTP Request: HEAD https://huggingface.co/api/resolve-cache/models/Qwen/Qwen3.8-27B/1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0/tokenizer_config.json?%2FQwen%2FQwen3.8-27B%2Fresolve%2F1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0%2Ftokenizer_config.json=&etag=%225de744b3fca2129d7186979ae47c06be33903243%22 "HTTP/1.1 200 OK"
07:33:46 [INFO] HTTP Request: GET https://huggingface.co/api/resolve-cache/models/Qwen/Qwen3.8-27B/1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0/tokenizer_config.json?%2FQwen%2FQwen3.8-27B%2Fresolve%2F1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0%2Ftokenizer_config.json=&etag=%225de744b3fca2129d7186979ae47c06be33903243%22 "HTTP/1.1 200 OK"
07:33:46 [INFO] HTTP Request: GET https://huggingface.co/api/models/Qwen/Qwen3.8-27B/tree/main/additional_chat_templates?recursive=false&expand=false "HTTP/1.1 404 Not Found"
07:33:47 [INFO] HTTP Request: GET https://huggingface.co/api/models/Qwen/Qwen3.8-27B/tree/main?recursive=true&expand=false "HTTP/1.1 200 OK"
07:33:47 [INFO] HTTP Request: HEAD https://huggingface.co/Qwen/Qwen3.8-27B/resolve/1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0/tokenizer.json "HTTP/1.1 302 Found"
07:33:47 [INFO] HTTP Request: GET https://huggingface.co/api/models/Qwen/Qwen3.8-27B/xet-read-token/1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0 "HTTP/1.1 200 OK"
07:33:48 [INFO] HTTP Request: HEAD https://huggingface.co/Qwen/Qwen3.8-27B/resolve/1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0/tokenizer.model "HTTP/1.1 404 Not Found"
07:33:48 [INFO] HTTP Request: HEAD https://huggingface.co/Qwen/Qwen3.8-27B/resolve/1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0/added_tokens.json "HTTP/1.1 404 Not Found"
07:33:48 [INFO] HTTP Request: HEAD https://huggingface.co/Qwen/Qwen3.8-27B/resolve/1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0/special_tokens_map.json "HTTP/1.1 404 Not Found"
07:33:48 [INFO] HTTP Request: HEAD https://huggingface.co/Qwen/Qwen3.8-27B/resolve/1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0/chat_template.jinja "HTTP/1.1 307 Temporary Redirect"
07:33:48 [INFO] HTTP Request: HEAD https://huggingface.co/api/resolve-cache/models/Qwen/Qwen3.8-27B/1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0/chat_template.jinja?%2FQwen%2FQwen3.8-27B%2Fresolve%2F1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0%2Fchat_template.jinja=&etag=%22c0c686f9c38d70d179fb7b5f5aa7530bc913dda3%22 "HTTP/1.1 200 OK"
07:33:48 [INFO] HTTP Request: GET https://huggingface.co/api/resolve-cache/models/Qwen/Qwen3.8-27B/1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0/chat_template.jinja?%2FQwen%2FQwen3.8-27B%2Fresolve%2F1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0%2Fchat_template.jinja=&etag=%22c0c686f9c38d70d179fb7b5f5aa7530bc913dda3%22 "HTTP/1.1 200 OK"
07:33:49 [INFO] HTTP Request: GET https://huggingface.co/api/models/Qwen/Qwen3.8-27B "HTTP/1.1 200 OK"
07:33:49 [INFO] Loading model...
07:33:49 [INFO] HTTP Request: GET https://huggingface.co/api/models/Qwen/Qwen3.8-27B "HTTP/1.1 200 OK"
07:33:49 [INFO] HTTP Request: HEAD https://huggingface.co/Qwen/Qwen3.8-27B/resolve/1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0/model.safetensors "HTTP/1.1 404 Not Found"
07:33:49 [INFO] HTTP Request: HEAD https://huggingface.co/Qwen/Qwen3.8-27B/resolve/1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0/model.safetensors.index.json "HTTP/1.1 307 Temporary Redirect"
07:33:49 [INFO] HTTP Request: HEAD https://huggingface.co/api/resolve-cache/models/Qwen/Qwen3.8-27B/1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0/model.safetensors.index.json?%2FQwen%2FQwen3.8-27B%2Fresolve%2F1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0%2Fmodel.safetensors.index.json=&etag=%22da35e3c564457dface7d138f0b6cac284ff8958c%22 "HTTP/1.1 200 OK"
07:33:49 [INFO] HTTP Request: GET https://huggingface.co/api/resolve-cache/models/Qwen/Qwen3.8-27B/1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0/model.safetensors.index.json?%2FQwen%2FQwen3.8-27B%2Fresolve%2F1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0%2Fmodel.safetensors.index.json=&etag=%22da35e3c564457dface7d138f0b6cac284ff8958c%22 "HTTP/1.1 200 OK"
07:33:49 [INFO] HTTP Request: GET https://huggingface.co/api/models/Qwen/Qwen3.8-27B/tree/1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0?recursive=true&expand=false "HTTP/1.1 200 OK"
[W1014 07:35:23.946857500 CUDACachingAllocator.cpp:3934] memory allocation failed with OOM on device 0 while trying to allocate 178257920 bytes (free: 66781184, total: 50865307648).
[W1014 07:35:23.947203298 CUDACachingAllocator.cpp:3934] memory allocation failed with OOM on device 0 while trying to allocate 178257920 bytes (free: 66781184, total: 50865307648).
[W1014 07:35:23.982983662 CUDACachingAllocator.cpp:3934] memory allocation failed with OOM on device 0 while trying to allocate 178257920 bytes (free: 66781184, total: 50865307648).
[W1014 07:35:23.983302600 CUDACachingAllocator.cpp:3934] memory allocation failed with OOM on device 0 while trying to allocate 178257920 bytes (free: 66781184, total: 50865307648).
[W1014 07:35:23.997295492 CUDACachingAllocator.cpp:3934] memory allocation failed with OOM on device 0 while trying to allocate 125829120 bytes (free: 66781184, total: 50865307648).
[W1014 07:35:23.997596290 CUDACachingAllocator.cpp:3934] memory allocation failed with OOM on device 0 while trying to allocate 125829120 bytes (free: 66781184, total: 50865307648).
07:35:23 [ERROR] Quantization failed: CUDA out of memory. Tried to allocate 170.00 MiB. GPU 0 has a total capacity of 47.37 GiB of which 63.69 MiB is free. Including non-PyTorch memory, this process has 47.30 GiB memory in use. Of the allocated memory 46.74 GiB is allocated by PyTorch, and 153.06 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation. See documentation for Memory Management (https://docs.pytorch.org/docs/stable/notes/cuda.html#optimizing-memory-usage-with-pytorch-cuda-alloc-conf)
Traceback (most recent call last):
File "/root/_work/1/s/auto_quant/phases/quantize.py", line 479, in <module>
quantize(args)
File "/root/_work/1/s/auto_quant/phases/quantize.py", line 293, in quantize
model = AutoModelForCausalLM.from_pretrained(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.venv/lib/python3.12/site-packages/auto_round/utils/common.py", line 205, in patched
return underlying_func(klass, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.venv/lib/python3.12/site-packages/transformers/models/auto/auto_factory.py", line 411, in from_pretrained
return model_class.from_pretrained(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.venv/lib/python3.12/site-packages/transformers/modeling_utils.py", line 4338, in from_pretrained
loading_info, disk_offload_index = cls._load_pretrained_model(model, state_dict, checkpoint_files, load_config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.venv/lib/python3.12/site-packages/transformers/modeling_utils.py", line 4481, in _load_pretrained_model
loading_info, disk_offload_index = convert_and_load_state_dict_in_model(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.venv/lib/python3.12/site-packages/transformers/core_model_loading.py", line 1754, in convert_and_load_state_dict_in_model
realized_value = mapping.convert(
^^^^^^^^^^^^^^^^
File "/root/.venv/lib/python3.12/site-packages/transformers/core_model_loading.py", line 1008, in convert
collected_tensors = self.materialize_tensors()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.venv/lib/python3.12/site-packages/transformers/core_model_loading.py", line 970, in materialize_tensors
tensors = [future.result() for future in tensors if future.result() is not None]
^^^^^^^^^^^^^^^
File "/root/.local/share/uv/python/cpython-3.12.13-linux-x86_64-gnu/lib/python3.12/concurrent/futures/_base.py", line 456, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/root/.local/share/uv/python/cpython-3.12.13-linux-x86_64-gnu/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/root/.local/share/uv/python/cpython-3.12.13-linux-x86_64-gnu/lib/python3.12/concurrent/futures/thread.py", line 59, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.venv/lib/python3.12/site-packages/transformers/core_model_loading.py", line 1262, in _job
return _materialize_copy(tensor, device, dtype)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.venv/lib/python3.12/site-packages/transformers/core_model_loading.py", line 1240, in _materialize_copy
tensor = tensor.to(device=device, dtype=dtype)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 170.00 MiB. GPU 0 has a total capacity of 47.37 GiB of which 63.69 MiB is free. Including non-PyTorch memory, this process has 47.30 GiB memory in use. Of the allocated memory 46.74 GiB is allocated by PyTorch, and 153.06 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation. See documentation for Memory Management (https://docs.pytorch.org/docs/stable/notes/cuda.html#optimizing-memory-usage-with-pytorch-cuda-alloc-conf)
Auto-generated by error_analysis pipeline. cc @lvkaokao
Looks like Qwen/Qwen3.8-27B | INT4 (W4A16) hit a CUDA OOM trying to materialize a tensor on GPU 0, which only has ~64 MiB free despite 47 GiB total capacity. The error suggests memory fragmentation; setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True might help avoid fragmentation issues during tensor transfers.
I can't run code or allocate GPU resources myself since I lack a runtime shell and have zero outgoing budget. If you want me to summarize this error, draft a fix suggestion, or critique the memory management approach, just say the word—I'll do it in text only.