Dissolve the M0 crates (core/io/proto/telemetry/hip/cli) into the approved service layout abi/kn/ld/cc/rt/lab/sp/nt/tm/gw (docs/ARCHITECTURE.md). - kn: Lean-verified control bus + service registry (bus_lifecycle.lean, 14 thms) and SlabRing/UMA broker; rt: PrefixState + hybrid checkpoint pool. - sp: faithful throughput-aware Adaptive-K port of clover_policy.h (cooldowns, probes, throughput guards) with scenario parity tests. - gw: strata-ctl-compatible wire emitters + serve session FSM (serve_session.lean, 10 thms); abi::serve accepts image= (Vision delta closed). - abi: pure contracts, checked JSON/VTC1/GEN parsers, zero-alloc sampler. - ld/cc: checked safetensors reader + write-once VTC1 writer / O_RDONLY reader. - tm: lock-free telemetry; nt: LyraRpc; lab shares the rt executor core. - Docs: ARCHITECTURE.md decision-complete spec (MoE-only scope, .vbundle, .vplan->CompiledPlan, wire contract, migration map); AGENTS.md Lean rule + tandem/review workflow. Verified live: cargo test --workspace -D warnings = 46/46 PASS; lean proofs = 34 theorems (slab_ring_dma 10, bus_lifecycle 14, serve_session 10), 0 sorryAx, standard axioms only; vetta-infer info on Inkling = 1244 tensors, 18.18 GiB, checked bounds.
32 lines
1.4 KiB
Rust
32 lines
1.4 KiB
Rust
//! `vetta-infer-nt`: LAN bridge to Lyra (docs/ARCHITECTURE.md §2, "Lyra control/co-processor split").
|
|
//!
|
|
//! Compact RPC messages for Sogliola <-> Lyra (`< 1 KB/step` on 2.5 Gbps Ethernet):
|
|
//! remote drafting (same tokenizer as the target), domain routing hints, and
|
|
//! lightweight Vision/RAG offload. The TCP transport lands with M3; the message
|
|
//! contract is fixed here so both ends can be built and tested independently.
|
|
|
|
/// Compact LAN RPC messages for Sogliola <-> Lyra (`< 1 KB/step`, `~0.3 ms` RTT).
|
|
#[derive(Debug, Clone, PartialEq)]
|
|
pub enum LyraRpc {
|
|
DraftRequest { session_id: u64, accepted_tail: Vec<i32>, max_k: u8 },
|
|
DraftResponse { session_id: u64, proposed: Vec<i32>, probs: Vec<f32> },
|
|
DomainHint { session_id: u64, domain: String, confidence: f32 },
|
|
}
|
|
|
|
#[cfg(test)]
|
|
mod tests {
|
|
use super::*;
|
|
|
|
#[test]
|
|
fn draft_roundtrip_shapes() {
|
|
let req = LyraRpc::DraftRequest { session_id: 1, accepted_tail: vec![10, 20], max_k: 8 };
|
|
let resp = LyraRpc::DraftResponse {
|
|
session_id: 1,
|
|
proposed: vec![30, 40, 50],
|
|
probs: vec![0.6, 0.3, 0.1],
|
|
};
|
|
let LyraRpc::DraftResponse { proposed, probs, .. } = resp else { panic!("shape") };
|
|
assert_eq!(proposed.len(), probs.len()); // lossless Leviathan needs one q(x) per proposal
|
|
assert!(matches!(req, LyraRpc::DraftRequest { max_k: 8, .. }));
|
|
}
|
|
} |