[Python] RuntimeError: CUDA error: named symbol not found when using TorchAoConfig with...

Discussão em 'Python' iniciado por Stack, Julho 26, 2025.

  1. Stack

    Stack Membro Participativo

    I'm trying to load the Qwen2.5-VL-7B-Instruct model from hugging face with 4-bit weight-only quantization using TorchAoConfig (similar to how its mentioned in the documentation here), but I'm getting a runtime error related to CUDA.

    Code:

    from transformers import Qwen2_5_VLForConditionalGeneration, TorchAoConfig, AutoProcessor
    import torch

    torch.cuda.empty_cache()

    quantization_config = TorchAoConfig("int4_weight_only", group_size=128)

    model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
    "Qwen/Qwen2.5-VL-7B-Instruct",
    torch_dtype=torch.bfloat16,
    device_map="auto",
    quantization_config=quantization_config
    )

    processor = AutoProcessor.from_pretrained("Qwen/Qwen2.5-VL-7B-Instruct")



    Environment:

    Python: 3.11

    Transformers: latest

    GPU: Collab T4

    I got the following error:

    Error:

    RuntimeError: CUDA error: named symbol not found
    CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
    For debugging consider passing CUDA_LAUNCH_BLOCKING=1
    Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.



    I am new to this, probably missing something simple , Any help or insights would be appreciated!.

    Continue reading...

Compartilhe esta Página