Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Point Unsloth docs links at unsloth.ai/docs instead of docs.unsloth.ai (#14333)
Michael Hand9aded3801f4
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex 6eb8d1bc6ea..874dff36292 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -6,7 +6,7 @@ Thank you for not only using Unsloth but also for being interested in helping ou- **Fix Bugs**: Identify and resolve issues with the existing codebase.- **Submit Ideas**: Request new features or share enhancements you'd like to see.- **Develop Features**: Implement new functionality or improve existing tools which can be done via PRs.-- **[Improve Documentation](https://docs.unsloth.ai/)**: Help by creating guides, FAQs, or enhancing clarity.+- **[Improve Documentation](https://unsloth.ai/docs)**: Help by creating guides, FAQs, or enhancing clarity.One of the best ways to support us is by spreading the word about Unsloth! Share how it’s powering your amazing projects in blog posts or social media, and inspire others to explore its potential. Even a simple star on our repo goes a long way in showing your support and helping the community grow. 🌟diff --git a/docker/DOCKERHUB-ROCM.md b/docker/DOCKERHUB-ROCM.mdindex f04abddb94a..5787aac22a6 100644--- a/docker/DOCKERHUB-ROCM.md+++ b/docker/DOCKERHUB-ROCM.md@@ -2,7 +2,7 @@Fine-tune and run LLMs on AMD GPUs with no setup. This image carries the full training stack built against ROCm: PyTorch with ROCm 7.2, Unsloth, unsloth-zoo, a bitsandbytes build with the ROCm 4-bit fix, triton-rocm, TRL, PEFT and diffusers.-This is the AMD counterpart to [`unsloth/unsloth`](https://hub.docker.com/r/unsloth/unsloth), which is CUDA-only. Source: [`docker/Dockerfile.rocm`](https://github.com/unslothai/unsloth/blob/main/docker/Dockerfile.rocm). Guide: [docs.unsloth.ai](https://docs.unsloth.ai/get-started/install/docker).+This is the AMD counterpart to [`unsloth/unsloth`](https://hub.docker.com/r/unsloth/unsloth), which is CUDA-only. Source: [`docker/Dockerfile.rocm`](https://github.com/unslothai/unsloth/blob/main/docker/Dockerfile.rocm). Guide: [unsloth.ai/docs](https://unsloth.ai/docs/get-started/install/docker).## Quick start@@ -140,5 +140,5 @@ The build's own record is in the image: `cat /etc/unsloth-rocm-build` reports th- Source and issues: [github.com/unslothai/unsloth](https://github.com/unslothai/unsloth)- Docker files: [`docker/`](https://github.com/unslothai/unsloth/tree/main/docker)-- Documentation: [docs.unsloth.ai](https://docs.unsloth.ai)+- Documentation: [unsloth.ai/docs](https://unsloth.ai/docs)- Licences: the image is labelled `Apache-2.0 AND AGPL-3.0-only`. [Apache-2.0](https://github.com/unslothai/unsloth/blob/main/LICENSE) covers the repository and the training stack. The [AGPL-3.0](https://github.com/unslothai/unsloth/blob/main/studio/LICENSE.AGPL-3.0) half is there for the one AGPL file this image ships, `/workspace/smoke_test_rocm.py`, which carries an `AGPL-3.0-only` header; Unsloth Studio itself is only in the `studio` tag.diff --git a/docker/DOCKERHUB.md b/docker/DOCKERHUB.mdindex fada7854eb6..be79c9e6acd 100644--- a/docker/DOCKERHUB.md+++ b/docker/DOCKERHUB.md@@ -2,7 +2,7 @@Fine-tune and run LLMs, vision, audio and diffusion models with no setup. Every image carries the training stack (PyTorch 2.11 with CUDA 12.8, [Unsloth](https://github.com/unslothai/unsloth), unsloth-zoo, bitsandbytes, TRL, PEFT, plus xformers on `linux/amd64`), JupyterLab with the [Unsloth notebooks](https://github.com/unslothai/notebooks), and prebuilt llama.cpp. The `latest` image adds whisper.cpp for Unsloth Studio's speech-to-text and audio.cpp (CUDA build on `linux/amd64`) for its text-to-speech, music and transcription models.-Source: [`docker/`](https://github.com/unslothai/unsloth/tree/main/docker). Guide: [docs.unsloth.ai](https://docs.unsloth.ai/get-started/install/docker).+Source: [`docker/`](https://github.com/unslothai/unsloth/tree/main/docker). Guide: [unsloth.ai/docs](https://unsloth.ai/docs/get-started/install/docker).## Quick start@@ -194,7 +194,7 @@ Both images refresh the notebooks from GitHub on each start, which costs 10 to 2## Help-- [Documentation](https://docs.unsloth.ai)+- [Documentation](https://unsloth.ai/docs)- [r/unsloth](https://reddit.com/r/unsloth)- [Issues](https://github.com/unslothai/unsloth/issues)diff --git a/install.sh b/install.shindex d3a623f4bc2..a604717b5ff 100755--- a/install.sh+++ b/install.sh@@ -416,7 +416,7 @@ _bnb_rocm_arch_has_binary() {}_warn_bnb_no_rocm_binary() {_bnb_rocm_arch_has_binary && return 0- substep "[WARN] aarch64: bitsandbytes ships no ROCm kernels on this arch; 4-bit QLoRA needs a source build -- https://docs.unsloth.ai/get-started/install-and-update/amd" "$C_WARN"+ substep "[WARN] aarch64: bitsandbytes ships no ROCm kernels on this arch; 4-bit QLoRA needs a source build -- https://unsloth.ai/docs/get-started/install/amd" "$C_WARN"}_install_bnb_rocm() {_label="$1"@@ -6960,7 +6960,7 @@ if [ "$_torch_index_pinned" = false ] && [ "$SKIP_TORCH" = false ] && \fiecho " [WARN] Routing to AMD arch-specific wheels ($(_strip_index_url_credentials "$TORCH_INDEX_URL"))." >&2echo " [WARN] These wheels bundle their own ROCm runtime; install the kernel stack for native compute:" >&2- echo " [WARN] https://docs.unsloth.ai/get-started/install-and-update/amd" >&2+ echo " [WARN] https://unsloth.ai/docs/get-started/install/amd" >&2if [ -n "$_linux_inferred_gfx" ]; thenecho " [WARN] Tip: set UNSLOTH_ROCM_GFX_ARCH=$_linux_inferred_gfx to skip inference next time." >&2else@@ -7375,7 +7375,7 @@ case "$_torch_index_leaf" inecho " [WARN] rocm wheels ship without gfx906 BLAS kernels and fail at first use)." >&2echo " [WARN] gfx906 is a community-maintained legacy path: 16-bit LoRA and full" >&2echo " [WARN] finetuning work out of the box; bitsandbytes 4-bit QLoRA requires a" >&2- echo " [WARN] source build of bitsandbytes for gfx906 (see docs.unsloth.ai/amd)." >&2+ echo " [WARN] source build of bitsandbytes for gfx906 (see unsloth.ai/docs/get-started/install/amd)." >&2echo "" >&2_amd_gfx906_base="${UNSLOTH_PYTORCH_MIRROR:-https://download.pytorch.org/whl}"while [ "${_amd_gfx906_base%/}" != "$_amd_gfx906_base" ]; do@@ -7691,7 +7691,7 @@ case "$TORCH_INDEX_URL" insubstep "Strix Halo (gfx1151): this installer auto-offers ROCm-on-WSL setup once the"substep " driver is current; or run unsloth/scripts/install_rocm_wsl_strixhalo.sh yourself."else- substep "AMD ROCm users: see https://docs.unsloth.ai/get-started/install-and-update/amd"+ substep "AMD ROCm users: see https://unsloth.ai/docs/get-started/install/amd"fisubstep "Re-run with --no-torch for GGUF-only (faster, no PyTorch):"substep " curl -fsSL https://unsloth.ai/install.sh | sh -s -- --no-torch"@@ -8284,7 +8284,7 @@ if [ "$_MIGRATED" = true ]; thenfiif [ "$SKIP_TORCH" = false ] && [ "$_torch_index_is_rocm_family" = true ]; thenif _is_gfx906_bnb_skip; then- substep "gfx906: skipping prebuilt bitsandbytes (no gfx906 kernels); build from source for 4-bit QLoRA -- https://docs.unsloth.ai/get-started/install-and-update/amd" "$C_WARN"+ substep "gfx906: skipping prebuilt bitsandbytes (no gfx906 kernels); build from source for 4-bit QLoRA -- https://unsloth.ai/docs/get-started/install/amd" "$C_WARN"else_install_bnb_rocm "install bitsandbytes (AMD)" "$_VENV_PY"fi@@ -8485,7 +8485,7 @@ elif [ -n "$TORCH_INDEX_URL" ]; thenfiif [ "$SKIP_TORCH" = false ] && [ "$_torch_index_is_rocm_family" = true ]; thenif _is_gfx906_bnb_skip; then- substep "gfx906: skipping prebuilt bitsandbytes (no gfx906 kernels); build from source for 4-bit QLoRA -- https://docs.unsloth.ai/get-started/install-and-update/amd" "$C_WARN"+ substep "gfx906: skipping prebuilt bitsandbytes (no gfx906 kernels); build from source for 4-bit QLoRA -- https://unsloth.ai/docs/get-started/install/amd" "$C_WARN"else_install_bnb_rocm "install bitsandbytes (AMD)" "$_VENV_PY"fidiff --git a/studio/frontend/src/features/browser/address.ts b/studio/frontend/src/features/browser/address.tsindex 2aceb1f6a88..31a89c8af71 100644--- a/studio/frontend/src/features/browser/address.ts+++ b/studio/frontend/src/features/browser/address.ts@@ -24,7 +24,7 @@ export const SEARCH_ENGINES: Record<SearchEngineId, { label: string; searchUrl:};const SCHEME = /^[a-z][a-z\d+.-]*:\/\//i;-// A dotted host (optionally with port and path), no spaces: "docs.unsloth.ai/x", "пример.рф", "example.xn--p1ai".+// A dotted host (optionally with port and path), no spaces: "unsloth.ai/docs/x", "пример.рф", "example.xn--p1ai".const HOST_LIKE = /^(?:[\p{L}\p{N}_-]+\.)+(?:\p{L}{2,}|xn--[a-z\d-]+)(?::\d+)?(?:[/?#]\S*)?$/iu;// File extensions that are not TLDs, so "llama.cpp" is a search (.py, .md and .rs are real TLDs).const FILE_NAME = /^[^/?#:]+\.(?:cpp|jsx?|tsx?|jsonl?|html?|css|txt|csv|ya?ml|toml|ipynb|gguf|safetensors|bin|pdf|png|jpe?g)$/i;diff --git a/studio/frontend/src/features/browser/new-tab-page.tsx b/studio/frontend/src/features/browser/new-tab-page.tsxindex 7495b7d263d..e0880888a5e 100644--- a/studio/frontend/src/features/browser/new-tab-page.tsx+++ b/studio/frontend/src/features/browser/new-tab-page.tsx@@ -30,7 +30,7 @@ const UNSLOTH_SITES: Site[] = [{ title: "Unsloth", url: "https://unsloth.ai", icon: "/sticker.png" },{title: "Unsloth Docs",- url: "https://docs.unsloth.ai",+ url: "https://unsloth.ai/docs",icon: "/sticker.png",},];@@ -46,12 +46,26 @@ const OTHER_SITES: Site[] = [const KNOWN_SITES = [...UNSLOTH_SITES, ...OTHER_SITES];-// The proxied view loads the docs at the address docs.unsloth.ai redirects to; the home page stays blocked.+// The proxied view keeps the docs; the unsloth.ai home page stays blocked.const PROXIED_SITES: Site[] = [{ title: "Unsloth Docs", url: "https://unsloth.ai/docs", icon: "/sticker.png" },...OTHER_SITES,];+/** One suggestion per host, except the docs, which share unsloth.ai with the home page. */+function siteKey(url: string): string {+ const host = hostOf(url);+ if (host === "docs.unsloth.ai") return "unsloth.ai/docs";+ if (host !== "unsloth.ai") return host;+ try {+ return /^\/docs(?:\/|$)/.test(new URL(url).pathname)+ ? "unsloth.ai/docs"+ : host;+ } catch {+ return host;+ }+}+const SUGGESTED_COUNT = 4;const RECENTS_PER_PAGE = 5;@@ -63,12 +77,12 @@ function suggestedSites(): Site[] {const byHost = new Map<string, { site: Site; visits: number }>();for (const item of history) {- const host = hostOf(item.url);+ const host = siteKey(item.url);const seen = byHost.get(host);if (seen) seen.visits += 1;else {const icon = KNOWN_SITES.find(- (site) => hostOf(site.url) === host,+ (site) => siteKey(site.url) === host,)?.icon;byHost.set(host, {site: { title: item.title || host, url: item.url, icon },@@ -80,12 +94,12 @@ function suggestedSites(.filter((site) => site.visits > 1).sort((a, b) => b.visits - a.visits).map((site) => site.site);- const hosts = new Set(sites.map((site) => hostOf(site.url)));+ const hosts = new Set(sites.map((site) => siteKey(site.url)));for (const site of defaults)- if (!hosts.has(hostOf(site.url))) sites.push(site);- const off = new Set(hidden);+ if (!hosts.has(siteKey(site.url))) sites.push(site);+ const off = new Set(hidden.map((key) => siteKey(`https://${key}`)));return sites- .filter((site) => !off.has(hostOf(site.url)))+ .filter((site) => !off.has(siteKey(site.url))).slice(0, SUGGESTED_COUNT);}@@ -109,7 +123,7 @@ function SuggestedSite({ site, tabId }: { site: Site; tabId: string }) {const t = useT();const { navigate } = useBrowserStore.getState();const remove = () =>- useBrowserPrefsStore.getState().hideSuggestion(hostOf(site.url));+ useBrowserPrefsStore.getState().hideSuggestion(siteKey(site.url));return (<LinkContextMenuurl={site.url}diff --git a/studio/frontend/tests/browser-docs-link.test.ts b/studio/frontend/tests/browser-docs-link.test.tsnew file mode 100644index 00000000000..0509c3de55e--- /dev/null+++ b/studio/frontend/tests/browser-docs-link.test.ts@@ -0,0 +1,20 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0++import assert from "node:assert/strict";+import test from "node:test";++import { readSrc } from "./helpers/kit.ts";++test("the browser suggests the docs at unsloth.ai/docs, separate from the home page", () => {+ const page = readSrc("features/browser/new-tab-page.tsx");+ assert.doesNotMatch(page, /url: "https:\/\/docs\.unsloth\.ai"/);+ assert.equal(page.match(/url: "https:\/\/unsloth\.ai\/docs"/g)?.length, 2);+ // Both live on unsloth.ai, so suggestions are keyed per site, not per host.+ assert.match(+ page,+ /if \(host === "docs\.unsloth\.ai"\) return "unsloth\.ai\/docs";/,+ );+ assert.doesNotMatch(page, /hosts\.has\(hostOf\(/);+ assert.match(page, /hideSuggestion\(siteKey\(site\.url\)\)/);+});diff --git a/studio/install_python_stack.py b/studio/install_python_stack.pyindex 8b615d0d7b7..ee6efbff094 100644--- a/studio/install_python_stack.py+++ b/studio/install_python_stack.py@@ -7012,7 +7012,7 @@ def _ensure_rocm_torch() -> "bool | None":f" family that runs on gfx906 (newer rocm wheels ship without gfx906 BLAS\n"f" kernels and fail at first use). gfx906 is a community-maintained legacy\n"f" path: 16-bit LoRA and full finetuning work; bitsandbytes 4-bit QLoRA\n"- f" requires a source build of bitsandbytes for gfx906 (see docs.unsloth.ai/amd).\n"+ f" requires a source build of bitsandbytes for gfx906 (see unsloth.ai/docs/get-started/install/amd).\n")# Either reroute must fire even when has_hip_torch is True: an existing@@ -7133,7 +7133,7 @@ def _ensure_rocm_torch() -> "bool | None":_dim(" gfx906: skipping prebuilt bitsandbytes (no gfx906 kernels). ""Build bitsandbytes from source for 4-bit QLoRA -- "- "see docs.unsloth.ai/get-started/install-and-update/amd."+ "see unsloth.ai/docs/get-started/install/amd."))# The base install resolves unsloth's unconditional bitsandbytes dep to a@@ -7193,7 +7193,7 @@ def _ensure_rocm_torch() -> "bool | None":_red(" aarch64: bitsandbytes ships no ROCm kernels on this arch; ""4-bit QLoRA needs a source build -- "- "https://docs.unsloth.ai/get-started/install-and-update/amd"+ "https://unsloth.ai/docs/get-started/install/amd"))@@ -12977,7 +12977,7 @@ def install_python_stack() -> int:_note("AMD GPU detected but ROCm PyTorch could not be auto-installed. ""Manual install may be required. See: "- "https://docs.unsloth.ai/get-started/install-and-update/amd"+ "https://unsloth.ai/docs/get-started/install/amd")# 3. Extra dependenciesdiff --git a/tests/python/test_install_python_stack.py b/tests/python/test_install_python_stack.pyindex 4c8bffeb978..fdbb7da51e7 100644--- a/tests/python/test_install_python_stack.py+++ b/tests/python/test_install_python_stack.py@@ -1237,7 +1237,7 @@ class TestProgressLineNotes:test makes it wrap: every message fits one line at COLUMNS=100."""msg = ("AMD GPU detected but ROCm PyTorch could not be auto-installed. Manual install "- "may be required. See: https://docs.unsloth.ai/get-started/install-and-update/amd"+ "may be required. See: https://unsloth.ai/docs/get-started/install/amd")out = self._render(lambda: ips._note(msg), columns = "60")lines = [ln for ln in out.split("\n") if ln.strip()]@@ -1245,7 +1245,7 @@ class TestProgressLineNotes:for line in lines:assert len(line) - len(line.lstrip()) == ips._INDENT + ips._COL, repr(line)assert " ".join(ln.strip() for ln in lines) == msg- assert any("https://docs.unsloth.ai" in ln for ln in lines), out+ assert any("https://unsloth.ai/docs" in ln for ln in lines), outdef test_note_falls_back_to_the_flat_indent_in_verbose_mode(self):"""Verbose prints no bar and no step line, so the value column would indentdiff --git a/tests/studio/install/test_rocm_support.py b/tests/studio/install/test_rocm_support.pyindex 1160e600b4d..249247a21a2 100644--- a/tests/studio/install/test_rocm_support.py+++ b/tests/studio/install/test_rocm_support.py@@ -4261,7 +4261,7 @@ class TestWindowsRocmWarning:def test_windows_amd_warning_has_docs_link(self):"""Warning should include AMD docs link."""source = _STACK_PATH.read_text(encoding = "utf-8")- assert "docs.unsloth.ai/get-started/install-and-update/amd" in source+ assert "unsloth.ai/docs/get-started/install/amd" in sourceclass TestIsRdnaExpansion: