开源项目 GitHub Trending 2026-08-13T12:01 正文 ok 2658 words

Unsloth:在本地运行、训练与部署 LLM 和扩散模型

英文标题:🔥 unslothai/unsloth

Unsloth 提供桌面端、Web UI(Unsloth Studio)和代码版(Unsloth Core),用于在本地运行、训练及部署 LLM、扩散、嵌入和音频模型。该项目支持 Claude Code、OpenAI Codex、MCP 等 Agent 接入本地模型,并提供 OpenAI 兼容 API、RAG、私有搜索及远程 HTTPS 访问能力。官方称,其微调可实现最高 2 倍训练速度并减少 70% 显存占用,同时覆盖 LoRA、QLoRA、全量微调、RL、GRPO、DPO 和 FP8 等方案。对开发者而言,Unsloth 的重点价值在于跨 NVIDIA、AMD、Intel、macOS 和多 GPU 环境统一本地模型推理、训练与部署工作流。
打开原文相关 3 · 机会 2
media351.1 KB media354.1 KB media1.3 KB media57.5 KB media342 B media68.8 KB media67.3 KB

中文

Unsloth 可让你在本地运行和训练模型。

下载适用于你操作系统的原生 Unsloth Desktop 应用:

从 Unsloth 或 GitHub Releases 下载。

或者,如需手动安装:

curl -fsSL https://unsloth.ai/install.sh | sh

irm https://unsloth.ai/install.ps1 | iex

社区:

Unsloth 支持在本地运行、训练和部署 AI 模型,并覆盖各类模型。

  • 运行和训练 LLM、扩散、嵌入及音频模型:Kimi K3、MiniMax-H3、Qwen3.8、Muse Glimmer、DeepSeek-V4、Gemma 4。

  • **Agent 与工具:**将本地模型用于 Claude Code、Codex 和 MCP,包括工具调用与代码执行。

  • **搜索与 RAG:**使用私有且不限量的网页搜索、深度研究和 RAG。

  • **图像和视频:**运行和训练图像及视频扩散模型或多模态模型。

  • **音频:**使用私有且不限量的网页搜索、深度研究和 RAG。

  • **硬件:**支持 CPU、NVIDIA、AMD、Intel、macOS 和多 GPU 配置。

  • **远程访问:**通过安全的 Cloudflare HTTPS 远程访问本地模型。

  • **微调:**训练 LLM、扩散、TTS 和嵌入模型时,速度可提升 2 倍,显存占用可减少 70%。

  • **完整支持:**支持强化学习、LoRA、QLoRA、全量微调、预训练、RL、GRPO、DPO 和 FP8。

  • **导出与部署:**可导出或部署模型,支持 GGUF、NVFP4、FP8 等格式。

  • **数据集:**通过 Data Recipes 从 PDF、CSV、DOCX 等文件构建数据集。

  • **OpenAI 兼容 API:**通过 OpenAI 兼容 API 提供模型服务,也可连接至云服务商。

Unsloth Start 可通过一条命令,将 Claude Code、Codex 及其他 Agent 连接到本地模型。

启动 Unsloth、加载模型并打开项目文件夹后,运行:

将 claude 替换为任意受支持的 Agent:

Agent 命令
Claude Code unsloth start claude
OpenAI Codex unsloth start codex
Hermes Agent unsloth start hermes
OpenClaw unsloth start openclaw
OpenCode unsloth start opencode

Claude Code、Codex 和 OpenCode 可以保留当前模型,并将 Unsloth 用作本地子 Agent:

unsloth start claude --as-subagent --model unsloth/model-GGUF:quant

Unsloth 有三种使用方式:桌面应用 Unsloth Desktop、Web UI Unsloth Studio,以及代码版 Unsloth Core。

Unsloth Desktop(推荐)

这款基于 Tauri 的桌面应用是使用 Unsloth 最简单的方式,无需配置,因此建议从这里开始。

