Baton

Idle GPUs go to the next student, and nobody loses

Syntax Error 2026Shipped October 25, 2026#general#identity
Repo
Baton banner

About

## The problem it solves

## The problem

University labs share a few GPU machines between dozens of students. A student loads a model in a Jupyter notebook, goes to lunch or a lecture, and the GPU memory stays reserved. Nobody else can use it, even though nothing is running.

  • In a three-month trace of real research notebooks, reserved GPUs sat **idle over 81% of the time**, and **nearly 70% were never used at all** (NotebookOS, ASPLOS 2026).
  • Big universities fight this with automatic cullers. Princeton estimates **6% of its GPU-hours** would otherwise be wasted (Halverson et al., PEARC 2026).
  • Small labs have no such tools. They share by etiquette: checking `nvidia-smi`, booking calendars and emailing "whose process is this?"
  • The tools that do free GPUs **kill the session**. Loaded models, optimizer state and hours of work are gone, so students learn to hoard GPUs instead.

## What Baton does

Baton frees idle GPUs **without killing anyone's work** and: 1. **Watches** each session's real GPU compute every se 2. **Warns** the owner when a session holds memory but does no work. The warning appears on the dashboard, in the notebook or as a phone notification, and the owner can **snooze** it. 3. **Parks** the session if nobody responds: its tensors move to host RAM in about 0.3 s, the process keeps running, and the GPU memory isfreed. 4. **Hands over** the free slot to the next student in a **fair queue**, which shows everyone an ETA. 5. **Restores** the session as soon as its owner runs ah **every tensor identical**. Returning owners jump thequeue. ## What people can use it for - **Students** get a GPU sooner instead of waiting hours, and can step away without losing their session. They can say "back at 3 pm" and Baton restores the session just before they return. - **Lab admins** stop policing GPUs by hand. **Deadline mode** tightens the rules for exam week, and a **dry-run report** shows what parking would reclaim before anyone is parked. - **Everyone** can see what happened and why. Each decision is explained in plain English ("Why was I parked?"), every handover leaves a **receipt** showing whose wait it saved, and a **leaderwho give GPU time back.

Students change almost nothing: one line in Jupyter (`%Baton tracks their models by itself.

## The result

In a simulated week with 40 students on 8 GPUs:

  • idle GPU-hours fall from **385 to 69**;
  • the 95th-percentile wait for a GPU drops from **over 4 hours to zero**;
  • **no sessions are lost**, whereas an activity culler but kills **70 of 84** sessions.

## Challenges we ran into

### 1. Moving a live session's memory without breaking it We first tried to grab GPU memory from outside the process, but you can't safely move tensors while a training step is using them. Our fix was **cooperative parking**: a small client inside the notebook (`TensorParker`) tracks the session's models and tensors. When the daemon asks, the client parks them **between steps**, copying every tensor to host RAM, freeing the GPU memory and keeping the Python objects alive. On restore, every tensor goes back to the GPU, and we compare checksums before and after to prove nothing changed.

### 2. Sessions that hung forever when a restore failed In testing, if a restore failed (for example, another session had taken the memory), the notebook waited for a "resumed" message that never came. The daemon also kept the slot marked as taken. We added explicit failure paths on both sides: - the daemon releases the slot, puts the session back in the *parked* state and hands the slot to the next student in the queue; - the client raises a clear error instead of waiting.

We did the same for **park timeouts**, and we handle a "parked" reply that arrives after the daemon has given up.

### 3. One bad tick stopped the whole daemon The daemon checks every session once a second. A single unexpected error in that loop (a process exiting mid-check, for example) ended the loop and silently stopped all parking. We wrapped each tick so that an error is logged with its full traceback and the next tick still runs. This made the system much more robust during long demos.

### 4. Windows refused to reset the database while the dashboard was open Our demo script deleted the SQLite state file for a clean run. On Windows this crashed with `PermissionError: [WinError 32]`, because the dashboard's live status stream had the file open. Linux allows deleting an open file, so it only showed up on Windows. We now **empty the tables in place** instead of deleting the file. This works with readers attached, and we added a test that holds a connection open while clearing.

### 5. Telling "idle" apart from "thinking" Memory alone can't tell you whether a session is idle, because every session holds memory. We measure each process's real **GPU compute** over a time window. Baton never parks straight away: itce period and lets students **snooze**. That way astudent who is reading output or thinking about the next cell isn't punished.

### 6. Session ids that repeated across daemon restarts Session ids restart at `s1` every time the daemon startsessions from different runs. We changed the database togive each session its own row id. Existing data is migrated automatically. The "Why was I parked?" timeline now starts from that session's most recent registration.

### 7. A live dashboard that didn't hammer the database The dashboard streams status every second, and re-reading the full snapshot for every open tab was wasteful. Each stream now checks only the snapshot's **timestamp**. It sends a new snapshot when d, and fetches only the events it hasn't seen yet.

Screenshots

Baton screenshot 1Baton screenshot 2Baton screenshot 3Baton screenshot 4

Team

From the public Devfolio project page. Votes, swipes and the judge score are hackfeed's own.

AI judge

Not judged yet. A free model reads this page, compares it with similar projects and this event's winners, then scores it and says what would make it win.

Still being built?

Not checked yet.

Swipe stats

0upvotes
0skips
0saves

Discussion 0

No comments yet. Ask the team something, or say what you'd use it for.

Posting as a guest. Plain text, 1,000 characters max.

Already built nearby

Closest projects by meaning and shared words. Similar isn't the same as copied: read them.