JupyterLab and marimo are both free Python notebooks that run on your own PC, and both are good places to load a model onto your graphics card and experiment with it. They work in very different ways, though. JupyterLab runs whatever cell you tell it to, in whatever order, and saves notebooks as .ipynb files with their outputs. marimo is reactive: it tracks how cells depend on each other, keeps results consistent and saves notebooks as plain Python. This comparison looks at what that means for local AI work.
At a glance
| JupyterLab | marimo |
|---|
Execution model | You run cells manually, in any order | Reactive: dependent cells re-run or are marked stale |
File format | .ipynb (JSON, stores outputs) | .py (pure Python, outputs not stored by default) |
Install | pip install jupyterlab
| pip install marimo
|
Multiple Python environments | One install, a kernel per environment (ipykernel) | Run from each project, or per-notebook sandboxes |
Expensive GPU cells | Only run when you run them | Turn autorun off, or gate with mo.stop() |
Run as a script or app | Needs conversion | python notebook.py, marimo run notebook.py
|
Desktop app | JupyterLab Desktop | No; runs in the browser or editor extensions |
VS Code | Jupyter extension | marimo extension |
Convert between them | marimo convert imports .ipynb
| marimo export ipynb exports back
|
Execution model: freedom vs consistency
This is the big difference. marimo's documentation describes a Jupyter notebook as a REPL: you execute blocks of code one at a time, and Jupyter has no understanding of how they relate. That's flexible, but it's easy to run cells out of order or change a variable without re-running the cells that used it, leaving results on screen that no longer match the code. The marimo team goes as far as citing research that over a third of Jupyter notebooks on GitHub fail to reproduce.
marimo instead models a notebook as a graph of cells, linked by the variables they define and use. Run a cell and the cells that depend on it run automatically; delete a cell and its variables are removed from memory. For AI experiments, that means the output under a prompt really is from the current settings.
The price is a few rules. The same variable can't be defined in more than one cell, so code that keeps reassigning df or model across cells needs restructuring, and marimo suggests wrapping code in functions or using underscore-prefixed names for temporary variables.
Expensive GPU cells
Local AI notebooks often include a cell that takes a long time and a lot of VRAM, such as loading a model or generating a batch of images. In JupyterLab that's straightforward: nothing runs unless you run it.
In marimo, automatically re-running a model-loading cell because you changed something upstream would be painful, and the documentation addresses it directly. You can configure the runtime not to autorun on startup or on cell execution; marimo still tracks dependencies and marks affected cells as stale, with a button to run them all. You can also use mo.stop() with mo.ui.run_button() so a cell only runs when you press a button. It's workable, but it's something to set up, whereas JupyterLab's manual model needs nothing.
Either way, the loaded model lives in VRAM until you free it or restart. Our JupyterLab GPU guide covers torch.cuda.empty_cache() and kernel restarts.
JupyterLab saves .ipynb files: JSON that includes cell outputs such as images and printed text. That's convenient for showing results, and .ipynb is the standard format you'll be handed by tutorials and example repos, but the JSON produces noisy diffs in git. Jupytext can pair notebooks with plain .py or .md files if that bothers you.
marimo stores notebooks as pure Python. They diff cleanly in git, run as scripts with python notebook.py, and can be served as an interactive web app with marimo run. The flip side is that outputs such as plots aren't stored in the file; marimo can periodically snapshot a notebook as HTML or ipynb into a __marimo__ folder if you turn that setting on, or you can export with marimo export.
Python environments and PyTorch builds
Both play well with separate environments, which matters when one project needs a CUDA build of PyTorch and another needs something else. JupyterLab's usual approach is one Jupyter install with a registered kernel per environment, using python -m ipykernel install --user --name .... The uv documentation also covers launching JupyterLab inside a uv project with uv run --with jupyter jupyter lab.
marimo is installed alongside your notebook's packages, and with uv or Pixi you launch it from your project with uv run or pixi run. It can also store a notebook's package requirements inside the file and install them into an isolated sandbox, for example with uvx marimo edit --sandbox notebook.py. That's neat for small, self-contained experiments. For a GPU build of PyTorch, you'll still want to set up the project environment yourself; our uv guide for local AI shows how with --torch-backend.
AI features and editors
marimo has built-in AI features: an assistant that generates code with context about the variables in memory, the option to bring your own API keys or use local models, GitHub Copilot support, and a marimo pair mode for working with coding agents. The extras that enable AI completion come with the optional marimo[recommended] install. If you run a local model server, our best GPU for local AI coding guide covers the hardware side.
For JupyterLab, the official installation page covers the core app; AI features come from separate extensions, which we haven't assessed here. On the editor side, both work in VS Code: Jupyter notebooks through the Jupyter extension, and marimo through its own VS Code extension, which marimo says also works in Cursor and other VS Code forks. JupyterLab also has an official desktop app, JupyterLab Desktop, which marimo doesn't.
Which should you use?
Choose JupyterLab if you mostly run notebooks from tutorials and model repos, want outputs saved inside the notebook, like running cells freely in any order, or want a double-click desktop app. It's also the one to learn first, because .ipynb is the format everything else converts to and from.
Choose marimo if your notebooks grow into tools you rerun and share, you keep them in git, or you've been caught out by stale results in Jupyter. Turn autorun off before you load big models.
You don't have to pick only one: marimo convert your_notebook.ipynb -o your_notebook.py brings a Jupyter notebook into marimo, and marimo export ipynb goes the other way. For more options, see our best Python notebook apps for local AI.