Unsloth Studio(Beta)支持 Windows、Linux、WSL 和 macOS。

  • **CPU:**目前支持聊天和 Data Recipes。
  • **NVIDIA:**可在 RTX 30/40/50、Blackwell、DGX Spark、Station 等硬件上训练。
  • **macOS:**全面支持训练、MLX 和 GGUF 推理。
  • **AMD:**在 Windows、WSL 和 Linux 上支持训练、RL、聊天和部署。阅读 AMD 指南。
  • **Vulkan:**支持在兼容 GPU(包括 Intel GPU)上进行 GGUF 推理。Vulkan 仅加速 GGUF 推理;训练仍需受支持的 PyTorch 或 MLX 后端。
  • **多 GPU:**现已可用,重大升级即将推出。

curl -fsSL https://unsloth.ai/install.sh | sh

使用相同命令即可更新。

Studio 运行后,可在 Settings > System > GGUF inference engine 中切换 GGUF 推理后端:选择 CPU、CUDA、ROCm 或 Vulkan(仅显示为当前设备提供构建版本的选项),然后点击 Apply。该选择会随安装记录,更新后仍会保留;选择 Automatic 则恢复为硬件自动检测。

如需在首次启动前选择后端,请在安装或更新之前设置 UNSLOTH_LLAMA_CPP_BACKEND。它会选择 llama.cpp 二进制包,因此仅在启动 Studio 时设置该变量,无法替换已有二进制包;同时它会覆盖在 Settings 中作出的选择:

export UNSLOTH_LLAMA_CPP_BACKEND=vulkan # or cpu, cuda, rocm, auto curl -fsSL https://unsloth.ai/install.sh | sh

irm https://unsloth.ai/install.ps1 | iex

使用相同命令即可更新。

如需在首次启动前选择 GGUF 推理后端,请在运行安装程序或更新程序前设置环境变量(也可以稍后在 Settings > System > GGUF inference engine 中修改):

$env:UNSLOTH_LLAMA_CPP_BACKEND="vulkan" # or cpu, cuda, rocm, auto irm https://unsloth.ai/install.ps1 | iex

当后端不同时,重新运行当前安装程序会替换此前选择的二进制包。无需单独安装 Vulkan SDK;GPU 驱动必须提供可正常工作的 Vulkan 运行时。

如需局域网或云端访问,添加 -H 0.0.0.0(仅开放原始端口;如需公共 URL,请添加 --cloudflare)。默认情况下,Unsloth 只能在本地访问。

如需通过 HTTPS 访问 Unsloth,请使用 unsloth studio --secure。Unsloth 会继续绑定到 localhost,并且只能通过免费的 Cloudflare 隧道访问;该隧道会发布一个公开的 https://*.trycloudflare.com URL(如果隧道无法启动,服务会以关闭状态失败,因此不会暴露原始端口)。这会使 Unsloth 可从互联网访问,因此拥有链接和 API key 的任何人都可以使用它并执行代码:请妥善保管 API key(见下文远程访问)。

使用我们的 Docker 镜像 unsloth/unsloth 容器。运行:

docker run -d -e JUPYTER_PASSWORD="mypassword"
-p 8888:8888 -p 8000:8000 -p 2222:22
-v $(pwd)/work:/workspace/work
--gpus all
unsloth/unsloth

开发版、Nightly 版、卸载

如需查看开发版、Nightly 版、卸载等说明,请参阅高级安装指南。

Unsloth Core(代码版)

curl -LsSf https://astral.sh/uv/install.sh | sh uv venv unsloth_env --python 3.13 source unsloth_env/bin/activate uv pip install unsloth --torch-backend=auto

winget install -e --id Python.Python.3.13 winget install --id=astral-sh.uv -e uv venv unsloth_env --python 3.13 .\unsloth_env\Scripts\activate uv pip install unsloth --torch-backend=auto

对于 Windows,只有在已安装 PyTorch 的情况下,pip install unsloth 才可用。请阅读我们的 Windows 指南。你也可以使用与 Unsloth Studio 相同的 Docker 镜像。

对于 RTX 50x、B200、6000 系列 GPU:使用 uv pip install unsloth --torch-backend=auto。请阅读以下指南:Blackwell 和 DGX Spark。
如需在 AMD 和 Intel GPU 上安装 Unsloth,请遵循我们的 AMD 指南和 Intel 指南。

使用我们的 Notebook 免费训练。你可以使用新的免费 Unsloth Studio Notebook,在 Web UI 中免费运行和训练模型。请阅读我们的指南。添加数据集、运行,然后部署训练完成的模型。

  • **AMD 训练:**在 Windows、WSL 和 Linux 的 AMD GPU 上训练、运行 RL、聊天和部署。指南
  • **GGUF 硬件控制:**选择 GPU/层放置策略、卸载 MoE 专家,并使用多 GPU 或张量并行。#6414
  • **适用于任何 Agent 的本地模型:**通过 Unsloth 的 OpenAI 兼容和 Anthropic 兼容 API,将 unsloth start 与 Claude Code、Codex、Hermes、OpenCode、OpenClaw 等配合使用。指南
  • **MCP 控制端点:**让兼容客户端管理模型、训练、配方、检查点和导出。#7191
  • **本地推理可靠性:**更快恢复长对话、恢复停滞下载,并复用已有 GGUF 文件。#7204 • #6858 • #7209
  • 新模型:Qwen-AgentWorld、Ornith、Kimi K2.7 Code 和 MiniMax M3
  • **GLM-5.2:**使用 Unsloth Dynamic GGUFs 在本地运行 Z.ai 的 7440 亿参数、100 万上下文开放模型。指南
  • **DeepSeek-V4:**在本地运行 DeepSeek-V4-Flash,并获得经修正的多轮对话和工具调用行为。指南
  • **DiffusionGemma:**在 Unsloth Studio 中运行和微调 Google 的扩散语言模型,推理速度提升 1.8 倍。指南
  • **Qwen3.6:**运行和训练 Qwen3.6;借助 MTP 可实现 1.4 至 2.2 倍更快的推理,并可在受支持 GPU 上使用 NVFP4 量化。指南
  • **Gemma 4:**运行和训练 Gemma 4 文本、图像和音频模型,支持 QAT、MTP、GGUF 和 MLX。指南
  • **MCP 服务器:**通过 Model Context Protocol,将本地模型连接至文件、应用、数据库和外部工具。指南
  • **连接:**在同一界面中混用本地模型与 API 服务商(OpenAI、Anthropic)或服务器(vLLM、Ollama)。指南
  • **Unsloth Studio 发布:**用于运行和训练 LLM 的全新 Web UI。博客
  • 训练 MoE LLM 的速度提升 12 倍,显存占用减少 35%——适用于 DeepSeek、GLM、Qwen 和 gpt-oss。博客
  • **嵌入模型:**Unsloth 现支持约 1.8 至 3.3 倍更快的嵌入模型微调。博客 • Notebooks
  • 新的批处理算法实现了相比其他所有方案长 7 倍的上下文 RL。博客
  • 新增 RoPE 和 MLP Triton Kernels 与 Padding Free + Packing:训练速度提升 3 倍,显存占用减少 30%。博客
  • **50 万上下文:**现在可在一块 80GB GPU 上,训练上下文长度超过 50 万的 200 亿参数模型。博客
  • **FP8 与视觉 RL:**现在可在消费级 GPU 上进行 FP8 和 VLM GRPO。FP8 博客 • 视觉 RL

以下高级说明适用于 Unsloth Studio。关于 Unsloth Core 的高级安装,请查看文档。

开发版 / Nightly 版 / 实验性安装:macOS、Linux、WSL

开发版从 main 分支构建,该分支包含最新(nightly)源代码。

git clone https://github.com/unslothai/unsloth cd unsloth ./install.sh --local unsloth studio -p 8888

如需安装到隔离位置(拥有独立虚拟环境、auth/、studio.db、缓存和 llama.cpp 构建),请设置 UNSLOTH_STUDIO_HOME,并在启动时再次传入:

UNSLOTH_STUDIO_HOME="$PWD/.studio" ./install.sh --local UNSLOTH_STUDIO_HOME="$PWD/.studio" unsloth studio -p 8888

然后更新:

cd unsloth && git pull ./install.sh --local unsloth studio -p 8888

开发版 / Nightly 版 / 实验性安装:Windows PowerShell

开发版从 main 分支构建,该分支包含最新(nightly)源代码。

git clone https://github.com/unslothai/unsloth.git cd unsloth Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass .\install.ps1 --local unsloth studio -p 8888

如需安装到隔离位置(拥有独立虚拟环境、auth/、studio.db、缓存和 llama.cpp 构建),请设置 UNSLOTH_STUDIO_HOME,并在启动时再次传入:

$env:UNSLOTH_STUDIO_HOME="$PWD.studio"; .\install.ps1 --local $env:UNSLOTH_STUDIO_HOME="$PWD.studio"; unsloth studio -p 8888

然后更新:

cd unsloth; git pull .\install.ps1 --local unsloth studio -p 8888

远程访问:--secure(HTTPS 隧道)与原始端口

默认情况下,unsloth studio 会绑定至 127.0.0.1(仅限本机)。如需从另一台设备访问,请选择以下方式之一:

  • --secure(推荐):仅通过免费的 Cloudflare HTTPS 链接提供服务。U

English / 原文

Unsloth lets you run and train models locally.

Features • Quickstart • Notebooks • Documentation

Download the native Unsloth Desktop app for your operating system:

Download from Unsloth or GitHub Releases.

Or if you prefer to install manually:

curl -fsSL https://unsloth.ai/install.sh | sh


irm https://unsloth.ai/install.ps1 | iex

Community:

Unsloth lets you run, train, and deploy AI models locally, with support for all types of models.

  • Run and train LLMs, diffusion, embedding, audio models: Kimi K3, MiniMax-H3, Qwen3.8, Muse Glimmer, DeepSeek-V4, Gemma 4.

  • Agents & Tools: Use local models with Claude Code, Codex, and MCP, including tool calling and code execution.

  • Search & RAG: Use private and unlimited web search, deep research, and RAG.

  • Image and video: Run and train image and video diffusion or multimodal models

  • Audio: Use private and unlimited web search, deep research, and RAG.

  • Hardware: Supports CPU, NVIDIA, AMD, Intel, macOS, and multi GPU setups.

  • Remote Access: Access your local models remotely through secure Cloudflare HTTPS.

  • Fine-tuning: Train LLMs, diffusion, TTS, and embedding models 2× faster with 70% less VRAM

  • Complete support: Supports reinforcement learning, LoRA, QLoRA, full fine tuning, pretraining, RL, GRPO, DPO, and FP8.

  • Export & Deploy: Export or Deploy models with including GGUF, NVFP4, FP8 and more formats.

  • Datasets: Build datasets from PDFs, CSVs, DOCX files, and more with Data Recipes.

  • OpenAI Compatible API: Serve models through an OpenAI compatible API and also connect to cloud providers

Unsloth Start connects Claude Code, Codex and other agents to local models with one command.

Start Unsloth, load a model, open your project folder, then run:

Replace claude with any supported agent:

Agent Command
Claude Code unsloth start claude
OpenAI Codex unsloth start codex
Hermes Agent unsloth start hermes
OpenClaw unsloth start openclaw
OpenCode unsloth start opencode

Claude Code, Codex and OpenCode can keep their current model and use Unsloth as a local subagent:

unsloth start claude --as-subagent --model unsloth/model-GGUF:quant

