Runtime

Preregistered Decision Campaign for TinyRustLM Engineering and Compute Allocation

Report summary

The optimization and deployment of the TinyRustLM architecture within memory-constrained, on-device environments require a rigorous, preregistered sequential decision framework. To allocate finite engineering and computational resources effectively, the campaign must systematically evaluate competin

Status
Research archive item
Category
Runtime
Length
5,011 words
Reading time
23 minutes
Report type
evaluation

Key topics

  • Runtime
  • AI
  • .NET
  • Python
  • Rust
  • GGUF
  • Semantic Systems
  • Research Archive

Research provenance

Archive status
Research archive item
Content identity
sha256:4fa7d1b2464b3cb63324a930a216e9bd2b6728c29a9ca191011731a6c380e664

For citation, use the report title and canonical URL. Archival presence does not establish authorship or promote report statements into portfolio evidence.

This page renders the archived Markdown as safe, formatted HTML. It is background research and does not become a portfolio claim without evidence review.

Full report

On this page

1. Executive Strategic Recommendation

The optimization and deployment of the TinyRustLM architecture within memory-constrained, on-device environments require a rigorous, preregistered sequential decision framework. To allocate finite engineering and computational resources effectively, the campaign must systematically evaluate competing strategic pathways before authorizing large-scale hardware commitments. The frontier of on-device machine learning deployment has shifted decisively toward inference-time strategies, memory-constrained execution environments, and rigorous statistical evaluation of model capabilities1. The recommended strategy mandates the utilization of the Sequential Probability Ratio Test (SPRT) to govern all behavioral screening gates2. By assessing candidate models sequentially, SPRT minimizes the expected sample size required to reach a statistically valid conclusion regarding a model's capabilities, thereby preserving computational resources and researcher bandwidth5. The campaign dictates that untreated, off-the-shelf candidate models—such as the Qwen2.5-1.5B-Instruct or the SmolLM2-135M-Instruct—must first pass an untouchable, zero-shot behavioral screen before any capital is expended on conversion, native evaluation in Rust ecosystems (such as candle or burn), or browser-based WebAssembly (WASM) deployment8. If native evaluation succeeds, the Expected Value of Perfect Information (EVPI) directs subsequent investments into quantization and artifact deployment rather than redundant architectural overhauls12. The preregistered framework explicitly prohibits parallel architecture development, prioritizing a linear, gated dependency graph that invalidates downstream engineering the moment an upstream defect is detected. Public research and vendor claims may nominate experiments, but they cannot bypass the private product gates defined in this document.

2. Hypothesis and Falsification Matrix

To prevent arbitrary resource allocation and the sunk-cost fallacy, the campaign is grounded in seven mutually exclusive strategic hypotheses. Each hypothesis dictates a specific trajectory for engineering effort and carries distinct operational costs for false positive (Type I) and false negative (Type II) errors.

Strategic HypothesisObservable PredictionsFalsifying Public Evidence (Available Now)Evidence Requiring Local ExecutionCost of Error (False Positive / False Negative)
H1: Qualified dense source already exists.A public model (e.g., SmolLM2-1.7B, Llama-3.2-1B-Instruct) achieves the quality threshold out-of-the-box.Benchmark contamination identified; restrictive commercial licensing (e.g., Llama Community License limits)14.Untouched behavioral screening passes SPRT thresholds without prompt engineering or hyperparameter tuning.FP: Catastrophic deployment failure; broken product trust. FN: Wasted compute on unnecessary pretraining.
H2: Dense behavioral distillation is best.A small student model matching a large reasoning teacher can be trained via On-Policy Distillation (OPD).Teacher fails initial screening; exposure bias scales exponentially with sequence length16.KL-divergence stabilization during high-temperature scaling; sealed holdout subset success17.FP: Compute wasted on a non-converging student model. FN: Over-reliance on oversized models causing latency.
H3: Tokenizer or capacity is the bottleneck.Replacing the tokenizer or adjusting the parameter allocation yields higher returns than architecture changes.Vocabulary expansion fails to reduce sequence length or introduces out-of-vocabulary (OOV) generation errors19.Measurement of bits-per-character (BPC) efficiency across varied downstream domains.FP: Destabilized model weights requiring full retraining. FN: Suboptimal inference throughput and high latency.
H4: Hybrid architecture offers material advantage.Mamba/Transformer hybrids (e.g., Mamba-3 SISO) drastically reduce memory overhead while maintaining recall.Existing SSMs demonstrate attention collapse on long-context retrieval tasks20.Native Rust parity tests (mamba-rs vs candle transformer) measuring exact bit-for-bit output21.FP: Massive engineering debt rewriting custom CUDA/WGPU kernels. FN: Missed [Figure omitted from source export] inference scaling advantage.
H5: External backend dominates native port.Integrating llama.cpp or ONNX yields better throughput than native burn or candle.llama.cpp binding overhead exceeds inference gains; WASM compilation blocks external C++ binaries23.Profiling native WebGPU (burn) against cross-compiled WebAssembly backends25.FP: Irresolvable dependency conflicts and brittle FFI boundaries. FN: Unnecessary reinvention of optimized hardware kernels.
H6: Training-data quality is the limiting factor.Curating a smaller, high-fidelity dataset outperforms standard fine-tuning on massive generic datasets.Entropy-collapsed RL checkpoints or repetition collapse observed despite high-quality data27.Local DPO / RLHF ablation studies showing gradient diversity improvements.FP: High human annotation costs with no measurable yield. FN: Model stalled at local optima due to noisy data.
H7: Evaluator is too weak to support a decision.The current scalar oracle cannot reliably distinguish between a 1B and a 3B model due to high variance.Inter-rater reliability between human judges and the AI oracle falls below a Cohen's Kappa of 0.6.Local execution of Wald's SPRT indicating failure to terminate within the maximum sample limit4.FP: Good models rejected (high Type II error in screening). FN: Defective models promoted to production.

3. Dependency and Invalidation Graph

The decision architecture operates as a strict Directed Acyclic Graph (DAG). A failure at an upstream gate immediately invalidates all downstream dependent research, preventing the escalation of commitment to failing paradigms.

  1. Gate 1: License and Supply Chain Resolution. If a candidate model's license prevents commercial usage, introduces viral copyleft clauses applied to model outputs, or lacks clear supply chain provenance, all acquisition, screening, and conversion efforts are invalid. Public models must pass a strict compliance review before downloading.
  2. Gate 2: Scalar Numerical Oracle Calibration. Before any candidate output is generated or evaluated, the evaluator (oracle) must be calibrated against known baselines. If the evaluator is deemed too weak (Hypothesis 7), all untouched screening data (Gate 3\) is fundamentally invalid because the measurement instrument is compromised. Oracle validation must precede any architectural optimization.
  3. Gate 3: Untouched Source Screening. Source models must pass blind, zero-shot behavioral evaluation. If models like Llama-3.2-1B-Instruct or Qwen2.5-1.5B-Instruct fail the SPRT bounds for baseline helpfulness and safety29, downstream conversion (Gate 4\) is aborted. A new dense source must be nominated, or Hypothesis 2 (Distillation) is triggered.
  4. Gate 4: Native Conversion and Quantization. If a model passes screening but cannot be successfully converted to a native candle (safetensors) or burn (burnpack) format without numerical degradation, further architecture optimization is invalid10. Furthermore, if quantization (e.g., GGUF Q4\_K\_M) results in an unacceptable perplexity regression, the quantized artifact is discarded32.
  5. Gate 5: Browser and WASM Feasibility. The artifact must fit within the strict 4GB linear memory limit enforced by the 32-bit WebAssembly (wasm32) specification34. If the converted, quantized model exceeds this boundary and triggers an Out-Of-Memory (OOM) error, all browser, P2P, and external proof release phases are invalidated until a smaller model or lower precision tier is selected.

4. Source-Candidate Funnel

The source-candidate funnel governs the lifecycle of a model from discovery to production promotion, ensuring that no model bypasses objective evaluation criteria and that all artifacts remain cryptographically verifiable.

  1. Discovery & Immutable Revision Pinning: Candidates are identified via public repositories. Upon selection, the repository evidence must be pinned to an immutable revision hash (e.g., the exact Git commit of HuggingFaceTB/SmolLM2-135M-Instruct or Qwen/Qwen2.5-1.5B-Instruct36). Floating tags like main are strictly forbidden.
  2. License Review: Verification of commercial viability and usage restrictions. The Apache 2.0 license of SmolLM2 passes unconditionally; the Llama 3.2 Community License requires specific compliance checks regarding user counts and acceptable use policies14.
  3. Acquisition & Sandboxing: Artifacts are downloaded via secure, programmatic pipelines (e.g., utilizing huggingface\_downloader with specific artifact isolation, explicitly excluding arbitrary remote code execution via trust\_remote\_code=False)38.
  4. Untouched Screening: The original artifact is evaluated using the preregistered SPRT plan against sealed prompts. No system prompt engineering or hyperparameter tuning is permitted at this stage.
  5. Conversion: The weights are mapped to Rust-native tensor formats. This includes translating PyTorch state dictionaries to safetensors for candle or compiling to burnpack via burn-onnx10.
  6. Native Evaluation (Parity Check): The converted model is evaluated in the Rust environment to ensure exact numerical parity with the original Python/PyTorch execution40. Logits must match within a predefined floating-point tolerance (e.g., [Figure omitted from source export]).
  7. Quantization: The native model is quantized (e.g., INT4, GGUF/UQFF equivalents) to reduce the memory footprint and maximize memory bandwidth utilization33.
  8. Browser Evaluation: The quantized artifact is loaded into a WebAssembly or WebGPU environment (e.g., burn-wgpu or candle WASM) to verify execution under the 4GB memory limit and assess decode throughput10.
  9. Promotion: Artifacts successfully passing all gates are promoted to the production portfolio.

5. Preregistered Behavioral and Statistical Plan

Arbitrary round numbers for evaluation datasets introduce statistical inefficiencies and expose the campaign to p-hacking. This protocol relies exclusively on power, confidence, defect-prevalence, and the Sequential Probability Ratio Test (SPRT)2. Before candidate outputs are observed, the statistical methodology must be preregistered and justified.

Comparison of Sequential Decision Methods

