Software⏱️ 2 min read📅 2026-05-30

How to Fix: AI model training with unsloth and axolotle errors

The error is caused by a dependency conflict between xformers and torch. Installing the correct version of torch should resolve the issue.

Quick Answer: Update torch to version 2.5.1 using pip or conda, as it is required by xformers.

The error you're experiencing is caused by the incompatibility between the versions of PyTorch and xformers/torchaudio. The xformers library requires a specific version of PyTorch, but you have an incompatible version installed.

🛑 Root Causes of the Error

  • Using a CPU without a GPU, despite having installed the necessary dependencies.

🚀 How to Resolve This Issue

Method 1: Update PyTorch Version

  1. Step 1: Run `pip install --upgrade torch` to update PyTorch to the latest version.

Method 2: Install Specific Versions of xformers and torchaudio

  1. Step 1: Run `pip install xformers==0.0.29.post1 torchaudio==2.5.1+cu121 --upgrade torch` to install the specific versions required by xformers and torchaudio.

✨ Wrapping Up

By following these steps, you should be able to resolve the error and successfully train your AI model using xformers and torchaudio.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions