arXiv:2610.33275cs.DCOct 2026

Manuscript Offprint

arXiv:2610.33275

LooseLeaf: Enabling Serverless GPUs for Computational Notebooks

Yusen Wu, Tingfeng Lan, Benjamin Carver, Haoliang Wang, Geoffrey Fox, Yue Cheng

Yusen Wu

University of Virginia

Charlottesville, VA, USA

xrn4ub@virginia.edu

Haoliang Wang

Adobe Research

San Jose, CA, USA

hawang@adobe.com

Tingfeng Lan

University of Virginia

Charlottesville, VA, USA

erc8gx@virginia.edu

Geoffrey Fox

University of Virginia

Charlottesville, VA, USA

vxj6mb@virginia.edu

Benjamin Carver

George Mason University

Fairfax, VA, USA

benrcarver@gmail.com

Yue Cheng

University of Virginia

Charlottesville, VA, USA

mrz7dp@virginia.edu

ABSTRACT

Computational notebooks reserve a GPU for the whole session, yet the GPU computes only while a cell executes and sits idle otherwise. Serverless execution would release the GPU between cells, but reconstructing the accumulated notebook state on a fresh worker imposes substantial cost on every GPU cell. This paper presents LooseLeaf, a serverless GPU platform for interactive notebooks. LooseLeaf derives the state and import closures of each cell, the minimal variables and packages that the cell needs. Our analysis on 5,000 real-world notebooks shows that these closures are small, and user-cell editing leaves seconds to prepare them. LooseLeaf prepares a GPU worker with these closures while the user edits the cell. After execution, the worker saves the updated state within seconds, so the GPU is reclaimable after every cell. LooseLeaf starts 95–98% of GPU cells with no visible delay, matches the interactivity of a pinned session, and provisions 32–55% fewer GPU-hours than state-of-the-art notebook platforms.

1 INTRODUCTION

Computational notebooks are the de facto interface for data-driven programming. A notebook organizes a program into a sequence of cells. The user runs one cell at a time, and the output appears as soon as execution finishes. This immediate feedback suits the exploratory nature of data analysis and machine learning. Software such as Jupyter [41] brings this interface to millions of users across education, research, and industry [56, 58]. Every major cloud provider now offers a commercial notebook platform [2, 7, 10, 17].

Nowadays, AI/ML makes up a growing share of notebook workloads. A production study reports that interactive deep learning training has emerged as a dominant notebook use case [28]. The rapid progress of large language models (LLMs) pushes this trend further. Open-weight releases put billion-parameter pretrained models in the hands of individual users [37, 54, 66]. Fine-tuning or validating such a model for a task takes repeated trials [26, 33, 49], and notebooks fit this style of work. Every one of these steps executes on a GPU. GPU-backed notebooks are now a standard offering of these platforms [5, 7, 10, 13].

Platforms such as Colab [7] and Kaggle [10] bind a GPU to a notebook session for its entire lifetime. The session acquires the GPU when it starts and holds the GPU until it ends. A session, however, needs the GPU for only a small fraction of its lifetime. First, a notebook mixes GPU cells for training and inference with

Figure

Figure 1: Provisioned GPU-hours against interactivity for LooseLeaf and four baseline approaches on real Kaggle notebooks at 72 concurrent sessions ( §4§4). The horizontal axis gives the fraction of GPU-cell runs that miss the one-second interactive-start threshold. The vertical axis gives GPU-hours normalized to session-pinned reservation (e.g., Colab [7], Kaggle Notebooks [10]). The baselines trace a cost-interactivity frontier; LooseLeaf shifts this frontier toward the lower left, approaching the interactivity of session-pinned execution while using fewer GPU-hours than all serverless baselines.

CPU-only cells for data preparation and plotting. The GPU does no work while a CPU-only cell runs. Second, the user pauses between executions to examine the output, reason about the result, and edit the next cell. This development time far exceeds the execution time [28]. The reserved GPU thus computes only while a GPU cell executes and sits idle for the rest of the session. A production study reports that reserved GPUs are idle over 81% of the time [28]. Session-pinned reservation is therefore wasteful and prohibitively expensive at fleet scale.

A natural remedy is to acquire a GPU only while a GPU cell executes. Serverless GPUs have recently emerged as a new type of cloud service and offer exactly this model [12, 18, 35]. In this model, code runs as self-contained functions. Each function invocation is served by a worker process that is created on demand on a GPU machine and reclaimed once the invocation finishes. A notebook could thus run each GPU cell as one invocation. The GPU would be released during the CPU-only cells and the pauses in between, and provisioning would follow actual demand.

A notebook cell, however, is not a self-contained function. Cells run in a long-lived kernel process and build on the variables and packages that earlier cells leave behind. A fresh worker holds none of this state and needs seconds to minutes per run to re-compute the whole of it, whether by re-running the earlier cells or by loading all previous variables. Such a start is far from interactive. Prior response-time studies suggest that responses should arrive within about one second for users to maintain cognitive flow [47, 51, 52]. We therefore use one second as the interactive-start threshold: a GPU-cell run misses this threshold if the cell begins executing more than one second after the user presses Run. Serverless GPUs for notebooks thus come down to a question of session state. A cell must receive the state it needs before it can run, and the time to provide that state decides whether the cell starts interactively.

A cell does not need the whole state. A cell that runs inference, for example, reads the model, the tokenizer, and the inputs it evaluates. The dataframes and plots that earlier exploration left behind are irrelevant to it. What a cell needs is also knowable. Notebook code is organized in cells, so the variables and packages that a cell references can be read from its code while the user is still writing it. To verify these properties at scale, we characterized roughly 5,000 real AI/ML notebooks (§2.4). The characterization confirms that a GPU cell typically reads a small fraction of the session state, and that the packages it imports concentrate in a small common set that can be loaded once and shared. Notebooks also offer a unique window to exploit these properties. A user edits a cell for seconds to minutes before running it. What a GPU cell needs can thus be prepared during this window, before the user presses Run.

This paper presents LooseLeaf, a serverless GPU platform built on these observations. While the user edits a cell, LooseLeaf derives from the code the variables and packages that the cell needs. We call these two sets the state closure and the import closure of the cell. LooseLeaf then prepares a serverless GPU worker with these closures ahead of the run. By the time the user presses Run, the worker already holds what the cell needs, and the cell starts at once. After the cell executes, the worker saves the state updates (incrementally) to a shared store within seconds, so the GPU is reclaimable right after every cell. LooseLeaf therefore provisions GPUs by actual demand. Figure 1 summarizes the key results on real Kaggle notebooks. Across all notebook solutions, LooseLeaf keeps user-visible start latency below one second at p95: with 72 sessions, more than 95% of GPU cells begin execution within one second after the user presses Run.

In summary, this paper makes the following contributions:

• We characterize roughly 5,000 real-world AI/ML notebooks and make three observations that motivate LooseLeaf.

  • We introduce per-cell state and import closures, two abstractions that reduce the preparation of a GPU cell from the whole session to what the cell needs.

  • We design a fast checkpoint store for the session state of GPU notebooks. On top of it, we build LooseLeaf, a serverless GPU platform that prepares a GPU worker for each GPU cell during editing.

  • We evaluate LooseLeaf on real Kaggle notebooks. Across loads, LooseLeaf provisions 43–70% fewer GPU-hours than session-pinned reservation and 32–55% fewer than the state-of-the-art NotebookOS.

References (21)