arXiv Science⌕ Search

arXiv subjects

Dezhen Lu

Publications and source records attributed to Dezhen Lu.

11 recordsLinked to original sources

FlashM2L: A Parity-Ordered FP64 Tensor-Core Multipole-to-Local Operator That Runs the Black-Box FMM Above the FP64 Vector Peak

In the black-box fast multipole method (bbFMM), multipole-to-local (M2L) translation is a dense sum of small operator products per target box. Although Hopper's FP64 tensor-core instructions (DMMA) exceed the FP64 vector peak, this sum in its usual order is limited by HBM traffic. The article presents FlashM2L, a target-centric DMMA operator whose tiling follows from register and shared-memory budgets and reproduces all seven pilot tilings. A slab-reuse model chooses the term order before the run: grouping the terms by source parity cuts DRAM traffic 5-14-fold. On GH200, FlashM2L runs above the measured FP64 vector peak, a bound for any FP64-FMA implementation of the same multiply-adds: 1.05-1.31x that peak with its expansions in L2 and up to 1.32x with them in HBM. In a preregistered whole FP64 bbFMM written for this study, replacing its DFMA M2L kernels with FlashM2L speeds up the evaluation by up to 1.5x (geometric mean over sizes). At the FMM's accuracy, an INT8 Ozaki-II residue form of the same sum is a further 2.03-2.50x faster than DMMA as an operator at K=173. Every preregistered criterion, with its frozen prediction and outcome, is in an appendix ledger.

cs.DC↗

Refresh or Reweight? Two Kinds of Training-Inference Mismatch in LLM Reinforcement Learning

Reinforcement learning for large language models draws its rollouts from an inference engine that runs older weights at lower precision than the trainer, so every update is off-policy. Existing corrections each repair one failure and expose another: truncated importance sampling slows learning under quantized rollouts, score centering over-sharpens the policy late in training, and trust regions on the lag need a second forward pass. We show that these failures are the uncontrolled terms of a single bias decomposition, and that the mismatch behind them has two kinds that call for different tools: a lag, which a weight refresh removes, and an engine discrepancy, which survives every refresh. We prove that every estimator with bounded importance weights has a bias floor set by the leak, the trainer's probability mass above the weight cap, and that the leak at a refresh and its growth afterwards separate the two kinds online, from the top-K log-probabilities the engine already returns. The resulting method, GRACE, centers every update, refreshes the sampler when the lag part of the leak exceeds a budget, and switches on truncation when the engine discrepancy grows. Across nine settings that span stale, quantized and asynchronous FP8 and NVFP4 rollouts with Qwen3 models up to 8B parameters, GRACE is the only correction that attains the highest accuracy in every one. It matches on-policy training with 7-9 times fewer refreshes under a stale sampler, improves on centered truncated importance sampling by up to 4.4 points under NVFP4 rollouts, and matches the lag-ratio trust region at 11% lower cost per step.

cs.LG↗

Late Activation: A Better Reward-Diversity Trade-off for RL-Tuned Flow Models

Online reinforcement learning (RL) has become a standard way to align text-to-image flow models with human preferences, but it erodes a property users value as much as quality: variety. After RL tuning, the images for one prompt converge on one composition; on SD3.5-Medium tuned with DiffusionNFT, held-out CLIP diversity falls to 38% of the base model's. Rather than retrain with a new objective, as most existing remedies do, we ask where along the sampling path diversity is lost and whether the reward needs that loss. Switching the adapter off by noise level reveals a sharp asymmetry: the collapse happens in the first few high-noise steps, where the adapter steers every seed toward the same layout, while the reward added there is largely redundant, since later steps recover it from the base model's own composition. Training needs these steps; sampling does not. We therefore propose late activation: the base model composes the image and hands over to the adapter below a noise level τ, with no retraining and no extra network evaluations. It keeps 96% of NFT's reward gain with 25% higher CLIP diversity and 23% less drift, beats early stopping and velocity or LoRA-weight scaling at matched reward, matches annealed guidance at half its sampling time, and holds across three rewards and four RL methods. Paired with a stronger training tilt, it improves on default NFT in reward and diversity at once, over ten training seeds per arm. Our noise-level attribution also offers a simple diagnostic of where RL tuning gains reward and loses diversity.

cs.LG↗

FlyingStart: Learned Cross-Token Warm Starts for Fixed-Point Decoding in Recurrent-Depth Language Models

Recurrent-depth language models generate each token by iterating a shared block of layers until its hidden state converges. Inference methods for these models decide when to stop the iteration, yet every token still starts from random noise and pays the full cost of converging. We show that where the iteration starts is a second, independent lever. A token's fixed point is predictable from the state at which the previous token stopped, after a learned change of coordinates, and we introduce FlyingStart, a linear warm start that is fitted in closed form on the frozen model and costs under 5% of one loop. The iteration and its stopping rule are unchanged, so the exit criterion certifies the same distance to the fixed point from any start: a better start removes loops at unchanged accuracy. On Huginn-0125, FlyingStart matches the accuracy of the strongest training-free baseline with 14--19% fewer decoding layers, raises batched throughput by 16--18% in two serving engines, and adds a further 10--14% on top of self-speculative decoding. A contraction analysis predicts the number of loops saved on all four models we study, including one where the prediction was recorded before any evaluation, and token by token on Huginn, and it identifies when a warm start pays off: the saving grows with the number of loops a model needs to converge.

cs.CL↗

PackLoop: Row-Packed Self-Speculative Decoding for Looped Language Models under Concurrency

Looped language models reuse one block of weights T times per token, trading parameters for test-time depth, but autoregressive decoding then pays T sequential passes per token. Self-speculative decoders recover 2-10x for a single request, yet their gains fade as requests share a GPU, and current practice is to speculate less as load grows. We show that what fails under load is the layout of speculative work, not speculation. In concurrent decoding the unit of cost is the row, one request advancing on one loop, which reads that loop's key-value (KV) cache once; additional positions inside a row are nearly free. Pipelined schedules such as the wavefront place every speculative position on a different loop, hence in a row of its own, so each token is still read T times. We present PackLoop, built on one principle: speculate only inside rows that are read anyway. Deep loops accumulate positions and advance them as a block in one row, context-copy proposals join the row that the first loop already reads, and a closed-form admission rule, the economic order quantity of inventory theory, sets how long to accumulate from a cost model calibrated once per engine. PackLoop is exact: in FP32 its output is token-for-token identical to autoregressive decoding, also under sampling and early exit. Across 164 load points spanning three GPUs, four Ouro models, six benchmarks, and contexts up to 32K tokens, one PackLoop configuration is faster than the best existing schedule, chosen per point, at 161 points (median 1.25x, up to 1.76x) and never significantly slower. Its lead grows with concurrency and context length, the regime in which existing self-speculation gains least.

cs.LG↗

How Far Does Second-Order Linear Response Predict Quantization Mismatch? Pre-Registered Measurements on Five Language Models

Serving systems choose a weight format for each model and deployment. A low-cost screen predicts the resulting KL divergence from the unquantized model's Fisher information using $\tfrac12Δ^\top FΔ$, the expansion underlying Hessian-aware and second-order post-training quantizers. We assess the reliability of this screen in GPU batches with channel-wise int8, per-tensor fp8 and group-wise int4 on Qwen3-8B, Qwen3-4B, OLMo-2-7B, Qwen3-32B and Qwen3-30B-A3B. Relative predictions hold across a 16-fold range of perturbation scales, int4 group sizes and rounding modes, while absolute predictions are heavy-tailed. A trimmed average brings 10 of 12 cells on Qwen3-4B and OLMo-2 within 15% of measured KL. The MoE model exhibits nonquadratic response at small perturbations, with int8 KL scaling as $α^{0.63}$. Computing per-sequence gradients in bf16 can cause fourfold prediction errors. We trace these errors to arithmetic in the lower half of the backward pass and eliminate them by using fp32 there. Batch-invariant kernels run at 0.55 times the throughput, while changes in reduction order introduce a floor of 0.17-0.22 nats per sequence. We build a screener with one streamed fp32 Fisher pass, trimmed tensor-block predictions with a band, a flag for aligned tensors and per-layer format allocation. On the unseen Mistral-7B-v0.3 family, all six predictions fall within the band, all three KL budgets are met, and vLLM throughput is predicted within 0.4%.

cs.CL↗

What Sets the Serving Speed of Looped Language Models? Measurements and Optimizations Graded by Exactness

Looped language models apply one block of layers many times per token, so a serving engine pays every per-layer overhead once per loop; we measure serving for Ouro and Huginn-0125 in an open-source looped-model engine and grade our optimizations from bitwise-identical changes to those that require an accuracy check. At batch 1, fusing all loop submissions leaves Ouro throughput at 0.99x; the 5689 small kernels per token are the real cost, and fusing them behind rounding fences raises throughput 1.11-1.59x while 1014/1014 requests remain identical. An approximate fusion is no faster and misses a one-point GSM8K rule on 87 questions (61 and 62 correct versus 64), so we do not ship it. Huginn's released defaults avoid dead KV slots, reuse prefix-cache pages, and serve 1.77-3.16x faster than the base engine; Ouro reaches 1.65-2.15x and agent sessions 1.91-3.21x, while Huginn's noise and prefix-reuse changes stay within one point on all 1319 Huginn test questions; Huginn's packed prefill, -0.61 points on the same questions, meets that rule only on its point estimate. Position-keyed noise makes CPU cache reuse exact but still leaves 20 of 128 GPU full hits different, while loop fusion delays prefill admission and a 64-graph cache prevents eager fallbacks. Under prefill-decode disaggregation ExactLoop reaches up to 3.3x the base throughput with peer error handling disabled, and 3.1x in two of three runs with it enabled. Its transfer budget, sized to hold one request's KV in flight, cuts the commit tail from about one second under the earlier budget to 16 ms (base: 2.8 s), removing the polling rounds that the engine's interval would otherwise impose.

cs.DC↗

Where KV-Cache Error Lives in Looped Language Models: A Diagnostic Study of Ouro and Huginn

A looped language model applies one block of layers 4 times per token and keeps a key/value (KV) plane for each loop. We study where storage error changes the next-token distribution and how shared-weight error accumulates, using Ouro-1.4B (4 loops) on GSM8K and MATH and Huginn-0125 (32 loops) on GSM8K-derived chains, with dense, simulated quantization. Per unit of error, values carry 94% of the diagonal Fisher mass, but measured KL is dominated by keys with larger quantization errors. Local second-order prediction follows the measured KL of typical sequences, including 136 held-out chains, but misses a few confident rows, and a local second-order factor for shared weights at 32 loops ranges from 1.65 (INT8) to 4.09 (INT4), so it depends on the error direction. A cell-level allocator lowers one-step KL at 25-48% of BF16 bytes, while paired task-accuracy comparisons depend on budget and the 25% gap against K4V2 shrinks to near zero under a post hoc answer-extraction check. A later Ouro-2.6B test retains the key/value split but falsifies measured-cost allocation's advantage over Fisher at 31%; across all 21 ledger registrations, 60 of 176 criteria failed.

cs.DC↗

Recency Is the Wrong Axis: A Negative Result on Windowed Deepest-Plane KV Caching in Looped Language Models

