interplane.Get Omega
Read in your language

aien-sovereign-core-mv

AienOS host runtime: inference scheduling, paged KV state, the aien CLI and Spark verification tooling. Its inference engine is in alpha testing (DGX Spark GB10); Omega is the implementation destination.

Brought by drakestapleton

branch main Branches Tags History

aien-sovereign-core-mv / om / qwen-native / model / checks / Bounds.lean

24 lines · 1101 bytes Raw Blame History
1import Std.Tactic
2namespace QwenNative
3/-- A positive size is rounded up to the number of 128-element blocks. -/
4def blocks (n : Nat) := (n + 127) / 128
5theorem scale_coordinate {x n : Nat} (h : x < n) : x / 128 < blocks n := by
6 unfold blocks
7 omega
8/-- model/profile.om reserves 1600 slots per layer; an expert owns three consecutive slots. -/
9def expertSlot (expert projection : Nat) := 32 + expert * 3 + projection
10theorem expert_range {e p : Nat} (he : e < 256) (hp : p < 3) :
11 32 ≤ expertSlot e p ∧ expertSlot e p < 1020 := by
12 unfold expertSlot
13 omega
14theorem expert_unique {e f p q : Nat} (hp : p < 3) (hq : q < 3)
15 (h : expertSlot e p = expertSlot f q) : e = f ∧ p = q := by
16 unfold expertSlot at h
17 omega
18theorem layer_slots_disjoint {i j a b : Nat} (hij : i < j) (ha : a < 1600) :
19 i * 1600 + a < j * 1600 + b := by omega
20/-- Sequential generation consumes at most prompt + cap - 1 positions. -/
21theorem context_bound {prompt cap j : Nat} (hcap : 0 < cap)
22 (hadmit : prompt + (cap - 1) ≤ 8192) (hj : j + 1 < cap) :
23 prompt + j < 8192 := by omega
24end QwenNative