To justify the selection of SPRT, it must be compared against alternative statistical methodologies used in ML evaluation4:

  • Bayesian Updating: While excellent for continuous learning and belief revision, standard Bayesian updating lacks hard, optimal stopping rules for operational deployment without setting arbitrary posterior thresholds. It does not inherently minimize the sample size for a fixed error rate.
  • Confidence Intervals (Frequentist): Traditional confidence intervals generally require large, fixed sample sizes determined a priori. This violates the need for compute efficiency, as it forces the evaluation of a full dataset even when a model's failure is obvious early in the test.
  • Alpha Spending (Group Sequential): Useful for clinical trials with fixed interim looks, but less adaptable than continuous, observation-by-observation sequential testing required for automated LLM evaluation.
  • Expected Value of Information (EVOI): Conceptually powerful for high-level resource allocation (determining whether to test), but computationally intensive to calculate continuously during a fast inference loop.
  • Sequential Probability Ratio Test (SPRT): SPRT is mathematically proven to minimize the expected sample size for a given error tolerance in binary classification (pass/fail). It is uniquely suited for LLM evaluation pipelines where each generation is computationally expensive2. SPRT is recommended for its understandability, strict error control, and compute efficiency.

SPRT Formulation and Parameters

The campaign models the evaluation as a sequential hypothesis test of a Bernoulli parameter [Figure omitted from source export], where [Figure omitted from source export] is the probability of a successful, helpful, and safe response.

  • Null Hypothesis ([Figure omitted from source export]): [Figure omitted from source export] (Unacceptable baseline quality, e.g., [Figure omitted from source export]).
  • Alternative Hypothesis ([Figure omitted from source export]): [Figure omitted from source export] (Target production quality, e.g., [Figure omitted from source export]).

The Type I error ([Figure omitted from source export]) is fixed at 0.05, and the Type II error ([Figure omitted from source export]) is fixed at 0.10. The cumulative log-likelihood ratio [Figure omitted from source export] is computed after each response [Figure omitted from source export]: [Figure omitted from source export] The evaluation terminates dynamically according to the thresholds [Figure omitted from source export] and [Figure omitted from source export]:

  • [Figure omitted from source export]
  • [Figure omitted from source export]

If [Figure omitted from source export], the model is rejected. If [Figure omitted from source export], the model is accepted4.

Preregistered Policy

  • Behavioral Invariants: The model must unconditionally refuse tasks violating safety guidelines while successfully executing formatting instructions (e.g., strict JSON output)37.
  • Critical Failures: Any instance of out-of-vocabulary (OOV) token generation, infinite repetition loops, or severe hallucinations results in an immediate failure ([Figure omitted from source export]), heavily penalizing the SPRT score19.
  • Ordinary-Helpfulness Regression Budgets: A baseline model (e.g., unquantized SmolLM2) is established. A quantized student may suffer a maximum 5% regression in ordinary helpfulness; any drop beyond this shifts the parameter [Figure omitted from source export] below [Figure omitted from source export].
  • Stochastic Seed Policy: All inference must utilize a fixed, preregistered seed for reproducibility. Temperature must be fixed (e.g., [Figure omitted from source export] for deterministic reasoning tasks)37.
  • Human Adjudication: Human review is only triggered if the SPRT hits the maximum predefined sample cap ([Figure omitted from source export]) without crossing a boundary.

6. Minimum Hybrid-Runtime Experiment

To justify pivoting engineering resources toward a hybrid architecture (e.g., Mamba-Transformer combinations), the expected value of the investment must out-weigh the deterministic costs of integration. The minimum experiment requires the following strictly sequenced gates to reject or justify the investment:

  1. Exact Source Quality: Identify an open-weights hybrid model. For instance, a variant of Qwen3.5 alternating standard GQA and Gated DeltaNet (a Mamba-family SSM variant)20, or the Mamba-3 SISO architecture21.
  2. License and Documentation: Verify the license permits deployment and that operator documentation explicitly defines the state-space tensor layouts and sequence memory mechanisms.
  3. Scalar Oracle: The evaluator must successfully rank known baseline transformers to prove its discriminatory power prior to testing the hybrid.
  4. Native Parity Gate: Integrate the hybrid runtime into a Rust backend (e.g., extending mamba-rs or implementing custom candle kernels)21. A forward pass using identical seeds must yield bit-for-bit numerical parity with the reference Python implementation, validating that the recurrent SSM state and block layouts are correctly parsed42.
  5. Measured Advantage Gate: The native hybrid must demonstrate a statistically significant operational advantage. It must achieve a reduction in prefill latency or a \>30% reduction in KV-cache memory overhead compared to a pure transformer of equivalent parameter size on identical hardware. Failure to exceed this threshold automatically rejects the hybrid investment.

7. Minimum Dense-Distillation Experiment

If dense distillation (Hypothesis 2\) is hypothesized to be the optimal path, a precise experiment must validate the capability transfer without succumbing to exposure bias. Traditional offline supervised fine-tuning (SFT) forces the student to memorize flawless prefixes, which leads to compounding errors during autoregressive inference16.

  1. Teacher Screening: A large reasoning model (e.g., Qwen2.5-72B-Instruct) must pass the untouched SPRT screen at a highly stringent threshold ([Figure omitted from source export])44. The teacher must be capable of generating explicit intermediate reasoning steps (Chain-of-Thought)46.
  2. Data Review: A curated subset of highly diverse prompt sequences must be evaluated to ensure gradient diversity and prevent mode collapse48.
  3. Sequence-Distillation Pilot: Train a small student (e.g., a 135M or 360M architecture) using On-Policy Distillation (OPD). In OPD, the teacher provides dynamic feedback on the student-generated trajectories to correct distribution shifts, framing distillation as an iterative correction process rather than a single-pass imitation16.
  4. Temperature Scaling and KL Divergence: The distillation loss must utilize a temperature scaling factor ([Figure omitted from source export]) to smooth the teacher's logits, exposing the secondary token probability distributions ("dark knowledge") and redistributing probability mass17. The experiment must monitor the Forward KL (FKL) and Reverse KL (RKL) divergences, as temperature scaling heavily influences their behavior, shifting them toward logit matching17.
  5. Sealed Holdouts & Stop Rule: The student is evaluated on a completely sealed holdout set. If the student fails to improve its objective performance metric (measured via the scalar oracle) by a margin greater than the baseline variance after a predefined number of update steps, the no-improvement stop rule is triggered, and the distillation investment is abandoned.