Looped language models reuse one block of layers over $R$ recurrent steps but store a key-value (KV) plane for each step. Keeping only the deepest plane shrinks the cache up to $R$-fold. A natural repair, which we call RIPE, keeps every plane for the $W$ most recent positions and shares the deepest plane elsewhere. This repair acts on the wrong axis: across three looped models, the cost of sharing is set by how far the late loops' planes have converged (ripeness) and by which positions share, not by recency. On Raven-Llama the deep planes sit within the bf16 rounding floor, so no window is needed. On Huginn-0125 a 64-position window removes most of a concentrated replay-error tail (9 to 1 positions over 48 prompts), yet in a real self-speculative decoder the policy is slower and larger than the deepest plane alone and not measurably closer to full-cache decoding. On Ouro-1.4B the prompt lies outside any 16-64-position window: on 24 GSM8K questions with a 2048-token budget, the full cache and a FlashLoop baseline finish 23 answers and RIPE at most 2, although physical storage matches the emulated policy bitwise. Sensitivity and ripening models fitted on Huginn and Raven explain their contrast, and Ouro's own report that prompt-side sharing is harmful explains the third. Separately, bf16 execution-shape effects are as large as the cache effects being measured. Recent-window repair of shared-plane caches should not be adopted without a per-model ripeness test. We release ten pre-registered batches with every failed prediction.

cs.DC↗

ScaleRLT: Exact Log-Probabilities and Fast Deferred Rollouts for Reinforcement Learning on Looped Transformers

Looped language models such as Ouro reuse one block of layers several times per token. A rollout engine can batch the deeper loops of several response positions and run them only when a deep readout is due. This deferred schedule is fast, but the learner of an on-policy RL algorithm recomputes the sampled tokens' log-probabilities with a dense pass, and the two computations differ in floating point: in FP32 at 4096 tokens about 18% of the sampled tokens miss a $10^{-5}$ same-weight gate, and with bf16 weights nearly every token does. We use a hybrid learner log-probability, $\ell=\ell_{\mathrm{dense}}+\mathrm{sg}(\ell_{\mathrm{sched}}-\ell_{\mathrm{dense}})$, where $\mathrm{sg}$ denotes stop-gradient. Its value is a no-grad replay through the rollout's own schedule, and its gradient is the dense learner's. The replay reproduces the rollout bit for bit in all 167 FP32 and 28 bf16 real-weight cells we ran on three platforms, including rollouts whose batch shrinks at stop tokens, and the gradient has the same FP32 error as other dense implementations in all 102 pre-registered comparisons from 96 to 4096 tokens; the full GRPO loss of a training step matches a float64 reference to $3.1\times10^{-4}$. On one GPU, deferral raises rollout throughput by $1.47$ to $1.56\times$, and by $1.18$ to $1.54\times$ once every step runs from CUDA graphs, bit for bit. In a two-node GRPO loop, one-wave KV admission and CUDA graphs shorten an update by $2.71\times$ with the gate bitwise at every update, and four nodes keep the update time within 2% at the same per-GPU load. In 100-update runs held-out GSM8K accuracy rose from 23% to 82% with the mixed-depth readout that deferral relies on and from 34% to 90% with the native readout, which reached a higher accuracy in less time. For looped models beyond one node we analyse a ring mapping of layers to GPUs and measure its communication paths.

cs.LG↗

Weight Placement Is Not Enough: Synchronization in Multi-Node CPU Decoding of Ternary LLMs

Ternary LLMs read only a few gigabytes per decoded token, yet on dual-socket servers with four NUMA nodes the fastest ternary runtime we found uses less than half of the memory bandwidth. Placing each weight on the node of the thread that reads it is necessary but not enough: in a decode engine with node-local weights that reuses ik_llama's kernels, threads on two generations of Xeon servers still spend 20-48% of each token waiting at synchronization points. Per-thread barrier traces show that most of the wait is for the slowest threads of each node; the barriers' own latency (microseconds each, but up to 12% of the token for the smallest model) and serial per-node work are smaller parts. On identical kernels, a Megatron-style column split beats a row-owned split without cross-node reductions in every configuration we measured, and isolating the number of barriers shows that most of its gain comes from its threads waiting less for each other and for their node leaders, and only a minority from having fewer barriers. Where decoding is DRAM-bound, the resulting engine is 1.5-2.1x faster than ik_llama with all cores and 1.5-1.9x faster than ik_llama at its fastest thread count (3.2x and 2.8x for a small model that runs from the L3 cache), at the same accuracy and with less energy per token.

cs.DC↗