Skip to main content

notebook_llm

One interactive CLI to run LLMs on a Kaggle/Colab GPU with Ollama: detect GPUs, check whether a model fits, estimate tokens/sec, search the Ollama library, pull, load, benchmark, and open a public tunnel link.

Install (Kaggle notebook: Internet ON, Accelerator = GPU)

!pip install -q notebook-llm-cli

From a local folder (copy it to a writable place first, /kaggle/input is read-only):

!pip install -q ./notebook_llm     # or: pip install notebook-llm-cli
import notebook_llm
notebook_llm.run()                 # opens the interactive menu (input boxes appear in the cell)

In a real terminal just run notebook-llm. Note: !notebook-llm cannot take keyboard input in Kaggle, so use notebook_llm.run() there.

Menu

  1. Quick start - installs everything, picks the best model that fits, loads it, opens the tunnel
  2. Search Ollama library - live search of ollama.com/search (paged with m, filters like /tools /vision /thinking /embedding /newest, or paste model:tag / a library URL). Cloud-only models are hidden because they don't run on your GPU (/cloud shows them). Pick a model to see FIT verdict and ~tok/s for every size, then pull/load
  3. Recommended models for my GPU
  4. Quant picker - compare every quantization (q2 / q4_K_M / q5 / q8 / fp16 ...) of one model size: exact size, fit, ~tok/s, quality, and a suggested pick. Also reachable from any list by typing q3 (= quants of row 3)
  5. Installed models - load / unload / benchmark (real tok/s) / delete
  6. Connect your tools - ready-to-paste settings for Continue, Cline, Aider, Open WebUI, Claude Code, Cursor, Antigravity IDE and Python/curl, filled in with your tunnel link, model and context length. Save them all to a file with s
  7. Tunnel - open, show link, close, new link
  8. Server - start / stop / restart / logs / GPU report
  9. Settings - context length, KV cache type, flash attention, keep-alive, models folder (saved)
  10. Benchmark the active model

Disk-space check

Before every download the tool compares the model size (+5% +1 GB) with free space in the models folder. If it won't fit you can delete models on the spot, pick a smaller quant, or continue anyway. The models folder is chosen automatically (the disk with the most free space, e.g. /kaggle/temp) and shown in the header; change it in Settings.

Tool notes

  • Cursor sends requests from its own servers, so it needs the public tunnel link (that's what this tool gives you).
  • Claude Code uses Ollama's Anthropic-compatible API (ANTHROPIC_BASE_URL); it needs a tool-capable model and a large context.
  • Antigravity IDE has no custom-model setting, so use the Continue/Cline extension inside it.

Non-interactive

notebook-llm gpus                    # hardware + recommended table
notebook-llm search coder
notebook-llm check llama3.1:70b --ctx 8192
notebook-llm quants qwen2.5-coder:7b # compare quantizations
notebook-llm connect cursor          # or: continue cline aider openwebui claude-code antigravity python (none = all)
notebook-llm quickstart --model auto
notebook-llm status | stop

Python API

from notebook_llm import NotebookLLM
llm = NotebookLLM()
url = llm.quickstart()               # install -> serve -> pull -> load -> tunnel
llm.chat("hello"); llm.benchmark(); llm.close_tunnel(); llm.stop_server()
print(llm.connect("cursor"))        # settings text for a tool; llm.connect() = all tools

How the estimates work

  • Needs = weights (exact size from registry.ollama.ai, else params x bytes/param) + KV cache (scales with context and KV type) + ~0.7 GB per GPU.
  • FIT: FITS (<=92% of total VRAM), TIGHT (<=100%), SLOW (spills to RAM), TOO BIG.
  • tok/s = memory bandwidth / bytes read per token, using a built-in GPU bandwidth table (T4, P100, V100, A100, L4, RTX...). MoE models only read their active experts (e.g. qwen3-coder:30b ~3.3B active) so they are much faster than dense models of the same size. Multi-GPU is layer-split, so it adds capacity, not speed.
  • Estimates are +-30%. Use Benchmark for the real number.

Notes

  • The tunnel link has no authentication; anyone with it can use your GPU.
  • NVIDIA GPUs only. Library search scrapes ollama.com; if it is unreachable a built-in list is used.

Metadata

Release files for notebook-llm-cli 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for notebook-llm-cli 0.6.0
File Size Uploaded Provenance Actions
notebook_llm_cli-0.6.0.tar.gz 35.0 kB Without provenance Details for notebook_llm_cli-0.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for notebook-llm-cli 0.6.0
File Interpreter ABI Platform Actions
notebook_llm_cli-0.6.0-py3-none-any.whl Python 3 none any Details for notebook_llm_cli-0.6.0-py3-none-any.whl

Total release size: 70.7 kB

Release files / notebook_llm_cli-0.6.0.tar.gz

Download URL notebook_llm_cli-0.6.0.tar.gz
Size 35.0 kB
Tags Source
SHA-256 checksum
How to use checksums
99d402d73b7d2e5bc720f13bedaf885d6af6182c5e27c4216ef748f5b723e00e
BLAKE2b-256 checksum
How to use checksums
85528aaabee72ba99005ab4191486d3e013c5dfaa2d697e6c14db4a87d314676
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / notebook_llm_cli-0.6.0-py3-none-any.whl

Download URL notebook_llm_cli-0.6.0-py3-none-any.whl
Size 35.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
61be175adc8bcad55d82de2136e5802e20b0628ce315d2446af20eca580b35b2
BLAKE2b-256 checksum
How to use checksums
43cafddcfa1e4e6cecae8d4ce087f1618659afbe6b9fb3179d81849c7868511a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Security for notebook-llm-cli 0.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page