Odyssey Route-B / QLAF Hybrid Recurrent LLM β Architecture, Triton Kernel Optimization & Multi-Seed Scaling Case Study
Portfolio Case Study Note: This repository contains the architectural specifications, disassembled Triton PTX/SASS Tensor Core audits, multi-seed pretraining convergence logs, and long-context benchmark telemetry produced during a 6-month client engagement (MayβOct 2026). To respect client IP and patent-pending core modules, proprietary model weights and internal recurrent cell source files are omitted in favor of verifiable benchmark telemetry, validation reports, and compiler inspection tooling.
Client & Objective
Engaged across a 6-month campaign (MayβOct 2026) to architect, optimize, and validate the Odyssey Route-B / Quantum-Like Attention Framework (QLAF) hybrid recurrent LLMβspanning low-level custom Triton Tensor Core (mma.sync / HMMA) kernels and CUDA Graph decode managers to autonomous multi-seed 1.3B pretraining (225,000 steps up to 65,536 context length) and 7B / 70B architecture scaling on dedicated NVIDIA A100 80GB infrastructure.
System Architecture Overview
flowchart TD
subgraph Input["1. Input & Progressive Curriculum (4k -> 65,536 -> 128k+ Tokens)"]
A["Packed Token Stream (B, T)"] --> B["Chunked Parallel Prefill Engine"]
end
subgraph HybridStack["2. Odyssey Route-B / QLAF Hybrid Layer Stack (75% QLAF / 25% FlashAttention)"]
B --> C["Layers 0, 1, 2: Recurrent QLAF Cell + Top-1 Aion Router"]
C --> D["Parameter-Free Recurrent RMSNorm (Eliminates Long-Context Loss Spikes)"]
D --> E["Parallel Associative Prefix-Sum Scan (Prefill) / Constant-State Update (Decode)"]
E --> F["Layer 3 (Every 4th Layer): Exact Causal FlashAttention Anchor"]
end
subgraph TritonEngine["3. Custom 3-Stage Tiled Triton MMA & CUDA Graph Decode Stack"]
F --> G["Stage 1: _decode_project_kernel (HMMA Tensor Core Lowered, 0 Spills)"]
G --> H["Stage 2: _decode_strict_fused_kernel / INT8 Dynamic State Quantization (<32KB Shared Mem)"]
H --> I["Stage 3: _decode_readout_tsc_kernel (BLOCK_H=128 Tiled Readout)"]
I --> J["Static CUDA Graph Replay Manager (513.26 tok/s Peak Decode on A100)"]
end
Key Engineering Milestones
1. Kernel Optimization & Associative Prefix Scans (Full Report)
- Parallel Associative Prefix-Sum Scans: Replaced sequential token-by-token Python recurrent loops with parallel associative prefix-sum scans during prefill.
- 3-Stage Tiled Triton MMA Kernels: Engineered custom projection, fused state-update, and TSC readout kernels (
_decode_strict_fused_kernel,_factorized_mid_kernel,_factorized_out_kernel). RefactoredH-dimension readout tiling into staticBLOCK_H = 128chunks, cutting shared memory usage from270 KB(above the A100163 KBphysical ceiling) to<32 KBwith zero register spills confirmed vianvdisasmPTX/SASS audits. - Dynamic INT8 State Quantization & CUDA Graph Managers: Eliminated CPU kernel launch bottlenecks via static CUDA Graph capture and factorized decode layer budgets, achieving 513.26 tok/s peak decode throughput on NVIDIA A100 (a 2.50x speedup over base strict decode, outperforming Mamba SSM at
467.19 tok/sand standard Transformer at419.15 tok/s).
2. Architecture Scaling β 7B & 70B Parameters (7B Report | 70B Report)
- Memory-Efficient Scaling to 70B: Engineered activation gradient checkpointing and constant-memory recurrent state caching up to 70B parameter configurations on A100 80GB hardware.
- Parameter-Free Recurrent RMSNorm: Integrated parameter-free RMSNorm directly into the causal recurrence and Triton JIT kernels to prevent state magnitude explosion and eliminate loss spikes across ultra-long sequences.
- 128k+ Context Window Benchmarks:
- At 7B Scale (128k Context): Achieved 464.82 tok/s decode throughput (4.74x faster than Transformer baseline at
97.98 tok/sand 3.27x faster than Mamba at142.49 tok/s), 5.09x faster prefill (10.10svs.51.45s), and 45% lower peak VRAM (12.52 GBvs.22.89 GB). - At 70B Config Scale: Demonstrated 4.22x decode speedup (
262.15 tok/s) within a constant 7.22 GB peak VRAM envelope across 32k, 128k, and 1M token context sweeps where dense baselines hit driver-level OOM at 8k+ tokens.
- At 7B Scale (128k Context): Achieved 464.82 tok/s decode throughput (4.74x faster than Transformer baseline at
3. Autonomous 1.3B Multi-Seed Pretraining at 65k Context (Full Report)
- 225,000 Total Steps Across 3 Seeds (
42,100,2026): Managed end-to-end pretraining of the 1.3B Hybrid QLAF-FlashAttention model (75% recurrent QLAF / 25% exact causal FlashAttention interleaved at layers 3, 7, 11). - 11-Stage Progressive Context Curriculum: Dynamically scaled sequence length from
4,096$\rightarrow$8,192$\rightarrow$12,288$\rightarrow$16,384$\rightarrow$20,480$\rightarrow$28,672$\rightarrow$32,768$\rightarrow$40,960$\rightarrow$49,152$\rightarrow$57,344$\rightarrow$65,536 tokens (65k)with dynamic sequence packing. - Diagnostic Health Gates & Self-Healing Containers: Programmed automated in-loop diagnostic gates (monitoring gradient norm health
0.0052 β 0.0721, Top-1 Aion Router linear entropy decay, and multi-depth alphanumeric NIAH probes) alongside self-healing Docker entrypoints with atomic checkpoint recovery to Hugging Face storage.
Results & Impact
- 100.0% Exact Needle-in-a-Haystack (NIAH) Recall: Verified across 16k, 32k, and 65,536 sequence lengths across all three 1.3B validation seeds (
42,100,2026). - 16.1 GB of Model Checkpoints Published to Hugging Face: Surpassing 20,000+ monthly downloads on the Hugging Face Hub (
apache-2.0).
Hugging Face Hub Publication & Multi-Seed Verification
1.3B Multi-Seed Pretraining & Downstream Evaluation Leaderboard
| Validation Seed | Pretraining Steps | Max Context Length | 16k / 32k / 65k Needle Recall | Final Loss | Perplexity | Zero-Shot MMLU (500-Sample) | Campaign Status |
|---|---|---|---|---|---|---|---|
| Seed 42 | 75,000 / 75,000 |
65,536 tokens (65k) |
100.0% (J3K9P2) |
1.4462 |
4.2469 |
23.8% |
Completed & Verified |
| Seed 100 | 75,000 / 75,000 |
65,536 tokens (65k) |
100.0% (J3K9P2) |
0.5186 |
1.6797 |
28.4% |
Completed & Verified |
| Seed 2026 | 75,000 / 75,000 |
65,536 tokens (65k) |
100.0% (J3K9P2) |
2.0445 |
7.7253 |
23.4% |
Completed & Verified |
| Campaign Mean | 225,000 Steps Total |
65,536 tokens (65k) |
100.0% |
1.3364 |
4.5506 |
25.2% |
All 3 Seeds Completed |
Disassembled Triton Tensor Core (PTX & SASS) Audit Summary
Audited via nvdisasm and scripts/inspect_triton_assembly.py on NVIDIA A100 (sm_80):
| Triton Kernel | Target Arch | Registers | Register Spills (ld.local/st.local) |
PTX Tensor-Core Instructions | SASS Tensor-Core Instructions | Lowering Status |
|---|---|---|---|---|---|---|
_decode_strict_fused_kernel |
sm_80 |
211 | 0 (None) | mma.sync (48x), ldmatrix (8x) |
HMMA (160x), LDSM (36x) |
Verified Tensor Core |
_decode_project_kernel |
sm_80 |
40 | 0 (None) | mma.sync (8x), ldmatrix (4x) |
HMMA (8x), LDSM (4x) |
Verified Tensor Core |
_decode_readout_tsc_kernel |
sm_80 |
75 | 0 (None) | mma.sync (24x), ldmatrix (7x) |
HMMA (144x), LDSM (36x) |
Verified Tensor Core |
_prefill_project_kernel |
sm_80 |
35 | 0 (None) | mma.sync (8x), ldmatrix (4x) |
HMMA (8x), LDSM (4x) |
Verified Tensor Core |
_prefill_readout_tsc_kernel |
sm_80 |
71 | 0 (None) | mma.sync (20x), ldmatrix (5x) |
HMMA (20x), LDSM (5x) |
Verified Tensor Core |
_factorized_mid_kernel |
sm_80 |
13 | 0 (None) | mma.sync (4x) |
HMMA (4x) |
Verified Tensor Core |
_factorized_out_kernel |
sm_80 |
18 | 0 (None) | mma.sync (8x) |
HMMA (8x) |
Verified Tensor Core |
Repository Structure
odyssey-qlaf-llm-scaling-case-study/
βββ README.md # Executive Portfolio Case Study & Architecture Overview
βββ assets/ # Hugging Face Hub & Multi-Seed Leaderboard Screenshots
β βββ hf_downloads_overview.png # 20,069+ monthly downloads & 16.1 GB total checkpoint size
β βββ hf_multiseed_leaderboard.png # 3-Seed 65k NIAH & MMLU leaderboard on Hugging Face
β βββ hf_architecture_and_artifacts.png # Architectural summary & 4.02 GB seed checkpoint manifest
βββ reports/
β βββ 01_Triton_TensorCore_SASS_PTX_Audit.md # Milestone 1: Triton MMA kernels, drift audit & 513+ tok/s decode
β βββ 02_1.3B_MultiSeed_65k_Pretraining.md # Milestone 2: 225k-step 1.3B pretraining & 100% 65k NIAH recall
β βββ 03_7B_LongContext_Scaling_Report.md # Milestone 3A: 7B multi-seed validation & 128k context scaling
β βββ 04_70B_Architecture_Scaling_Report.md # Milestone 3B: 70B scaling & constant-VRAM long-context benchmarks
βββ benchmarks/
β βββ campaign_results_1.3b.json # 3-seed 1.3B final leaderboard metrics
β βββ downstream_eval_results_1.3b.json # 65k NIAH & 500-sample MMLU evaluation results
β βββ benchmark_150m_results.json # 17-configuration serving latency & CUDA Graph ablation dataset
β βββ benchmark_7b_results.json # 7B context scaling (1k to 128k) vs Transformer/FlashAttn/Mamba
β βββ benchmark_70b_results.json # 70B multi-seed & extreme context scaling telemetry
β βββ confirm_decode_mma_output.json # Automated PTX/SASS Tensor Core instruction match confirmation
β βββ logs/ # Step-by-step pretraining convergence logs (Seeds 42, 100, 2026, 777, 999)
βββ scripts/
βββ inspect_triton_assembly.py # Automated PTX & SASS (`nvdisasm`) register/spill/HMMA auditor
βββ make_hash_manifest.py # SHA-256 artifact integrity manifest generator