Unsloth can be used in three ways: Unsloth Desktop , the desktop app; Unsloth Studio , the web UI; or Unsloth Core , the code based version.

Unsloth Desktop (recommended)

The Tauri based desktop app is the easiest way to use Unsloth and needs no setup, so start here.

Unsloth Studio (Beta) works on Windows, Linux, WSL and macOS.

  • CPU: Supported for Chat and Data Recipes currently

  • NVIDIA: Training works on RTX 30/40/50, Blackwell, DGX Spark, Station and more

  • macOS: Training, MLX and GGUF inference are ALL supported.

  • AMD: Training, RL, chat and deployment work on Windows, WSL and Linux. Read the AMD guide.

  • Vulkan: GGUF inference is supported on compatible GPUs, including Intel GPUs. Vulkan accelerates GGUF inference only; training still requires a supported PyTorch or MLX backend.

  • Multi-GPU: Available now, with a major upgrade on the way

    curl -fsSL https://unsloth.ai/install.sh | sh

Use the same command to update.

The GGUF inference backend can be changed from Settings > System > GGUF inference engine once Studio is running: pick CPU, CUDA, ROCm or Vulkan (only the ones with a build for your machine are listed) and Apply. The choice is recorded with the install, so updates keep it, and Automatic returns to hardware detection.

To pick it before the first launch instead, set UNSLOTH_LLAMA_CPP_BACKEND before installing or updating. It selects the llama.cpp binary bundle, so setting it only when launching Studio cannot replace an existing one, and it overrides whatever was chosen in Settings:

export UNSLOTH_LLAMA_CPP_BACKEND=vulkan   # or cpu, cuda, rocm, auto
curl -fsSL https://unsloth.ai/install.sh | sh


irm https://unsloth.ai/install.ps1 | iex

Use the same command to update.

To pick the GGUF inference backend before the first launch, set the environment variable before running the installer or updater (or change it later in Settings > System > GGUF inference engine):

$env:UNSLOTH_LLAMA_CPP_BACKEND="vulkan"   # or cpu, cuda, rocm, auto
irm https://unsloth.ai/install.ps1 | iex

Re-running the current installer replaces a previously selected bundle when the backend differs. A separate Vulkan SDK is not required; the GPU driver must provide a working Vulkan runtime.

For LAN or cloud access, add -H 0.0.0.0 (raw port only; add --cloudflare for a public URL). By default, Unsloth is accessible only locally.

To reach Unsloth over HTTPS, use unsloth studio --secure. Unsloth stays bound to localhost and is reached only through a free Cloudflare tunnel, which publishes it at a public https://*.trycloudflare.com URL (it fails closed if the tunnel can't start, so the raw port is never exposed). This makes Unsloth reachable from the internet, so anyone with the link and API key can use it and run code: keep your API key private (see Remote access below).

Use our Docker image unsloth/unsloth container. Run:

docker run -d -e JUPYTER_PASSWORD="mypassword" \
  -p 8888:8888 -p 8000:8000 -p 2222:22 \
  -v $(pwd)/work:/workspace/work \
  --gpus all \
  unsloth/unsloth

Developer, Nightly, Uninstall

To see developer, nightly and uninstallation etc. instructions, see advanced installation.

Unsloth Core (code-based)

curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv unsloth_env --python 3.13
source unsloth_env/bin/activate
uv pip install unsloth --torch-backend=auto


winget install -e --id Python.Python.3.13
winget install --id=astral-sh.uv  -e
uv venv unsloth_env --python 3.13
.\unsloth_env\Scripts\activate
uv pip install unsloth --torch-backend=auto

For Windows, pip install unsloth works only if you have PyTorch installed. Read our Windows Guide. You can use the same Docker image as Unsloth Studio.

For RTX 50x, B200, 6000 GPUs: uv pip install unsloth --torch-backend=auto. Read our guides for: Blackwell and DGX Spark.
To install Unsloth on AMD and Intel GPUs, follow our AMD Guide and Intel Guide.