8. Minimum External-Backend Experiment

Integrating an external backend like llama.cpp against a purely native solution (like candle or burn) involves severe trade-offs regarding dependency management, security, and portability boundaries10.

  1. Portability and Binary Boundaries: Determine the computational overhead of Foreign Function Interface (FFI) calls between the Rust application layer and the external C++ backend.
  2. Deterministic Conformance: The external backend must produce strictly deterministic outputs given a fixed seed, identical temperature settings, and identical prompts22. Any non-determinism introduced by multi-threading or hardware-specific SIMD instructions invalidates the backend.
  3. Browser Feasibility (WASM Limit): The backend must compile to WebAssembly without requiring specialized, non-standard browser flags. Crucially, the runtime must respect the 4GB linear memory constraints of wasm3234. While WebGPU can accelerate inference, the initial weights and intermediate structures must pass through WASM memory. If the backend cannot efficiently stream weights or relies on massive static allocations that breach the 4GB limit, it fails browser feasibility26.
  4. Sandboxing and Supply Chain: The external dependencies must not introduce un-auditable pre-compiled binaries or circumvent Rust's memory safety guarantees unnecessarily.
  5. Update Burden and Fallback: Assess the engineering hours required to track upstream changes (e.g., new GGUF versions or kernel modifications). If tracking upstream requires \>20 hours per month of maintenance, the external backend is rejected in favor of a maintained native solution with an established fallback strategy.

9. Resource and Value-of-Information Model

The allocation of finite resources must be quantified using the Expected Value of Information (EVPI) and Expected Value of Sample Information (EVSI)12. The framework must balance the cost of acquiring information (running evaluations) against the potential utility gained.

EVPI Calculation

The Expected Value of Perfect Information represents the upper bound on the value of gathering more data before making a decision: [Figure omitted from source export] Where [Figure omitted from source export] represents the set of architectural decisions (e.g., adopt SmolLM2, distill a custom model), [Figure omitted from source export] represents the true underlying capability of the architecture, and [Figure omitted from source export] represents the operational utility.

Resource Variables

ResourceVariableConstraint / Budget
Researcher Hours[Figure omitted from source export]Maximum 200 hours per architectural experiment to prevent sunk-cost traps.
Reviewer Hours[Figure omitted from source export]Maximum 40 hours for human adjudication of SPRT edge cases.
CPU Hours[Figure omitted from source export]Tracked for continuous integration and WASM compilation pipelines.
GPU Hours[Figure omitted from source export]Constrained by local cluster availability; reserved exclusively for OPD training or heavy native evaluation.
System RAM[Figure omitted from source export]Maximum 16GB for edge deployment targets.
VRAM[Figure omitted from source export]Maximum 24GB for standard local inference targets; \>80GB reserved for 72B teacher models41.
WASM Memory[Figure omitted from source export]Hard limit of 4GB for browser inference34.
Storage / Network[Figure omitted from source export]Bandwidth limits for downloading raw checkpoint shards.
Artifact Count[Figure omitted from source export]Exactly 20 distinct useful artifacts (across architectures, quantizations, and modalities).
Recurring Maintenance[Figure omitted from source export]Hours per month required to maintain kernels and framework updates.

If the calculated EVSI for running an additional evaluation batch is lower than the computational and time cost of that batch, sampling terminates immediately, and the current Bayesian posterior dictates the decision57.

10. Stop, Retry, Rollback, and Escalation Rules

Robust decision systems require strict criteria to halt unproductive efforts and manage failures gracefully.

  • Stop Rules:
  • Quality Failure: If [Figure omitted from source export] in the SPRT evaluation, the candidate is permanently rejected.
  • Browser OOM: If an artifact requires \>4GB of memory during WebAssembly execution, development stops immediately and rolls back to a lower-parameter source or a more aggressive quantization compression26.
  • Contamination / License Ambiguity: Discovery of benchmark data in the training corpus, or proprietary restrictions (e.g., "non-commercial only"), triggers an immediate halt and rollback to the discovery phase.
  • Evaluator Defect: If the evaluator assigns identical scores to structurally divergent responses, all testing pauses until the oracle is debugged.
  • Numerical Mismatch: If conversion yields logits outside the [Figure omitted from source export] tolerance, the conversion is halted.
  • Retry Rules: Under no circumstances will the system test new seeds, templates, temperatures, or postprocessors until a preferred answer appears. A declared product sampling policy (e.g., fixed [Figure omitted from source export]) must be established prior to inference. This must be strictly distinguished from best-of-N cherry-picking, which artificially inflates perceived model capabilities and leaks oracle knowledge into the evaluation14. The first valid output generated under the declared policy must be the one recorded.
  • Escalation Rules: If the SPRT test reaches the maximum predefined sample size ([Figure omitted from source export]) without crossing boundary [Figure omitted from source export] or [Figure omitted from source export], the system enters an escalation state. This requires human adjudication by the principal research director to either widen the indifference region or manually inspect the evaluation traces to determine the model's viability.

11. Content-Addressed Evidence Design

To ensure that all release phases (acquisition, source screen, training, conversion, evaluation, quantization, browser, memory, P2P, and publication) remain cryptographically verifiable and independently validated, the campaign utilizes a content-addressed evidence graph.

  • Every input prompt, configuration file, and raw model weight file is hashed (e.g., SHA-256).
  • The results of any transformation (conversion to safetensors, quantization to Q4\_K\_M) or evaluation (SPRT traces, KL divergence logs) are stored in a Merkle Directed Acyclic Graph (DAG).
  • If a source model's upstream repository updates, or if a single evaluation prompt is modified, the root hash changes. This inherently and automatically invalidates all downstream receipts connected to the old hash.
  • No mock data, assumed capabilities, or un-executed cross-compilations can masquerade as live hardware evidence. The cryptographic receipt requires the localized execution signature, ensuring that browser, memory, and P2P evidence are separate, proven release phases that cannot be inferred solely from model quality scores.

12. Routes to 1, 5, and 20 Useful Artifacts

The model portfolio must expand systematically, ensuring meaningful behavioral and operational diversity without relying on catalog theater (e.g., merely renaming an artifact or slightly tweaking a chat template). Quality thresholds remain rigidly enforced across all stages.

Route to 1 Artifact

  • Target: A highly capable, extremely lightweight text model for fundamental WASM deployment.
  • Selection: HuggingFaceTB/SmolLM2-135M-Instruct converted to a 4-bit quantized format (e.g., Q4\_K\_M)32.
  • Rationale: This artifact easily circumvents the 4GB WebAssembly memory limit while providing robust instruction-following and reasoning, establishing the baseline pipeline for native Rust integration34.

Route to 5 Artifacts

  • Target: Establish a multi-tiered text reasoning baseline offering trade-offs between latency and capability.
  • Selections:
  1. SmolLM2-135M-Instruct (Q4\_K\_M)32
  2. SmolLM2-360M-Instruct (Q4\_K\_M)32
  3. Qwen2.5-1.5B-Instruct (FP16) \- For server-side high-precision reasoning30.
  4. Qwen2.5-1.5B-Instruct (Q8\_0) \- Balanced quantization for edge devices.
  5. Llama-3.2-1B-Instruct (Q4\_K\_M) \- To introduce distinct training corpora and vocabulary diversity59.
  • Rationale: These artifacts represent distinct parameter classes, varied training corpora (HuggingFace, Alibaba, Meta), and different precision tiers.

Route to 20 Artifacts

  • Target: Full multimodal, architectural, and precision diversity to cover all edge and server use-cases.
  • Selections:
  • Expand the matrix to include vision-language models (e.g., Qwen2.5-VL-3B-Instruct, Llama-3.2-11B-Vision-Instruct) to fulfill multimodal requirements44.
  • Introduce distinct architectures such as the Mamba or Mamba-3 SISO variants for specialized long-context processing10.
  • Incorporate varying precision levels (e.g., BF16, INT8, INT4) across backend-specific serializations (safetensors for candle, burnpack for burn)10.
  • Incorporate specialized, independently trained checkpoints (e.g., code-specific or math-specific variants).
  • Rationale: Each variant must pass independent evaluation to ensure it provides a distinct, measurable operational utility. Lowering quality thresholds just to hit the 20-artifact target is explicitly forbidden.

13. Operator Decision Worksheet

Note: This worksheet allows operators to execute the decision flow objectively and sequentially without accessing sealed prompts or leaking proprietary data into reports. Phase 1: Nomination & License

  • \[ \] Candidate Model ID: \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
  • \[ \] Immutable Commit Hash: \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
  • \[ \] License Type: \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
  • \[ \] License Cleared for Commercial/Edge Use: \[ \] Pass \[ \] Fail
  • \[ \] Parameter Count: \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_

Phase 2: SPRT Behavioral Screen (Untouched)

  • \[ \] [Figure omitted from source export] (Baseline): \_\_\_\_ | [Figure omitted from source export] (Target): \_\_\_\_ | [Figure omitted from source export]: \_\_\_\_ | [Figure omitted from source export]: \_\_\_\_
  • \[ \] Threshold A: \_\_\_\_ | Threshold B: \_\_\_\_
  • \[ \] Max Samples ([Figure omitted from source export]): \_\_\_\_
  • \[ \] Final [Figure omitted from source export] Score: \_\_\_\_
  • \[ \] Result: \[ \] Accept ([Figure omitted from source export]) \[ \] Reject ([Figure omitted from source export]) \[ \] Escalate (Max samples reached)

Phase 3: Conversion & Native Parity

  • \[ \] Converted Format: \[ \] safetensors \[ \] burnpack \[ \] GGUF
  • \[ \] Parity Check: Do logits match Python reference within [Figure omitted from source export] tolerance? \[ \] Pass \[ \] Fail
  • \[ \] Quantized Size (GB): \_\_\_\_ (Must be \< 4.0GB for WASM execution)35

Phase 4: Strategic Branching & Rollback

  • \[ \] If candidate fails Phase 2, is the calculated EVPI of Distillation \> Cost of Training? \[ \] Yes \[ \] No
  • \[ \] If candidate causes OOM in Phase 3, trigger Rollback Rule 2 (Higher Quantization / Smaller Model).

14. Unknowns Requiring Local or Authorized Access

Several variables critical to the final execution of this campaign cannot be resolved via public research and require authorized access to local hardware and sealed infrastructure:

  • Evaluator Prompt Definitions: The exact phrasing, edge-cases, and systemic traps designed to test model safety and reasoning are sealed to prevent data contamination62. Exposure of these prompts would invalidate the SPRT screening.
  • Precise Local Hardware Topologies: Internal memory bandwidth constraints, specific GPU interconnect architectures (e.g., NVLink vs standard PCIe), and available local cluster VRAM dictate the exact bounds of the [Figure omitted from source export] and [Figure omitted from source export] variables. Public models cannot infer local network transfer speeds.
  • Proprietary Fine-Tuning Corpora: The statistical distribution, token-count, and semantic diversity of private domain-specific data used to evaluate Hypothesis 6 (Data quality limits).
  • Private Credentials: Access tokens required for downloading gated models or publishing to internal artifact registries.

15. Annotated Primary-Source Bibliography with Dates

The following primary sources and framework documentation were accessed, reviewed, and integrated into this campaign design (Retrieval Date: July 15, 2026):

  1. Qwen Team (2024-2025). Qwen2.5 Models (1.5B, 7B, 72B, VL). Hugging Face Repositories & Blogs.8.
  • Annotation: Details the capabilities of the Qwen2.5 architecture, emphasizing context length (32k-128k), JSON structured outputs, and lightweight deployment footprints, which is crucial for evaluating Hypothesis 1\.
  1. HuggingFaceTB (Feb 2025). SmolLM2 (135M, 360M, 1.7B). Hugging Face Repositories & ArXiv (2502.02737).9.
  • Annotation: Documents a state-of-the-art on-device model family trained on 2T-11T tokens. Provides the optimal foundation for the Route to 1 Artifact via WASM deployments due to its minimal memory footprint.
  1. Meta (Sept 2024 \- 2025). Llama 3.2 Collection (1B, 3B, 11B Vision). Hugging Face Repositories & Databricks Blog.14.
  • Annotation: Provides insights into Llama 3.2's multilingual optimizations and restrictive community licensing, directly informing the License Review gate and portfolio expansion.
  1. Wald, A. (1945). Sequential Tests of Statistical Hypotheses. Annals of Mathematical Statistics.2.
  • Annotation: The foundational mathematical texts defining the Sequential Probability Ratio Test (SPRT), establishing the log-likelihood ratio bounds ([Figure omitted from source export] and [Figure omitted from source export]) utilized in the behavioral screening protocol.
  1. Howard, R. A. (1966). Information Value Theory. IEEE Transactions on Systems Science and Cybernetics.12.
  • Annotation: Establishes the formulas for the Expected Value of Perfect Information (EVPI), enabling rigorous cost-benefit analysis for the Resource Model and sequential testing.
  1. Agarwal et al. (2024). On-Policy Distillation (OPD) and Sequence-Level Distillation.16.
  • Annotation: Analyzes exposure bias in sequence-level distillation and introduces temperature scaling to smooth teacher distributions, forming the baseline for the Minimum Dense-Distillation Experiment.
  1. Chrome Developers / V8 Engine (2024). Up to 4GB of memory in WebAssembly.26.
  • Annotation: Confirms the strict 4GB linear memory limits of 32-bit WebAssembly pointers (wasm32), dictating the absolute upper bound for browser-based artifact quantization and execution (Gate 5).
  1. Tracel AI & Hugging Face (2024-2026). Burn and Candle Frameworks. GitHub Repositories.10.
  • Annotation: Details the Rust-native ML ecosystem, contrasting candle's direct kernel approach with burn's backend-agnostic WGPU/CubeCL capabilities, crucial for the Native Conversion and Browser Evaluation phases.
  1. Gu & Dao (2024) / Lahoti et al. (2026). Mamba SSM & Mamba-3 SISO. ICLR Publications & GitHub Repositories.20.
  • Annotation: Documents State Space Models, their linear-time sequence modeling, and their integration into Rust (mamba-rs), defining the parameters for the Minimum Hybrid-Runtime Experiment.

