[PR #118] [MERGED] serve: routing traces from the live server #2464

Closed
opened 2026-11-04 02:00:24 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/118
Author: @maedoc
Created: 9/29/2026
Status: ✅ Merged
Merged: 9/29/2026
Merged by: @Niko1221

Base: main ← Head: routing-trace-serve


📝 Commits (1)

  • 57fa1fd serve: routing traces from the live server (--dump-routing under --serve)

📊 Changes

1 file changed (+14 additions, -0 deletions)

View changed files

📝 src/program/generate.cpp (+14 -0)

📄 Description

Two gaps kept the routing trace one-shot-only:

  • drive_pool_multi, the verify-window dispatch the serve path uses for every decode call, had no trace hook; --dump-routing under --serve opened the file and wrote nothing. Records now go out per token in drive_pool's format (layer, k, ids, weights). The multi dispatch fuses the router weights into the kernel and does not surface them, so records carry unit weights: make_profile.py ranks pairs by routed frequency, which is the signal that matters; a one-shot run still records true weights.
  • the trace sat in a stdio buffer until teardown, so a crash lost the whole session's data. It now flushes at every request's DONE.

Verified live: a serve-mode trace grows per request, parses cleanly in make_profile.py's format (all 48 layers, records per decode position), and captures real multi-session traffic for expert-profile building.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/118 **Author:** [@maedoc](https://github.com/maedoc) **Created:** 9/29/2026 **Status:** ✅ Merged **Merged:** 9/29/2026 **Merged by:** [@Niko1221](https://github.com/Niko1221) **Base:** `main` ← **Head:** `routing-trace-serve` --- ### 📝 Commits (1) - [`57fa1fd`](https://github.com/Niko1221/Strata/commit/57fa1fde2503d1e382abb870695d4835118c883a) serve: routing traces from the live server (--dump-routing under --serve) ### 📊 Changes **1 file changed** (+14 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/program/generate.cpp` (+14 -0) </details> ### 📄 Description Two gaps kept the routing trace one-shot-only: - drive_pool_multi, the verify-window dispatch the serve path uses for every decode call, had no trace hook; --dump-routing under --serve opened the file and wrote nothing. Records now go out per token in drive_pool's format (layer, k, ids, weights). The multi dispatch fuses the router weights into the kernel and does not surface them, so records carry unit weights: make_profile.py ranks pairs by routed frequency, which is the signal that matters; a one-shot run still records true weights. - the trace sat in a stdio buffer until teardown, so a crash lost the whole session's data. It now flushes at every request's DONE. Verified live: a serve-mode trace grows per request, parses cleanly in make_profile.py's format (all 48 layers, records per decode position), and captures real multi-session traffic for expert-profile building. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-04 02:00:24 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#2464
No description provided.