﻿# ONNX CUDA expert substitution: resident replacements are an approximation, not a cache hit

Cold-expert substitution in v0.4.0 changes which expert contributes; distinguish replacement telemetry from cache hits and validate task fidelity.

Author: Retrivium team
Updated: 2026-11-15
Canonical URL: https://retrivium.ai/journal/week46-engine-ort-cold-expert-substitution-fidelity/
Language: en

CUDA Plugin EP v0.4.0 offers opt-in substitution of cold tail experts with GPU-resident experts. The release groups it with approximate routing and warns that results change. A replacement expert is therefore different from fetching the originally selected expert more efficiently: it computes another contribution and needs an explicitly accepted fidelity tradeoff.

## A cache hit preserves expert identity

Caching the requested expert changes where its weights come from, while substitution changes which weights are used. Conflating the two makes an approximation look exact. A proposed telemetry check records originally selected and actually executed expert identities, along with replacement counts. Keep an exact baseline with substitution disabled. That evidence supports an honest explanation of a faster route without claiming it computes the same mixture term by term.

## Rank and threshold define an eligibility policy

The release exposes threshold and minimum-rank controls. These determine where approximation may act, rather than guaranteeing a particular accuracy level. A local study should report both and hold residency fixed when comparing them. Do not select settings solely by maximum throughput on a short sequence. Include task-level evaluation and long-enough generation to observe accumulated behavioural differences, with the same sampling policy across configurations.

## Speculative verification changes the work shape

The linked PR extends substitution coverage to multi-row verification tiles and avoids reusing routes already removed by pruning. A test limited to one decode row cannot establish that interaction. Include a verification-shaped batch with substitution alone, pruning alone and their combination where supported. Compare executed-route telemetry and numerical outcomes, because overlapping approximation policies should not accidentally count an already absent route as another valid candidate.

## Report fidelity without borrowing another model’s sweep

The PR contains attributed throughput and divergence observations for its chosen configuration. They are not guarantees for a different expert model, prompt set or residency ratio. This article reports the mechanism and proposed comparison, without adding a new benchmark or recommending a universal setting. A useful result names the exact baseline, replacement policy, model and task metric so the tradeoff can be reviewed directly.

## Sources

- [ONNX Runtime plugin-ep-cuda/v0.4.0 release](https://github.com/microsoft/onnxruntime/releases/tag/plugin-ep-cuda/v0.4.0)
- [ONNX Runtime pull request #33944](https://github.com/microsoft/onnxruntime/pull/33944)

## Related reading

- [llama.cpp and vLLM: the fixed-concurrency RTX 4090 study](/journal/llama-cpp-vllm-4090-fixed-concurrency-2025-comparison/)
- [ONNX Runtime provider order: graph partition priority is not request failover](/journal/fg2-onnxruntime-provider-priority-subgraph-partition/)
