Skip to content

Commit e3d6a22

Browse files
fix(studio/colab): polish Colab Cloudflare UX and notebook docs
- Show Cloudflare link before login credentials (matches card copy) - Skip in-cell proxy iframe when Cloudflare tunnel is ready on Colab - Warn clearly when Colab expected a tunnel but none was opened - Update Unsloth_Studio_Colab.ipynb for auto-Cloudflare start() default Co-authored-by: souravrajvidev-glitch <souravrajvidev-glitch@users.noreply.github.com>
1 parent 8ab65ea commit e3d6a22

3 files changed

Lines changed: 274 additions & 153 deletions

File tree

studio/Unsloth_Studio_Colab.ipynb

Lines changed: 142 additions & 131 deletions
Original file line numberDiff line numberDiff line change
@@ -1,134 +1,145 @@
11
{
2-
"cells": [
3-
{
4-
"cell_type": "markdown",
5-
"metadata": {
6-
"id": "view-in-github",
7-
"colab_type": "text"
8-
},
9-
"source": [
10-
"<a href=\"https://colab.research.google.com/github/unslothai/unsloth/blob/main/studio/Unsloth_Studio_Colab.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
11-
]
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {
6+
"id": "view-in-github",
7+
"colab_type": "text"
8+
},
9+
"source": [
10+
"<a href=\"https://colab.research.google.com/github/unslothai/unsloth/blob/main/studio/Unsloth_Studio_Colab.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
11+
]
12+
},
13+
{
14+
"cell_type": "markdown",
15+
"metadata": {
16+
"id": "6b87de59"
17+
},
18+
"source": [
19+
"To run this, press \"*Runtime*\" and press \"*Run all*\" on a **free** Tesla T4 Google Colab instance!\n",
20+
"<div class=\"align-center\">\n",
21+
"<a href=\"https://unsloth.ai/\"><img src=\"https://github.com/unslothai/unsloth/raw/main/images/unsloth%20new%20logo.png\" width=\"115\"></a>\n",
22+
"<a href=\"https://discord.gg/unsloth\"><img src=\"https://github.com/unslothai/unsloth/raw/main/images/Discord button.png\" width=\"145\"></a>\n",
23+
"<a href=\"https://unsloth.ai/docs/\"><img src=\"https://github.com/unslothai/unsloth/blob/main/images/documentation%20green%20button.png?raw=true\" width=\"125\"></a> Join Discord if you need help + ⭐ <i>Star us on <a href=\"https://github.com/unslothai/unsloth\">Github</a> </i> ⭐\n",
24+
"</div>\n",
25+
"\n",
26+
"To install Unsloth Studio on your local device, follow [our guide](https://unsloth.ai/docs/new/unsloth-studio/install). Unsloth Studio is licensed [AGPL-3.0](https://github.com/unslothai/unsloth/blob/main/studio/LICENSE.AGPL-3.0).\n",
27+
"\n",
28+
"### Unsloth Studio\n",
29+
"\n",
30+
"Train and run open models with [**Unsloth Studio**](https://unsloth.ai/docs/new/unsloth-studio/start). NEW! Installation should now only take 2 mins!\n",
31+
"\n",
32+
"\n",
33+
"We are actively working on making Unsloth Studio install on Colab T4 GPUs faster.\n",
34+
"\n",
35+
"[Features](https://unsloth.ai/docs/new/unsloth-studio#features) • [Quickstart](https://unsloth.ai/docs/new/unsloth-studio/start) • [Data Recipes](https://unsloth.ai/docs/new/unsloth-studio/data-recipe) • [Unsloth Chat](https://unsloth.ai/docs/new/unsloth-studio/chat) • [Export](https://unsloth.ai/docs/new/unsloth-studio/export)"
36+
],
37+
"id": "6b87de59"
38+
},
39+
{
40+
"cell_type": "markdown",
41+
"metadata": {
42+
"id": "e4206349"
43+
},
44+
"source": [
45+
"<p align=\"left\"><img src=\"https://github.com/unslothai/unsloth/raw/main/studio/frontend/public/studio%20github%20landscape%20colab%20display.png\" width=\"600\"></p>"
46+
],
47+
"id": "e4206349"
48+
},
49+
{
50+
"cell_type": "markdown",
51+
"metadata": {
52+
"id": "27da2957"
53+
},
54+
"source": [
55+
"### Setup: Clone repo and run setup"
56+
],
57+
"id": "27da2957"
58+
},
59+
{
60+
"cell_type": "code",
61+
"metadata": {
62+
"id": "27e68f91"
63+
},
64+
"source": "!git clone --depth 1 --branch main https://github.com/unslothai/unsloth.git\n%cd /content/unsloth\n!chmod +x studio/setup.sh && ./studio/setup.sh --local",
65+
"execution_count": null,
66+
"outputs": [],
67+
"id": "27e68f91"
68+
},
69+
{
70+
"cell_type": "markdown",
71+
"metadata": {
72+
"id": "3e1771a9"
73+
},
74+
"source": [
75+
"### Start Unsloth Studio"
76+
],
77+
"id": "3e1771a9"
78+
},
79+
{
80+
"cell_type": "code",
81+
"metadata": {
82+
"id": "277e431e"
83+
},
84+
"source": [
85+
"import sys\n",
86+
"sys.path.insert(0, \"/content/unsloth/studio/backend\")\n",
87+
"from colab import start\n",
88+
"\n",
89+
"# On Colab, start() auto-opens a Cloudflare link and prints admin login credentials.\n",
90+
"# Use the Cloudflare link above the ready card to open Studio (in-cell iframes often stay blank).\n",
91+
"start()\n",
92+
"\n",
93+
"# To skip the Cloudflare tunnel and try the in-notebook proxy iframe only:\n",
94+
"# start(cloudflare=False)"
95+
],
96+
"execution_count": null,
97+
"outputs": [],
98+
"id": "277e431e"
99+
},
100+
{
101+
"cell_type": "markdown",
102+
"metadata": {
103+
"id": "f2b0c6a1"
104+
},
105+
"source": [
106+
"And we're done! If you have any questions on Unsloth, we have a [Discord](https://discord.gg/unsloth) channel! If you find any bugs or want to keep updated with the latest LLM stuff, or need help, join projects etc, feel free to join our Discord!\n",
107+
"\n",
108+
"Some other resources:\n",
109+
"1. Looking to use Unsloth locally? Read our [Installation Guide](https://unsloth.ai/docs/get-started/install) for details on installing Unsloth on Windows, Docker, AMD, Intel GPUs.\n",
110+
"2. Learn how to do Reinforcement Learning with our [RL Guide and notebooks](https://unsloth.ai/docs/get-started/reinforcement-learning-rl-guide).\n",
111+
"3. Read our guides and notebooks for [Text-to-speech (TTS)](https://unsloth.ai/docs/basics/text-to-speech-tts-fine-tuning) and [vision](https://unsloth.ai/docs/basics/vision-fine-tuning) model support.\n",
112+
"4. Explore our [LLM Tutorials Directory](https://unsloth.ai/docs/models/tutorials-how-to-fine-tune-and-run-llms) to find dedicated guides for each model.\n",
113+
"5. Need help with Inference? Read our [Inference & Deployment page](https://unsloth.ai/docs/basics/inference-and-deployment) for details on using vLLM, llama.cpp, Ollama etc.\n",
114+
"\n",
115+
"<div class=\"align-center\">\n",
116+
" <a href=\"https://unsloth.ai\"><img src=\"https://github.com/unslothai/unsloth/raw/main/images/unsloth%20new%20logo.png\" width=\"115\"></a>\n",
117+
" <a href=\"https://discord.gg/unsloth\"><img src=\"https://github.com/unslothai/unsloth/raw/main/images/Discord.png\" width=\"145\"></a>\n",
118+
" <a href=\"https://unsloth.ai/docs/\"><img src=\"https://github.com/unslothai/unsloth/blob/main/images/documentation%20green%20button.png?raw=true\" width=\"125\"></a>\n",
119+
"\n",
120+
" Join Discord if you need help + ⭐️ <i>Star us on <a href=\"https://github.com/unslothai/unsloth\">Github</a> </i> ⭐️\n",
121+
"\n",
122+
" <b>This notebook is licensed <a href=\"https://github.com/unslothai/unsloth/blob/main/studio/LICENSE.AGPL-3.0\">AGPL-3.0</a></b>\n",
123+
"</div>"
124+
],
125+
"id": "f2b0c6a1"
126+
}
127+
],
128+
"metadata": {
129+
"accelerator": "GPU",
130+
"colab": {
131+
"gpuType": "T4",
132+
"provenance": [],
133+
"include_colab_link": true
134+
},
135+
"kernelspec": {
136+
"display_name": "Python 3",
137+
"name": "python3"
138+
},
139+
"language_info": {
140+
"name": "python"
141+
}
12142
},
13-
{
14-
"cell_type": "markdown",
15-
"id": "6b87de59",
16-
"metadata": {
17-
"id": "6b87de59"
18-
},
19-
"source": [
20-
"To run this, press \"*Runtime*\" and press \"*Run all*\" on a **free** Tesla T4 Google Colab instance!\n",
21-
"<div class=\"align-center\">\n",
22-
"<a href=\"https://unsloth.ai/\"><img src=\"https://github.com/unslothai/unsloth/raw/main/images/unsloth%20new%20logo.png\" width=\"115\"></a>\n",
23-
"<a href=\"https://discord.gg/unsloth\"><img src=\"https://github.com/unslothai/unsloth/raw/main/images/Discord button.png\" width=\"145\"></a>\n",
24-
"<a href=\"https://unsloth.ai/docs/\"><img src=\"https://github.com/unslothai/unsloth/blob/main/images/documentation%20green%20button.png?raw=true\" width=\"125\"></a> Join Discord if you need help + ⭐ <i>Star us on <a href=\"https://github.com/unslothai/unsloth\">Github</a> </i> ⭐\n",
25-
"</div>\n",
26-
"\n",
27-
"To install Unsloth Studio on your local device, follow [our guide](https://unsloth.ai/docs/new/unsloth-studio/install). Unsloth Studio is licensed [AGPL-3.0](https://github.com/unslothai/unsloth/blob/main/studio/LICENSE.AGPL-3.0).\n",
28-
"\n",
29-
"### Unsloth Studio\n",
30-
"\n",
31-
"Train and run open models with [**Unsloth Studio**](https://unsloth.ai/docs/new/unsloth-studio/start). NEW! Installation should now only take 2 mins!\n",
32-
"\n",
33-
"\n",
34-
"We are actively working on making Unsloth Studio install on Colab T4 GPUs faster.\n",
35-
"\n",
36-
"[Features](https://unsloth.ai/docs/new/unsloth-studio#features) • [Quickstart](https://unsloth.ai/docs/new/unsloth-studio/start) • [Data Recipes](https://unsloth.ai/docs/new/unsloth-studio/data-recipe) • [Unsloth Chat](https://unsloth.ai/docs/new/unsloth-studio/chat) • [Export](https://unsloth.ai/docs/new/unsloth-studio/export)"
37-
]
38-
},
39-
{
40-
"cell_type": "markdown",
41-
"id": "e4206349",
42-
"metadata": {
43-
"id": "e4206349"
44-
},
45-
"source": [
46-
"<p align=\"left\"><img src=\"https://github.com/unslothai/unsloth/raw/main/studio/frontend/public/studio%20github%20landscape%20colab%20display.png\" width=\"600\"></p>"
47-
]
48-
},
49-
{
50-
"cell_type": "markdown",
51-
"id": "27da2957",
52-
"metadata": {
53-
"id": "27da2957"
54-
},
55-
"source": [
56-
"### Setup: Clone repo and run setup"
57-
]
58-
},
59-
{
60-
"cell_type": "code",
61-
"execution_count": null,
62-
"id": "27e68f91",
63-
"metadata": {
64-
"id": "27e68f91"
65-
},
66-
"outputs": [],
67-
"source": "!git clone --depth 1 --branch main https://github.com/unslothai/unsloth.git\n%cd /content/unsloth\n!chmod +x studio/setup.sh && ./studio/setup.sh --local"
68-
},
69-
{
70-
"cell_type": "markdown",
71-
"id": "3e1771a9",
72-
"metadata": {
73-
"id": "3e1771a9"
74-
},
75-
"source": [
76-
"### Start Unsloth Studio"
77-
]
78-
},
79-
{
80-
"cell_type": "code",
81-
"execution_count": null,
82-
"id": "277e431e",
83-
"metadata": {
84-
"id": "277e431e"
85-
},
86-
"outputs": [],
87-
"source": "import sys\nsys.path.insert(0, \"/content/unsloth/studio/backend\")\nfrom colab import start\n\n# Default: in-tab iframe only. start() blocks to keep the kernel alive.\nstart()\n\n# For a shareable Cloudflare link, replace start() above with:\n# start(cloudflare=True)"
88-
},
89-
{
90-
"cell_type": "markdown",
91-
"id": "f2b0c6a1",
92-
"metadata": {
93-
"id": "f2b0c6a1"
94-
},
95-
"source": [
96-
"And we're done! If you have any questions on Unsloth, we have a [Discord](https://discord.gg/unsloth) channel! If you find any bugs or want to keep updated with the latest LLM stuff, or need help, join projects etc, feel free to join our Discord!\n",
97-
"\n",
98-
"Some other resources:\n",
99-
"1. Looking to use Unsloth locally? Read our [Installation Guide](https://unsloth.ai/docs/get-started/install) for details on installing Unsloth on Windows, Docker, AMD, Intel GPUs.\n",
100-
"2. Learn how to do Reinforcement Learning with our [RL Guide and notebooks](https://unsloth.ai/docs/get-started/reinforcement-learning-rl-guide).\n",
101-
"3. Read our guides and notebooks for [Text-to-speech (TTS)](https://unsloth.ai/docs/basics/text-to-speech-tts-fine-tuning) and [vision](https://unsloth.ai/docs/basics/vision-fine-tuning) model support.\n",
102-
"4. Explore our [LLM Tutorials Directory](https://unsloth.ai/docs/models/tutorials-how-to-fine-tune-and-run-llms) to find dedicated guides for each model.\n",
103-
"5. Need help with Inference? Read our [Inference & Deployment page](https://unsloth.ai/docs/basics/inference-and-deployment) for details on using vLLM, llama.cpp, Ollama etc.\n",
104-
"\n",
105-
"<div class=\"align-center\">\n",
106-
" <a href=\"https://unsloth.ai\"><img src=\"https://github.com/unslothai/unsloth/raw/main/images/unsloth%20new%20logo.png\" width=\"115\"></a>\n",
107-
" <a href=\"https://discord.gg/unsloth\"><img src=\"https://github.com/unslothai/unsloth/raw/main/images/Discord.png\" width=\"145\"></a>\n",
108-
" <a href=\"https://unsloth.ai/docs/\"><img src=\"https://github.com/unslothai/unsloth/blob/main/images/documentation%20green%20button.png?raw=true\" width=\"125\"></a>\n",
109-
"\n",
110-
" Join Discord if you need help + ⭐️ <i>Star us on <a href=\"https://github.com/unslothai/unsloth\">Github</a> </i> ⭐️\n",
111-
"\n",
112-
" <b>This notebook is licensed <a href=\"https://github.com/unslothai/unsloth/blob/main/studio/LICENSE.AGPL-3.0\">AGPL-3.0</a></b>\n",
113-
"</div>"
114-
]
115-
}
116-
],
117-
"metadata": {
118-
"accelerator": "GPU",
119-
"colab": {
120-
"gpuType": "T4",
121-
"provenance": [],
122-
"include_colab_link": true
123-
},
124-
"kernelspec": {
125-
"display_name": "Python 3",
126-
"name": "python3"
127-
},
128-
"language_info": {
129-
"name": "python"
130-
}
131-
},
132-
"nbformat": 4,
133-
"nbformat_minor": 5
143+
"nbformat": 4,
144+
"nbformat_minor": 5
134145
}

0 commit comments

Comments
 (0)