Recent ML Advances: Attention Kernels, Agent Training, and Inference
Recent progress in machine learning is changing several parts of the engineering stack at once. Attention kernels reduce the cost of executing an existing model. Training environments make it possible to improve agents against task outcomes. Open multimodal models bring more workloads onto local hardware. Inference-time reasoning allocates additional computation to the problems that benefit from it.
These developments act at different levels, which is what makes them complementary. A model can become cheaper to run without changing its weights, more capable through training, or more reliable through an execution policy that adds tools and verification. Understanding the mechanism identifies where each improvement belongs in an application.
Four places where computation changes
| Development | Level of change | Main benefit | Governing constraint |
|---|---|---|---|
| Attention kernels | Execution of tensor operations | Lower runtime and memory traffic | Hardware and tensor shapes |
| Outcome-based agent training | Learned behavior | Better task completion | Environment and reward quality |
| Local multimodal models | Deployment options | More tasks on smaller hardware | Model fit and input processing |
| Inference-time allocation | Work performed per request | More capability on difficult tasks | Latency, compute, and selection |
The baseline differs in each row. A kernel comparison holds weights and inputs fixed. A training comparison holds the evaluation task and resource budget fixed. A deployment comparison asks whether another model satisfies the application’s requirements. An inference-policy comparison includes all attempts and checks used to produce the answer.
This separation also explains why gains cannot generally be multiplied together. Two changes may reduce the same part of the execution, and an improvement at one layer can expose a bottleneck at another.
Attention as a memory-system problem
Conventional attention forms a score matrix, normalizes it, and multiplies the resulting probabilities by the value matrix. Materializing those intermediates creates substantial off-chip memory traffic. The original FlashAttention algorithm reorganizes exact attention around tiling and online softmax, reducing transfers between high-bandwidth memory and on-chip storage.1
The scale is visible from the intermediate alone. A 32,768-by-32,768 matrix contains about 1.07 billion entries. At two bytes per entry, one such matrix occupies 2 GiB. This calculation describes the straightforward materialized representation for one head, before other tensors are included.
A tiled algorithm works on smaller blocks and retains the running statistics needed to produce the same attention operation. Avoiding the full intermediate reduces both storage and memory traffic. Numerical differences can still arise from floating-point ordering, as with other fused implementations.
This is an execution improvement that can benefit existing weights. Its value depends on how much attention contributes to the workload, which differs between training, prefill, and decode.
FlashAttention-4 and asymmetric hardware scaling
FlashAttention-4 targets Blackwell’s change in the balance between matrix throughput and supporting resources. Tensor-core compute grows faster than some of the bandwidth and non-matrix operations needed to feed it. The work combines algorithm changes with a revised kernel pipeline to keep those resources coordinated.2
The paper reports B200 results against specified cuDNN and Triton baselines. The useful engineering lesson is the dependency between algorithm and hardware: increasing matrix throughput changes which operations must be reduced, overlapped, or reorganized.
The end-to-end gain follows the fraction of time affected. If attention occupies 30 percent of a workload and a new kernel makes it twice as fast, normalized total time becomes:
0.70 + 0.30 / 2 = 0.85
That is an overall speedup of about 1.18x. If attention occupies 5 percent, the same local improvement gives about 1.026x overall. The calculation connects a kernel result to the application profile.
The attention-kernel guide develops the underlying tiling and memory argument. The recent work extends it to a different balance of hardware resources.
Training agents against executable outcomes
An agent produces a trajectory of observations and actions. When the environment can evaluate the result, training can reward completed work: a patch passes checks, a tool sequence reaches a target state, or an output satisfies a verifier.
OpenEnv addresses the infrastructure needed to run these experiments through consistent environment interfaces.3 Observations, actions, resets, and outcomes become repeatable parts of a rollout. That makes it easier to collect experience across tasks and compare changes in the policy.
The environment defines the learning signal. In a coding task with reward 1 for passing tests and 0 otherwise, the evaluator must distinguish implementing the feature from changing the tests or hard-coding the fixture. Hidden cases and protected evaluation code preserve that distinction.
Infrastructure reliability matters for the same reason. A dependency service failing during a run creates an unsuccessful outcome even when the proposed code is correct. Recording tool failures, invalid actions, and timeouts separately helps distinguish environment problems from the behavior being trained.
Generalization depends on the task distribution
A training improvement is useful when it carries to new work. Near-duplicate tasks can make a random split unusually easy, so repository, template, or time-based splits can expose different kinds of generalization.
The tool environment also defines the distribution. A policy trained with unrestricted access can behave differently when deployed with a scoped filesystem or fewer tools. Matching the relevant execution conditions connects the training result to the intended agent.
Task success, number of attempts, intervention rate, and resource use describe different aspects of that transfer. A policy may improve completion while using more tool calls, or become more efficient while preserving its success rate. Both changes can be valuable under different operating budgets.
The persistent-agent architecture supplies the corresponding deployment machinery: durable state, recoverable actions, and explicit completion conditions. Better learned behavior and better execution support contribute to the same completed task.
Open multimodal models on local hardware
The Gemma 4 ecosystem announcement describes multimodal model variants and integration across runtimes including MLX and llama.cpp.4 The practical change is a broader set of tasks that can be implemented with locally available weights and execution.
Multimodal deployment includes more than the text decoder. A document assistant may resize an image, encode visual content, retrieve relevant context, and generate a response. Each stage contributes to latency and memory use. A text-only token rate measures only part of that path.
A useful local workload therefore begins with the original input. For a scanned document, this includes rotation, small print, tables, handwriting, and language variation. An answer linked to its supporting page or region connects extraction quality to the evidence in the document.
The model variant and runtime determine which inputs and operations are supported. Quantization changes storage and execution. The complete configuration includes those choices alongside the model’s license and the hardware available to run it.
Capacity creates new application choices
A compact model that meets a task’s quality requirement can shift execution from a hosted service to a local device. This changes latency, availability, and data movement as well as inference cost.
The memory budget includes weights, modality encoders, temporary tensors, and the attention cache. Long inputs can move the limiting factor from weight storage to activations or cached state. The MLX hardware comparison separates capacity, bandwidth, and compute for that reason.
Local execution also changes where document contents travel. The inference step can remain on the device while model downloads, telemetry, or a separate OCR service use the network. Describing those stages independently gives an accurate account of the application’s data path.
The resulting choice is task-specific. A smaller local model may provide the required extraction quality at low latency, while difficult synthesis remains on a larger system. The application can combine those paths rather than assigning every request to the same model.
Inference-time reasoning and parallel attempts
Training determines the model’s behavior, while an inference policy determines how much work it performs for a particular request. Additional reasoning, tools, independent attempts, and verification can improve difficult-task success without applying the same cost to every request.
Meta’s Muse Spark report discusses both efficient reasoning and parallel work on difficult tasks.5 These address two different parts of the budget: the work within an attempt and the number of attempts available for selection.
Under a simplified independence assumption, if one attempt succeeds with probability p, the chance that at least one of k attempts succeeds is:
1 - (1 - p)^k
With p = 0.4 and k = 4, that is about 87 percent. This describes the opportunity available to a selector. The final result also depends on whether the correct candidate can be recognized, and correlated errors reduce the benefit of additional attempts.
Executable code tests can provide a strong selection signal for some tasks. For factual synthesis, retrieving evidence may contribute more than another answer generated from the same information. The most useful additional computation addresses the source of uncertainty.
Allocation across requests
A serving policy can use a short path for routine tasks and reserve verification or additional attempts for a difficult subset. Its performance includes the quality of the routing decision: sending a hard task to the short path can erase the saving through failure or rework.
Total cost per accepted result captures generation, selection, tools, and retries. Wall-clock time distinguishes serial reasoning from parallel work. These measurements explain whether extra computation produces a useful result within the application’s budget.
The recent developments expand the available design space at each layer. Kernels lower the execution cost, environments improve what agents learn, local models change where tasks can run, and inference policies decide where additional work is valuable. Their shared effect is finer control over the relationship between capability and resources.
References
Footnotes
-
Dao et al., FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness, NeurIPS 2022. ↩
-
Zadouri et al., FlashAttention-4: Algorithm and Kernel Pipelining Co-Design for Asymmetric Hardware Scaling, March 2026. Hardware and baseline-specific results. ↩
-
Hugging Face and collaborators, The Open Source Community is backing OpenEnv for Agentic RL. Environment infrastructure for agentic reinforcement learning. ↩
-
Hugging Face, Welcome Gemma 4: Frontier multimodal intelligence on device, April 2, 2026. Model variants and runtime integration. ↩
-
Meta, Introducing Muse Spark: Scaling Towards Personal Superintelligence, 2026. Vendor account of model and inference-time design. ↩
Different engineering interventions can be complementary without being interchangeable.
| Case | Changed object | Validation target |
|---|---|---|
| Attention kernel | The execution of existing tensor operations | Numerical equivalence and workload-specific runtime |
| Agent training | The learned behavior under a task distribution | Held-out task success and transfer |
| Local deployment | Memory placement and runtime integration | Complete working set, compatibility, and latency |
| Test-time allocation | How much work a request receives | Success under a latency or compute budget |
Compare each intervention against the objective at its own layer before composing them.
A deployment experiment connects implementation details to a task-level result.
- Fix the job
Choose the hardware, model, test cases, and resource budget.
- Measure each change
Evaluate one kernel, training, or policy change at a time.
- Test the combination
Check that precision, memory, and scheduling assumptions still hold together.
- Validate the task
Measure success and resource use on the complete application.
Published gains from unrelated workloads cannot be multiplied into a reliable end-to-end forecast.