Skip to content

TinyLM Swarm Lab

TinyLM Swarm Lab is a local mission-control app for running tiny language-model research experiments.

Core trick

A Gemini orchestrator proposes tiny-LM experiments, and workers run real training code, writing config, metrics and checkpoints as artifacts.

Tags

Description

TinyLM Swarm Lab is a local mission-control app for running tiny language-model research experiments. The local orchestrator uses Gemini 3.5 Flash to generate experiment hypotheses, then assigns independent workers to test different tiny-LM configurations. Each worker runs real training code, produces artifacts like config.json, metrics.json, notes.md, train.log, and checkpoint.json, and reports results back to the dashboard. The project solves the manual loop of small-model experimentation: choosing hypotheses, launching runs, reading logs, comparing metrics, and deciding what to try next. TinyLM Swarm Lab makes that process visible and repeatable by showing the active worker fleet, current best model, efficiency trade-offs, artifact outputs, and checkpoint-based sampling in one UI.
Zemelware/TinyLM-Swarm-Lab★ 00 forksTypeScriptCreated May 23, 2026 · last push May 23, 2026

README excerpt

# TinyLM Swarm Lab

TinyLM Swarm Lab is a local research orchestrator for tiny language-model experiments. The local server owns run state, asks Gemini 3.5 Flash for experiment hypotheses, provisions workers, collects artifacts, compares results, and renders a mission-control dashboard.

The app defaults to **Managed Agent if available**. When Gemini Managed Agent execution succeeds, each worker runs code in a remote Antigravity-backed sandbox and returns an artifact bundle. If that path is unavailable or drops, the worker is labeled **Local fallback** and the same experiment runs locally on this computer. The UI does not label fallback runs as Managed Agents.

Artifacts are written under:

```text
runs/<runId>/<experimentId>/
```

## Current Model

The current training runner is a tiny character-level bigram language model:

- It learns next-character probabilities from a small corpus.
- It trains with real SGD and cross-entropy loss.
- It writes metrics, logs, notes, and a checkpoint.
- The Playbench samples text from `checkpoint.json`.

This is an MVP training target, not a nanoGPT-style transformer yet.

## Run Locally

Requirements:
- Node.js 20+
- npm

```bash
npm install
npm run dev
```

Open `http://localhost:3000`.

## Environment

Optional but recommended:

```bash
GEMINI_API_KEY=...
```

Without `GEMINI_API_KEY`, Gemini hypothesis generation uses static presets and all workers are labeled `Local fallback`.

With `GEMINI_API_KEY`, the app can request:
- Gemini 3.5 F

Team