Train for free with our notebooks. You can use our new free Unsloth Studio notebook to run and train models for free in a web UI. Read our guide. Add dataset, run, then deploy your trained model.

  • AMD training : Train, run RL, chat and deploy on AMD GPUs across Windows, WSL and Linux. Guide
  • GGUF hardware controls : Choose GPU/layer placement, offload MoE experts and use multi-GPU or Tensor Parallelism. #6414
  • Local models for any agent : Use unsloth start with Claude Code, Codex, Hermes, OpenCode, OpenClaw and more through Unsloth's OpenAI- and Anthropic-compatible APIs. Guide
  • MCP control endpoint : Let compatible clients manage models, training, recipes, checkpoints and exports. #7191
  • Local inference reliability : Resume long chats faster, recover stalled downloads and reuse existing GGUF files. #7204 • #6858 • #7209
  • New models : Qwen-AgentWorld, Ornith, Kimi K2.7 Code and MiniMax M3
  • GLM-5.2 : Run Z.ai's 744B-parameter, 1M-context open model locally with Unsloth Dynamic GGUFs. Guide
  • DeepSeek-V4 : Run DeepSeek-V4-Flash locally with corrected multi-turn and tool-calling behavior. Guide
  • DiffusionGemma : Run and fine-tune Google's diffusion language model with 1.8x faster inference in Unsloth Studio. Guide
  • Qwen3.6 : Run and train Qwen3.6 with MTP for 1.4-2.2x faster inference and NVFP4 quants for supported GPUs. Guide
  • Gemma 4 : Run and train Gemma 4 text, image and audio models with QAT, MTP, GGUF and MLX support. Guide
  • MCP servers : Connect local models to files, apps, databases and external tools through Model Context Protocol. Guide
  • Connections : Mix local models with API providers (OpenAI, Anthropic) or servers (vLLM, Ollama) in the same interface. Guide
  • Introducing Unsloth Studio : our new web UI for running and training LLMs. Blog
  • Train MoE LLMs 12x faster with 35% less VRAM - DeepSeek, GLM, Qwen and gpt-oss. Blog
  • Embedding models : Unsloth now supports ~1.8-3.3x faster embedding fine-tuning. Blog • Notebooks
  • New 7x longer context RL vs. all other setups, via our new batching algorithms. Blog
  • New RoPE & MLP Triton Kernels & Padding Free + Packing : 3x faster training & 30% less VRAM. Blog
  • 500K Context : Training a 20B model with >500K context is now possible on an 80GB GPU. Blog
  • FP8 & Vision RL: You can now do FP8 & VLM GRPO on consumer GPUs. FP8 Blog • Vision RL

The below advanced instructions are for Unsloth Studio. For Unsloth Core advanced installation, view our docs.

Developer / Nightly / Experimental installs: macOS, Linux, WSL:

The developer install builds from the main branch, which is the latest (nightly) source.

git clone https://github.com/unslothai/unsloth
cd unsloth
./install.sh --local
unsloth studio -p 8888

To install into an isolated location (its own virtual env, auth/, studio.db, cache and llama.cpp build), set UNSLOTH_STUDIO_HOME and pass it again at launch:

UNSLOTH_STUDIO_HOME="$PWD/.studio" ./install.sh --local
UNSLOTH_STUDIO_HOME="$PWD/.studio" unsloth studio -p 8888

Then to update :

cd unsloth && git pull
./install.sh --local
unsloth studio -p 8888

Developer / Nightly / Experimental installs: Windows PowerShell:

The developer install builds from the main branch, which is the latest (nightly) source.

git clone https://github.com/unslothai/unsloth.git
cd unsloth
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
.\install.ps1 --local
unsloth studio -p 8888

To install into an isolated location (its own virtual env, auth/, studio.db, cache and llama.cpp build), set UNSLOTH_STUDIO_HOME and pass it again at launch:

$env:UNSLOTH_STUDIO_HOME="$PWD\.studio"; .\install.ps1 --local
$env:UNSLOTH_STUDIO_HOME="$PWD\.studio"; unsloth studio -p 8888

Then to update :

cd unsloth; git pull
.\install.ps1 --local
unsloth studio -p 8888

Remote access: --secure (HTTPS tunnel) vs raw port

By default unsloth studio binds to 127.0.0.1 (this machine only). To reach it from another device, pick one of:

  • --secure (recommended): serve only through a free Cloudflare HTTPS link. Unsloth stays bound to localhost and the tunnel provides the public URL; it fails closed (does not start) if the tunnel can't come up, so the raw port is never exposed.

    unsloth studio --secure -p 8888

  • -H 0.0.0.0: bind the raw port on all network interfaces, reachable from anywhere on the network (subject to your firewall). It does not create a public internet URL; add --cloudflare to also publish an internet-reachable https://*.trycloudflare.com link even behind a firewall. Only use this on a network you trust.

    unsloth studio -H 0.0.0.0 -p 8888

The Cloudflare tunnel is off by default : -H 0.0.0.0 exposes the raw port only, not a public internet URL. Pair the wildcard bind with --cloudflare (unsloth studio -H 0.0.0.0 --cloudflare) to also publish a public https://*.trycloudflare.com link, or prefer --secure (above), which keeps the raw port private. --cloudflare has no effect on a loopback bind.

On a wildcard bind Unsloth works out the address to share by asking ifconfig.me for the public IP, then asks check-host.net whether that port is reachable so it can tell you if a firewall is in the way. Both contact a third party. Set UNSLOTH_STUDIO_DISABLE_PUBLIC_CHECK=1 to skip them; the banner then shows the LAN address and no reachability line.

The first time Unsloth is published on a public URL (--secure or --cloudflare) with the auto-generated admin password still in place, it asks for a new admin password in the terminal (masked input with confirmation) before the public link goes up. Without an attached terminal it warns instead and keeps the bootstrap deadline: Unsloth shuts down after UNSLOTH_STUDIO_BOOTSTRAP_TIMEOUT (default 1 hour) unless the password is changed in the web UI.

For headless setups that cannot answer that prompt, set the initial admin password non-interactively with --password (only takes effect when no password is set yet; if one already exists it is a hard error, so rotate later with unsloth studio reset-password):

unsloth studio --secure --password 'your-strong-password'        # visible in `ps`/history
UNSLOTH_STUDIO_PASSWORD='your-strong-password' unsloth studio --secure   # via env var
printf '%s\n' 'your-strong-password' | unsloth studio --secure --password -   # via stdin

A literal --password VALUE is visible in the process list and shell history, so prefer the UNSLOTH_STUDIO_PASSWORD env var or --password - (stdin) for automation. This applies to any launch (public or a headless -H 0.0.0.0 bind), and the password is set in the parent before the server binds, so it never reaches a re-executed child process.

Server-side tools (web search, Python and terminal code execution) run as your user and are on by default. Anyone who can reach the server with the API key can run code on this machine, so keep your API key private and pass --disable-tools when exposing Unsloth.

Installer options can be passed as environment variables. On macOS, Linux and WSL place the variable after the pipe so the shell passes it to sh; on Windows set it with $env: before piping to iex.

Skip PyTorch (GGUF-only mode):

curl -fsSL https://unsloth.ai/install.sh | UNSLOTH_NO_TORCH=1 sh


$env:UNSLOTH_NO_TORCH=1; irm https://unsloth.ai/install.ps1 | iex

Skip the post-install prompt that starts Unsloth (useful for automated installs):

curl -fsSL https://unsloth.ai/install.sh | UNSLOTH_SKIP_AUTOSTART=1 sh


$env:UNSLOTH_SKIP_AUTOSTART=1; irm https://unsloth.ai/install.ps1 | iex

