Repository navigation
Closed
Labels
Description
name: Unsloth Studio Bug
about: Getting "Failed to import ML libraries: module 'torch' has no attribute 'float8_e8m0fnu" when running training
title: "[Studio Bug] "
labels: bug
assignees: ""
Environment
Where are you using Unsloth?
- Studio desktop application
- Studio web UI (
unsloth studio) - Unsloth CLI
- Python package or notebook
- Colab or Kaggle
Operating system and version:
Windows 11 25H2
GPU model(s) and accelerator backend:
NVIDIA Tesla P40 (CUDA 12.4)
Versions:
Unsloth Version
v0.1.800-beta
Package Version
2026.8.18
Desktop App Version
0.1.800-beta
llama.cpp Version
b10360-mix-87da1a2
What happened?
Steps to reproduce:
- Run training with these parameters: ```yaml
training:
max_seq_length: 2048
num_epochs: 0
learning_rate: 0.0002
embedding_learning_rate: null
batch_size: 2
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
eval_steps: 0
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: unsloth
optim: adamw_8bit
lr_scheduler_type: linear
lora:
lora_r: 16
lora_alpha: 16
lora_dropout: 0
target_modules:- q_proj
- k_proj
- v_proj
- o_proj
- gate_proj
- up_proj
- down_proj
use_rslora: false
use_loftq: false
use_dora: false
logging:
enable_wandb: false
wandb_project: llm-finetuning
enable_tensorboard: false
tensorboard_dir: runs
log_frequency: 10
**Expected behavior:**
Training starts
**Actual behavior:**
"Failed to import ML libraries: module 'torch' has no attribute 'float8_e8m0fnu'" error appears.
**Model and operation involved:**
<!--
Include the model ID or filename and whether this involved installation,
startup, download, training, inference, GGUF, diffusion, or export.
-->
## Diagnostics and logs
<!--
Remove API keys, Hugging Face tokens, passwords, cookies, private prompts,
local paths you do not want to disclose, and other sensitive information.
Do not upload your entire ~/.unsloth/studio directory: it can contain auth
state, databases, chats, datasets, and models.
-->
### Desktop application
Click **Copy Diagnostics** on the error, startup, or update screen and paste the
result below:
```text
{"timestamp": "2026-08-15T16:15:24.121051Z", "level": "error", "event": "Training error: Failed to import ML libraries: module 'torch' has no attribute 'float8_e8m0fnu'"}
{"timestamp": "2026-08-15T16:15:24.121587Z", "level": "error", "event": "Stack trace:\nTraceback (most recent call last):\n File \"C:\\Users\\Aleksandr\\.unsloth\\studio\\unsloth_studio\\Lib\\site-packages\\studio\\backend\\core\\training\\worker.py\", line 4020, in run_training_process\n from core.training.trainer import UnslothTrainer\n File \"C:\\Users\\Aleksandr\\.unsloth\\studio\\unsloth_studio\\Lib\\site-packages\\studio\\backend\\core\\training\\trainer.py\", line 50, in <module>\n from unsloth import FastLanguageModel, FastVisionModel, is_bfloat16_supported\n File \"C:\\Users\\Aleksandr\\.unsloth\\studio\\unsloth_studio\\Lib\\site-packages\\unsloth\\__init__.py\", line 1531, in <module>\n from ._gpu_init import *\n File \"C:\\Users\\Aleksandr\\.unsloth\\studio\\unsloth_studio\\Lib\\site-packages\\unsloth\\_gpu_init.py\", line 164, in <module>\n import unsloth_zoo\n File \"C:\\Users\\Aleksandr\\.unsloth\\studio\\unsloth_studio\\Lib\\site-packages\\unsloth_zoo\\__init__.py\", line 506, in <module>\n from unsloth_zoo.temporary_patches import (\n File \"C:\\Users\\Aleksandr\\.unsloth\\studio\\unsloth_studio\\Lib\\site-packages\\unsloth_zoo\\temporary_patches\\__init__.py\", line 20, in <module>\n from .gemma import *\n File \"C:\\Users\\Aleksandr\\.unsloth\\studio\\unsloth_studio\\Lib\\site-packages\\unsloth_zoo\\temporary_patches\\gemma.py\", line 28, in <module>\n from .utils import (\n File \"C:\\Users\\Aleksandr\\.unsloth\\studio\\unsloth_studio\\Lib\\site-packages\\unsloth_zoo\\temporary_patches\\utils.py\", line 319, in <module>\n from transformers.processing_utils import Unpack\n File \"C:\\Users\\Aleksandr\\.unsloth\\studio\\.venv_t5_510\\transformers\\proces\n... [240 chars omitted; raise UNSLOTH_STUDIO_MAX_EXCEPTION_CHARS to see it all] ...\ned_fp8 import ALL_FP8_EXPERTS_FUNCTIONS\n File \"C:\\Users\\Aleksandr\\.unsloth\\studio\\.venv_t5_510\\transformers\\integrations\\finegrained_fp8.py\", line 45, in <module>\n _UE8M0_SF_DTYPE = torch.float8_e8m0fnu\n ^^^^^^^^^^^^^^^^^^^^\n File \"C:\\Users\\Aleksandr\\.unsloth\\studio\\unsloth_studio\\Lib\\site-packages\\torch\\__init__.py\", line 2681, in __getattr__\n raise AttributeError(f\"module '{__name__}' has no attribute '{name}'\")\nAttributeError: module 'torch' has no attribute 'float8_e8m0fnu'\n"}
If Copy Diagnostics is unavailable, attach the newest relevant files from:
- Windows:
%USERPROFILE%\.unsloth\studio\ - Linux/macOS:
~/.unsloth/studio/
Useful files include:
tauri.logand, if relevant,tauri.log.1logs/install-*.log,logs/update-*.log,logs/repair-*.log, orlogs/backend-*.log- The newest
logs/server/server-*.log
Studio web UI
Attach the newest relevant items:
- Linux/macOS/Windows:
~/.unsloth/studio/logs/server/server-*.log
(use%USERPROFILE%\.unsloth\studio\logs\server\on Windows) - Linux/macOS shortcut launches only:
~/.local/share/unsloth/studio.log - Terminal output if Studio was launched from a terminal
- Browser Console errors for browser-only problems
If you configured UNSLOTH_STUDIO_HOME or STUDIO_HOME, look under
<CUSTOM_STUDIO_HOME>/logs/ instead.
Model-specific logs, if applicable
- GGUF/llama.cpp: newest
~/.unsloth/studio/logs/llama-server/*.log - Diffusion GGUF: newest
~/.unsloth/studio/logs/diffusion-server/*.log - Training resume/checkpoint bug: relevant
trainer_state.json
Python package or notebook, if applicable
Paste the complete traceback and minimal reproduction:
# Remove all tokens and private data.Also include Python, Unsloth, unsloth_zoo, PyTorch, Transformers, and TRL
versions, plus nvidia-smi output when applicable.
Activity
Diagnose torch and triton version skew at import time (#11023)
Diagnose torch and triton version skew at import time (unslothai#11023)