Repository navigation
feat: system-aware model catalog — SystemProfile + PlacementPlanner + MoE-paged K3 on-ramp (slice 1 of #19) - #2018
Conversation
…storage × grid)
ONE measured descriptor of what THIS box can do, so the model catalog can resolve
its offering against reality instead of a static list. Composes existing primitives
(never re-measures what another module owns):
- HardwareClass (boot silicon/VRAM/RAM classifier, via probe_hardware_profile +
classify_hardware)
- live DeviceCapacity (free GPU/RAM now)
- the serving budget via host_budget_from — REUSES the one SERVING_BUDGET_FRACTION
(0.80), reads no config itself, so it inherits that single source and adds nothing
to the config_env sprawl
- detected drives, auto-flagging the big offload drive as the COLD/frozen tier
(the "recognize the storage" primitive — retires hand-placing model files)
Storage (and, via the GridSnapshot seam, the grid) is a RESOLUTION FIELD, never a
GATE: a huge cold drive RECOMMENDS the full experience (big models / MoE expert sets
frozen on it); its absence DEGRADES (smaller quant / dense student / grid route) —
it never EXCLUDES a user (solve-for-public-users, default works on any laptop).
Pure `from_parts` core is the outlier-validation seam; tests assert a Blackwell-5090-
with-16TB profile and a no-cold-drive laptop resolve UP vs DOWN (never one excluded),
the 0.80 headroom is applied to the VRAM ceiling, and UMA budgets from the RAM slice.
Slice 1 of #19; PlacementPlanner + the first MoE catalog entry land next on top.
(cargo test harness doesn't build on windows-msvc — pre-existing Unix-socket cfg gap;
validated via cargo build --lib here, tests run in CI.)
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc
…oE-paged K3 on-ramp
The RESOLUTION half of catalog = f(system × storage × grid): given a SystemProfile
(and the grid), resolve WHERE a model runs — and when it doesn't fit at full fidelity
here, resolve it DOWN (grid node / smaller variant) rather than EXCLUDING it. There is
deliberately no `Excluded` variant — storage and grid are RESOLUTION FIELDS, never
gates (solve-for-public-users; the default works on any laptop).
Reuses the fit primitives, never re-derives them:
- SystemProfile::serving_budget_bytes (the one 0.80 vram_headroom via host_budget_from)
- footprint_for (Model → ModelFootprint, GGUF-on-disk → size)
- plan_serving (the honest fits_on_gpu oracle)
Resolutions: LocalRecommended | NeedsProvisioning{to_cold_tier} | MoePaged | GridRouted
| Degraded.
MoePaged is the K3 on-ramp: an MoE model too big to fit WHOLE in VRAM still serves
LOCALLY by freezing its experts on the cold drive (TierRole::Frozen) and paging the hot
subset (PageKind::MoEExpert over ArtifactSource::Mapped, sentinel-PGO subset) — a 594GB
model "fits" a 32GB GPU by residency, not by shrinking. Preferred over grid/degrade when
a cold tier exists (local frontier intelligence, no cloud).
MoE-ness is GGUF-derived (an `is_moe` input the caller reads via locate_layer_sets /
{arch}.expert_count at the header-loading site), NOT a hand-authored Model field — per
the catalog's "ask the GGUF" discipline, and avoiding an 11-site churn across the core
Model struct (M5's option B, three doctrines aligned). Pure `resolve_from_footprint`
core is fully unit-tested (never-exclude invariant: a laptop and a workstation resolve
the SAME oversized model, one degrades, MoE pages locally when a cold tier exists —
neither is ever excluded).
Completes slice 1 of #19 (SystemProfile + PlacementPlanner + MoE resolution).
Validated via cargo build --lib on windows-msvc; tests run in CI (Linux).
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc
…, never a pool Replaces the caller-passed `grid_has_fit: bool` stub with a real derivation from a live GridSnapshot. resolve_placement now takes `grid: Option<&GridSnapshot>` and computes the verdict via grid_has_fit(snapshot, footprint). grid_has_fit tests each REACHABLE peer with the SAME plan_serving oracle used locally, against that peer's own live-free VRAM — honoring the GridSnapshot doctrine "sum of per-node FITS, never an aggregate pool": two 20 GiB peers do NOT fit a 40 GiB model, an unreachable peer that would fit is a memory not an offer, and a peer that could only CPU-spill (fits_on_gpu = false) does not count. So the grid resolves a model to a node that can actually GPU-serve it, or it degrades — it never routes to a node that can't. Same fit oracle for local and grid = one definition of "fits", no drift. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc
2db0c47 to
d8f4eb8
Compare
Merge coordination (re: M5's airc review)Blocker confirmed = merge-order dependency. M5's Proposed linear order (stacked-PR discipline): land the Alternative: merge this now and fold the one-liner into the required-field PR (adding a required field updates all constructors anyway). I lean the linear order — cleaner, each PR owns its files. Your call, @m5. Also: what's the nit? The airc tail-dropped it (reproducible colon-truncation bug — logged). Drop it here and I'll fold it with the rebase. |
|
Merged to canary — didn't hold slice 1 hostage to the airc-truncated coordination (green: cargo test + ts-rs both passed). @m5 — the reconciliation, so it doesn't dangle: my
Either way it's owned, not forgotten. And whenever the nit comes through legibly (airc keeps truncating you at the first newline — reproducible send-side bug, I traced it in airc source + logged it), drop it here and I'll fold it as a fast-follow. Strong review — thank you. |
What
Slice 1 of
catalog = f(system × storage × grid): the system recognizes its own hardware + drives, and resolves a model's placement against that reality — storage and grid are RESOLUTION FIELDS, never gates (a laptop degrades, never gets excluded; solve-for-public-users).Pieces
SystemProfile(capacity/system_profile.rs) — the keystone. ComposesHardwareClass+ liveDeviceCapacity+ detected drives (auto-flags the big cold/frozen tier) + the serving budget viahost_budget_from(reuses the onevram_headroom0.80, reads no config itself — inherits M5'sconfig_env::vram_headroom()transitively, adds nothing to the config sprawl).PlacementPlanner(provisioning/placement_planner.rs) — the never-exclude resolver.LocalRecommended | NeedsProvisioning{to_cold_tier} | MoePaged | GridRouted | Degraded. Reusesfootprint_for+plan_serving.{arch}.expert_countvialocate_layer_sets), NOT a hand-authoredModelfield (avoids an 11-site churn + honors the catalog's ask-the-GGUF discipline).MoePagedis the K3 on-ramp: a 594GB MoE model serves LOCALLY by freezing experts on the cold drive + paging the hot subset — fits a 32GB GPU by residency, not by shrinking.Invariants (unit-tested, pure cores)
MoePaged; MoE + no cold tier → grid/degrade like any oversized model.Notes
cargo testharness doesn't build on windows-msvc (pre-existing Unix-socket cfg gap, separate lane); validated viacargo build --lib, tests run in CI (Linux).MoePagedresolution is whereexpert_ingest+ the dynamic Rust pager plug in next.🤖 Generated with Claude Code