Skip to content

0.9.0

Latest

Choose a tag to compare

@fab2s fab2s released this 29 Nov 04:27
· 4 commits to main since this release
2933f11

Upgrading from 0.8.0? Most of this release is additive. What can stop
a build: exhaustive matches on Device (it gained MPS), struct
literals of the trainer's config structs (new fields), and
ClusterWorker::run_until_shutdown's return type. What changes without
a compile error: a run that went NaN, stopped early or lost its final
checkpoint now fails where it exited 0, NAdam follows PyTorch's
update rule, and every box of a cluster must run this release. See
UPGRADE.md.

AMD support in this cycle was verified on real hardware by @dhekimian (gfx1151 Strix Halo, gfx1201 Radeon AI PRO R9700) and @DhruvDh (gfx1100 Radeon RX 7900 XTX). Their runs, measurements and patches are in [#80].
Native Apple GPU support is @newQuery's ([#72]).

Changed

Licence and toolchain

  • flodl is dual-licensed: MIT OR Apache-2.0, at the user's option. Apache-2.0 adds an explicit patent grant from every contributor; MIT stays available for GPLv2-compatible use. Releases before this one remain MIT. The licence files are now LICENSE-MIT and LICENSE-APACHE, and every published crate ships both, flodl included, which shipped none before.
  • flodl and flodl-hf declare separate minimum Rust versions: 1.90 for the core crates, 1.95 for flodl-hf. Both of the floors that raised the shared one (1.91 in 0.8.0, now 1.95) came from flodl-hf's Hub client, which no core crate compiles. Each side now declares its own measured floor, and the msrv job checks each from a fresh resolution, since with no committed lockfile that is what a consumer gets.
  • The lint gates run on a pinned Rust release. CI's CPU job followed floating stable while the published GPU images kept the compiler of the day they were built, so a Rust release could fail main with no commit behind it. The version is declared once per Dockerfile (ARG RUST_VERSION), a bump is a reviewed commit that rebuilds the images, and a weekly workflow opens an issue when stable moves ahead. Contributors rebuild their local images after a bump (CONTRIBUTING.md).
  • flodl-hf no longer compiles flodl-cli into downstream builds. Only the export_hf example uses it, so it moved from an optional dependency behind the default hub feature to a dev-dependency.

GPU and AMD

  • The ROCm container image defaults to ROCm 10.2, and the runtime is chosen per libtorch variant. The image ran ROCm 7.0, which segfaults on gfx1151 and is about five times slower than 10.2 on gfx1201 with the same libtorch: in the rocm image the image's runtime is loaded ahead of the copy libtorch bundles, so the runtime governs. A variant's .arch records its runtime (rocm_runtime=, 10.2 when absent), fdl derives the base image tag from it, and ROCM_VERSION=<x.y> fdl ... overrides it for one run. If you call docker compose directly, the build argument is now ROCM_BASE_TAG (a full tag) in place of ROCM_VERSION. The version matrix behind the default is @dhekimian's ([#80]).
  • Batches upload synchronously on an integrated GPU. Host and device share memory there, so the page-locked staging copy and the separate copy stream bought nothing, and on Strix Halo (gfx1151) that path hung the GPU under the trainer. A discrete card keeps the pinned asynchronous upload. Found, fixed and measured by @dhekimian ([#99], [#80]).
  • The end-of-run idle figure is measured on AMD, and the VRAM figure says what it is. The poller behind idle=[...] read utilisation through NVML only, so an AMD card at full load was reported 100% idle. It now uses the vendor-aware reader the per-epoch line already had, and a device that never yields a reading reports an unknown idle share (n/a) instead of a full one. The terminal's VRAM: 978 MB / 0 B was allocated over spill; it is now allocated over total, with the excess named when the allocator goes past physical VRAM. The timeline's device-wide "VRAM used" column, zero on AMD until now, reads the amdgpu counter of the pool the device computes from: VRAM on a discrete card, system-RAM-backed GTT on an integrated one.
  • fdl gpu-test-all and fdl gpu-test-nccl run every step and name the ones that failed. Both were && chains, so a first failure hid everything after it. Reported by @dhekimian ([#80]).

fdl

  • ./fdl in a flodl checkout builds the checkout's own fdl. The bootstrap script downloaded the latest release binary whenever none was built, so a clone of main ran the last release's fdl beside newer sources. A checkout that is not on a release tag now builds fdl from its tree (host cargo, else the dev container) and falls back to the release with a warning; a release-tag checkout, a scaffolded project and the curl-and-run script keep taking the release binary. When fdl's sources are newer than the binary, one line says so and names the rebuild; nothing rebuilds on its own. The container build also creates its bind-mount sources first, which Docker otherwise created as root on a fresh clone.
  • fdl --version names the commit, and a farm's cloud-init installs the fdl that configured the farm. The user-data fetched the latest release on every instance, so a farm configured from an unreleased build booted walk-ins on an older fdl, which failed at the first dial. fdl now embeds its git commit (flodl-cli 0.8.0 (bfde431), with , dirty when its sources differ), and fdl join-config --cloud-init installs accordingly: a release build hands out the release, any other build has the instance cargo install that exact commit. A dirty build is refused, since no instance can install uncommitted sources.
  • fdl probe calls a working box ready. A card the box cannot use was an error wherever it stood, so three common layouts read verdict: ISSUES while training fine: an uncovered integrated GPU beside the discrete card in use, a second vendor's card with no runtime on the host, and a missing libnccl on a one-card box. Such a card is now an error only when it leaves the box nothing to train on; a missing libnccl is an error from two NVIDIA cards up. On a box with Docker, AMD cards the host has no ROCm for are listed when they are what it would train on, since the image carries the runtime. fdl @cluster probe is unchanged, and fdl probe --rank-host asks for that stricter reading on one box.
  • fdl probe reports the tools a walk-in reaches for, and every "not installed" line speaks the box's own package manager. A box whose join: block names an sshfs:// data source or a source.from: transport learns about a missing sshfs, rsync or git from the probe, not from fdl join refusing to dial. Install hints from fdl probe, fdl join and fdl publish go through one platform decider (apt, dnf, brew, a WSL2 pointer on Windows).
  • fdl join-config's preflight flags an active host firewall as a door obligation. A host firewall drops inbound on the door port before sshd can log it, and every check the box can run on itself rides the loopback exemption, so the gap looks exactly like a broken router. Each firewall layer detectable without root (ufw, firewalld, nftables or iptables services, the macOS application firewall, a WSL2 guest's Windows host) is now its own preflight check, never claimed satisfied, with its allow command and an outside-in probe.
  • The controller states the run's arguments at admission, and every admitted box runs exactly those. An agent spawned its ranks with whatever fdl join had been given, so a box that brought its own binary could train the binary's defaults beside a rank training the published run, and nothing refused the mix. The accept reply now carries the controller's argument list and agents spawn with it. The control protocol is now v6, counting the graph-profile frame below; controller and workers must run the same fdl release, as before.
  • fdl publish ships what cargo says the project is, and the tree carries its own digest. The served tree was the source root minus three guessed names, which on a real checkout was 28 GB of caches, build output and datasets. A cargo project now publishes the file set cargo reports for it and its path dependencies, plus the workspace-level files a build reads, lockfile included. Publish writes .fdl-run.sha256 beside the manifest, and a worker verifies every file after each fetch and refuses a tree that differs, so a pull that straddled a re-publish re-dials. The manifest gains a digest: field that a 0.8.0 worker rejects, so publish and its workers must run the same release; newer readers tolerate unknown fields from here on.
  • One cargo registry cache for every compose service. Each service mounted its own .cargo-cache-<name> and .cargo-git-<name>, so the same crates were stored once per image (about 2 GB of duplicates on a rig). They now share .cargo-cache and .cargo-git, in this repository and in fdl init scaffolds; the RHEL service keeps its own because it runs as root. Old per-service directories can be merged with rsync -a --ignore-existing or simply removed.
  • The CPU libtorch directory names its platform. Bare precompiled/cpu stays the Linux x86_64 build, while Linux aarch64 installs to cpu-aarch64 and macOS to cpu-macos, so builds for two architectures coexist in one checkout and are selected per host through .active.<case> or a cluster arch:. Every download records platform=<os>-<arch>, so fetching over another platform's build replaces it loudly. On macOS with a Docker-mounted project, fdl setup fetches the container's Linux build at the host's architecture, and the dev container mounts it with no .env override.
  • A relative ssh.identity_file resolves against the project root, in every frame that opens an ssh connection. The value is read on the host, inside the compose service and by the training launcher, so an absolute path could be right for only one of them: a container-absolute key made fdl @cluster probe fail while runs worked. One relative spelling now names the same file everywhere; absolute and ~/ paths pass through untouched.
  • Address already in use on a cluster port names the holder, and the way out. On Linux the error appends who holds the port. When the holder is PID 1 of a container, where kill -9 fails in a way that reads as a permissions problem, the hint is the docker rm -f that clears it.
  • Help text keeps the structure of its doc comments, and fdl <cmd> -h documents the flags fdl answers itself. Lists and paragraph breaks in a #[derive(FdlArgs)] doc comment reached --help as one run-on sentence; they now survive, inline code and emphasis are styled, and fdl <cmd> --help and a binary's own --help share one layout engine. Inline literals render in the palette's amber, not bold. --refresh-schema, which appeared in no help at all, is listed in a new fdl flags section. A schema cache written by a different fdl is treated as stale.
  • -q / --quiet silences docker compose's container-lifecycle narration. The Container ... Creating / Created pair in front of every containerized command is hidden; the container's own output is untouched. It is opt-in because those lines confirm that the command did run in a container. The flag carries into the fdl a run line invokes inside the container.

Training engine

  • GradScaler unscales and checks every gradient in one kernel and one host read. step multiplied and tested each parameter's gradient on its own, which is a kernel and a blocking read per parameter on a GPU. It now uses libtorch's fused unscale-and-check, as PyTorch's scaler does. GradScaler::unscale_ is new, for a loop that clips: clip after it, and the step that follows does not unscale again. The tutorial's mixed-precision loop clipped the scaled gradients, which shrinks the update by the scale; it is corrected. Suggested by @dhekimian ([#80]).
  • eval_fn always scores the consensus. Under cpu-async the elected rank's own model is a blend, so every eval scored a state that exists on no saved artifact. On the CPU path the eval is now served at the reduce: the elected rank scores that round's consensus and restores its own state verbatim, so a round with an eval trains exactly like one without. The final eval scores the same model the checkpoint bundle persists. request_eval is served at the next reduce, and eval cadence counts epoch_splits slices, so single-pass runs get interior evals. NCCL already scored the consensus and is unchanged.
  • The checkpoint bundle is the run's canonical persist form, and checkpoint_fn always receives the consensus. On the CPU averaging path a clean end persisted nothing, the periodic callback ran on a rank holding a blend under cpu-async, and request_checkpoint waited for an epoch boundary. With save_path set, a clean end now always writes the final consensus bundle, checkpoint_every adds periodic ones (each atomically supersedes the last), and checkpoint_fn fires on the controller against the averaged frame. request_checkpoint is served at the next reduce. Writers create the stem's parent directories, and the run prints where a relative stem resolves. Rank children no longer build a per-rank final snapshot that nothing consumed.
  • A non-f32 model buffer no longer silently disables consensus checkpoints. The reduce ships only f32 buffers, but the checkpoint writer counted all of them toward completion, so one integer buffer meant a checkpoint never wrote, with no error. Bundles now carry the f32 subset, and a load leaves the others at their constructed values. ModelSchema gained a public field (f32_buffer_idx) that struct-literal construction needs.
  • The CPU-averaging divergence signal no longer holds a full model copy per rank. Each rank kept a steady f32 CPU copy of every parameter (about 4 GB at 1B parameters, per rank) to produce three scalars per sync. They are now computed during the reduce itself, one tensor at a time, with identical results. On RAM-tight hosts this also removes a swap-thrash source, since that copy was rewritten every window.
  • The convergence guards are named after what they measure: TrendGuard becomes LevelGuard (the divergence level) and MsfGuard becomes GrowthGuard (the rate at which divergence compounds, the only one that may cut the anchor). Deprecated aliases keep the old Rust names compiling; ddp-bench's selector is now --guard none|level|growth. The research/elche-msf/ record keeps the original vocabulary, with a mapping note.
  • The async overshoot budget is derived per rank. The flat default of 15 batches left a fast rank idle at the barrier and let a slow one run past the window. Each rank's budget now covers the measured reduce duration at its own step rate, bounded by one window's allocation and by --max-overshoot N. In a five-seed A/B, quality stayed within noise and the fast rank's in-sync utilisation roughly doubled.
  • Every optimizer steps in a few batched kernels, and none is slower than PyTorch's. SGD, RMSprop, Adagrad, NAdam and RAdam looped over parameters with several kernel calls and temporaries per tensor, which on ResNet-20 made SGD's step ten times dearer than PyTorch's and the whole epoch about 15% slower (3.3 s against 2.87 s on an RTX 5060 Ti; 3.0 s now). Each now updates a whole parameter group at once; NAdam and RAdam, whose coefficients follow a parameter's own step count, update parameters in buckets of equal count. Adam and AdamW already ran libtorch's fused kernel but uploaded their step counts with a blocking copy on every step; the counts are now filled on the device, and Adam calls the plain Adam kernel where it borrowed AdamW's with a zero decay. On 65 parameter tensors a step costs, flodl against PyTorch's default: SGD 52 µs / 143 µs (863 µs before), RMSprop 104 / 181 (1320 before), Adagrad 99 / 248 (1060 before), NAdam 134 / 421 (2490 before), RAdam 122 / 334 (2190 before), Adam 169 / 262 (227 before), AdamW 207 / 269 (254 before). Against PyTorch's fused=True, the same kernel, Adam and AdamW are level (169 / 170 and 207 / 208). The updates are unchanged mathematically but sum in a different order, so a seeded run differs from an earlier one in the last bits. Five multi-tensor ops carry it and are public: Tensor::foreach_addcmul_, foreach_addcdiv_, foreach_addcdiv_scalars_ (one value per tensor), and the out-of-place foreach_sqrt and foreach_add_list. Prompted by @dhekimian's PyTorch comparison ([#80]).
  • NAdam and RAdam follow PyTorch's update rule. NAdam used a constant momentum coefficient, where PyTorch's follows a schedule that starts near beta1 / 2 and rises towards beta1 over thousands of steps (momentum_decay, default 4e-3). Over a typical run that weights the raw gradient several times more than flodl did, so a recipe ported from PyTorch trained on a different trajectory; no PyTorch setting reproduced the old form, and it is gone. RAdam added eps after the bias correction of the second moment, where PyTorch adds it before, which only shows with a large eps. Both were checked against PyTorch 2.10's source. NAdam gains .momentum_decay(), and both gain .weight_decay(), which they supported with no way to set it. State files are unchanged and still load: the schedule's running product is rebuilt from the step counts, and momentum_decay comes from the constructor. A NAdam run resumed across this change continues under the new rule.
  • A CPU-averaging reduce takes less than half the time on a large model, and says where the rest goes. Every hop of the reduce path authenticates the model-sized frame, with a portable SHA-256 that ran at about 560 MB/s; on OLMo-150M over three ranks that hashing was more than half of a 12.7 s reduce. The MAC now uses the CPU's SHA extensions where it has them (about 2.5 GB/s on a Ryzen 9 9900X), authenticates a header and its payload without first copying them into one buffer, and is computed once for a consensus broadcast, not once per connection. The same run reduces in 5.7 s, and its wall time went from 233 s to 192 s. Tags are unchanged, so the wire format is too. At -vv, each hop (a relay's rank readers, its uplink and downlink, the controller's receive and its reduce-and-scatter) now prints a [stage-prof] line splitting its time into receive, send, MAC, copy, parse, encode, sum and the outer step. flodl depends on the RustCrypto sha2 and hmac crates in place of hmac-sha256.
  • The record stream's meta declares the engine scalars only when a record can carry them. A run without --reports-per-epoch published a meta promising series that no record held.

ddp-bench

  • A sweep trains each cell in its own process. A cluster training session runs once per process, so a sweep with more than one multi-GPU cell trained the first and failed on the second. The sweeping process now starts one child per (model, mode) pair, keeps the skip decisions and the exit code, and a cell stops if its sweep is killed. A sweep on a cluster that forms through a join window is refused with the reason. --validate, --save-baseline, --baseline, --tolerance and the validate preset are removed: they compared against baselines for models the bench no longer has.
  • fdl ddp-bench --model <m> runs the model's own default, and --quick runs its own short profile. The bench's fdl.yml set five epochs for every invocation, so through fdl no model ran its default length. That global is gone, and the sweep presets that want five epochs say so. --quick selects a per-model profile sized to a few minutes with the loss still falling (20 passes for ResNet-20, one pass over 1M tokens for OLMo, the default for models that are already short). The learning rate no longer drops with the epoch count on a model that has a schedule; a constant-rate model given more epochs still trains at a proportionally lower rate, says so, and --lr-scale 1 holds the default.
  • The solo baseline shuffles, honors --epoch-splits, and gains a trainer twin, solo-trainer. The hand-written solo-N loop walked the dataset in storage order while every DDP mode drew from the trainer's seeded permutation, so reports compared runs trained on different orders. It now draws the trainer's order, which moves solo numbers against earlier reports. --mode solo-trainer runs one device through Trainer::builder(): it is how a one-GPU box exercises the trainer, and against solo-N it prices the trainer itself. It needs exactly one visible device (--gpus N) and stays out of --mode all. The data banner says gpu-preload only for solo-N, the one mode that holds the dataset on the device.
  • --per-epoch-eval measures the consensus, on the rank the controller elects. It scored rank 0's own local model. It now rides the coordinator's eval cadence, like final eval=: the elected rank scores the averaged parameters at every epoch boundary (each --epoch-splits slice counts) and restores its own state.
  • Enumerated flags declare the values they accept. --guard, --outer-optimizer, --data-source, --tier and --dashboard-theme carry choices, validated before a container starts. --model and --mode name registries and point at --list.

Added

Devices and precision

  • Device::MPS: native Apple Silicon GPU support. Tensors, autograd, mixed precision and both data loader paths address the Apple GPU as its own device. Device::is_accelerator() answers "data must leave the host" (CUDA and MPS), while is_cuda() keeps meaning "a CUDA runtime exists". There is no Cargo feature: mps_available() is the runtime check. On an M5 Pro, TinyBERT fine-tuning ran 2.4x to 5x faster than on the CPU. The trainer picks it for a single-device run when there is no CUDA or ROCm GPU, and both tiers train there at every precision. Device gained a variant, so exhaustive matches need an arm (see UPGRADE.md). Contributed by @newQuery ([#72]).
  • default_device(), and a scaffold that uses the hardware. The function returns the device a hand-written loop should compute on: the first usable GPU, then the Apple GPU, then the CPU. The project fdl init scaffolds trained on the CPU on every machine; its template now starts from default_device(), builds the model and its batches there, and prints which device it trains on.
  • .device(...) pins a run to one device. A builder and TrainerConfig setting: the run trains on that device and does not fan out across GPUs, and a device that cannot run is an error. .device(Device::CPU) keeps a run on the CPU of a machine that has a GPU, which until now took an empty CUDA_VISIBLE_DEVICES.
  • TrainerConfig::precision: mixed-precision training as a trainer setting. Precision::Bf16Mixed runs each rank's training forward under bf16 autocast while parameters, averaging, checkpoints and evaluation stay f32; Precision::run does the same for a hand-written loop. On an OLMo run it trained 1.81x faster on an RTX 5060 Ti and 1.89x on a Radeon AI PRO R9700 (measured by @dhekimian, [#80]) with the loss unchanged; a small convolutional model got slower, so it is off by default. A card that only emulates bf16 (NVIDIA below compute capability 8.0) still applies it and says so, and precision_fallback keeps such a rank in f32. ddp-bench exposes both as --precision bf16-mixed and --precision-fallback. WorkerConfig and DdpRunConfig gained two public fields that struct-literal construction needs. Precision::F16Mixed (--precision f16-mixed) does the same in f16, where the trainer also runs a loss scaler on each rank: the loss is scaled before backward, the gradients are unscaled before the clip and the step, and a step with non-finite gradients is skipped. On a small convolutional model, where bf16 can lose to f32, f16 was the fastest of the three on both AMD chips measured (1.6x and 2.4x over f32), and on an RTX 5060 Ti it was faster than bf16 but still slower than f32, so the choice is one to measure. Suggested and measured by @dhekimian ([#80]).

Platforms and GPU

  • The shim builds against libtorch 2.11 to 2.15. It compiled against 2.10 only. The shim now follows the version it is built with (the c10::cuda aliases a ROCm libtorch defines itself from 2.11, C++20 and a changed accumulator type from 2.14). fdl still downloads 2.10, which no newer version outperformed on the cards measured; this is for those who bring their own libtorch. Patch by @dhekimian ([#80]), who ran it on gfx1151 against 2.11, 2.14.1, 2.15 and the 2.16 nightlies.
  • TunableOp reaches the ROCm container, and the troubleshooting guide says when to use it. PYTORCH_TUNABLEOP_ENABLED, _TUNING and _FILENAME, and AMD_SERIALIZE_KERNEL, are passed through when set on the host. @dhekimian measured a 2.07x faster OLMo run on gfx1151 with a tuned results file and no gain on gfx1201 ([#80]).
  • Live GPU metrics on AMD, read from the kernel. Per-device utilisation came from NVML alone, so a ROCm build reported none. AMD devices are now read from amdgpu's sysfs, with no ROCm SMI and no extra install; temperature and power are read too. A sensor the driver does not publish is reported absent, not zero. Inside a container this needs --device=/dev/kfd, the node ROCm itself requires.
  • Linux ARM (aarch64) CPU support. PyTorch publishes no linux-aarch64 libtorch archive, but the CPU build ships self-contained inside the torch wheel, so fdl libtorch download repackages the wheel into a normal variant, and fdl setup carries the whole recipe on an ARM box (Graviton, Ampere, Apple Silicon's Linux container). GPU variants still refuse there by name; fdl libtorch build from source remains the GPU path. CI now installs, tests and trains on an arm runner.
  • Host RAM and the CPU are measured by one probe on every platform. The RAM probe every data budget reads knew only Linux, so on a Mac each tier that holds data in RAM stayed off and a streaming loader re-read its data every epoch. macOS and Windows are now measured. The CPU name no longer reads "Unknown CPU" on a Mac or on ARM Linux, and the thread count is what the process may use, so a container limited to 8 CPUs on a 64-core host reports 8. fdl no longer relies on the deprecated wmic on Windows.

fdl

  • fdl ui, the local operations page. One loopback web page for the project's farms, hardware probe, cluster status and resolved config, with four working areas:

    • Farm setup and publish. The join-config wizard as a preview-then-apply form (Apply unlocks only after a dry run of exactly that form state), and publish with its gate build streamed live.
    • Launch. The project's fdl.yml commands, with a form generated from each command's schema, fdl's global options (verbosity, --gpus, --no-append, --no-prebuild), a help button, and a run ledger from which an entry can be re-launched. There is no stop button on purpose: a killed cluster run leaves ports held and ranks spinning.
    • Run. The admission view until the run's dashboard answers, then the live dashboard, proxied through the page's own port, so one ssh -L forward carries everything on a headless controller. A run now reports its dashboard port to its status board (fdl status prints it), so a page opened on an already running cluster finds it.
    • History. Saved dashboards discovered on disk.

    The page drives the CLI and never reimplements it: every panel runs fdl and shows the exact command line above its result. Job streams resume where a dropped connection left them, and consoles render the command's own ANSI colours. It has no dependencies, binds 127.0.0.1 only, checks the Host header, and gates every form value before it becomes an argument. Every route requires a session: the URL printed at startup carries a token that the first visit trades for a cookie, so another user of the same box cannot open the page. fdl ui --url prints that URL again for a browser that lost its session.

  • Colour-forcing variables cross the Docker boundary. FORCE_COLOR, CLICOLOR_FORCE and CARGO_TERM_COLOR are forwarded when set, so FORCE_COLOR=1 fdl test colours its output in CI logs as it does on the host.

  • fdl cargo reports and reclaims cargo's on-disk footprint. Bare fdl cargo sizes compiled artifacts and registry caches per path; fdl cargo target --clear reclaims the first (cost: a recompile) and fdl cargo cache --clear the second (cost: a re-download). Clearing empties the directories and keeps them, since several are bind-mount sources that Docker would recreate as root. --json on all three.

  • fdl join-config --list and --dry-run. --list enumerates the project's farms with door, controller and credential state. --dry-run runs the full pass with every write withheld and reports what an apply would create, update or leave alone. Neither prompts, and both combine with --json.

  • fdl join-config --libtorch <variant> pins the libtorch a farm's workers acquire. The worker yml always declared libtorch: auto, which on AMD picks the older ROCm bundle so one image serves every 7.x host. A farm on a known image can now match its runtime exactly. The pin and --cloud-init-user are read back from the farm's own files on later runs, so --regen keeps them.

  • fdl clippy runs cargo fmt --all --check first. Formatting and lints are one style gate, so the local gate can no longer pass on a tree CI will refuse; fdl fmt writes the fix.

Observability

  • The dashboard has tabs, plots the engine, and embeds the timeline. Overview, Architecture (the graph and its heat maps) and Timeline, which shows the controller's forensic timeline or a host's, live or in a saved archive. With --reports-per-epoch, the metrics chart also plots the training engine: the ElChe anchor, sync durations, divergence and its growth rate. The saved archive links every host's timeline.html.
  • timeline.html shows every series the timeline records. Per-GPU utilisation and VRAM with idle gaps and sync windows shaded, the anchor trajectory, sync durations, divergence, loss and learning rate, host CPU and RAM, and the samples of remote hosts, which a cluster run used to lose. Zoom keeps spikes visible at any scale.
  • Telemetry survives a crash and reaches shared storage during the run. The forensic timeline was RAM-only, so a dying run took its diagnostics with it. Each process now appends samples and events to a bounded ring under ~/.flodl/telemetry/<run>/, off the training thread, and a shipper mirrors that directory to the shared run directory on its own clock. A stalled shared mount can strand the shipper but never a record append or teardown.
  • The graph timing heat map across a cluster. TrainerConfig::profile_graph profiles every rank's training graph with device-side events and ships per-node min and mean to the controller at clean teardown. The dashboard renders one heat map per GPU model, never averaging across models or clocks, with an SVG download that saves exactly what is on screen. Graph::profile_stats() exposes the same accumulator: the minimum across passes estimates a node's intrinsic cost, the mean what it costs in practice. ddp-bench enables it with --save-dashboard.

Benchmarks

  • ddp-bench --olmo-eval in-domain. The OLMo bench scored a held-out domain that a small model on a few tens of millions of tokens barely moves, so the eval curve said little about training. in-domain scores a slice of the training shard at a fixed offset, kept disjoint from the training data by construction. out-of-domain stays the default.
  • The benchmark suite measures the optimizer step and a launch-heavy model, and its report says what is noise. Every tier-1 entry used Adam on models dominated by a few large kernels, so a slow optimizer step on many small tensors could not show. The suite gains resnet20 (65 parameter tensors, built as a graph, SGD with momentum and weight decay) and an optimizer-step table with one row per optimizer (fdl bench --optim), plus fused=True rows for Adam and AdamW so flodl's fused kernel is also compared like with like. The comparison is now three tables (training throughput, optimizer step, memory), with times per step, the tensor count, the delta with its uncertainty, and a verdict that reads within noise when the two sides differ by less than two sigma. fdl bench also no longer exits silently on a driver that reports no default GPU clock. A run now writes to its own gitignored benchmarks/runs/<timestamp>/ and no longer deletes the previous one; fdl bench promote copies a run into the committed benchmarks/published/, where the rounds behind the published v0.3.0 table now live. The Windows bench-publish.ps1 and .cmd wrappers are removed: the reference results come from native Linux, and the README says how to lock clocks by hand on WSL2.

Fixed

GPU, containers and fdl

  • fdl autocomplete no longer deletes the end of a shell rc file. Updating an installed block removed everything from its marker to the end marker, and when the end marker was missing, everything to the end of the file. Only a closed block is removed now; an unclosed marker loses its own line and nothing below it. The file is rewritten in one rename, through a symlink when the rc is one, instead of a truncate followed by an append.
  • --no-prebuild no longer turns each remote host into a controller of its own. With the flag, a remote host runs fdl <cmd> itself, and fdl recognised a launcher-spawned invocation by the rank variable only. Hosts are now started as agents, so the remote fdl took itself for a fresh controller and ran the pre-flight and the build for the other hosts, with its own paths. The guard now covers every role a launcher hands out.
  • fdl libtorch download --path no longer deletes a directory that is not a libtorch. An existing target without the expected version file was removed whole and without a question, so a mistyped path cost whatever was there. A directory that carries no sign of a libtorch install is now refused and left untouched, and --dry-run reports the same refusal. A real replacement happens only once the new build is downloaded and checked, so a failed or interrupted download leaves the previous install in place, and an HTTP error from the download server fails as one instead of as an unreadable archive.
  • fdl --gpus N takes effect under Docker. fdl set the device mask on the host process, but the cuda and rocm compose services did not list the variables, so the container saw every card. Both now pass CUDA_VISIBLE_DEVICES and HIP_VISIBLE_DEVICES, here and in fdl init scaffolds. An existing project needs the same two lines in its own compose file. By @dhekimian ([#97]).
  • LSTM and GRU run on AMD cards. The stacked recurrent layers packed their weights into cuDNN's layout on any GPU, and a ROCm build has no cuDNN, so the first forward failed. The packing is now requested only where PyTorch itself requests it. Found by @dhekimian running the GPU suite on gfx1151 and gfx1201 ([#80]); the tests that assumed one discrete NVIDIA card now hold on an AMD card, an integrated one and a two-GPU box.
  • fdl setup provisions an AMD box that has Docker and no ROCm. The survey does not count a card the host cannot open, so setup saw no GPU and installed CPU libtorch, although the rocm image carries the runtime. With Docker available, setup now provisions for the cards the kernel reports. Reported by @dhekimian ([#80]).
  • A container on an AMD box joins the host's device groups by number. group_add: [video, render] resolved the names inside the image, where the ids need not match the host's, and the container saw no GPU or did not start. fdl now exports the owning groups of the host's device nodes. Reported by @dhekimian, with the fix ([#80]).
  • fdl probe no longer reports a missing C++ compiler as an issue on a box that builds in Docker. It is a warning when Docker is running and an issue otherwise, as in fdl setup. By @dhekimian ([#98]).
  • Switching the libtorch variant rebuilds the FFI shim. In a container the libtorch path is a fixed mount point, so cargo saw no change and kept the shim built against the previous variant. Reported by @dhekimian ([#80]).
  • A cluster build and a local build reach the same image for the same libtorch. The cluster prebuild parsed the CUDA version from the variant's name, which says nothing for a source build, so that one was compiled in the default CUDA image. Both paths now read the variant's .arch.
  • The dataset cache and the telemetry spill survive a containerized run. Both live under ~/.flodl, which no compose service mounted, so every containerized run downloaded its datasets again. The dev, cuda and rocm services now mount the host's directory, and a fresh box creates it as the user ([#96]). Reported and fixed with @dhekimian ([#80]).
  • FLODL_HOME relocates the dataset cache and the telemetry spill too. fdl honoured it for libtorch variants while the library kept writing under ~/.flodl. If you already set it, datasets are fetched once more into the new place.
  • A fresh clone no longer ends up with .cargo-credentials.toml as a root-owned directory. Docker creates a missing bind-mount source as a directory; fdl now creates the empty file first. Reported by @dhekimian ([#80]).
  • A native entry: line is run by a shell. It was split on spaces and executed directly, so --features "$FDL_GPU_FEATURE" reached cargo as literal text and native mode failed. Reported by @DhruvDh ([#80]).
  • fdl recognises a Podman container as a container. It looked for Docker's marker file only, so inside Podman every docker: command tried to start a container from within one.
  • fdl <cmd> -h had lost every binary-backed option list. The schema probe did not resolve the docker: service the way the run path does, failed, and help quietly rendered no options. The probe now resolves it identically, and a page view or a tab-press never starts a container for it.
  • ddp-bench fails when nothing ran. A box where every requested mode was skipped printed skipping and exited 0. A sweep that skips some cells and runs others is unchanged. Reported by @dhekimian ([#80]).
  • Graph profiling on CUDA times execution, not the launch. The profiler was a host clock around each node call while CUDA launches are asynchronous, so it measured the enqueue. GPU forwards now bracket every node with device-side events, and the node sum equals the pass total. Timings resolve one pass behind and the training loop never synchronizes for them. Profile says which clock produced it (source: ProfileSource), the one compile-visible change for code that constructs Profile literally.

Cluster runs

  • A model that went NaN or infinite stops the run. The divergence between a rank and the average was computed as zero when the norms were not finite, so the guards read a dead model as perfectly converged and the run spent the rest of its budget averaging it into every rank. Each rank now fails at the first sync where a norm is not finite, with a message naming the usual causes, and the run ends with an error. This holds on both averaging backends, when divergence is measured.
  • A run waits for its final checkpoint, and fails if it could not write it. On the CPU averaging path the consensus bundle and its .meta.json are written by background threads that nothing waited for, so a run could exit 0 with a .tmp file on disk and no bundle. The launcher now waits for every checkpoint writer before it reports the result. A run that trained to the end but could not write its last bundle, model or meta, returns an error; an earlier failed write that a later bundle replaced stays a warning.
  • A cluster run that stops before its last epoch is a failed run. Ranks that give up exit clean, so a run that lost a host at epoch 42 of 200 ended with exit code 0 and ddp-bench printed a done: line. The launcher now returns an error when training did not reach its last epoch, which reaches DdpHandle::join and the exit code. An explicit DdpHandle::shutdown stays a clean cancel, and a coordinator error or panic fails the run the same way.
  • A crashed rank no longer ends a CPU-averaging run for the survivors. The controller read any rank exit as the end of training and closed every connection, so one killed process ended a cpu-sync, cpu-cadence or cpu-async run within seconds. An exit now only takes that rank out of the reduce barrier, and the run finishes as a degraded run.
  • A dead rank's work that never reached a consensus is trained again. The survivors were handed the samples a dead rank had not finished, but not those it had trained since its last averaging, whose effect died with the process. The coordinator now tracks samples trained but not yet averaged and returns them on a death. On the CPU backends an epoch closes when its work is averaged, not when it is reported. NCCL runs keep closing on reported completion for now.
  • A host that dies without closing its connections no longer takes the run down. A powered-off box or a network partition sends no reset, so writes to its ranks eventually blocked for 30 s on the thread that keeps the healthy ranks' liveness beacon going, and they gave the coordinator up for dead. A failed write now closes the connection, a dead rank's connection gets a 250 ms write bound, and the launcher stops waiting on a host whose ranks are all dead. The same bound applies inside a host: a local rank that stops reading no longer stalls its siblings.
  • The coordinator reports how long the ranks went without hearing from it. A rank gives the coordinator up after 30 s of silence, so the longest gap between two beacons says how close a run came: -v prints it at the end, and it is printed as it happens from 5 s. Two causes of long gaps are closed: the dead-rank scan no longer runs on liveness stamps a stalled beacon has aged, and under nccl-cadence the wait before a reduce no longer holds the cohort for a timing sample that cannot arrive.
  • The end-of-run consensus reduce can no longer be skipped by a message-drain race. On a loaded box the coordinator could decide to shut down before seeing a rank's last steps, so the cohort ended without its final reduce and the final eval scored a consensus one window old. The decision now drains timing first. A worker whose control channel disconnects without a shutdown message says so, where it used to exit as cleanly as a natural end.
  • CPU averaging measured its sync time from the wrong signal, which stalled anchor growth. Under cpu-async the ranks train through the averaging, so the clock stopped about one batch in: ElChe was fed about 200 ms against a measured 13.8 s round-trip, and the anchor never grew. The measured duration now spans the whole rendezvous.
  • EpochCallbackPolicy::Fastest elects on measured pace. It resolved to rank 0 at construction, so "fastest" meant "admitted first", and a slow box that dialed first ran every consensus eval. The eval, checkpoint and epoch-callback roles are now elected once, when ElChe's first calibration lands; Rank(n) is unchanged.
  • Two hosts of one run can share a box. Every host's relay bound the same two loopback ports, so a second walk-in in the same network namespace died on Address already in use. That is the shape of a box holding a card from each vendor, one container per vendor. The ports are now distinct per host.
  • A coordinator that fails to start no longer leaves a walk-in cohort hanging. The controller and every connected agent waited on each other forever. The launcher now tells the connected hosts to tear down and exits with the coordinator's error, and formation stops waiting once a rank is reported dead before its relay dialed in.

Training

  • A graph node with two tags keeps one name. Parameter and buffer names are prefixed by the node's tag, and with two tags the prefix followed the iteration order of a hash map, which changes from process to process: a checkpoint saved under one tag could fail to load under the other. A tag written by the user now wins over a generated one, and among those the smallest name. Graphs with one tag per node are unaffected.
  • A tag spelled like another node's generated id fails the build. Tags and generated node ids both prefix parameter names, so a first layer tagged linear_2 and an untagged second layer both named their parameters linear_2/..., and the graph built without a word. The build now returns an error naming the tag.
  • A single-device cooperative Worker reports its epochs. poll_metrics and epoch_metrics were always empty below two GPUs, so a loop written for a cluster saw no loss on one device (ddp-bench --tier cooperative printed loss=0.000000). Each epoch now yields one EpochMetrics there too, in the cluster shape with one rank.
  • A single-device run honors save_path and resume_from, and scores its final model. Below two GPUs the trainer ignored both: nothing was written, and a resume retrained from epoch 0 without a word. The run now writes the same bundle a cluster does, at the end and every checkpoint_every epochs, and resumes at the first unfinished epoch with the scheduler's step clock restored. Bundles move both ways between one device and a cluster. A final bundle that cannot be written fails the run, as does a resume_from whose meta cannot be read. The cooperative Worker does the same on one device: periodic bundles on the epoch boundary, the final one at finish. eval_fn also runs once on a managed run, on the finished model, when the cadence did not already score it.
  • cast_parameters and Parameter::to_device no longer freeze the model. Both ran their conversion with gradient tracking on and installed the result as the parameter. That result carries autograd history, so it is not a leaf and never receives a gradient: training ran, the loss stayed constant, and nothing reported it. The shipped mixed_precision example trained nothing for this reason. A parameter's replacement tensor is now detached from its history first. Module::move_to_device already did this and was not affected.
  • The Adam kernels reject lists of different lengths. Tensor::fused_adam_, fused_adamw_ and adam_step_batched checked the step counts only, and the C++ side reads every list as deep as the parameter list, so a shorter gradient or moment list was read past its end: undefined behaviour from safe code. The optimizers always built equal lists, so this affected direct callers. They now return an error.

Walk-ins and fdl join-config

  • A walk-in's first dial no longer dies on Host key verification failed. Every ssh a fdl join makes is non-interactive, so a box that had never seen the controller failed on first contact. StrictHostKeyChecking=accept-new is now the default: the key is recorded on first use and a changed one is refused. An explicit setting in ssh.options still wins.
  • fdl join-config --regen revokes the key it replaces. A regenerated key was appended beside its predecessor, which kept admitting while the report said it no longer did. The install now removes the previous key in the same atomic rewrite and reports what became of it. Every file holding the admission token is written 0600.
  • fdl join-config no longer emits a daemon-level guardrail for a door on port 22. The sshd drop-in scopes its restrictions by port, so on port 22 it would have applied them to every login on the box. The generated file now says why nothing is installed and recommends a dedicated port; the key line carries the whole guardrail on 22.
  • fdl join-config's door check works on OpenSSH 10.5. That version prints sshd -T keywords in their documented case, so a lowercase match printed nothing and read as a door without its guardrail.
  • A join window with min_rank_start: 1 is refused when it opens. A one-rank world has nothing to average with; the window used to open, admit a walk-in and panic at the start. The minimum is now 2, and the launcher answers a one-rank world with an error naming the fix.
  • A binary's pre-run GPU gate no longer defeats the model-signature probe. A main() that bails on the local GPU count before Trainer::run exited 0 with no signature, and the join proceeded unguarded. flodl::distributed::launcher::model_sig_probe_requested() lets such a gate step aside for the probe.
  • A standing --persist walk-in re-dials 5 s after a clean run. The backoff doubled after every attempt, so a fleet chaining short runs waited longer each time for windows that were already open. A completed run now resets it.

What's Changed

  • site: version the guide in the URL, permanently + welcome AMD, honestly by @fab2s in #57
  • join-config: --list + --dry-run, the wizard's read-only companions by @fab2s in #58
  • monitor: spill the timeline to a node-local JSONL ring for crash fore… by @fab2s in #59
  • Pre scratch by @fab2s in #60
  • distributed: the end-of-run reduce decision drains timing first - a t… by @fab2s in #61
  • distributed: an aggregated epoch is the run tail - the forced post-ag… by @fab2s in #62
  • monitor: the envelope reads without draining, and the graph profiler … by @fab2s in #63
  • Cpu sync timing by @fab2s in #64
  • distributed: the final eval fences the consensus writeback, and the f… by @fab2s in #65
  • site: a wrapped code span ending in half-rendered two guide pag… by @fab2s in #66
  • libtorch: linux ARM lands as a wheel repackage - the CPU dir names it… by @fab2s in #67
  • probe: a walk-in learns about a missing sshfs/rsync/git before it dia… by @fab2s in #68
  • cluster-test, going live by @fab2s in #69
  • flodl-hw: one host RAM probe for Linux, macOS and Windows, read throu… by @fab2s in #73
  • flodl-hw: one CPU probe names and counts the CPU on Linux (ARM includ… by @fab2s in #74
  • ci: os-matrix failures print their diagnostics, and the sshd check sh… by @fab2s in #76
  • ci: the rocky legs parse the sshd drop-in with a real daemon, and a l… by @fab2s in #77
  • Dual-license flodl under MIT OR Apache-2.0 by @fab2s in #75
  • distributed: the round-frame collect loop passes clippy on Rust 1.100 by @fab2s in #79
  • distributed: a cluster run that stops before its last epoch fails ins… by @fab2s in #78
  • fdl: a containerized run keeps its dataset cache and telemetry, joins… by @fab2s in #81
  • fdl: setup provisions a Docker-only AMD box, a native entry line runs… by @fab2s in #82
  • fdl: the ROCm image defaults to 10.2 and follows a per-variant runtim… by @fab2s in #83
  • Solo epoch splits by @fab2s in #84
  • fdl: a checkout between releases builds its own fdl, a binary older t… by @fab2s in #85
  • Amd summary figures by @fab2s in #86
  • fdl: probe calls a working box ready, and holds a cluster host to the… by @fab2s in #87
  • rnn: LSTM and GRU run on ROCm, and the GPU suite holds on AMD, integr… by @fab2s in #88
  • fdl: the GPU suite runs every step and names the failures, and TunableOp reaches the ROCm container by @fab2s in #89
  • distributed: two hosts of one run can share a box, and a failed coordinator no longer hangs a walk-in cohort by @fab2s in #90
  • flodl-sys: the shim builds against libtorch 2.11 to 2.15 by @fab2s in #91
  • ddp-bench: the solo modes are compared as distributions, since GPU training does not repeat run to run by @fab2s in #92
  • ddp-bench: a model runs its own default through fdl, --quick runs its own short profile, and the LR no longer drops with epochs on scheduled models by @fab2s in #93
  • ddp-bench: a sweep trains each cell in its own process, and the dead validate and baseline flags are removed by @fab2s in #94
  • tests: the two NCCL via_coord smokes use the session salt their relay does, and the cluster-test overlay runs the NCCL unit tests by @fab2s in #95
  • prefetch: upload synchronously on an integrated GPU by @dhekimian in #99
  • probe: a missing C++ compiler is a warning when Docker can build by @dhekimian in #98
  • compose: pass the device mask from --gpus into the GPU containers by @dhekimian in #97
  • fdl: the options probe creates flodl's home as the user, like every other container by @dhekimian in #96
  • changelog: the unreleased section is consolidated and credits the AMD testers, and ddp-bench's data banner says gpu-preload only where it is true by @fab2s in #100
  • trainer: precision is a setting, with bf16 mixed precision as its first reduced type by @fab2s in #101
  • optim: SGD updates a parameter group in a few batched kernels, not a loop over parameters by @fab2s in #102
  • bench: the suite measures the optimizer step and a launch-heavy model, says what is noise, and keeps published runs by @fab2s in #103
  • optim: RMSprop and Adagrad step in a few batched kernels, Adam no longer blocks on its step counts, and the benchmark compares fused Adam like with like by @fab2s in #104
  • optim: NAdam and RAdam step in a few batched kernels, and Adam calls its own fused kernel by @fab2s in #105
  • optim: NAdam and RAdam follow PyTorch's update rule by @fab2s in #106
  • distributed: a CPU-averaging reduce hashes with the CPU's SHA extensions, once per broadcast, and says where its time goes by @fab2s in #107
  • nn: a cast or moved parameter keeps training, and the Adam kernels reject lists of different lengths by @fab2s in #108
  • fdl: a libtorch download never deletes a directory that is not a libtorch, and replaces an install only once the new one is checked by @fab2s in #109
  • distributed: a run waits for its final checkpoint, model and meta, and fails if it could not write it by @fab2s in #110
  • distributed: a single-device run honors save_path and resume_from on both tiers and scores its final model, and --no-prebuild no longer makes a remote host a controller by @fab2s in #111
  • fdl: fdl ui requires a session on every route, and a lost one is recovered with fdl ui --url by @fab2s in #112
  • graph: a node with two tags keeps one name, and fdl autocomplete no longer deletes the end of a shell rc file by @fab2s in #113
  • fail loudly: a model that went NaN or infinite stops the run, and a tag spelled like another node's id fails the build by @fab2s in #114
  • amp: f16-mixed precision with a per-rank loss scaler, and GradScaler unscales in one kernel by @fab2s in #115
  • test: the f16 worker test starts from fixed weights, so its first step cannot overflow by @fab2s in #116
  • test: the stage timer test no longer depends on how long a sleep takes by @fab2s in #117
  • Add native Apple MPS support by @newQuery in #72
  • distributed: a single-device cooperative Worker reports its epochs through poll_metrics by @fab2s in #118
  • Release 0.9.0 by @fab2s in #119

New Contributors

Full Changelog: 0.8.0...0.9.0