Pin the Python version:

curl -fsSL https://unsloth.ai/install.sh | UNSLOTH_PYTHON=3.12 sh


$env:UNSLOTH_PYTHON='3.12'; irm https://unsloth.ai/install.ps1 | iex

Install to a custom location with UNSLOTH_STUDIO_HOME:

curl -fsSL https://unsloth.ai/install.sh | UNSLOTH_STUDIO_HOME=/abs/path sh


$env:UNSLOTH_STUDIO_HOME='C:\path'; irm https://unsloth.ai/install.ps1 | iex

On macOS, the installer defaults to the system certificate store (UV_SYSTEM_CERTS=1) so uv trusts the CAs in your Keychain, needed behind TLS-inspecting proxies (Cisco Umbrella, Zscaler, etc.). Opt out with:

curl -fsSL https://unsloth.ai/install.sh | UV_SYSTEM_CERTS=0 sh

Point the frontend build at a corporate npm mirror/proxy with UNSLOTH_NPM_REGISTRY (for the developer install behind a firewall that blocks registry.npmjs.org):

UNSLOTH_NPM_REGISTRY=https://artifactory.example.com/api/npm/npm/ ./install.sh --local


$env:UNSLOTH_NPM_REGISTRY='https://artifactory.example.com/api/npm/npm/'; .\install.ps1 --local

It is threaded as --registry into the Unsloth frontend npm/bun installs; the supply-chain locks (7-day min-release-age, exact version pins) stay in force.

Cap Unsloth's native CPU thread pools on high-core hosts: UNSLOTH_CPU_THREADS=8 unsloth studio -p 8888.

The recommended way to fully remove Unsloth Studio is the matching uninstall script for your OS. It stops any running servers, removes the install dir, the launcher data dir, the desktop shortcut, and any platform-specific entries (macOS .app bundle + Launch Services on Mac; Start Menu, HKCU\Software\Unsloth registry key and user PATH entries on Windows):

  • ​ MacOS, WSL, Linux: curl -fsSL https://raw.githubusercontent.com/unslothai/unsloth/main/scripts/uninstall.sh | sh
  • ​ Windows (PowerShell): irm https://raw.githubusercontent.com/unslothai/unsloth/main/scripts/uninstall.ps1 | iex

If you only want to drop the install dir and keep the launcher/shortcut for a later reinstall, you can instead run rm -rf ~/.unsloth/studio (Mac/Linux/WSL) or Remove-Item -Recurse -Force "$HOME\.unsloth\studio" (Windows). The model cache at ~/.cache/huggingface is not touched by any of these.

For more info, see our docs.

You can delete old model files either from the bin icon in model search or by removing the relevant cached model folder from the default Hugging Face cache directory. By default, HF uses:

  • ​ MacOS, Linux, WSL: ~/.cache/huggingface/hub/
  • ​ Windows: %USERPROFILE%\.cache\huggingface\hub\

You can cite the Unsloth repo as follows:

@software{unsloth,
  author = {Daniel Han, Michael Han and Unsloth team},
  title = {Unsloth},
  url = {https://github.com/unslothai/unsloth},
  year = {2023}
}

If you trained a model with 🦥Unsloth, you can use this cool sticker!

Unsloth uses a dual-licensing model of Apache 2.0 and AGPL-3.0. The core Unsloth package remains licensed under Apache 2.0 , while certain optional components, such as the Unsloth Studio UI are licensed under the open-source license AGPL-3.0.

This structure helps support ongoing Unsloth development while keeping the project open source and enabling the broader ecosystem to continue growing.

  • The llama.cpp library that lets users run and save models with Unsloth
  • The Hugging Face team and their libraries: transformers and TRL
  • The Pytorch and Torch AO team for their contributions
  • NVIDIA for their NeMo DataDesigner library and their contributions
  • And of course for every single person who has contributed or has used Unsloth!