Skip to content

在RTX 5060上使用 Unsloth 时,由于GPU架构过新,导致程序启动失败。 #3870

Closed

Description

@suichengxuan

自查清单

  • 我已仔细阅读了 UnSloth 的官方安装文档和 Windows 支持说明
  • 我已尝试更新 xformers 和 torch 到最新版本(包括 nightly 版)
  • 我已搜索并查看了现有的 issues,确认目前暂不支持 RTX 50xx 系列

问题描述

在 RTX 5060 上使用 Unsloth 时,由于 GPU 架构过新,xformers 库无法找到对应的预编译二进制文件,导致程序启动失败。
目前的 UnSloth 源码强制使用 xformers 或 flash_attn,未提供优雅降级到 PyTorch 原生SDPA的选项。

其他信息

临时修复方案:
通过修改 UnSloth 源码,注释掉 xformers 和 flash_attn 的强制检查,并强制模型使用 PyTorch 原生的 SDPA。

建议:
希望能增加一个环境变量(如 UNSLOOTH_USE_NATIVE_SDPA=1)或配置项,允许用户在 xformers 不可用时自动回退到原生 SDPA,以确保在新架构 GPU 上的可用性。

Activity

  1. Datta0 commented on Jan 9, 2026

    @Datta0
    Contributor

    Hey @suichengxuan can you give this guide a try and see if this solves it for you?
    https://unsloth.ai/docs/basics/fine-tuning-llms-with-blackwell-rtx-50-series-and-unsloth
    I do understand you're asking for fallback onto SDPA. That happens automatically when xformers and flash attn are unavailable.
    But I would still recommend once going through the guide for better results :)

  2. danielhanchen commented on Jun 17, 2026

    @danielhanchen
    Member

    This issue should be fixed now - sorry on the delay - please update with uv pip install --upgrade unsloth unsloth_zoo --force-reinstall --no-cache-dir - if the issue is still there, please open another issue - appreciate it again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions