docs: signed i8 formulas per role — Q/K/V/Gate/Up/Down encoding + MatVec Complete formulas for building signed i8 distance tables: Q: raw cosine → i8 (extern, no gate) K: silu(gate) × K → cosine → i8 (intern, gate-modulated) V: silu(gate) × V → cosine → i8 (intern, gate-modulated) Gate: raw cosine → i8 (IS the gate, topology reference) Up: silu(gate) × Up → cosine → i8 (strongest effect, 33% Δ) Down: raw cosine → i8 (funnel, receives gated result) Per-role scale factors from Qwopus BF16 measured ranges. Gate gets highest resolution (scale=552) because range is narrowest. Signed MatVec + clamp(0) = excitation/inhibition dynamics. Complete layer_forward_signed() showing gate as NARS trust modulator. https://claude.ai/code/session_01ChLvBfpJS8dQhHxRD4pYNp#119
Merged
Conversation
Complete formulas for building signed i8 distance tables: Q: raw cosine → i8 (extern, no gate) K: silu(gate) × K → cosine → i8 (intern, gate-modulated) V: silu(gate) × V → cosine → i8 (intern, gate-modulated) Gate: raw cosine → i8 (IS the gate, topology reference) Up: silu(gate) × Up → cosine → i8 (strongest effect, 33% Δ) Down: raw cosine → i8 (funnel, receives gated result) Per-role scale factors from Qwopus BF16 measured ranges. Gate gets highest resolution (scale=552) because range is narrowest. Signed MatVec + clamp(0) = excitation/inhibition dynamics. Complete layer_forward_signed() showing gate as NARS trust modulator. https://claude.ai/code/session_01ChLvBfpJS8dQhHxRD4pYNp
AdaWorldAPI
pushed a commit
that referenced
this pull request
Apr 6, 2026
role_tables.rs (7 tests): silu(): SiLU activation function gate_modulate(): silu(gate) ⊙ role elementwise build_raw_table(): ClamCodebook → BF16 (Q, K, V, Gate, Down) build_gate_modulated_table(): silu(gate)×Up → cosine → BF16 (Up only) LayerTables: complete per-role table set for one layer GateModulationStats: cells_changed, mean/max delta Per-role encoding (from PR #119 formulas): Q: raw cosine → BF16 (extern, no gate) K: raw cosine → BF16 (attention, no FFN gate) V: raw cosine → BF16 (attention, no FFN gate) Gate: raw cosine → BF16 (topology reference) Up: silu(gate)×Up → BF16 (gate-modulated, the 33% correction) Down: raw cosine → BF16 (funnel) Synthetic test: 91.4% cells changed, mean Δ=0.087, max Δ=0.266 Real Qwopus (measured in other session): 99.2% cells, mean Δ=84.2 u8 Uses: bgz_tensor::stacked_n::{StackedN, ClamCodebook, bf16_to_f32} ndarray::hpc::heel_f64x8::cosine_f32_to_f64_simd 259 tests pass. https://claude.ai/code/session_019RzHP8tpJu55ESTxhfUy1A
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.