Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By EnzymeADv1.0.0MITIn 1 marketplace
Trains Lux models in Julia through Reactant and XLA from a short experiment struct with a few hooks. Fields marked Device can change without recompiling, and trained models can be exported for serving.
Trending plugins
7-day copy clicks
Claude loads one when your task matches it, or you run it by name.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Reactant-first training for Lux models: declare the experiment, compile once, train without boilerplate.
ReactantNitro is a training framework for Julia, built on Reactant.jl
and Lux.jl. The model is an ordinary Lux model, every compiled
program is Reactant, and XLA runs it. You write the experiment as a struct plus a handful of hooks;
the framework supplies the compiled programs, the device transfers, the optimizer, the schedules,
checkpointing, and the run's lifecycle. Training and serving both stay in Julia, from the first
train! to the exported bundle.
The design follows PyTorch Lightning, adapted to Reactant. Beyond a training loop, a Reactant-first stack needs control over when XLA compiles and what the tracer walks, device memory freed after each batch instead of when the host GC runs, and binding by name between loaders, hooks, schedules and optimizer rules. On top of those it supplies what Lightning does: gradient accumulation, phases, schedules, checkpoint and resume, logging, and export, plus sharpness-aware minimization (SAM).
A Reactant-first stack has pitfalls that are easy to hit and hard to diagnose: a compile that takes far longer than it should, an edit that reuses a stale program, a run that runs out of device memory hours in. None of them raises an error on its own; the framework guards against each one.
Every field on an experiment carries one of three markers. The marker decides what the compiled program sees and whether changing the value recompiles:
| Marker | Reaches traced code as | In the compile key? | Changing the value |
|---|---|---|---|
GraphConst{T} | a baked literal | yes | recompiles, correctly: a different value is a different program |
Device{T} | a device-resident traced input | no, by construction | never recompiles: sweep it, schedule it, rewrite it live |
unmarked, i.e. Host{T} | not at all | no | never recompiles: driver-only, invisible to the tracer |
Unmarked means Host because most fields are.
@experiment struct MyExp
"Structural: changes the emitted graph, so it bakes and is part of the compile key."
width::GraphConst{Int} = 128
"A traced input: sweep it or schedule it without recompiling."
smoothing::Device{Float32} = 0.05f0
"Unmarked, therefore Host: driver-only and invisible to the tracer."
max_epochs::Int = 20
end
Programs are keyed and stored once per process, not once per Nitro.
Recompilation explains when a program is reused and what the compile key cannot see.
using Pkg
Pkg.add("ReactantNitro")
Four hooks are required. Everything else has a default: the optimizer (RAdam at 1e-3), one
parameter group, no decay, no schedule, prefetching, validation, checkpointing, and a JSON Lines
logger that writes the loss, metrics and schedule values to metrics.jsonl in the run directory.
using ReactantNitro, Lux, Random
using MLDatasets: MNIST
using MLUtils: DataLoader
# Explicit CPU, so the quick start runs anywhere. It must come before the first `Nitro`, where the
# XLA client initializes; the backend is fixed for the process from then on.
setup_devices!(backend = "cpu")
@experiment struct MnistMLP
width::GraphConst{Int} = 128
smoothing::Device{Float32} = 0.05f0
max_epochs::Int = 5
end
ReactantNitro.build_model(e::MnistMLP, rng) = begin
model = Chain(Dense(784 => e.width, relu), Dense(e.width => 10))
(model, Lux.setup(rng, model)...)
end
7-day copy clicks
npx claudepluginhub enzymead/reactantnitro.jl --plugin reactantnitro-jlBuilt from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Plugins from other owners that cover similar ground