interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / om / gpu / spec / README.md

23 lines · 1817 bytes Raw Blame History Rendered
1# Pure Seeded OM-2 Speculative Decoding Scheduler (`om/gpu/spec/`)
2
3Zero-heap, zero-C, zero-CUDA Omega implementation of DeepInfer's confidence-scheduled variable-length speculative verification engine (`MTPVarlen` from `deepseek-ai/DeepInfer/csrc/engine/mtp_varlen.hpp`) plus a zero-training N-gram prompt-lookup drafter calibrated with per-depth EMA acceptance probabilities.
4
5## Modules
6
7- **`mtp_varlen.om`**:
8 - Hardware decode throughput curve (`specCurveM`, `specCurveMs`, initialized for GB10 via `specInitGb10DefaultCurve` or live-calibrated via `specAddCurvePoint`).
9 - Online `ForwardRuntimeEstimator` (per-graph-size sliding median + median-of-medians slope, clamped `>= 0.0`) and `SamplerRuntimeEstimator` (9-sample sliding median per `num_seqs` with global fallback).
10 - `specSchedule(numSeqs)`: exact `N-2` total-budget (`best_bsz`) + `N-1` per-stream (`specOutLens`) async-decoupled scheduler maximizing `expected_accepted / (baseline_ms + slope_ms * graph_size + sampler_ms)`.
11 - `specVerifyGreedy(...)`: lossless greedy speculative verification (`a + 1` emitted tokens bit-identical to target greedy decoding).
12- **`ngram_draft.om`**:
13 - Longest-suffix (4-gram → 2-gram) prompt/context lookup drafter (`k <= 5`) with online per-depth EMA acceptance calibration (`ngObserveResult`), producing cumulative per-position acceptance rates in the same format as a DSpark Confidence Head.
14- **`check_mtp_varlen.om`**:
15 - Host self-test & negative-control gate (light load full draft, heavy load knee trimming, async `N-2`/`N-1` decoupling, online runtime estimators + negative-slope clamp, lossless greedy verification + N-gram drafter, hostile-input refusal).
16
17## Build and Verify (AArch64 Linux)
18
19```sh
20sh seed/omega-from-seed.sh
21sh om/gpu/spec/build.sh build/spec
22build/spec/check_mtp_varlen
23```