bolt Colab Script Generator

Run Any AI Model on Google Colab

Configure your model, generate a ready-to-run Python script, paste it into Colab, and get a public chat URL in minutes.

tune Model Configuration
The exact Ollama model identifier. Find models at ollama.com/library
A friendly name shown in the chat UI header and banner
psychology Thinking Model
Enable if the model uses <think> tags for chain-of-thought reasoning (e.g. DeepSeek-R1, QwQ)
An optional system prompt prepended to every conversation
Shown as "Made by ___" in the CLI banner and web UI
description your_model_colab.py

            
warning Do NOT Paste Into a Cell

Running the script with !python3 file.py or pasting directly into a Colab cell will NOT work properly โ€” Cloudflare URLs, rich progress bars, and interactive CLI chat require a real terminal, not a notebook cell.

Instead, upload the file and run it from the Colab terminal as described below. ๐Ÿ‘‡

menu_book What To Do Next
1

Save the Script

Click the ๐Ÿ’พ Save as .py button above to download the generated script as a .py file to your computer. Or use ๐Ÿ“‹ Copy Code and save it manually.

2

Open Google Colab

Go to colab.research.google.com and create a new notebook.

3

Select GPU Runtime

Click Runtime โ†’ Change runtime type and select T4 GPU (free tier) or A100 (Colab Pro). Larger models need more VRAM.

4

Upload the Script File

In the left sidebar, click the ๐Ÿ“ Files tab, then click the โฌ† Upload button. Upload the .py file you saved in Step 1. It will appear in /content/.

5

Open a Terminal

Click Runtime โ†’ Run in Terminal, or use the keyboard shortcut. You can also type !bash in a cell and press Enter to open a shell. This gives you a real terminal that shows all output correctly.

6

Run the Script

In the terminal, run:
python3 /content/your_model_colab.py
Replace the filename with whatever you saved it as. The script will install everything, download the model, and show progress bars.

7

Get Your Public URL

A Cloudflare tunnel will create a public URL like https://xyz.trycloudflare.com. This URL will be clearly displayed in the terminal output. Share it with anyone!

8

Start Chatting!

Use the web chat UI via the public URL, or use the CLI chat directly in the terminal. Type exit to quit CLI mode.

info Important Notes

โ€ข Always use the terminal โ€” never !python3 in a cell. The ! prefix breaks rich output and Cloudflare URL detection.

โ€ข Free Colab gives you ~12.7 GB VRAM with T4. Models up to ~14B parameters (quantized) fit here.

โ€ข Session time limit: Free Colab disconnects after ~90 minutes of idle time or ~12 hours total.

โ€ข Don't close the tab while the script is running โ€” the Colab session needs to stay active.

โ€ข Cloudflare URL changes each time you restart โ€” share the new one.

โ€ข For models > 14B parameters, use Colab Pro with A100 GPU (40/80 GB VRAM).