Conceptio › Archive › arXiv CS
arXiv CS open access

Shoonya: Zero-Socket In-Process Small Language Models for Graph Databases with Schema-Epoch KV Caching, Live Catalog Logit Masking, and Verifier-Advantage Distillation

Madhulatha Mandarapu et al. · arxiv_cs
arXiv CS · Papers
Open Source ↗Direct PDF ↓
data-managementdatabasessqlstorage
Coupling a property-graph database to an external language-model server imposes a three-part socket tax: serialization overhead dwarfing microsecond graph reads, repeated prefill of verbose schemas, and blind decoding divorced from the live catalog and multi-version concurrency control (MVCC) engine
Conceptio Open Archive

Analyze & explore related research in Conceptio

Connect this record directly into your research workflow or AI agent. Explore citations across open repositories, query full text, and export structured proof bundles.

Shoonya: Zero-Socket In-Process Small Language Models for Graph Databases with Schema-Epoch KV Caching, Live Catalog Logit Masking, and Verifier-Advantage Distillation Madhulatha Mandarapu∗

Sandeep Kunkunuru†

arXiv:2611.28502v1 [cs.DB] 21 Nov 2026

VaidhyaMegha Private Limited, India https://samyama.ai/ November 2026

Abstract Coupling a property-graph database to an external language-model server imposes a three-part socket tax: serialization overhead dwarfing microsecond graph reads, repeated prefill of verbose schemas, and blind decoding divorced from the live catalog and multi-version concurrency control (MVCC) engine. We present Shoonya, from-scratch commercially clean (0.0% non-commercial or share-alike data) tri-modal (Python, Rust, OpenCypher) small language models (16.8M to 1.07B parameters) co-designed with shoonya-infer, a zero-dependency pure-Rust runtime embedded inside the samyama-graph-enterprise address space. Direct GraphStore references unlock three database-native primitives: (1) an epoch-invalidated SchemaPrefixCache over a copy-on-write PagedKvArena accelerating warm CPU time-to-first-token by 4.91×–13.68× with O(1) DDL invalidation; (2) a 36 µs columnar catalog and source-span logit mask enforcing valid ontology identifiers and verbatim spans; and (3) a sub-65 µs read-only MVCC gate serving Tier-0 queries inside 389.8 MiB INT8 RSS (59.8–67.9 tok/s) with 0.0% hallucination leak. Rank-factorized tied embeddings (−74.5% vocabulary weights), atomic indentation tokens (0/421 indentation errors), 4:1 grouped-query attention with 2:1 cross-layer KV sharing (−93.75% INT8 KV memory), Warmup-Stable-Decay training, KnOTS SVD merging, Step-GRPO, and Rust Jacobi SVD governance keep 100% of layers heavy-tailed (α ∈ [1.88, 2.20]). Finally, we synthesize nine lessons across v0.1–v1.0, resolving a Reverse-Token-Density Distillation Trap via teacher scaling and zero-VRAM Verifier-Advantage-Gated Knowledge Distillation (AdvKD), recovering +13.61 MBPP points (33.07%) while reaching 100% validity on enrichment, grounded extraction, and tool planning.

1

Introduction

Modern property-graph databases increasingly embed language-driven workflows alongside declarative query execution: translating natural-language questions into OpenCypher [Francis et al., 2018], synthesizing multi-step agentic tool plans, extracting typed entity-relation triples from unstructured clinical or enterprise text, and enriching domain ontologies [Mandarapu and Kunkunuru, 2026b]. Controlled experiments on clinical question answering establish that knowledge-graph grounding helps language models specifically when decisive institutional facts lie outside pretraining corpora ∗ †

madhulatha@samyama.ai sandeep@samyama.ai

1

[Mandarapu and Kunkunuru, 2026a]. Yet in regulated deployments where private subgraphs cannot leave on-premise boundaries, even self-hosting an open-weight model via a separate localhost HTTP or gRPC server introduces a fundamental socket tax: 1. IPC and serialization asymmetry. An in-memory columnar property graph resolves singlehop adjacency and MVCC visibility in 15–65 µs, whereas loopback JSON serialization, OS socket scheduling, and Python runtime dispatch cost milliseconds per call—precluding tight per-token or per-candidate database verification. 2. Redundant schema prefill. Enterprise graph schemas span hundreds to thousands of tokens. Stateless socket calls re-prefill the schema prompt on every turn, dominating CPU time-to-firsttoken (TTFT), while external KV prefix caches [Zheng et al., 2024] lack transactional coherence when database DDL statements mutate labels or properties. 3. Catalog-blind subword decoding. Out-of-process decoders sample tokens without live access to the graph catalog, hallucinating nonexistent edge labels (e.g., :TREATS instead of :TARGETS), inverting edge arrows, or fabricating ungrounded entity strings. External grammar compilers [Willard and Louf, 2023] require tens to hundreds of milliseconds to rebuild static automata upon schema evolution. Just as DuckDB eliminated client-server wire overhead for analytical SQL by embedding vectorized OLAP inside the host process [Raasveldt and Mühleisen, 2019], we invert that pattern for graph-native AI: embedding a zero-dependency Rust language-model runtime directly inside the graph database’s own Rust address space, sharing zero-copy references to its live catalog and MVCC storage engine. Realizing this architecture without multi-trillion-token opaque web scrapes or copyleft/noncommercial training contamination required building Shoonya from scratch across twelve iterative releases (v0.1 → v0.9.5-AdvKD and Stage-3 1.3B-v1.0). Shoonya pairs a PyTorch/CUDA pretraining and reinforcement-learning stack with an eight-crate zero-external-dependency Rust plane (shoonya-core, shoonya-tokenizer, shoonya-telemetry, shoonya-eval, shoonya-infer, shoonya-search, shoonya-ffi, and shoonya-cli), culminating in zero-socket in-process execution inside samyama-graph-enterprise (v1.15.0) [Mandarapu and Kunkunuru, 2026b] with zero lines modified in the core database repositories. Contributions. This paper documents the complete architecture, data governance, training objectives, longitudinal learnings, and enterprise evaluation of Shoonya: 1. Zero-socket in-process graph-SLM engine (Section 2). Linking pure-Rust shoonya-infer (0 external crates, FP32 parity ≤ 1.29 × 10−5 ) directly to immutable &GraphStore references unlocks: (i) a DDL-epoch-pinned SchemaPrefixCache over a copy-on-write PagedKvArena (4.91×– 13.68× warm CPU TTFT speedup with O(1) DDL invalidation); (ii) a 29.8–56.4 µs live columnar catalog, escaped ToolPlan, and source-span FSM logit mask; and (iii) a 19.6–66.2 µs readonly MVCC execution and coverage gate achieving 0.0% false-positive hallucination leak inside 389.8 MiB RSS (350M INT8, 59.8–67.9 tok/s) and 1, 162.9 MiB RSS (1.3B INT8, 22.0– 25.0 tok/s). 2. Parameter-dense tri-modal backbone and hardware-aligned ablations (Section 3). Co-designing a 50, 264-token CodeTokenizer with disjoint FIM sentinels and atomic indentation tokens (37.9% indentation compression; 0/421 IndentationErrors across MBPP + HumanEval), rank-r factorized tied embeddings (−74.5% to −75.0% vocabulary weights), 4:1 GQA with 2:1 2

cross-layer KV sharing (−87.5% BF16 / −93.75% INT8 KV RAM), 8K YaRN, and WarmupStable-Decay (WSD) scheduling yields 30, 068 tok/s SRAM-fused training and 120, 051 tok/s 4K prefill—avoiding the 28×–35× HBM bottlenecks we measure on sparse-mask and recurrent alternatives. 3. Commercial-clean data pipeline, closed-loop spectral control, and tri-modal RLVR (Section 4). Across 886.47M SPDX-verified commercial-clean tokens (0.0% NC-SA, 0 SHA256 leaks across 593 held-out tasks), we combine online randomized / Cyclic Jacobi SVD spectral regularization (α ∈ [1.85, 3.5]), KnOTS SVD adapter merging with orthogonal nullspace scrubbing (OrthoKnOTS), dense symbolic Step-GRPO, and FLARE entropy-gated active KV grounding—keeping 20/20 (350M) and 24/24 (1.3B) layers collapse-free while 4.0T–5.5T-token external baselines drop into α < 1.85 correlation traps. 4. Longitudinal pitfalls (v0.1–v0.9.4), Reverse-Token-Density Trap, and AdvKD (Section 5). We catalog nine concrete mathematical and training failure modes uncovered across prior versions, culminating in the Reverse-Token-Density Distillation Trap: when a wider teacher has much lower tokens-per-parameter than a smaller student (ρT = 0.059 ≪ ρS = 2.55), un-gated forward KL transfers structural JSON/Cypher formatting (0% → 66.7%) but collapses student MBPP by −12.06 points and Rustc-Exec-64 by −15.62 points. Scaling teacher clean tokens 6.53× (411.04M) and gating teacher KL via zero-VRAM LoRA-toggled Verifier-Advantage-Gated KD (AdvKD) (55.76% routed positions) recovers +13.61 MBPP TTC points (33.07%) and 3.33× Rust execution while achieving 420×–5, 019× higher sample efficiency than CodeGen-350M-mono and SmolLM2-360M-Instruct (Section 6). What this is not and artifact scope. Shoonya is an embedded Tier-0 structural engine and zero-leak hybrid gatekeeper, not a standalone replacement for 70B+ frontier models on opendomain chat or complex multi-hop OpenCypher (OPTIONAL MATCH anti-joins and WITH ... HAVING aggregations), where our sub-65 µs MVCC gate escalates 100% of unverified queries (0.0% leak) to frontier APIs. Open model weights (Apache-2.0), shard provenance manifests, benchmark scorecards, and full-depth Rust SVD spectral certificates are publicly available at https://hugg ingface.co/VaidhyaMegha/Shoonya; the training stack and Rust database integration remain internal to VaidhyaMegha Private Limited / Samyama.ai.

2

Zero-Socket In-Process Graph-LLM Architecture

Figure 1 depicts the single-address-space integration between samyama-graph-enterprise (v1.15.0) and shoonya-infer. Rather than modifying the database engine or crossing an IPC socket, the in-process Rust bridge links samyama-graph-enterprise alongside shoonya-infer inside one OS process, passing immutable &GraphStore references directly into KV cache lookup, token-level logit masking, and MVCC candidate verification.

2.1

Zero-Dependency Pure-Rust shoonya-infer Runtime

To embed cleanly inside enterprise Rust DBMS binaries without C++/CUDA ABI conflicts or supply-chain bloat, shoonya-infer depends exclusively on the Rust standard library (std) plus sibling zero-dependency workspace crates (shoonya-core and shoonya-tokenizer). It implements native .safetensors binary parsing (F32, BF16, F16), symmetric per-row INT8 weight quantization (wo,i ≈ so qo,i ), RMSNorm, half-split RoPE/YaRN, SwiGLU, 4:1 GQA with 2:1 cross-layer KV sharing, rank-r factorized tied embeddings, and an iteration-level ContinuousBatchScheduler. 3

Single Rust OS Process (389.8 MiB RSS @ 350M INT8 | 0 External Crates in shoonya-infer | 0 Socket / JSON IPC) samyama::GraphStore DDL epoch Columnar Props + Adjacency CSR

SchemaPrefixCache

CoW PagedKvArena (4.9×–13.7× TTFT)

Zero-Trust MVCC Gate

Candidate Parse + Snapshot + Intent (0.0% Leak) &GraphStore Live Catalog & DDL Epoch shoonya-infer Worker Pool node_properties_full() (35.8 µs)

OnceLock + AVX2+FMA INT8/BF16

Read-Only MVCC Engine

Catalog & Span Logit FSM

Snapshot Cypher Exec (20.3–64.6 µs)

50, 264-Vocab Subword Trie Mask

Tier-0 Local Frontier API 100% Prec

Safe Escalate

Zero-Copy Read Snapshot

Figure 1: Zero-socket in-process architecture coupling samyama-graph-enterprise (v1.15.0) and shoonya-infer inside one Rust address space. Direct &GraphStore references enable DDL-epoch KV prefix caching, 36 µs columnar catalog and source-span logit masking over the 50, 264-token vocabulary, and sub-65 µs read-only MVCC verification. Across all three dense model tiers—Small (16.8M, L = 4, d = 256), Stage-1 (142.5M, L = 12, d = 768), and Stage-2 (317.3M, L = 20, d = 1024, r = 256)—shoonya-infer reproduces PyTorch FP32 logits to a maximum absolute error of 5.72 × 10−6 , 5.72 × 10−6 , and 1.29 × 10−5 , respectively, with 100% greedy top-1 token parity. Two CPU execution optimizations drive interactive performance: • Runtime AVX2+FMA SIMD kernels. Projection loops probe avx2 and fma CPU flags at runtime (is_x86_feature_detected!), widening quantized INT8 rows into 256-bit SIMD lanes with fused multiply-add without requiring host-specific compiler flags. • Persistent OnceLock worker pool. In Milestone M1 (v0.9.2), parallelizing projections via std::thread::scope spawned OS threads on every layer call, capping 350M INT8 CPU decode at 28.7 tok/s (920.8 ms warm TTFT). Replacing scoped threads in M2 (v0.9.3) with a persistent OnceLock spin-then-condvar worker pool eliminated kernel thread-creation overhead, boosting standalone INT8 throughput to 73.8 tok/s (154.4 ms warm TTFT) and live in-process samyama-graph-enterprise decode to 67.9 tok/s (400.4 ms warm TTFT) inside 389.5–389.8 MiB RSS (1, 162.9 MiB RSS at 22.0–25.0 tok/s for 1.3B INT8).

2.2

DDL-Epoch SchemaPrefixCache over Copy-on-Write PagedKvArena

Motivated by PagedAttention [Kwon et al., 2023] and RadixAttention [Zheng et al., 2024], shoonya-infer stores KV states in reference-counted 16-token pages within a PagedKvArena supporting both FP32 and per-head INT8 pages, with O(1) copy-on-write page splitting (fork_sequence) for multi-candidate test-time compute. Unlike external servers that key cached prefixes only by token IDs, SchemaPrefixCache binds each cached KV handle to the database’s transactional schema epoch:  kcache = graph_id, schema_epoch, FNV1a(xschema ) , (1) where xschema is a compact columnar header synthesized from &GraphStore (for example, (:Trial {enrollment, nct_id, phase, status, title})-[:TARGETS]->(:Disease {category, disease_id, name}), compressing prose db.schema.forLLM() output by 3.4×). At steady-state epoch e, queries bypass schema prefill entirely, cutting CPU TTFT by 13.68× in BF16 (7, 543.3 → 551.5 ms) and 11.66× in INT8 (4, 910.1 → 421.0 ms) on 192-token schemas, and by 4

4.91×–6.04× on compact clinical enterprise headers (6, 917.9 → 1, 193.1 ms on 1.3B INT8; Figure 2a) with 0.0 logit/token drift. When a DDL transaction alters the ontology (adding :Biomarker and :HAS_BIOMARKER in our live evolution check), advancing schema_epoch to e + 1 deterministically invalidates stale KV pages on turn 1 and warms e + 1 on turn 2+.

2.3

Sub-40 µs Live Columnar Catalog and Source-Span Logit Masking

Sharing address space with GraphStore lets the inference bridge inspect node_properties_full() directly in 29.8–37.5 µs (56.4 µs when also indexing live PropertyValue column dictionaries) to build subword trie masks over the 50, 264-token vocabulary across four enterprise surfaces: • Surface 1 (NLQPipeline) & Surface 2 (AgentPlanner ToolPlan). A lexical state tracker constrains tokens after (var: to live node labels L(G), after [: to live relationship types R(G) respecting endpoint topology, and after var. to property keys PG (ℓ) of var’s bound label ℓ. Extending this automaton with JSON-escaped inner-Cypher tracking (M5.A) lifts zero-retraining ToolPlan live MVCC execution on 350M-v0.9.5 from 0.0% to 33.3%. • Surface 3 (ExtractionAgent) & Surface 4 (Enrichment). For entity-relation JSON extraction from document d, an on-the-fly substring index built in < 20 µs restricts "name" string values to verbatim byte spans of d while restricting "label" and "type" fields to L(G)∪R(G), structurally eliminating hallucinated entities and out-of-schema predicates.

2.4

Sub-65 µs Zero-Trust MVCC Execution and Coverage Gate

Every candidate query passes through a two-stage Zero-Trust MVCC Gate prior to local delivery: (1) read-only execution against an in-process GraphStore MVCC snapshot (19.6–66.2 µs mean latency), rejecting any parse, planner, or type error; and (2) an oracle-free structural intent check verifying non-empty projections, ORDER BY/LIMIT alignment on superlative prompts, CONTAINS/OPTIONAL MATCH keyword alignment, and absence of ungrounded training-set literals. Verified queries return locally at Tier-0; rejected queries escalate to a frontier API. Across all benchmarks (Table 3), combining the live catalog FSM with the MVCC gate (Arm 4) maintained 0.0% false-positive leak (100.0% precision when served), whereas disabling the catalog FSM (Arm 3 on v0.9.3 BF16) leaked 8.33% (1/12).

3

Tri-Modal Backbone and Hardware-Physics Design

3.1

Hardware-Physics Language Split, Tokenization, and KV-Frugal Geometry

Shoonya enforces a strict hardware-physics boundary: > 98.5% of pretraining FLOPs remain in PyTorch/CUDA using BF16 Tensor Cores, native 16:4 GQA FlashAttention-2 SDPA [Dao, 2024] (eliminating manual 4× repeat_interleave copies and D2H .item() syncs to save 11.0 GiB VRAM under fullgraph=True torch.compile), while GIL-bound tokenization, Best-Fit Decreasing AST sequence packing, sandboxed execution, and spectral SVD run in our zero-dependency Rust workspace. Four architectural choices maximize reasoning capacity per megabyte: • 50, 264-token CodeTokenizer with atomic indentation. Extending the 50, 257-token GPT-2 BPE table with four disjoint Fill-In-the-Middle (FIM) [Bavarian et al., 2022] and pad sentinels (50257..50260) plus three atomic indentation tokens (<|indent_4|>, <|indent_8|>,

5

(a) Epoch-Pinned SchemaPrefixCache & AVX2 Pool TTFT

(b) In-Process 4-Surface Coverage (0.0% MVCC Leak) M1 (v0.9.2 Unaligned)

350M INT8 (Scoped Threads)

100

350M INT8 (OnceLock+AVX2)

Pass / Validity Rate (%)

920.9 ms (5.3x)

400.4 ms (4.9x)

350M BF16 (OnceLock+AVX2)

612.4 ms (5.9x)

M2 (v0.9.3 EnterpriseNLQ) M4 (v0.9.5-AdvKD / 1.3B-v1.0)

80

60

40

20

1.3B INT8 (OnceLock+AVX2)

1193.1 ms (5.8x)

Cold Schema Prefill TTFT (ms) Warm SchemaPrefixCache TTFT (ms)

0 0

1000

2000

3000

4000

5000

6000

7000

8000

Time-To-First-Token on x86-64 CPU (ms, lower is better)

NLQ Arm 1 NLQ Arm 2 Tier-1 1-Hop AgentPlannerExtraction Enrichment (Raw Syntax) (Compact Syn) Exact (0% Leak) ToolPlan JSONSpan-FSM Abstention

Figure 2: Live zero-socket samyama-graph-enterprise v1.15.0 CPU evaluation. (a) Cold schema prefill vs. warm SchemaPrefixCache TTFT across scoped threads (v0.9.2) and the persistent OnceLock + AVX2+FMA worker pool (v0.9.3/1.3B-v1.0). (b) Four-surface accuracy progression from unaligned M1 (v0.9.2) to M4 (v0.9.5-AdvKD / 1.3B-v1.0) at 0.0% MVCC hallucination leak. <|indent_12|>) compresses indented Python/Rust blocks by 37.9%, reduces whitespace surprisal to 3.1 × 10−4 nats [Mandarapu and Kunkunuru, 2026c], and drives out-of-distribution IndentationErrors to 0/257 on MBPP-Sanitized and 0/164 on HumanEval. • Rank-r factorized tied embeddings. At V = 50, 264, an unfactorized lookup table consumes ⊤ [Lan 77.3% of a 16.8M model and 51.5M parameters at d = 1024. Factorizing E = Etok Pproj et al., 2020] with r = 256 on Stage-2 (L = 20, d = 1024, df f = 4096, 312.1M params) cuts vocabulary weights by 74.5% (51.5M → 13.1M, dedicating 95.8% of weights to trunk layers), and r = 512 on Stage-3 (L = 24, d = 2048, df f = 5504, 1, 065.1M params) saves 75.0%. • 4:1 GQA + 2:1 Cross-Layer KV Sharing + 8K YaRN. Pairing 16:4 GQA [Vaswani et al., 2017, Ainslie et al., 2023] with 2:1 Cross-Layer KV Sharing [Sun et al., 2024] reduces 350M’s 8, 192-token KV cache from 640.0 MiB (MHA) to 160.0 MiB (4:1 GQA) to 80.0 MiB (BF16, −87.5%) and 40.0 MiB (INT8, −93.75%). Fixing wavelength-ramped YaRN [Su et al., 2024, Peng et al., 2024] amplitude scaling (mscale = 0.1 ln s + 1) preserves 8K code perplexity at 1.966 (66.7% early-schema top-5 recall), whereas naive linear position interpolation degrades to 48.37 PPL.

3.2

Six-Arm Iso-Step Architecture and WSD Scheduler Ablation

Table 1 and Figure 3b report a controlled 320-step (1.31M-token) wind-tunnel on RTX 4050 across six architecture/scheduler arms: (1) WSD [Hu et al., 2024] beats Cosine at identical throughput (29, 251 tok/s) by −31.07 PPL (77.68 vs. 108.75), and on continual token extension (320 → 440 steps) WSD’s pre-decay branch reaches 43.33 PPL vs. 70.35 PPL for Cosine warm-restart (which suffers a 5.057-nat LR re-warmup shock); and (2) SRAM-fused Dense-GQA-XKV2-WSD achieves 30, 068 tok/s training and 120, 051 tok/s 4K prefill, outrunning HBM-materialized 96.4%-sparse ProgSparseAttn (3, 399 tok/s at 4K—35.3× slower) and pure-PyTorch Jamba-MambaHybrid (1, 060 tok/s—28.4× slower training despite 40.40 iso-step PPL).

6

Architecture & LR Arm (320 steps, 1.31M clean tok) Dense-GQA-Cosine Dense-GQA-WSD Dense-GQA-XKV2-WSD (Chosen) SparseMoE-8x2-WSD ProgSparseAttn-WSD Jamba-MambaHybrid-WSD

Total / Active Params (M)

Train Speed (tok/s)

Val CE (nats)

Val PPL (↓)

4K Prefill (tok/s)

4K KV RAM (BF16 MiB)

36.7/36.7 36.7/36.7 36.0/36.0 107.5/36.7 36.7/36.7 45.0/45.0

29, 120 29, 251 30, 068 18, 891 16, 594 1, 060

4.689 4.353 4.400 3.952 4.207 3.699

108.75 77.68 81.43 52.03 67.16 40.40

115, 939 118, 350 120, 051 80, 755 3, 399 5, 225

20.0 20.0 10.0 20.0 20.0 4.6

Table 1: Controlled six-arm Iso-Step wind-tunnel on RTX 4050 (BF16). Dense-GQA-XKV2-WSD preserves FlashAttention-2 SRAM fusion while halving KV memory on top of 4:1 GQA (87.5% total BF16 KV reduction) and enabling spike-free WSD continual pretraining.

4

Data Governance, Spectral Control, and Post-Training Stack

4.1

Commercial-Clean Corpus Evolution (v0.4 → v1.0_clean) and Decontamination

Inspired by textbook-quality filtering [Gunasekar et al., 2023], Shoonya scaled pretraining data across four audited generations while holding model geometry constant: (i) v0.4–v0.5 (4, 300 AST-verified Python/Rust functions, 0.43M tokens); (ii) v0.6 (42.66M tokens); (iii) v0.7–v0.8.5 (226.60M 256-ctx + 33.55M 1024-ctx = 260.15M tri-modal tokens: 63.45% Python, 29.03% Rust, 7.52% Samyama OpenCypher across 19 domain KGs); and (iv) v0.9_clean (730.61M tokens) → v1.0_clean (886.47M uint16 tokens across 89 shards). To guarantee unrestricted enterprise deployment in v0.9+, an automated fail-closed SPDX gate (license_gate.py) purged the ∼ 17.5% CC-BY-NC-SA-4.0 and OpenRAIL sources present in v0.7– v0.8.5 (code_exercises, Evol-Instruct), retaining 0.0% NC-SA data (MIT, Apache-2.0, BSD, PSF-2.0, CC0, CC-BY-4.0), including execution-verified OpenCodeInstruct, Strandset-Rust-v1, and 46, 005 OpenCypher queries live-executed in SamyamaClient.embedded(). Pure-Rust shoonya-core packs 100% AST-complete documents via Best-Fit Decreasing at 21.26M tok/s while enforcing normalized docstring and canonical-AST SHA-256 decontamination (0 leaks across all 593 held-out benchmark tasks, dropping 845 colliding documents).

4.2

Closed-Loop Spectral Governance and Interference-Free Post-Training

• Closed-loop HTSR and randomized SVD telemetry. shoonya-telemetry implements both exact Cyclic Jacobi SVD and Halko–Martinsson–Tropp randomized subspace SVD [Halko et al., 2011] (4.75 ms at d = 2048, 3.62 ms at d = 1024), rotating across all L layers during training to track Von Neumann effective rank eRank [Roy and Vetterli, 2007], HTSR power-law tail exponent α [Martin and Mahoney, 2021], Jensen–Shannon head-redundancy penalties, and EWMA+MAD (z ≥ 6.5) loss-spike circuit breaking. Whenever α < 1.90, a closed-loop controller boosts AdamW weight decay by 1.5× (which self-healed an Epoch-8 dip from α = 1.84 → 1.88 in early runs). Figure 3a shows 100% ideal heavy-tailed layers on Shoonya-350M (20/20, ᾱ = 1.983) and Shoonya-1.3B (24/24, ᾱ = 2.075), whereas 4.0T–5.5T-token baselines suffer α < 1.85 over-compression (4/24 ideal layers on Qwen2.5-Coder-0.5B-Instruct, ᾱ = 1.762). • Zero-VRAM LoRA reference, dense symbolic Step-GRPO, and OrthoKnOTS. Post-training combines completion-masked SFT (with <|think|> planning blocks) and execution-guided Step-GRPO [Shao et al., 2024]. Toggling rank-16/32 LoRA adapters off 7

(a) Full-Depth Rust Jacobi SVD Weight Spectra

(b) 6-Arm Iso-Step Kernel Speed vs. Perplexity

2.2

2.0

1.8 Ideal Heavy-Tailed Regime Shoonya-1.3B v1.0 (24/24 Ideal, α=2.075) Shoonya-350M v0.9.5 (20/20 Ideal, α=1.983) SmolLM2-360M-Inst (24/32 Ideal, α=1.881) Qwen2.5-Coder-0.5B-Inst (4/24 Ideal, α=1.762)

1.6

Training Throughput (k tokens/sec)

HTSR Power-Law Exponent α

35 30

29.1k/s (PPL 108.8)

29.3k/s (PPL 77.7)

30.1k/s (PPL 81.4)

25 18.9k/s (PPL 52.0)

20

16.6k/s (PPL 67.2)

15 10 5

1.1k/s (PPL 40.4)

0 0.0

0.2

0.4

0.6

0.8

1.0

Dense-GQA Cosine

Normalized Transformer Depth (l / (L - 1))

Dense-GQA Dense-GQA SparseMoE Jamba-Mamba ProgSparse WSD 2:1 XKV+WSD 8x2 WSD Attn Hybrid

Figure 3: (a) Full-depth Rust Cyclic Jacobi SVD Heavy-Tailed Self-Regularization (HTSR) exponent α across normalized depth. Shoonya-1.3B v1.0 (24/24 layers, ᾱ = 2.075) and Shoonya-350M v0.9.5 (20/20 layers, ᾱ = 1.983) remain strictly inside the ideal α ∈ [1.85, 3.5] corridor, whereas multi-trillion-token sub-500M baselines exhibit α < 1.85 correlation traps. (b) Six-arm Iso-Step kernel throughput vs. perplexity. (set_lora_enabled(False)) evaluates exact reference log-probabilities log πref with 0 MB extra VRAM. Dense three-stage symbolic rewards in shoonya-eval (AST/parse validity +0.15, module/rustc/embedded Cypher execution +0.35, unit-test/tuple match 1.00) prevent sparse-reward advantage collapse (Ai ≡ 0). Domain-specialized Python, Rust, and Cypher LoRA adapters are fused in a shared singular basis via pure-Rust KnOTS [Stoica et al., 2025] + TIES [Yadav et al., 2023], augmented in v0.8.5 with orthogonal null-space scrubbing (OrthoKnOTS, removing 28.3% sign-opposing singular modes while retaining 99.98% capability norm), plus FLARE [Jiang et al., 2023] entropy-gated <|search_query|> active KV grounding (v0.8.0) and zero-credential, zero-egress AWS Spot IMDSv2 atomic auto-resume (< 2.5 s checkpoint flush; same-region S3 presigned sync).

5

Longitudinal Pitfalls, Reverse-Token-Density Trap, and AdvKD

5.1

Eight Clean-Slate Engineering Lessons (v0.1 → v0.9.3)

Building Shoonya iteratively from 16.8M to 1.07B parameters surfaced eight subtle failure modes before Milestone M3 (each permanently locked by regression tests): L1. Double causal shift (t+2) & pad loss (v0.1): Shifting labels in both the dataset loader and TransformerLM.forward trained position t to predict t + 2; single-shift ignore_index=-100 fixed syntax immediately. L2. Non-causal SDPA & bidirectional sliding window (v0.2): Passing is_causal=False when attention_mask=None leaked future tokens (loss → 10−4 , 0% generation); enforcing causal past-only masks fixed autoregression. L3. FIM sentinel collision & mid-AST truncation (v0.3): Reusing <|endoftext|> (50256) for FIM separators caused premature line termination; disjoint IDs (50257..50260) + ASTcomplete packing eliminated mid-expression cutoffs. L4. CTRL repetition-penalty sign inversion & parameter suppression (v0.4): Dividing 8

negative logits by penalty > 1 increased repetition [Keskar et al., 2019], and penalizing prompt tokens suppressed valid reuse of function arguments (arr, target); prompt-exempt piecewise CTRL sampling resolved both. L5. Unseen-identifier O(n) shortcutting & small-suite illusion (v0.4–v0.5): On binary_search, v0.4 synthesized O(log n) halving (Cyclomatic=7, Halstead=280.0), yet on the unseen renamed prompt locate_in_sorted it passed 100% of unit assertions via an O(n) linear scan (Cyclomatic=3, Halstead=155.1)—proving functional tests must be paired with static AST complexity checks. Similarly, v0.5.0 scored 96.9% on 8-task Stage-A at 0.43M tokens while scoring 0.39% on MBPP-Sanitized, motivating our two-stage evaluation gate. L6. Duplicate AS name ClauseConflict (v0.7.0 → v0.7.5): Two-entity Cypher templates projecting v1.name AS name, v2.name AS name triggered engine ClauseConflict, silently zeroing live Cypher execution until distinct semantic aliases were enforced (0.0% → 8.3%, 0 exec errors). L7. Post-RLVR SFT margin softening (v0.8.0 → v0.8.5): Applying cross-entropy SFT after Step-GRPO softened boundary margins on Rust/HumanEval; running Step-GRPO last after OrthoKnOTS scrubbing restored monotonic gains (28.02% greedy MBPP, 4.00% Cypher-100). L8. Compiler-only RLVR Goodharting (v0.8.5 → v0.9.1): Giving full reward to testless Rust snippets taught trivial compilable bodies; capping testless compile reward at 0.35 and requiring #[test] harnesses drove Rustc-Exec-64 to 20.31% TTC (v0.9.3).

5.2

Lesson L9: The Reverse-Token-Density Distillation Trap and AdvKD

Knowledge distillation [Hinton et al., 2015, Agarwal et al., 2024] assumes a larger teacher T (NT > NS ) dominates a smaller student S across token roles because both models are trained near Chinchilla token density ρ = D/N [Hoffmann et al., 2022]. Under strict 0%-NC-SA compute budgets in Milestone M3, our mature 312M student (v0.9.3, DS = 796.7M tokens, ρS = 2.55 tok/param) had 43× higher token density than our newly stood-up 1.07B teacher (1.3B-v0.9.3, DT = 62.9M tokens, ρT = 0.059 tok/param). Because its d = 2048 trunk absorbed four-surface JSON/Cypher syntax rapidly (66.7% ToolPlan/Extraction, 100% Enrichment) while lagging on algorithmic code (10.89% MBPP vs. student 31.52%), un-gated top-64 sequence KL distillation into 350M-v0.9.4 triggered severe capability inversion: Proposition 1 (Logit gradient conflict under reverse token density). At context c with verifiably correct continuation y ⋆ , if the high-density student anchor satisfies pS0 (y ⋆ | c) > pT (y ⋆ | c) due to higher conditional teacher entropy H(pT (· | c)) ≫ H(pS0 (· | c)), minimizing un-gated forward KL (K) (K) (K) (K) ∂LKL DKL (pT (· | c) ∥ pS (· | c)) induces positive gradient ∂z = pS (y ⋆ | c) − pT (y ⋆ | c) > 0 near S,y ⋆ S0 , eroding student probability mass on y ⋆ in favor of unverified teacher tail tokens. Empirically (Figure 4b, Table 2), v0.9.4 gained multi-surface JSON/Cypher formatting (0% → 66.7%) but collapsed by −12.06 points on MBPP TTC (31.52% → 19.46%), −7.93 points on HumanEval TTC (23.78% → 15.85%), and −15.62 points on Rustc-Exec-64 TTC (20.31% → 4.69%) despite retaining 20/20 ideal SVD layers (ᾱ = 1.982). Milestone M4 resolved this trap via two coupled mechanisms: 1. 6.53× WSD continual teacher scaling (1.3B-v1.0-Clean). Streaming unseen v1.0_clean shards across 2× L40S GPUs (385.9M tokens at T = 512, loss 0.8032, α = 3.01 + 25.2M 8K-YaRN tokens at T = 2048, loss 0.7086, α = 3.35; 411.04M cumulative clean tokens) + 9

(a) Longitudinal Scaling Across Fixed 312M–317M Backbone

30

100

Shoonya-350M: Rustc-Exec-64 CodeGen-350M-mono MBPP (335B tok) SmolLM2-360M-Inst HumanEval (4,000B tok)

Accuracy / Validity (%)

Zero-Shot Pass Rate (%)

35

(b) Reverse-Token-Density Trap & AdvKD Recovery

Shoonya-350M: MBPP-Sanitized Shoonya-350M: HumanEval

25 20 15 10

350M v0.9.3 (Pre-KD Anchor) 350M v0.9.4 (Un-gated KD Trap)

350M v0.9.5 (AdvKD, Ours) 1.3B v1.0 Teacher (411M tok)

80

60

40

20

5 0

0 100

101

102

103

Verified Pretraining Tokens (Millions, log scale)

MBPP (TTC)

HumanEval Rustc-64 (TTC) (TTC)

ToolPlan JSON

Extraction Enrichment Span-FSM (Concept)

Figure 4: (a) Longitudinal sample efficiency of Shoonya-350M (0.43M → 796.7M verified tokens) vs. external 350M–360M baselines (335B–4, 000B tokens). (b) Resolution of the M3 Reverse-TokenDensity Trap (v0.9.4) via 6.53× teacher scaling (1.3B-v1.0) and AdvKD (350M-v0.9.5). KnOTS + Step-GRPO lifted teacher MBPP 2.82× (10.89% → 30.74% TTC), HumanEval 1.75× (12.20% → 21.34% TTC), in-process Arm 2 Cypher syntax to 91.7%, and ToolPlan, Extraction, and Enrichment to 100.0%. 2. Zero-VRAM Verifier-Advantage-Gated KD (AdvKD). Evaluating the frozen pre-KD anchor S0 (v0.9.3) at 0 MB extra VRAM via set_lora_enabled(False), we apply teacher top-64 KL (τ = 2.0) strictly where the teacher is both greedy-exact and lower-surprisal than S0 : 



gt = I arg max pT (v | y<t ) = yt ∧ log pT (yt | y<t ) ≥ log pS0 (yt | y<t ) , v∈V

h

(K),τ

(K),τ 

LAdvKD (t) = gt (1 − λ)LCE (pS , yt ) + λτ 2 DKL pT h

(K)

+ (1 − gt ) LCE (pS , yt ) + βDKL pS0

pS

(K) 

pS

i

.

(2)

i

(3)

Gate gt = 1 fired on 55.76% of active tokens while anchoring the remaining 44.24% to S0 , followed by 36 steps of Step-GRPO polish to produce Shoonya-350M v0.9.5-Clean-AdvKD.

6

Experimental Evaluation

6.1

Longitudinal Scaling, AdvKD, and Same-Host Competitor Results (593 Problems)

All models in Table 2 were evaluated back-to-back on the same RTX 4050 host (BF16, t = 0 Std and N = 4 oracle-free Search-TTC) across all 593 SHA-256-decontaminated problems (Stage-A 8, MBPP-Sanitized 257 [Austin et al., 2021], OpenAI HumanEval 164 [Chen et al., 2021], Rustc-Exec-64 64, and embedded Cypher-Bench-100 100): • Longitudinal phase transitions (v0.5 → v0.9.3). Holding the 312M–317M backbone fixed while scaling clean tokens from 0.43M (v0.5.0) to 260.15M (v0.7.0–v0.8.5) to 796.71M (v0.9.1–v0.9.3) lifted MBPP-Sanitized 86.8× (0.39% → 33.85% TTC), HumanEval 43.0× 10

Model (t = 0 Std / N = 4 TTC) (Same-Host RTX 4050 BF16)

Params (M)

Pretrain Tokens

Stage-A (8)

MBPP-San (257)

HumanEval (164)

Rustc-64 (64)

Cypher-100 (100)

Ideal SVD (ᾱ)

356.7 361.8 494.0 494.0

335B 4, 000B 5, 500B 5, 500B

62.5% 87.5% 100.0% 87.5%

22.18% 38.13% 47.08% 42.80%

12.80% 19.51% 27.44% 50.61%

0.00% 15.62% 46.88% 32.81%

0.00% 1.00% 8.00% 0.00%

17/20 (1.92) 24/32 (1.88) 1/24 (1.76) 4/24 (1.76)

Prior Shoonya Lineage (v0.5.0 → v0.8.5-OrthoKnOTS; 317.3M Params) 350M v0.5.0 (Wind-Tunnel Seed) 317.3 0.0004B 96.9% 350M v0.6.0 (42.7M Step) 317.3 0.043B 93.8% 350M v0.7.5-RLVR (KnOTS+GRPO) 317.3 0.260B 87.5% 350M v0.8.0-Grounded (FLARE) 317.3 0.260B 87.5% 350M v0.8.5-OrthoKnOTS 317.3 0.260B 87.5%

0.39% 18.68% 27.24/26.85% 27.63/28.40% 28.02/28.02%

0.61% 8.54% 15.24/16.46% 15.24/15.85% 15.24/17.07%

0.00% 3.12% 9.38% 9.38% 3.12/6.25%

0.00% 0.00% 0.00% 2.00/3.00% 4.00/4.00%

20/20 (2.12) 20/20 (2.03) 20/20 (2.01) 20/20 (2.01) 20/20 (2.01)

Commercial-Clean Shoonya Family (0.0% NC-SA, WSD + 2:1 XKV; Std / Verifier TTC) 350M v0.9.0-Clean-Inst 312.1 0.295B 100/100% 24.90/24.90% 350M v0.9.1-Clean-Inst 312.1 0.797B 100/100% 32.68/33.85% 350M v0.9.2-KnOTS-Think 312.1 0.797B 100/100% 33.46/33.07% 350M v0.9.3-EntNLQ (S0 ) 312.1 0.797B 100/100% 30.74/31.52% 350M v0.9.4-UnGatedKD (Trap) 312.1 0.797B 93.8/87.5% 18.68/19.46% 350M v0.9.5-AdvKD (Latest) 311.7 0.797B 100/100% 30.93/33.07%

17.68/17.68% 21.95/26.22% 19.82/26.22% 18.60/23.78% 13.41/15.85% 17.68/20.73%

6.25/10.94% 8.59/17.19% 10.16/12.50% 16.41/20.31% 3.91/4.69% 9.38/15.62%

1.00/1.00% 1.50/2.00% 1.00/4.00% 1.00/1.00% 0.00/0.00% 1.00/3.00%

20/20 (2.00) 20/20 (1.98) 20/20 (1.98) 20/20 (1.98) 20/20 (1.98) 20/20 (1.98)

1.3B v0.9.3-Clean (M3 Seed) 1.3B v1.0-Clean (Latest)

8.23/12.20% 17.68/21.34%

0.00/0.00% 3.12/3.12%

0.00/0.00% 0.50/1.00%

24/24 (2.11) 24/24 (2.07)

External Sub-500M Baselines (Greedy t = 0) CodeGen-350M-mono [Nijkamp et al., 2023] SmolLM2-360M-Inst [Allal et al., 2025] Qwen2.5-Coder-0.5B [Hui et al., 2024] Qwen2.5-Coder-0.5B-Inst [Hui et al., 2024]

1, 065.1 1, 065.1

0.063B 0.411B

100/100% 87.5/87.5%

9.14/10.89% 28.21/30.74%

Table 2: Complete longitudinal progression (v0.5.0 → v0.9.5-AdvKD and 1.3B-v1.0) and samehost competitor evaluation across all 593 SHA-256-decontaminated problems and full-depth Rust Cyclic Jacobi SVD. (0.61% → 26.22% TTC), Rustc-Exec-64 from 0.00% → 20.31% TTC, and Cypher-Bench-100 to 4.00% (96.0%–99.0% valid syntax), while cutting hallucinated Python identifiers by −91.4% and ECE by −90.6% (0.323 → 0.030). • 420×–5, 019× sample efficiency. At 0.797B 0%-NC-SA tokens, Shoonya-350M v0.9.1-Clean outperforms CodeGen-350M-mono (335B tokens) across every benchmark (+11.67 MBPP TTC pts, +13.42 HumanEval TTC pts, +17.19 Rust pts) and surpasses SmolLM2-360M-Instruct (4, 000B tokens) on Stage-A (100% vs. 87.5%), HumanEval (21.95% Std / 26.22% TTC vs. 19.51%), Rustc-Exec-64 (17.19% vs. 15.62%), and Cypher-100 (2.00%–4.00% vs. 1.00%). Notice also that Qwen2.5-Coder-0.5B Base → Instruct jumps 27.44% → 50.61% on Python HumanEval while regressing 46.88% → 32.81% on Rust and 8.00% → 0.00% on OpenCypher due to Pythondominant chat tuning. • AdvKD recovery (v0.9.5). Shoonya-350M v0.9.5-AdvKD recovers +12.25 Std / +13.61 TTC points on MBPP (19.46% → 33.07% TTC, beating pre-KD v0.9.3’s 31.52%), +4.88 TTC points on HumanEval (20.73%), 3.33× TTC on Rustc-Exec-64 (4.69% → 15.62%), and 3.00% TTC on Cypher-100, while preserving 20/20 ideal SVD layers (ᾱ = 1.983).

6.2

In-Process samyama-graph-enterprise Four-Surface Results

Table 3 reports live zero-socket execution inside samyama-graph-enterprise v1.15.0 over the Clinical Enterprise KG (12 tiered NLQ-to-Cypher tasks + 6 agentic ToolPlan, ExtractionAgent, and Enrichment tasks + live DDL evolution). Shoonya-1.3B v1.0 INT8 (1, 162.9 MiB RSS, 20.3 µs MVCC check) reaches 75.0% raw Arm 1 syntax, 91.7% (11/12) compact Arm 2 syntax, and 100.0% across ToolPlan JSON, source-span grounded Extraction, and Enrichment/abstention. Shoonya-350M v0.9.5-AdvKD INT8 (389.8 MiB RSS, 59.8 tok/s) retains 66.7% raw Arm 1 syntax, 75.0% Arm 2 syntax, 66.7% ToolPlan/Extraction (with M5.A’s JSON-escaped Cypher FSM lifting live ToolPlan MVCC execution from 0.0% → 33.3%), 100%/100% Enrichment, and 50.0% (2/4) Tier-1 1-hop solve at 0.0% leak. 11

Checkpoint (samyama v1.15.0)

Precision (PagedKV)

RSS (MiB)

Warm TTFT (Speedup)

Speed (tok/s)

MVCC (µs)

Arm1/Arm2 Syntax

Tier-1 Solved

Arm4 Leak

Plan / Extr

Enrich (Concept/Abs)

350M v0.9.2 (M1) 350M v0.9.3 (M2) 350M v0.9.3 (M2) 350M v0.9.4 (Trap) 350M v0.9.5-AdvKD 350M v0.9.5-AdvKD

INT8 INT8 BF16 INT8 INT8 BF16

389.2 389.5 685.3 389.6 389.8 685.3

920.8 ms (5.3×) 400.4 ms (4.9×) 612.4 ms (5.9×) 396.0 ms (5.2×) 427.7 ms (5.0×) 651.4 ms (5.9×)

28.7 67.9 42.8 63.6 59.8 39.6

55.3 64.3 62.6 66.2 64.6 62.6

0.0/16.7% 33.3/66.7% 16.7/50.0% 58.3/58.3% 66.7/75.0% 66.7/75.0%

0.0% 50.0% 25.0% 50.0% 50.0% 50.0%

0.0% 0.0% 0.0%∗ 0.0% 0.0% 0.0%

0/0% 0/0% — 67/67% 67/67% —

0/0% 33/100% — 100/100% 100/100% —

1.3B v0.9.3 (M3) 1.3B v1.0-Clean 1.3B v1.0-Clean

INT8 INT8 BF16

1, 163.0 1, 162.9 2, 200.5

1, 052.6 ms (6.0×) 1, 193.1 ms (5.8×) 2, 109.3 ms (6.0×)

25.0 22.0 12.6

19.6 20.3 21.3

33.3/50.0% 75.0/91.7% 66.7/91.7%

0.0% 25.0% 25.0%

0.0% 0.0% 0.0%

67/67% 100/100% —

100/100% 100/100% —

Table 3: Live zero-socket evaluation inside samyama-graph-enterprise v1.15.0 on CPU (0 database files modified; catalog FSM build 29.8–37.5 µs). ∗ Disabling the catalog FSM (Arm 3) on v0.9.3 BF16 produced an 8.33% false-positive leak; Arm 4 (catalog FSM + MVCC gate) held 0.0% leak across all runs.

7

Related Work

Embedded databases and structured LLM serving. DuckDB showed that in-process analytical execution eliminates wire protocol overhead [Raasveldt and Mühleisen, 2019], while Samyama unifies property-graph, vector, and optimization workloads in Rust [Mandarapu and Kunkunuru, 2026b]. Where PagedAttention [Kwon et al., 2023], SGLang [Zheng et al., 2024], and Outlines [Willard and Louf, 2023] optimize out-of-process serving with static token-string caches and precompiled regexes, shoonya-infer embeds inside the DBMS process to bind KV validity to transactional DDL epochs and construct 36 µs logit masks from live columnar GraphStore structures. Compact code SLMs, subspace merging, and distillation. Sub-1B models including Phi-1 [Gunasekar et al., 2023], CodeGen [Nijkamp et al., 2023], MiniCPM [Hu et al., 2024], SmolLM2 [Allal et al., 2025], and Qwen2.5-Coder [Hui et al., 2024] train on 7B–5, 500B tokens. Capacity-gap distillation has studied NT ≫ NS [Mirzadeh et al., 2020, Agarwal et al., 2024]; we isolate the orthogonal reverse token-density regime (ρT ≪ ρS ) under strict commercial-clean data budgets and resolve it via zero-VRAM LoRA-gated AdvKD, complementing KnOTS/TIES merging [Stoica et al., 2025, Yadav et al., 2023] and GRPO [Shao et al., 2024].

8

Limitations and Frontier-Replacement Readiness

Table 4 states Shoonya’s production readiness across the four samyama-graph-enterprise LLM surfaces. While ontology Enrichment (100%/100%) and catalog+span-masked ExtractionAgent (100% grounded) are standalone-ready locally and Tier-1 NLQPipeline + AgentPlanner serve safely as zero-leak Tier-0 routers, three limitations define ongoing Milestone M5 work: (1) Tier-2/3 multi-hop OpenCypher (OPTIONAL MATCH, WITH..HAVING) remains at 0.0% greedy exact match in M4 due to 4/11 projection-alias mismatches, 4/11 multi-hop arrow-direction drifts, and 3/11 unindexed string literals; (2) 1.3B INT8 CPU warm TTFT (1.19 s) favors asynchronous enrichment over interactive typing compared to 350M INT8 (400 ms); and (3) expanding the live in-process benchmark beyond 18 clinical enterprise tasks (+593 public tasks) to multi-tenant enterprise graphs is underway.

12

samyama-graph-enterprise Surface

Best Local Accuracy (M4 / M5.A)

Leak

Deployment Mode

4. Ontology Enrichment & Abstention 3. ExtractionAgent (Catalog+Span FSM) 2. AgentPlanner (ToolPlan JSON) 1a. NLQPipeline Tier-1 (Single / 1-Hop) 1b. NLQPipeline Tier-2/3 (Multi-Hop)

100.0% concept / 100.0% abstain 100.0% JSON / 100.0% grounded 100.0% JSON (1.3B); 33.3% live exec (M5.A) 50.0% solved (350M), 100.0% precision 91.7% syntax, 0.0% greedy exact (M4)

0.0% 0.0% 0.0% 0.0% 0.0%

Standalone Local Standalone Local Hybrid Tier-0 Hybrid Tier-0 Escalate to Frontier

Table 4: Honest frontier-replacement readiness across all four samyama-graph-enterprise surfaces.

9

Conclusion

Embedding a zero-dependency pure-Rust language-model runtime inside the enterprise graph database address space turns database internals—DDL epochs, columnar property catalogs, and microsecond read-only MVCC snapshots—into first-class inference primitives. Combined with rank-factorized KV-sharing backbones, closed-loop Rust Jacobi SVD governance, execution-verified Step-GRPO, and Verifier-Advantage-Gated Knowledge Distillation (AdvKD), Shoonya delivers standalone ontology enrichment and grounded extraction plus zero-leak Tier-0 query routing inside 390 MiB of CPU RAM. Open weights (Apache-2.0), shard manifests, and spectral certificates are available at https://huggingface.co/VaidhyaMegha/Shoonya.

References Rishabh Agarwal, Nino Vieillard, Yongchao Zhou, Piotr Stanczyk, Sabela Ramos Garea, Matthieu Geist, and Olivier Bachem. On-policy distillation of language models: Learning from self-generated mistakes. In International Conference on Learning Representations (ICLR), 2024. Joshua Ainslie, James Lee-Thorp, Michiel de Jong, Yury Zemlyanskiy, Federico Lebrón, and Sumit Sanghai. GQA: Training generalized multi-query transformer models from multi-head checkpoints. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 4895–4901, 2023. Loubna Ben Allal, Anton Lozhkov, Elie Bakouch, Gabriel Martín Blázquez, Guilherme Penedo, Lewis Tunstall, Andrés Marafioti, Hynek Kydlíček, Agustín Piqueres Lajarín, Vaibhav Vahtola, et al. SmolLM2: When smol goes big — data-centric training of a small language model. arXiv preprint arXiv:2502.02737, 2025. Jacob Austin, Augustus Odena, Maxwell Nye, Maarten Bosma, Henryk Michalewski, David Dohan, Ellen Jiang, Carrie Cai, Michael Terry, Quoc Le, and Charles Sutton. Program synthesis with large language models. arXiv preprint arXiv:2108.07732, 2021. Mohammad Bavarian, Heewoo Jun, Nikolas Tezak, John Schulman, Christine McLeavey, Jerry Tworek, and Mark Chen. Efficient training of language models to fill in the middle. arXiv preprint arXiv:2207.14255, 2022. Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde de Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, et al. Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374, 2021. Tri Dao. FlashAttention-2: Faster attention with better parallelism and work partitioning. In International Conference on Learning Representations (ICLR), 2024. 13

Nadime Francis, Alastair Green, Paolo Guagliardo, Leonid Libkin, Tobias Lindaaker, Victor Marsault, Stefan Plantikow, Mats Rydberg, Petra Selmer, and Andrés Taylor. Cypher: An evolving query language for property graphs. In Proceedings of the 2018 International Conference on Management of Data (SIGMOD), pages 1433–1445, 2018. Suriya Gunasekar, Yi Zhang, Jyoti Aneja, Caio César Teodoro Mendes, Allie Del Giorno, Sivakanth Gopi, Mojan Javaheripi, Piero Kauffmann, Gustavo de Rosa, Olli Saarikivi, et al. Textbooks are all you need. arXiv preprint arXiv:2306.11644, 2023. Nathan Halko, Per-Gunnar Martinsson, and Joel A. Tropp. Finding structure with randomness: Probabilistic algorithms for constructing approximate matrix decompositions. SIAM Review, 53 (2):217–288, 2011. Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015. Jordan Hoffmann, Sebastian Borgeaud, Arthur Mensch, Elena Buchatskaya, Trevor Cai, Eliza Rutherford, Diego de Las Casas, Lisa Anne Hendricks, Johannes Welbl, Aidan Clark, et al. Training compute-optimal large language models. In Advances in Neural Information Processing Systems (NeurIPS), volume 35, pages 30016–30030, 2022. Shengding Hu, Yuge Tu, Xu Han, Chaoqun He, Ganqu Cui, Xiang Long, Zhi Zheng, Yewei Fang, Yuxiang Huang, Weilin Zhao, et al. MiniCPM: Unveiling the potential of small language models with scalable training strategies. arXiv preprint arXiv:2404.06395, 2024. Binyuan Hui, Jian Yang, Zeyu Cui, Jiaxi Yang, Dayiheng Liu, Lei Zhang, Tianyu Liu, Jiajun Zhang, Bowen Yu, Keming Lu, et al. Qwen2.5-Coder technical report. arXiv preprint arXiv:2409.12186, 2024. Zhengbao Jiang, Frank F. Xu, Luyu Gao, Zhiqing Sun, Qian Liu, Jane Dwivedi-Yu, Yiming Yang, Jamie Callan, and Graham Neubig. Active retrieval augmented generation. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 7969–7992, 2023. Nitish Shirish Keskar, Bryan McCann, Lav R. Varshney, Caiming Xiong, and Richard Socher. CTRL: A conditional transformer language model for controllable generation. arXiv preprint arXiv:1909.05858, 2019. Woosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng, Lianmin Zheng, Cody Hao Yu, Joseph E. Gonzalez, Hao Zhang, and Ion Stoica. Efficient memory management for large language model serving with PagedAttention. In Proceedings of the 29th Symposium on Operating Systems Principles (SOSP), pages 611–626, 2023. Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, and Radu Soricut. ALBERT: A lite BERT for self-supervised learning of language representations. In International Conference on Learning Representations (ICLR), 2020. Madhulatha Mandarapu and Sandeep Kunkunuru. Knowledge-graph grounding helps LLMs only for out-of-training knowledge: A controlled study on clinical question answering. arXiv preprint arXiv:2606.22419, 2026a.

14

Madhulatha Mandarapu and Sandeep Kunkunuru. Samyama: A unified graph-vector database with in-database optimization, agentic enrichment, and hardware acceleration. arXiv preprint arXiv:2603.08036, 2026b. Madhulatha Mandarapu and Sandeep Kunkunuru. Removable and irreducible: A token-cost ledger for the multilingual tokenization tax. arXiv preprint arXiv:2609.00378, 2026c. Charles H. Martin and Michael W. Mahoney. Implicit self-regularization in deep neural networks: Evidence from random matrix theory and implications for learning. Journal of Machine Learning Research, 22(165):1–73, 2021. Seyed Iman Mirzadeh, Mehrdad Farajtabar, Ang Li, Nir Levine, Akihiro Matsukawa, and Hassan Ghasemzadeh. Improved knowledge distillation via teacher assistant. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pages 5191–5198, 2020. Erik Nijkamp, Bo Pang, Hiroaki Hayashi, Lifu Tu, Huan Wang, Yingbo Zhou, Silvio Savarese, and Caiming Xiong. CodeGen: An open large language model for code with multi-turn program synthesis. In International Conference on Learning Representations (ICLR), 2023. Bowen Peng, Jeffrey Quesnelle, Honglu Fan, and Enrico Shippole. YaRN: Efficient context window extension of large language models. In International Conference on Learning Representations (ICLR), 2024. Mark Raasveldt and Hannes Mühleisen. DuckDB: An embeddable analytical database. In Proceedings of the 2019 International Conference on Management of Data (SIGMOD), pages 1981–1984, 2019. Olivier Roy and Martin Vetterli. The effective rank: A measure of effective dimensionality. In 15th European Signal Processing Conference (EUSIPCO), pages 606–610, 2007. Zhihong Shao, Peiyi Wang, Qihao Zhu, Runxin Xu, Junxiao Song, Xiao Bi, Haowei Zhang, Mingchuan Zhang, Y. K. Li, Y. Wu, and Daya Guo. DeepSeekMath: Pushing the limits of mathematical reasoning in open language models. arXiv preprint arXiv:2402.03300, 2024. George Stoica, Pratik Ramesh, Boglarka Ecsedi, Leshem Choshen, and Judy Hoffman. Model merging with SVD to tie the KnOTS. In International Conference on Learning Representations (ICLR), 2025. Jianlin Su, Murtadha Ahmed, Yu Lu, Shengfeng Pan, Wen Bo, and Yunfeng Liu. RoFormer: Enhanced transformer with rotary position embedding. Neurocomputing, 568:127063, 2024. Yutao Sun, Li Dong, Yi Zhu, Shaohan Huang, Wenhui Wang, Shuming Ma, Quanlu Zhang, Jianyong Wang, and Furu Wei. You only cache once: Decoder-decoder architectures for language models. In Advances in Neural Information Processing Systems (NeurIPS), volume 37, 2024. Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems (NeurIPS), volume 30, 2017. Brandon T. Willard and Rémi Louf. Efficient guided generation for large language models. arXiv preprint arXiv:2307.09702, 2023. Prateek Yadav, Derek Tam, Leshem Choshen, Colin A. Raffel, and Mohit Bansal. TIES-merging: Resolving interference when merging models. In Advances in Neural Information Processing Systems (NeurIPS), volume 36, 2023. 15

Lianmin Zheng, Liangsheng Yin, Zhiqiang Xie, Chuyue Sun, Jeff Huang, Cody Hao Yu, Shiyi Cao, Christos Kozyrakis, Ion Stoica, Joseph E. Gonzalez, Clark Barrett, and Ying Sheng. SGLang: Efficient execution of structured language model programs. In Advances in Neural Information Processing Systems (NeurIPS), volume 37, 2024.

16

Related documents

Record · ID 1767927 · SHA-256 f5a6b968e4a99ba1
Retrieved via Conceptio: every document is proof-bundled with source, license, and retrieval metadata.
Bring this data into your agent: Connect via MCP or API · 20 free credits to start · no card required
Read the Docs → · View CLI source on GitHub · Conceptio Open Knowledge Archive