Repository navigation
Releases
GPUlayer 0.11.2
Tested on NVIDIA L4 and H200 GPUs and against a real object store. That found one bug, fixed here. Results: benchmarks/results/2026-11-09-hf-strategies-speed/.
Fix
- TensorFlow and ONNX Runtime jobs ran on the CPU. Both install CUDA libraries with pip but do not find them, even in a plain virtualenv (TensorFlow 2.21, ONNX Runtime 1.31). On Linux a job's
LD_LIBRARY_PATHnow starts with thenvidia/*/libfolders of its own packages, then the worker's (ADR-0022). Ask fortensorflow[and-cuda]andonnxruntime-gpu[cuda,cudnn]. JAX, CuPy, TensorFlow, ONNX Runtime and Transformers all ran as jobs on an L4, and PyTorch still worked next to TensorFlow in the same process. Upgrade workers to get this fix.
Validated
- On the 4 GPUs of one machine (4× L4): FSDP (sharding strategies, activation checkpointing, CPU offload, sharded checkpoints with resume), DeepSpeed ZeRO 1 to 3 with offload, tensor parallelism, DDP communication hooks,
sync_batchnorm, manual optimization, bitsandbytes and TensorRT. Until now these ran only across machines with one T4 each. - 2× H200 with NVLink: topology (
NV18), GPU choice, NCCL, FSDP, tensor parallelism and DDP. - Notebook forks on 4 L4s: one process per GPU, the trained weights come back.
- A private Hugging Face bucket (
hf://) as the object store: checkpoints, CSV logs, resume,load_from_checkpointand two DDP processes. Not yet S3, GCS or Azure. Saving waits for the upload.
Measured against PyTorch Lightning
The GPUlayer Trainer was faster in all 14 cases: 1.04 to 1.68x on 1 to 4 L4s, and 1.10 to 2.50x on 1 and 2 H200s. Small models take a few milliseconds per step on an H200, so CPU work per step decides the result, and it varies by host: the same case gave 2.50x on one host and 1.47x on another. The overall count is now 27 of 31 GPU cases.
New
scripts/validate_object_store.py <url>.--devices Nforvalidate_parallel.py,validate_deepspeed.pyandvalidate_nccl.py.
Not covered
AMD ROCm and Ryzen AI NPUs, TPUs, and NCCL between multi-GPU machines.
GPUlayer 0.11.1
Validated on NVIDIA L4 (4 GPUs), H200 and RTX PRO 6000 Blackwell on Hugging Face Jobs. That found two bugs, both fixed here. Results: benchmarks/results/2026-11-09-hf-gpus/.
Fixes
- Notebooks on CUDA:
Trainer(devices=N)in a notebook failed in every forked process ("Cannot re-initialize CUDA in forked subprocess"), because the Trainer's own CUDA check asked the CUDA driver. It now asks NVML, as Lightning does. If a cell callstorch.cuda.is_available()beforefit, the processes say how to avoid it. - Automatic resume: a retry could start from the checkpoint before the one saved on SIGTERM and train some steps again. The worker took a checkpoint written a few milliseconds after the previous one, with the same size, as already stored; it now compares contents. Upgrade workers to get this fix.
Validated on GPUs
- The test suite (with the Lightning conformance tests), CUDA checks and the Trainer's GPU checks on L4, H200 and RTX PRO 6000.
TransformerEnginePrecision(FP8) on an L4: FP8 on in the forward pass, the loss within 2% of bf16-true. Transformer Engine 2.20 loads the FP8 state of a checkpoint only withNVTE_ALLOW_UNSAFE_PICKLE_EXTRA_STATE=1; set it only for checkpoints you trust.- Exact resume on one GPU (identical weights), resume and
torchmetricssync over NCCL on 4 L4s, notebook forks on 4 L4s. - JAX, CuPy and Transformers as GPUlayer jobs on an L4. TensorFlow and ONNX Runtime jobs did not find their CUDA libraries and ran on the CPU.
Not covered
AMD ROCm and Ryzen AI NPUs are still not run on their hardware. After the fix, the notebook check's own line parsing was corrected but not rerun, because no 4-GPU machine was free.
New validation scripts: scripts/validate_parity_gpu.py, scripts/validate_te_fp8.py, and scripts/validate_libraries.py again.
GPUlayer 0.11.0
Adds serving models on AMD Ryzen AI NPUs. It has not run on an NPU or with FastFlowLM itself: it
was built from FastFlowLM's source and tested with a stand-in flm. Expect rough edges, and
please report what you find.
- New: serving models on AMD Ryzen AI NPUs through FastFlowLM (ADR-0026).
gl.flm_service("model")
builds a service with an OpenAI-compatible API; workers report annpudevice whenflm validate
passes. Each replica takes an NPU for itself, listens on loopback unlessexpose=True
(FastFlowLM has no authentication), and a machine can serve on its NPU while it trains on its GPU.
The Trainer andlaunchrefuse an NPU with an explanation: FastFlowLM does inference only.
Implemented and tested with a stand-inflm, not on an NPU. Migration: a worker with a
ready NPU needs a server of this version.
GPUlayer 0.10.1
Prepares for AMD GPUs. Nothing here has run on AMD hardware yet: ROCm stays implemented, not
validated. A real ROCm wheel and the rocm/pytorch image were tested on x86 without a GPU.
- Fix (AMD, found by reading the code; not run on AMD hardware): AMD GPUs had no memory when
rocm-smiworked, so a job withgpu_memory_gbrejected them; names and memory now come
from the ROCm build of torch, also where AMD no longer shipsrocm-smi.accelerator="gpu"
raised on a ROCm build and now means its GPUs. A fit on AMD asked for a CUDA capability and could
say the GPU has NVIDIA's Tensor Cores. Machines withamd-smior/dev/kfdand no ROCm torch
now get a note. - New:
scripts/validate_rocm.shfor the first AMD machine, which also recordsamd-smiand
rocm-smioutput, since AMD publishes neither JSON format;docs/guides/amd-rocm.md; Docker
EXTRAS=base-torchfor images onrocm/pytorch(built on x86 and started; not run on a GPU).
The Dockerfile now also installs venv when a base image has Python without it. - Docs: ADR-0026 proposes how Ryzen AI NPUs fit in, as a service for inference.
GPUlayer 0.10.0
Makes the Trainer behave like PyTorch Lightning, not only look like it: tests/conformance runs
the same code on both. Step time is unchanged on an M2 Pro CPU, -1.7% to +0.3% over four runs
(benchmarks/results/2026-11-07-m2pro-parity-fixes/). Read the Migration notes.
- Fix:
self.log(name, metric)with atorchmetrics.MetricraisedTypeError. The Trainer
now computes the metric once at the end of the epoch or evaluation and resets it; the
metric syncs across processes itself. No new dependency, and no added cost for tensors. - Fix:
Trainer(max_steps=N)andTrainer(max_time=...)silently stopped after one epoch,
becausemax_epochsdefaulted to 1;Trainer(min_epochs=5)stopped after one too. The
default is nowmax_epochs=None: epochs are unlimited whenmax_stepsormax_timeis
set, and otherwise one epoch (ormin_epochs), as before. Migration: runs with
max_stepslarger than one epoch now train longer;max_epochs=Nonepassed explicitly
meant 1000 epochs and now follows these rules (passmax_epochs=1000);max_epochs=-1
meant 1000 and now means no limit, as in Lightning. - Fix:
fit(ckpt_path="last")and"best"raisedFileNotFoundError."last"is now the
newestlast*.ckptof the Trainer, itsModelCheckpointfolders and the run folder (also
on a rerun, and in launched jobs); with none, training starts from scratch, as in Lightning. - Fix:
ModelCheckpoint()monitoredval_lossby default, and failed in a model that logged
another name. The default is nowmonitor=None(keep the latest), as in Lightning.
Migration: passmonitor="val_loss"to keep the best by that name. - Fix: a URL as
default_root_dir,ModelCheckpoint(dirpath=...)orsave_checkpointpath
was written to a local folder nameds3:, with no error, so a checkpoint could vanish with
the machine. Those paths,ckpt_path,load_from_checkpointandCSVLogger(save_dir=...)
now go throughfsspec(new extra:gpulayer[remote]), and a URL that cannot be served is
an error when the object is created. URLs with a password are refused. Tested with fsspec's
in-memory filesystem, not yet against S3, GCS or Azure. - Fix:
self.logoptions were ignored.on_stepwithon_epochnow gives<name>_stepand
<name>_epoch(soEarlyStopping("val_loss_epoch")works),logger=Falsekeeps a value from
the loggers, andtrainer.progress_bar_metricsandlogged_metricshold what Lightning's do.
Loggers get Lightning's rows: steps from 0 (a value logged atglobal_step2 is step 1), an
epochcolumn on every row, noepoch_seconds, and evaluation's per-step values under their
own counter. Values logged inon_*_epoch_endare combined across processes.
Migration:trainer.callback_metricsno longer hasepochandepoch_seconds, and a
name logged per step intraining_stepholds its last value (Lightning's), not the epoch
mean: log it withon_epoch=Trueand monitor<name>_epochfor the mean, or read
trainer.history.callback_metricsis cleared whenfit,validateorteststarts. - Fix: with
val_check_interval, validation also ran after the last batch of each epoch, and
ending a run withmax_stepswithin an epoch validated once more. Validation now runs at
the interval's multiples only (withval_check_interval=3and 10 batches: after 3, 6 and 9),
as in Lightning. - New: automatic resume (ADR-0025).
launch(max_attempts=N)and
Trainer(launch_options={"max_attempts": N})keep the job's newestlast.ckpton the control
plane while it runs, without making training wait, and start the next attempt from it after a
lost worker or a SIGTERM. Distributed jobs can now retry: the whole group restarts from the
checkpoint, after every rank of the old attempt has stopped. New:JobSpec.resume, the retry
reasonpreempted, andPOST /v1/worker/tasks/{id}/checkpoint. A job withresumeneeds 0.10
workers; other jobs run on any worker. Tested with real processes on one machine; not yet on
a reclaimed cloud VM.from-lightning.mdsaid SLURM's requeue was not needed, which
overstated what 0.9 did: retries started over. - New: exact resume. Checkpoints hold the random number generators and, in one process, a
resumed run gives bit-identical weights to one that never stopped (tested on CPU with dropout
and shuffling, at epoch ends and within an epoch). A run resumed within an epoch used to read
the trained batches again, in a new order, so some samples repeated and others were skipped;
it now rebuilds the order and skips them in the sampler, without reading them.torchdata's
StatefulDataLoaderis saved and restored, as in Lightning. Across processes the data order
is exact; each rank's own random numbers are not restored. - Fix: checkpoints work both ways with Lightning. A Lightning checkpoint saved within an epoch
lost the rest of that epoch, and one saved afterfitskipped an epoch;fitnow reads
Lightning's loop state. GPUlayer checkpoints load with Lightning'sload_from_checkpoint, and
gpulayer.pytorch.utilities.to_lightning_checkpointwrites one for Lightning'sfit.
Migration: afterfit, and inon_train_end,trainer.current_epochnow counts the
epochs run (Lightning's meaning): one more than before. New checkpoints havenext_epoch. - Fix (Trainer, Lightning semantics):
training_step(self, dataloader_iter)raisedTypeError; the step now pulls its own
batches as(batch, batch_idx, dataloader_idx). Intraining_steponly.Nonefromtraining_stepskippedon_train_batch_end, which now runs with empty
outputs, and the batch counts inglobal_step. Migration: step counts of models that
skip batches go up; schedulers andmax_stepscount those steps too.on_before_zero_gradran after the optimizer step; it now runs before backward. When no
model or callback overrides it oroptimizer_zero_grad, gradients are still freed after
on_train_batch_end, before the next forward pass, which Lightning does not do: peak memory
stays lower and nothing can observe the difference except code reading.gradinside
training_step.- A second
fitwith the same Trainer trained again. It now continues from where the first
stopped, so with its limits reached it does nothing, as in Lightning. Migration: raise
max_epochs, or use a new Trainer. self.logerrors as in Lightning: a tensor of several values (it was averaged), a call in
a hook nothing collects from (setup,configure_optimizers,on_fit_start,
on_fit_end,on_train_end,on_validation_end,on_test_end,teardown, ...), and the
same name twice in a step with different options.
- New:
trainer.strategyhasbarrier,broadcast,reduce,all_gather,
reduce_boolean_decision,root_device, the ranks,lightning_moduleandoptimizers;
trainer.fit_loop(max_epochscan be set),validate_loop,test_loop,predict_loop,
val_check_batch,lightning_module;Module.hparams_initial,prepare_data_per_node.
Migration:trainer.max_stepsis -1 without a limit (was None);limit_*_batchesdefault
to 1.0 (were None);num_val_batchesandnum_test_batchesare always lists; with one loader
trainer.val_dataloadersis that loader, not a list. - Docs: "every public name has a counterpart" was overstated.
scripts/compare_api.pyreads
source and missed instance attributes such asfit_loop, what classes inherit such as
hparams_initial, and thattrainer.strategylacked 58 of the 60 attributes of Lightning's.
Names are now compared on live objects intests/conformance. - New: notebooks.
Trainer(devices=N)in a Jupyter kernel forks one process per device and
returns the weights, instead of packaging the folder ofipykernel_launcher.py(all of
site-packages) as a job.launch()from a notebook now explains itself.ddp_notebookand
ddp_forkare accepted. Linux only, tested in CI against a real Jupyter kernel on CPU; not
run on a GPU. On macOS it stops with an explanation, because forks of a kernel crash there. - New: SLURM. Under
srun, tasks train in place with SLURM's ranks and the first node as
rendezvous, where each task used to submit its own job. Ansbatchscript orsrun --pty bashis not taken for a task. Simulated with SLURM's variables on one machine; not run on a
cluster. With--gpus-per-task, each task uses its only visible GPU. - New CI job and
tests/conformance: the same code runs on PyTorch Lightning and on the
Trainer and must behave the same; differences not fixed yet are listed as strictxfails.
pip install -e '.[conformance]'adds what it needs.
GPUlayer 0.9.2
-
Fix: a task the control plane's timeout backstop marked timed out kept running on its
worker while its GPUs went to the next job, and a slow first environment build could
trigger that backstop although the process had time left. The backstop now counts from
process start (new worker callPOST /v1/worker/tasks/{id}/executing; a worker without
it getspreparation_allowance_seconds, default 3600, more), and timed-out tasks are
cancelled on the worker at the next heartbeat. Mixed versions keep working. -
Fix: a provider API error while reading a cloud instance's state (a 5xx, throttling)
marked the instance failed and nothing ever terminated it, so the VM kept running and
billing. State checks are now retried (5 in a row before giving up), and an instance that
failed or could not be read is terminated, with retries. -
Fix (Trainer, Lightning semantics):
- With a loader without a length, the gradients of the last
n % accumulate_grad_batches
batches were carried into the next epoch; they are now applied at the epoch's end
(one batch read ahead, only for such loaders). - Step schedulers with
frequency=Nstepped after optimizer steps 1, N+1, ... instead of
N, 2N, ...;ReduceLROnPlateauwithinterval="step"never stepped. With manual
optimization the Trainer stepped schedulers itself (Lightning leaves that to the model);
it no longer does. Migration: manual-optimization models that relied on it call
self.lr_schedulers().step()intraining_step. - With
check_val_every_n_epoch=None, an integerval_check_intervalnow counts batches
across epochs (it could never trigger when longer than an epoch). Mid-epoch validation
runs only on the epochscheck_val_every_n_epochselects. EarlyStoppingcounted patience once per training epoch, also on epochs without
validation, and ignored mid-epoch validations. It now checks after each validation
unless validation runs exactly once per epoch, as in Lightning, and honours
check_on_train_epoch_end.- Epoch values across processes follow
reduce_fx(a"sum"was averaged; max and min
too), and a mean is over all samples of all ranks. A name logged on only some ranks no
longer hangs the reduction. Epoch means are weighted by the batch size inferred from the
batch whenbatch_size=is not given (a smaller last batch counted as a full one). ModelCheckpoint(every_n_train_steps=...)decided on each rank's own step values; with
FSDP, where saving is a collective, ranks could decide apart and hang. The step values
are now averaged across ranks first.- Step time unchanged: A/B on an M2 Pro CPU,
mlp-cpu, -5.4% to +0.3% over four runs
(benchmarks/results/2026-11-04-m2pro-loop-fixes/).
- With a loader without a length, the gradients of the last
-
Home page: the six "What you get" cards show still, flat illustrations in the docs
diagrams' style (the Trainer API, scaling from one GPU to two machines, the scheduler's
per-machine reasons, validated hardware, run outputs, a custom loop withlaunch()and
Runtime) in place of the animated wireframe scenes. They follow the light and dark theme.
GPUlayer 0.9.1
- Fix: a worker with a nightly or release-candidate PyTorch (for example
2.3.0.dev20240104) was rejected as "does not satisfy >=0" whenpackagingolder than 25
was installed, because those versions leave pre-releases out of version ranges by default.
Pre-releases now count as their version (regression test added). - Fix: a job that called the Trainer more than once (fit, then predict or test) could fail
intermittently with "Gloo connectFullMesh failed ... Connection refused": the process group
was destroyed after each call, and a rank that finished first joined the next call through
rank 0's old store. A multi-process group now stays up until the process exits (seen twice
in CI; regression test added). - Home page: dark wireframe scenes for the six features, each a simple looping symbol of
what the card describes (a still frame with reduced motion), and a dashboard section with
screenshots of the overview, a distributed job and the workers in one row (click to
enlarge). Feature cards show two per row on phones. - Site: charts and diagrams on the home page and in the docs open full size on a click.
- Tests: every public name of the reference trainer API is exercised by at least one behaviour
test (tests/pytorch/test_feature_coverage.py,test_speed_mechanisms.py); check it with
python scripts/compare_api.py <reference-source> --tests. The speed-mechanism tests run on
every accelerator present (CPU, Apple GPU, CUDA). - Fix:
trainer.test_dataloaders,val_dataloadersandpredict_dataloadersare set by
test,validateandpredict(they stayed None).
Install: pip install -U gpulayer==0.9.1. Docker: ghcr.io/antonellof/gpulayer:0.9.1 (and :0.9.1-torch).
GPUlayer 0.9.0
The Trainer now covers the rest of the reference training API, validated on Tesla T4s for
DeepSpeed, FSDP options, tensor parallelism, DDP hooks, quantized training and TensorRT.
Migrating from 0.8 (breaking changes):
-
GPUlayer's code carries no Lightning names. Removed aliases:
glt.LightningModule(use
glt.Module),glt.LightningDataModule(glt.DataModule),glt.LightningCLI
(glt.GPULayerCLI),glt.LightningArgumentParser(glt.GPULayerArgumentParser). Renamed:
Trainer.lightning_moduleisTrainer.module; the CLI parser'sadd_lightning_class_args
isadd_component_args;utilities.LightningEnumisutilities.CaseInsensitiveEnum;
LitLogger's default folder is./gpulayer_logs. The benchmark scripts moved from
benchmarks/lightning_comparison/tobenchmarks/trainer_comparison/. -
The training loop no longer calls
model.train()every epoch (frozen submodules stay in
eval mode); callmodel.train()beforefitif a model arrives in eval mode (fitwarns). -
PyTorchProfiler's positional arguments afterfilenamefollow the reference order; pass
them by keyword. -
WandbLogger(log_model=...)uploads checkpoints as W&B artifacts instead ofrun.save. -
A bare class name on the CLI (
--data Data) that matches classes in two modules is an error
naming both; givemodule.Class. -
Validated on 2 Tesla T4 machines over NCCL: DDP communication hooks (fp16 compression, 11%
faster steps than plain DDP on that network) and post-local SGD (21% faster; replicas
identical after each averaging step) (benchmarks/results/2026-11-01-aws-2xt4-ddp-hooks/). -
Home page: no Lightning names outside the benchmark comparisons.
-
Validated on 2 Tesla T4 machines over NCCL (
benchmarks/results/2026-11-01-aws-2xt4-parallel/):
FSDP sharding strategies, activation checkpointing, CPU offload and sharded checkpoints
(merged across machines, resumed in a second job); tensor parallelism with
ModelParallelStrategy;Module.to_tensorrt. -
Fix: a task whose outputs passed the worker's 512 MiB cap returned none of them (the loop
stopped at the first file over the cap, so an 800 MB checkpoint also dropped the small
files after it) and said nothing. A file over a limit is now skipped and named in the task's
system log; the others still upload. The default cap is 4 GiB per task
(GPULAYER_MAX_OUTPUT_BYTES), 2 GiB per file. Found on AWS T4s with a 67M-parameter model. -
Sharded checkpoints written on several machines are merged into one folder after the job,
so they load and resume without a shared filesystem. -
DeepSpeed validated on Tesla T4s (AWS): ZeRO stages 1 to 3, with and without CPU offload, on
one machine and across two over NCCL;BitsandbytesPrecisionnf4 and int8 on one T4
(benchmarks/results/2026-11-01-aws-2xt4-deepspeed/). Three bugs found and fixed there:
DeepSpeed in one process needs a process group (it tried MPI discovery) andLOCAL_RANK,
which the Trainer now provides for the run; and jobs did not have their Python'sbin
directory onPATH, so DeepSpeed could not findninjato build its CPU Adam. Workers now
put it first, as an activated venv does. -
Fix: sharding a DataLoader across processes dropped
persistent_workers,
prefetch_factor,worker_init_fn,generator,timeoutand the multiprocessing context,
so distributed runs lost the user's loader tuning. They are kept now, as in Lightning. -
Trainer: Lightning's two speed hints (enable TF32 on Tensor Core GPUs; raise a low
num_workers), once per process, silenced by
gpulayer.pytorch.utilities.disable_possible_user_warnings(). -
Trainer: the rest of Lightning's public API (ADR-0024, "Full public API"), checked with the
newscripts/compare_api.py. Highlights: SIGTERM saves a resumable checkpoint
and raisesSIGTERMException;trainer.init_module(); FSDP options (sharding strategies,
activation checkpointing, CPU offload, sharded checkpoints) andModelParallelStrategy
(tensor parallelism); DDP communication hooks and post-local SGD;BitsandbytesPrecision
andTransformerEnginePrecision;RichProgressBar,CometLogger,LitLogger,
XLAProfiler; Lightning's CLI hooks, argument links and saved configs; accelerator classes
andgpulayer.pytorch.utilities. Tested on CPU (two processes for the distributed parts);
the GPU-only plugins and hosted loggers against fake packages. -
Behaviour change, as in Lightning: the training loop no longer calls
model.train()every
epoch, so frozen submodules stay in eval mode; evaluation restores each submodule's mode.
fitwarns when the model is in eval mode at the start. -
Trainer:
accelerator="tpu"withdevices="auto"trains on every TPU device of a TPU VM,
as Lightning'sXLAStrategydoes (one process per device throughxmp.spawn, gradients
averaged byxm.optimizer_step, rank 0's checkpoint and metrics loaded in your process).
Batches go throughMpDeviceLoader; metrics, barriers andall_gatheruse XLA collectives,
so a TPU pod is one run when the script is started on every host, as in Lightning. Manual
optimization on TPUs steps throughxm.optimizer_stepandxm.mark_step, and TPU
checkpoints hold CPU tensors. Tested with a simulatedtorch_xla(one VM and a two-host
pod); not run on a TPU.accelerator="hpu"gives an error, as Lightning removed Habana. -
Docs and site made shorter: the guides, architecture, reference, PyTorch and get-started
pages lost 30 to 60% of their words with the same commands, settings and status; the
Trainer page points to the API reference for the full argument list. The compare page is
now one training-focused capability matrix (GPUlayer, Lightning, Accelerate, Ray, SkyPilot,
dstack, Modal, Slurm/Kubernetes) with the measured speed against Lightning and when to choose
something else. The home page drops the quickstart, placement and architecture sections.
Corrected two stale statements: Trainer DDP on GPUs (validated on RTX 3070s and T4 machines)
and NCCL across machines in the GPU compatibility matrix. -
Fix: a worker that finished a task while the control plane was unreachable (a server pod
restarting) lost the outcome on the refused connection, so the server kept the task running
and the worker busy. Outcomes are now retried with backoff for up to 2 minutes; a rejection
is final. Found by the Kubernetes CI job; regression test added. -
Fix: manual optimization with DDP could hang (seen on a 2-vCPU CI runner). The step no
longer relies on DDP's reducer internals:manual_backwardaverages the gradients across
ranks in one coalesced all-reduce per dtype. Re-validated on 2 Tesla T4 machines over NCCL
(identical weights on both ranks). -
Trainer, the rest of Lightning's surface (ADR-0024 amendment): several dataloaders
(glt.CombinedLoaderfor training; lists for validate/test/predict withdataloader_idx);
validate,testandpredicton several devices or machines (each rank on its shard,
results back in the launching process);glt.GPULayerCLI(subcommands,
--trainer.*/--model.*/--data.*, JSON/YAML configs,class_path);plugins=with
precision plugins,CheckpointIO,TorchCheckpointIO,AsyncCheckpointIOand
TorchSyncBatchNorm;DeepSpeedStrategyandaccelerator="tpu"(implemented, not run on
hardware). New guide page: Command line. -
Install script at a short URL:
curl -fsSL https://gpulayer.dev/install.sh | sh(the site
proxies the repository'sinstall.sh). The home hero no longer shows agpulayer upbutton. -
Site: the home page hero has an animated wireframe landscape (mountains, lakes, hills) behind
the headline, drawn with three.js loaded after the page renders. It pauses offscreen and in
hidden tabs, shows one still frame with reduced motion, uses a lighter grid on phones and
follows the light/dark theme.
GPUlayer 0.8.1
-
Benchmarks re-measured with the 0.8 Trainer (2026-11-01) and every Trainer chart regenerated:
one T4 on AWS (GPUlayer Trainer 1.08 to 1.38x faster than Lightning), 4x RTX 3070 on Vast.ai
(1.26 to 1.60x in 5 of 6 cases, 1.12x slower on the 1-GPU CNN), Apple M2 Pro (1.02 to
1.80x), and a new chart, one T4 per machine on 2, 4 and 8 AWS machines over NCCL (MLP 1.08
to 1.29x faster, CNN 1.01 to 1.09x slower), and strong scaling with gloo on 2, 4 and 8 AWS
machines (17.8% faster on 8).multinode.pyandscaling_run.pytake the
worker layout fromMN_*variables. -
Validated on hardware (2026-11-01, 8 AWS
g4dn.xlarge, one Tesla T4 each,
benchmarks/results/2026-11-01-aws-8xt4/): NCCL across machines (DDP on 2, 4 and 8 machines
with 16-mixed andsync_batchnorm, identical weights on every rank; manual optimization on
8; FSDP on 2 and 8), and on one T4 Inductortorch.compile, 16-mixed manual optimization,
16-true/bf16-true,PyTorchProfilerCUDA columns, EMA and device stats. -
Fix:
clip_gradientswith manual optimization and 16-mixed unscaled the gradients twice
(it received the wrapper fromself.optimizers()), so such runs did not learn. Found on the
8-machine run; regression test added. -
Docs: the NVIDIA guide explains
CUDNN_STATUS_SUBLIBRARY_LOADING_FAILEDfrom a system
LD_LIBRARY_PATH(AWS Deep Learning AMIs) and how to start workers without it. -
Docs: a generated PyTorch API reference with every public class,
method, property and hook ofgpulayer.pytorch(scripts/make_api_reference.py; a test
fails when it is out of date or a public member has no docstring). The Trainer guide gains
a hook-order diagram; callbacks, loggers, profilers and the tuner moved to
their own page, and Moving from Lightning
has a side-by-side example and a table of differences. -
Docstrings for every public member of
gpulayer.pytorch; hooks share one description of when
they run (gpulayer.pytorch.hooks).BackboneFinetuning's defaultlambda_funcis now the
named functionmultiplicative, as in Lightning. -
benchmarks/cloud/aws.sh: instances run in a VPC of their own (gpulayer-bench, with its
own internet gateway; the default VPC is not used), install uv, PyTorch, Lightning and the
current GPUlayer commit on first boot (user-data,aws-boot.sh;readywaits for it), and
takeGL_AWS_SPOT=1,GL_AWS_AZ=...,allow/revokefor one outside IP,ssh,ip,
private-ipanddown-network. -
scripts/validate_trainer_gpu.py(one GPU: Inductortorch.compile, 16-mixed manual
optimization, "-true" precisions,PyTorchProfilerCUDA columns, EMA, device stats) and
scripts/validate_nccl.py(DDP withsync_batchnorm, manual optimization and FSDP across
GPU machines over NCCL).
GPUlayer 0.8.0
Lightning feature parity for the GPUlayer Trainer (ADR-0024).
-
Module: every Lightning hook, manual optimization (
automatic_optimization = False,
optimizers(),manual_backward,clip_gradients,toggle_optimizer; also with DDP),
several optimizers, allconfigure_optimizersforms including scheduler dicts with
interval,frequencyandmonitor(ReduceLROnPlateau),save_hyperparameters/hparams
(used byload_from_checkpoint),self.logoptions (reduce_fx,batch_size,
prog_bar,on_step),log_dict,all_gather,freeze,to_onnx,to_torchscript,
model-defined dataloaders,LightningModulealias. -
DataModule(LightningDataModule):prepare_dataonce per machine,setup(stage),
loaders, transfer hooks;fit/validate/test/predict(datamodule=...). -
Trainer arguments:
min_epochs,min_steps,limit_test_batches,
limit_predict_batches, fractional limits,overfit_batches,
reload_dataloaders_every_n_epochs,use_distributed_sampler,inference_mode(on for
validate/test/predict),detect_anomaly,sync_batchnorm(CUDA/ROCm),barebones,
logger,profiler,enable_progress_bar,enable_model_summary,
deterministic="warn",devices="auto",max_timeas a duration; precisions
bf16-true,16-true,64-trueand Lightning's short forms; strategy strings and
DDPStrategy(find_unused_parameters, static_graph, gradient_as_bucket_view, ...);
torch.compiled models train compiled with their own options. -
Callbacks:
ModelCheckpointwith Lightning's arguments (templates,every_n_train_steps,
train_time_interval,save_last,save_top_k=-1/0,monitor=None),EarlyStopping
thresholds,Timer,LambdaCallback,GradientAccumulationScheduler,
ThroughputMonitor,DeviceStatsMonitor,SpikeDetection,ModelSummary,
ProgressBar,BasePredictionWriter,OnExceptionCheckpoint,
StochasticWeightAveraging,WeightAveraging,EMAWeightAveraging,BaseFinetuning,
BackboneFinetuning,ModelPruning,LearningRateFinder,BatchSizeFinder. -
Loggers
CSVLogger,TensorBoardLogger,WandbLogger,MLFlowLogger; profilers
SimpleProfiler,AdvancedProfiler,PyTorchProfiler;Tuner.lr_findand
Tuner.scale_batch_size. -
Checkpoints use Lightning's layout (
optimizer_states,lr_schedulers,callbacks,
hyper_parameters, scaler;optimizeris still written) and resume within an epoch from
step checkpoints. Ctrl+C endsfitgracefully afteron_exceptionhooks. -
Speed: only overridden hooks are called,
self.loghas a fast path, epoch metrics are
averaged across ranks in one all-reduce. Step time measured within 1.4% of 0.7.1 on an
Apple M2 Pro CPU (A/B,benchmarks/results/2026-11-01-m2pro-parity/). -
Migration:
ModelCheckpoint's first positional argument is nowdirpath, as in
Lightning (passmonitor=by name).save_top_k=0is now valid (keeps none).
validate/testprint their results (verbose=Falseto silence). Callbacks with the 0.7
on_train_batch_end(trainer, model, loss, batch_idx)signature keep working. -
Not validated on GPUs yet:
sync_batchnorm, Inductortorch.compile, 16-mixed with manual
optimization. TensorBoard, W&B and MLflow loggers are untested (optional packages). -
Deprecated the
jax-cudaandcupy-cudaruntime profiles (never run on a GPU). They still
work and warn; they are removed in 0.9.0. Migration: replaceprofile="jax-cuda"with
accelerator="cuda", frameworks={"jax": ">=0.4", "jaxlib": ">=0.4"}(andcupy>=12for
cupy-cuda). -
Fix:
gpulayer up --name NAMEprinted the hostname as the local worker's name; the banner
now shows NAME, asgpulayer worker statusdoes. -
Docs and site: the home page terminal has a "Server + client" tab, and the quickstart (site,
docs and README) walks throughgpulayer up, a joined worker and a client training on two
nodes, with output from a run on one Mac in three terminals.