System Info
- transformers: 5.10.1
- torch: 2.7.0a0+7c8ec84dab.nv25.03
- Python: 3.12
- CUDA runner: CUDA 12.8.1.012 / NVIDIA driver 580.126.09
Transformers metadata still lists torch>=2.4 for the torch/testing extras.
Reproduction
In an environment with transformers==5.10.1 and NVIDIA torch 2.7.0a0+7c8ec84dab.nv25.03:
import torch
print(torch.__version__)
print(hasattr(torch, "float8_e8m0fnu"))
from transformers import AutoProcessor
Result:
2.7.0a0+7c8ec84dab.nv25.03
False
AttributeError: module 'torch' has no attribute 'float8_e8m0fnu'
Full import path from the traceback:
from transformers import AutoProcessor
transformers/models/auto/processing_auto.py
transformers/image_processing_utils.py
transformers/processing_utils.py
transformers/modeling_utils.py
transformers/integrations/finegrained_fp8.py: _UE8M0_SF_DTYPE = torch.float8_e8m0fnu
I also checked the public PyTorch CPU torch==2.7.0 wheel and it has this dtype, so the failing case is the NVIDIA torch 2.7 build used by the CUDA runner.
Expected behavior
Importing AutoProcessor should not fail just because this optional finegrained FP8 dtype is missing. Either guard this dtype access/import until the FP8 integration is used, or require a torch version/build that provides torch.float8_e8m0fnu.
System Info
Transformers metadata still lists
torch>=2.4for the torch/testing extras.Reproduction
In an environment with
transformers==5.10.1and NVIDIA torch2.7.0a0+7c8ec84dab.nv25.03:Result:
Full import path from the traceback:
I also checked the public PyTorch CPU
torch==2.7.0wheel and it has this dtype, so the failing case is the NVIDIA torch 2.7 build used by the CUDA runner.Expected behavior
Importing
AutoProcessorshould not fail just because this optional finegrained FP8 dtype is missing. Either guard this dtype access/import until the FP8 integration is used, or require a torch version/build that providestorch.float8_e8m0fnu.