rlx-llada2
LLaDA2 MoE block-diffusion language model for RLX, plus the TIDE predictive expert-offload runtime. Unlike an autoregressive LM, generation runs a masked-denoising loop over fixed-size blocks; the MoE experts can be streamed on/off the GPU per step so large mixture models fit in a bounded VRAM budget.
This is a library crate — no CLI binary. Loading, compiling, and driving generation happen through the runner API below.
Public API
use ;
use Device;
let mut runner = builder
.weights_path // dir with config.json + weights
.device
.batch_seq // batch, max window
.build?;
let gen_cfg = GenerateConfig ;
let = runner.generate?;
# Ok
Both TideRunner and the underlying LLaDA2Runner share the same builder (LLaDA2RunnerBuilder). Other exports:
LLaDA2MoeConfig—from_file/from_json_strHF config.- [
BlockDenoiseLoop] /run_block_diffusion— the block-diffusion denoise driver. build_llada2_forward_graph— the single-block forward IR graph.- TIDE offload —
enable_predictive_expert_offload,preview_predictive_offload, [TideOffloadStats], [gpu_expert_budget_from_device_memory]. Configure via the builder'stide_enable_predictive_expert_offload(max_per_layer, reserve_vram_gb, collect_stats, jump_steps).
How it fits
- rlx-qwen35 re-exports this crate's TIDE offload types for its own MoE checkpoints.
Features
| Feature | Enables |
|---|---|
hf-download |
hf-hub weight download helpers |
metal |
Metal backend (rlx-runtime/metal + rlx-metal) |
mlx |
MLX backend (rlx-runtime/mlx + rlx-mlx) |
cuda, rocm, gpu, vulkan, all-backends |
forwarded to rlx-runtime |
GPU expert-offload is most relevant on cuda (VRAM-bounded); on host/unified memory the budget preview falls back to system RAM.