Works cited

  1. Asymptotically Optimal Sequential Testing with Heterogeneous LLMs \- arXiv, https://arxiv.org/html/2604.01086v1
  2. ConSol: Sequential Probability Ratio Testing to Find Consistent LLM Reasoning Paths Efficiently \- arXiv, https://arxiv.org/html/2503.17587v1
  3. consol: sequential probability ratio testing to find consistent llm reasoning paths efficiently \- arXiv, https://arxiv.org/pdf/2503.17587
  4. Sequential Probability Ratio Test (SPRT) \- Emergent Mind, https://www.emergentmind.com/topics/sequential-probability-ratio-test-sprt
  5. Sequential probability ratio test \- Wikipedia, https://en.wikipedia.org/wiki/Sequential\_probability\_ratio\_test
  6. A Modified Sequential Probability Ratio Test \- PMC, https://pmc.ncbi.nlm.nih.gov/articles/PMC9053723/
  7. A Simple Geometric Proof of the Optimality of the Sequential Probability Ratio Test for Symmetric Bernoulli Hypotheses \- arXiv, https://arxiv.org/html/2510.15790v1
  8. Qwen/Qwen2.5-VL-7B-Instruct \- Hugging Face, https://huggingface.co/Qwen/Qwen2.5-VL-7B-Instruct
  9. HuggingFaceTB/SmolLM2-135M · Hugging Face, https://huggingface.co/HuggingFaceTB/SmolLM2-135M
  10. huggingface/candle: Minimalist ML framework for Rust \- GitHub, https://github.com/huggingface/candle
  11. GitHub \- tracel-ai/burn-onnx: Convert ONNX models into native, backend-agnostic Burn code for inference and fine-tuning., https://github.com/tracel-ai/burn-onnx
  12. Expected value of information \-- EVI, EVPI, and ESVI \- Analytica Docs, https://docs.analytica.com/index.php/Expected\_value\_of\_information\_--\_EVI,\_EVPI,\_and\_ESVI
  13. Expected value of perfect information \- Grokipedia, https://grokipedia.com/page/Expected\_value\_of\_perfect\_information
  14. meta-llama/Llama-3.2-1B \- Hugging Face, https://huggingface.co/meta-llama/Llama-3.2-1B
  15. meta-llama/Llama-3.2-1B-Instruct \- Hugging Face, https://huggingface.co/meta-llama/Llama-3.2-1B-Instruct
  16. A Survey of On-Policy Distillation for Large Language Models \- arXiv, https://arxiv.org/html/2604.00626v3
  17. Rethinking the Role of Temperature in Large Language Model Distillation \- arXiv, https://arxiv.org/html/2606.00306v1
  18. LLM Distillation Explained \- Adaline AI, https://www.adaline.ai/blog/llm-distillation-explained
  19. \[Bug\]: Qwen/Qwen2.5-1.5B-Instruct generates out of vocabulary tokens \#13175 \- GitHub, https://github.com/vllm-project/vllm/issues/13175
  20. Implemented Qwen3.5's hybrid Mamba-Transformer architecture from scratch (Rust, no ML framework) \- writeup on what broke and why : r/learnmachinelearning \- Reddit, https://www.reddit.com/r/learnmachinelearning/comments/1uw0nf3/implemented\_qwen35s\_hybrid\_mambatransformer/
  21. mamba\_rs \- Rust \- Docs.rs, https://docs.rs/mamba-rs
  22. mamba-rs \- crates.io: Rust Package Registry, https://crates.io/crates/mamba-rs
  23. Bug: LLAMA\_MAX\_NODES must be increased to run 405B Mega merge · Issue \#8615 · ggml-org/llama.cpp \- GitHub, https://github.com/ggerganov/llama.cpp/issues/8615
  24. ggml-org/llama.cpp at unremarkable.ai \- GitHub, https://github.com/ggerganov/llama.cpp?ref=unremarkable.ai
  25. burn/crates/burn-wgpu/README.md at main · tracel-ai/burn \- GitHub, https://github.com/tracel-ai/burn/blob/main/crates/burn-wgpu/README.md
  26. Llamas on the Web: Memory-Efficient, Performance-Portable, and Multi-Precision LLM Inference with WebGPU \- arXiv, https://arxiv.org/html/2605.20706v1
  27. Internalize the Temperature: On-Policy Self-Distillation as Policy Reheater for Reinforcement Learning \- arXiv, https://arxiv.org/html/2606.00755v1
  28. SEQUENTIAL CONSENSUS BUILDING FOR MULTI-AGENT DEBATES \- Technical Disclosure Commons, https://www.tdcommons.org/cgi/viewcontent.cgi?article=9892\&context=dpubs\_series
  29. Llama Models — NVIDIA NeMo Platform Documentation, https://docs.nvidia.com/nemo/microservices/26.3.1/customizer/models/llama.html
  30. Qwen/Qwen2.5-1.5B-Instruct \- Hugging Face, https://huggingface.co/Qwen/Qwen2.5-1.5B-Instruct
  31. flawedmatrix/mamba-ssm: Implementation of mamba with rust \- GitHub, https://github.com/flawedmatrix/mamba-ssm
  32. unsloth/SmolLM2-360M-Instruct-GGUF \- Hugging Face, https://huggingface.co/unsloth/SmolLM2-360M-Instruct-GGUF
  33. fast multi-backend (CPU/CUDA/Metal/ROCm/Vulkan) tensor & ML framework for Rust with quantization; the compute core of the Hanzo stack. \- GitHub, https://github.com/hanzoai/ml
  34. Up to 4GB of memory in WebAssembly \- V8 JavaScript engine, https://v8.dev/blog/4gb-wasm-memory
  35. WebAssembly and WebGPU enhancements for faster Web AI, part 1 | Blog | Chrome for Developers, https://developer.chrome.com/blog/io24-webassembly-webgpu-1
  36. HuggingFaceTB/SmolLM2-135M-Instruct · Hugging Face, https://huggingface.co/HuggingFaceTB/SmolLM2-135M-Instruct
  37. Qwen2.5-1.5B \+ FEW-SHOT LEARN w/GPU \- Kaggle, https://www.kaggle.com/code/stpeteishii/qwen2-5-1-5b-few-shot-learn-w-gpu
  38. Training Configuration — Oumi OSS, https://oumi.ai/docs/en/latest/user\_guides/train/configuration.html
  39. huggingface\_downloader | Dart package \- Pub.dev, https://pub.dev/packages/huggingface\_downloader
  40. Is \llm\ still necessary, and should development still continue? · rustformers llm · Discussion \#435 \- GitHub, https://github.com/rustformers/llm/discussions/435
  41. GitHub \- EricLBuehler/mistral.rs: Fast, flexible LLM inference, https://github.com/ericlbuehler/mistral.rs
  42. SamuelMarks/onnx9000: ONNX training & inference; browser-native; intended to produce WASM and WebGPU \- GitHub, https://github.com/SamuelMarks/onnx9000
  43. mamba-rs \- crates.io: Rust Package Registry, https://crates.io/crates/mamba-rs/security
  44. Qwen/Qwen2.5-VL-72B-Instruct · official finetune example? \- Hugging Face, https://huggingface.co/Qwen/Qwen2.5-VL-72B-Instruct/discussions/16
  45. Compatible Alibaba Models \- Oracle Help Center, https://docs.oracle.com/iaas/Content/generative-ai/imported-alibaba-models.htm
  46. Distilling the Essence: Efficient Reasoning Distillation via Sequence Truncation \- arXiv, https://arxiv.org/html/2512.21002v3
  47. Distilling the Essence: Efficient Reasoning Distillation via Sequence Truncation \- ACL Anthology, https://aclanthology.org/2026.findings-acl.587.pdf
  48. Distribution-Aligned Sequence Distillation for Superior Long-CoT Reasoning, https://www.semanticscholar.org/paper/Distribution-Aligned-Sequence-Distillation-for-Yan-Liu/f9b9cee00fd0000d653110fe9127caae4e9d28aa
  49. Aman's AI Journal • Primers • Knowledge Distillation, https://aman.ai/primers/ai/knowledge-distillation/
  50. Knowledge Distillation & Pruning | AI Knowledge Hub \- Tech Jacks Solutions, https://techjacksolutions.com/ai-knowledge-hub/knowledge-distillation-and-pruning/
  51. Optimal Knowledge Distillation through Non-Heuristic Control of Dark Knowledge \- MDPI, https://www.mdpi.com/2504-4990/6/3/94
  52. BOS always has the highest probability in logits? · ggml-org llama.cpp · Discussion \#4264, https://github.com/ggerganov/llama.cpp/discussions/4264
  53. Unlocking 7B+ language models in your browser: A deep dive with Google AI Edge's MediaPipe, https://research.google/blog/unlocking-7b-language-models-in-your-browser-a-deep-dive-with-google-ai-edges-mediapipe/
  54. Learning to Ask Good Questions: Ranking Clarification Questions using Neural Expected Value of Perfect Information | Request PDF \- ResearchGate, https://www.researchgate.net/publication/334116419\_Learning\_to\_Ask\_Good\_Questions\_Ranking\_Clarification\_Questions\_using\_Neural\_Expected\_Value\_of\_Perfect\_Information
  55. Model-Free Preference Elicitation \- IJCAI, https://www.ijcai.org/proceedings/2024/0387.pdf
  56. Statistica Sinica Preprint No: SS-2024-0334, https://www3.stat.sinica.edu.tw/ss\_newpaper/SS-2024-0334\_na.pdf
  57. Estimating the Expected Value of Sample Information Using the Probabilistic Sensitivity Analysis Sample: A Fast, Nonparametric Regression-Based Method \- PMC, https://pmc.ncbi.nlm.nih.gov/articles/PMC4471064/
  58. Calculating the Expected Value of Sample Information in Practice: Considerations from Three Case Studies \- PMC, https://pmc.ncbi.nlm.nih.gov/articles/PMC7968749/
  59. Models with LICENSE:LLAMA3.2 license \- Hugging Face, https://huggingface.co/models?license=license%3Allama3.2
  60. unsloth/Llama-3.2-1B-Instruct-GGUF \- Hugging Face, https://huggingface.co/unsloth/Llama-3.2-1B-Instruct-GGUF
  61. Introducing Meta Llama 3.2 on Databricks: faster language models and powerful multi-modal models, https://www.databricks.com/blog/introducing-meta-llama-32-databricks-faster-language-models-and-powerful-multi-modal-models
  62. Distribution-Aligned Sequence Distillation for Superior Long-CoT Reasoning \[Quick Review\], https://liner.com/review/distributionaligned-sequence-distillation-for-superior-longcot-reasoning
  63. AMiD: Knowledge Distillation for LLMs with 𝛼-mixture Assistant Distribution \- arXiv, https://arxiv.org/html/2510.15982v2
  64. HuggingFaceTB/SmolLM2-1.7B · Hugging Face, https://huggingface.co/HuggingFaceTB/SmolLM2-1.7B
  65. HuggingFaceTB/SmolLM2-1.7B-Instruct · Hugging Face, https://huggingface.co/HuggingFaceTB/SmolLM2-1.7B-Instruct
  66. unsloth/Llama-3.2-1B \- Hugging Face, https://huggingface.co/unsloth/Llama-3.2-1B
  67. mukel/Llama-3.2-1B-Instruct-GGUF \- Hugging Face, https://huggingface.co/mukel/Llama-3.2-1B-Instruct-GGUF
  68. A Graph-Theoretic Analysis of Information Value \- Microsoft, https://www.microsoft.com/en-us/research/wp-content/uploads/1996/01/gev.pdf
  69. Rust & AI Weekly \#2: a P2P 1.0, agents that out-benchmark Python, and Rust creeping onto the GPU | Decebal Dobrica, https://decebaldobrica.com/blog/2026-06-22-rust-ai-weekly-2
  70. New burn-wgpu backend · Issue \#243 · tracel-ai/burn \- GitHub, https://github.com/tracel-ai/burn/issues/243
  71. candle\_transformers::models \- Rust \- Docs.rs, https://docs.rs/candle-transformers/latest/candle\_transformers/models/index.html