mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #588] Reported expert-cache hit rate excludes --pcie-frac experts, so it rises as tok/s falls #275
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#275
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @yannickloth on GitHub (Oct 3, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/588
The serve log's "decode expert cache hit rate" and the
/metricshit_ratefield are the VRAM-resident share of the experts the pool looked up, not the share that avoided the CPU pool. Experts sent over PCIe for the GPU to read (--pcie-frac) are counted in neithercache_hitsnorcache_refused, so raising--pcie-fracremoves misses from the denominator and raises the reported hit rate even though those experts still have to be fetched and computed on the GPU:src/core/expert_source.cpp: in the pool dispatch,if (kind[i] >= 0) { if (kind[i] == 0) ++d.cache_hits; ... continue; }—kind == 1(PCIe) andkind == 2(peer) hit neither counter, and only the CPU path below does++d.cache_refused.d.pcie_expertstracks the offload separately (:1965).src/program/generate.cppcomputes the rate overhits + admitted + refusedand even documents the exclusion: "the VRAM share of the experts the pool looked up while decoding; experts it sent over PCIe for the GPU to read (--pcie-frac) are in neither count".So the metric is correct as a VRAM-residency figure, but it is presented (and shown in the Monitor tab) as a cache hit rate / health number, and it moves in the opposite direction from end-to-end speed when
--pcie-fracchanges. Measured on an RTX A3000 12 GB (Swift 1.5 IQ3_XXS, engine 0.1.35, a representative coding conversation):--pcie-frac0.75 reports a 0.78 hit rate while being the slowest arm. This makes the field hard to use as a calibration/health signal and easy to misread (e.g. "hit rate went up, why is it slower?").
Suggestion
Surface the GPU-offloaded share so the resident rate is interpretable — e.g. append the
pcie/peerdelta to the serve line and expose it in/metrics, or rename the existing field to make the exclusion explicit (vram_hit_rate), or compute the rate over all routed lookups. Happy to implement whichever direction is preferred; I did not want to change the semantics unilaterally since the current behaviour is deliberate. Details/measurements: forks-Strataops/issues/p8-reduce-misses.md.@Niko1221 commented on GitHub (Oct 4, 2026):
Agreed, and thanks for the A/B table. The hit rate keeps its meaning (the VRAM share of the experts the pool looked up), and 0.1.39 shows the PCIe share next to it. The serve log line adds
N more read by the GPU over PCIe or from another GPU (X% of all M routed)./metricsgives each request apcie_share, and the Monitor's column is now "VRAM hit rate" with "+X% PCIe" after it. DETAILS.md explains why a higher--pcie-fracraises the hit rate.