The config
One file per run.
The model, the LoRA settings, the data and the batch size. The trainer reads the file and starts.

Lumbridge Compute
OpenLumbridge RL is the trainer under Train. It trains open-weight models on hardware you own: supervised fine-tuning on one GPU, and a reinforcement-learning loop on two.
Tour

The config
The model, the LoRA settings, the data and the batch size. The trainer reads the file and starts.

What it does
uv run sft takes a TOML config and trains on one GPU: full weights or LoRA, with activation checkpointing and a chunked output head. Checkpoints land under the run’s output folder.
uv run rl starts an inference server, an orchestrator and a trainer. The orchestrator samples answers from environments, scores them and sends batches to the trainer, which pushes new weights back.
scripts/lumbridge/spark-setup.sh installs on an arm64 GPU machine with unified memory. It caps compile jobs, runs at idle priority and ends with a five-step smoke test.
A thin adapter over the reference Gemma 4 modules, with explicit block-causal and sliding-window masks for packed rows. Weights load with no conversion, and a check script compares it with the reference on real weights.
On unified memory the trainer’s peak-memory figure counts every process on the machine. scripts/lumbridge/measure-mem.sh samples the memory the system has left, so you see what the run itself took.
The changes are small and kept in files named for Lumbridge. The package keeps its upstream name, and every upstream file touched is listed in LUMBRIDGE.md.
How it works
Every entry point reads the same kind of TOML file. Settings compose from files, then the command line, and --dry-run writes the resolved configs without starting anything.
Trains with sharded data parallel, and flash attention where the model allows it. It trains the layouts it has model code for, including Llama, Qwen and Gemma 4, and stops at setup for anything else.
vLLM with routes added for loading new weights and LoRA adapters during a run. uv run inference starts it on its own.
Runs environments, samples groups of answers, scores them, computes advantages and hands batches to the trainer. It also runs evals at a set interval.
The install script, the smoke configs in configs/lumbridge, the Gemma 4 adapter and the memory script. Lumbridge Train writes an SFT config per run and calls uv run sft here.
Use it
Everything runs through uv from a clone of the repository. The smoke configs train for five steps on generated data: they check the setup, not a model.
# install on a unified-memory GPU machine, then a 5-step SFT smoke test
scripts/lumbridge/spark-setup.sh
# supervised fine-tuning from a TOML config
uv run sft @ configs/lumbridge/spark-smoke.toml
# LoRA SFT through the Gemma 4 adapter, and the memory it took
scripts/lumbridge/measure-mem.sh configs/lumbridge/bolt-e4b-smoke.toml
# the RL loop: resolve the configs without starting it
uv run rl @ examples/basic/reverse-text/rl.toml \
--dry-run --output-dir out --run.name check
Docs
In the repository.
Works with
uv run sft here and exports the last checkpoint.Not yet
Questions
It adds an install profile for a shared unified-memory machine, a Gemma 4 adapter, smoke configs and a memory script. Everything else is upstream code, merged in regularly.
Training runs where you start it. Model weights download from wherever your config points, and outside logging is optional.