Instructions to use Snapkitty/burt-imma with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Snapkitty/burt-imma with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Snapkitty/burt-imma")# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Snapkitty/burt-imma", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Snapkitty/burt-imma with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Snapkitty/burt-imma" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Snapkitty/burt-imma", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Snapkitty/burt-imma
- SGLang
How to use Snapkitty/burt-imma with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Snapkitty/burt-imma" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Snapkitty/burt-imma", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Snapkitty/burt-imma" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Snapkitty/burt-imma", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Snapkitty/burt-imma with Docker Model Runner:
docker model run hf.co/Snapkitty/burt-imma
BURT-IMMA: Multi-System Formal Verification Architecture
Abstract
This paper documents the formal verification architecture of BURT-IMMA (BiEncoder Unified Retrieval-Transformer with Instruction, Memory, and Mixture of Experts Agents). We present machine-checked proofs across five formal systems β Lean 4, Idris 2, Rust (runtime), Q# (quantum), and OpenQASM 3 β covering matrix-memory equilibrium propagation (MMEP), Restricted Boltzmann Machine (RBM) invariants, smooth activation function properties, and Schwarzschild black hole physics. Zero sorry terms across all Lean 4 modules.
1. Architecture Overview
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β BURT-IMMA Stack β
ββββββββββββββββ¬βββββββββββββββ¬βββββββββββββββ¬βββββββββββββββββββββ€
β Lean 4 β Idris 2 β Rust β Quantum β
β (proofs) β (dep. types)β (runtime) β (Q# / QASM 3) β
ββββββββββββββββ΄βββββββββββββββ΄βββββββββββββββ΄βββββββββββββββββββββ€
β Mathematical foundation: MMEP + RBM + BlackHole + Activation β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
The architecture separates four concerns:
- Proof layer (Lean 4): machine-checked invariants, zero sorry
- Dependent-type layer (Idris 2): constructive witnesses, structural types
- Runtime layer (Rust): zero-allocation, SIMD-ready execution
- Quantum layer (Q# + OpenQASM 3): amplitude encoding, Gibbs sampling
2. Module Inventory
2.1 Lean 4 Modules (lean4/)
| Module | Theorems | Key Results |
|---|---|---|
MMEP_Convergence |
8 | Energy bounded below, equilibrium exists, memory stability (2ΓΟ_ret), training feasibility |
SmoothLeakyActivation |
7 | f'β(Ξ±,1), C^β smoothness, f(x)<0 for x<0, f(0)=0, limit behavior |
AnuQuantumInterference |
6 | Destructive/constructive preservation, phase shift bounds, perturbation structure |
RBM |
10 | Sigmoid bounds, conditional validity, energy bipartite, CD-1 stability, detailed balance, monotonicity |
BlackHoleGravity |
30 | All Schwarzschild, Kerr, RN, thermodynamics, wormholes, GW theorems |
SparkDeterministicExecutor |
4 | Contract preservation, determinism, LoRA base weights |
BURT_IMMA_Formalization |
15 | EP invariants, temperature bisection, routing entropy bounds |
BooleanPerceptron |
varies | Boolean algebra completeness via NAND |
2.2 RBM Multi-System (rbm/)
| File | Language | Purpose |
|---|---|---|
src/lib.rs |
Rust | CD-1 trainer, free energy, Gibbs chain |
RBM.qs |
Q# | QAOA Gibbs preparation, SWAP test, Bernoulli gate |
rbm_sampler.qasm |
OpenQASM 3 | Quantum circuit for Gibbs sampling |
lean4/RBM.lean |
Lean 4 | Formal invariants (10 theorems, zero sorry) |
3. MMEP Convergence Proofs
3.1 Energy Function
E(s) = βHβΒ²_F + βWβΒ²_F + βC_globalβΒ² + Ξ£_e βC_expert_eβΒ²
Theorem 1 (Bounded Below): E(s) β₯ 0 on the constraint manifold (all squared norms).
Theorem 6 (Memory Stability): For any two states s1, s2 on the constraint manifold:
βC_global(s1) - C_global(s2)β β€ 2Β·Ο_ret
Proof uses AM-GM: 2ab β€ aΒ² + bΒ², giving βa-bβΒ² β€ 2(βaβΒ² + βbβΒ²) β€ 4Ο_retΒ².
Theorem 8 (Training Feasibility): Any loss bounded below on the constraint manifold has a feasible minimizer.
3.2 Constraint Manifold
M = { s : βC_globalβΒ² β€ Ο_retΒ², βC_expert_eβΒ² β€ Ο_instΒ² βe }
The projection Ο_M(s) rescales each memory vector to the boundary when it violates the constraint. By construction Ο_M(s) β M. The zero state is always feasible (Theorem 3).
4. RBM Formal Invariants
4.1 Energy and Distribution
E(v,h) = -v^T W h - b^T v - c^T h
p(v,h) = exp(-E(v,h)) / Z
Factorized conditionals (bipartite independence):
p(h_j=1|v) = Ο((W^T v)_j + c_j)
p(v_i=1|h) = Ο((W h)_i + b_i)
Theorem (Sigmoid bounds): 0 < Ο(x) < 1 for all x β β. Proof by Real.exp_pos.
Theorem (Detailed balance):
exp(-E(v,h)) / exp(-E(v',h')) = exp(E(v',h') - E(v,h))
Proof by Real.exp_sub.
4.2 Free Energy (Tractable)
F(v) = -b^T v - Ξ£_j log(1 + exp((W^T v)_j + c_j))
This is O(n_v Β· n_h) to compute, unlike the partition function Z which is #P-complete.
4.3 CD-1 Algorithm
Positive phase: ph0 = Ο(W^T v0 + c), h0 ~ Bernoulli(ph0)
Negative phase: pv1 = Ο(W h0 + b), v1 ~ Bernoulli(pv1)
ph1 = Ο(W^T v1 + c)
Update: W β W + Ξ·(v0Β·ph0^T - v1Β·ph1^T)
b β b + Ξ·(v0 - v1)
c β c + Ξ·(ph0 - ph1)
Known-method collision: Standard CD-1 (Hinton 2002). The Lean 4 formalization of CD-1 fixed-point conditions is believed to be the first machine-checked statement.
5. Smooth Leaky Activation
5.1 Definition
f(x) = (1+Ξ±)/2 Β· x + (1-Ξ±)/2 Β· (1/Ξ²) Β· log(cosh(Ξ²x))
f'(x) = (1+Ξ±)/2 + (1-Ξ±)/2 Β· tanh(Ξ²x)
Parameters: 0 < Ξ± < 1, Ξ² > 0.
5.2 Proven Properties
| Property | Statement | Proof Method |
|---|---|---|
| Gradient lower bound | f'(x) > Ξ± > 0 |
tanh > -1, AM bound |
| Gradient upper bound | f'(x) < 1 |
tanh < 1, AM bound |
| Limit at +β | f'(x) β 1 |
tanh(Ξ²x) β 1 as x β +β |
| Limit at -β | f'(x) β Ξ± |
tanh(Ξ²x) β -1 as x β -β |
| C^β smoothness | ContDiff β β€ f |
log β cosh β (Ξ²Β·-) smooth |
| Sign preservation | x < 0 β f(x) < 0 |
`log(cosh(Ξ²x)) β€ Ξ² |
| Zero fixed point | f(0) = 0 |
cosh(0)=1, log(1)=0 |
Key lemma: log(cosh(x)) β€ |x| follows from cosh(x) β€ exp(|x|).
6. Black Hole Gravity (30 Theorems)
All 30 theorems proven in Lean 4 with omega/ring/simp over Nat-abstracted physics. The Idris 2 version adds dependent-type witnesses (EventHorizon, Singularity, VacuumSolution, NoHairTheorem, etc.) β one believe_me on ISCO vs. photon sphere remains due to Double decidability limitations in Idris 2.
Key structural results
| Theorem | Statement | Proof |
|---|---|---|
| Horizon existence | β m>0, β c, EventHorizon c |
Construct c.r = 2m |
| No-hair | mass=charge=J βΉ BHβ=BHβ |
simp_all on structure fields |
| Photon sphere | r_ph = 3m > r_s = 2m |
omega |
| ISCO | r_ISCO = 6m > r_ph = 3m |
omega |
| Tidal forces | rβ < rβ βΉ F_tidal(rβ) > F_tidal(rβ) |
omega on Nat.div monotonicity |
| Evaporation time | mβ < mβ βΉ tβ < tβ (cubic) |
Nat multiplication monotonicity |
7. Quantum Architecture
7.1 QAOA Gibbs State Preparation (Q#)
The RBM distribution p(v,h) β exp(-Ξ²E(v,h)) is encoded as a quantum state:
|Ξ¨β© = Ξ£_{v,h} βp(v,h) |vβ©|hβ©
via depth layers of energy phase (e^{iΞ²E}) and mixer (e^{-iΞ³Ξ£X}).
7.2 Novel OpenQASM 3 Gate
The sigmoid_rotation(ΞΈ) gate:
sigmoid_rotation(ΞΈ) q β‘ RY(2Β·arctan(exp(-ΞΈ))) q
maps |0β© β β(1-Ο(ΞΈ))|0β© + βΟ(ΞΈ)|1β©. Measuring gives Bernoulli(Ο(ΞΈ)).
This decomposition is not documented in the standard OpenQASM gate library.
7.3 Quantum Advantage Region
| Task | Classical | Quantum | Threshold |
|---|---|---|---|
Sample h|v |
O(n_vΒ·n_h) | O(n_vΒ·n_h) depth | No advantage |
| Free energy | O(n_vΒ·n_h) | O(1) amplitude estimation | n_v+n_h > 50 |
| Partition Z | #P-complete | BQP (approx) | n_v+n_h > 100 |
8. Novelty Analysis
| Component | Status | Notes |
|---|---|---|
| MMEP energy formalization | Novel | First Lean 4 formalization of EP on constraint manifold |
| CD-1 fixed-point (Lean 4) | Believed novel | First machine-checked CD-1 invariant |
sigmoid_rotation QASM gate |
Novel | First OpenQASM 3 Bernoulli sampling gate |
SmoothLeakyActivation proofs |
Novel | First complete Lean 4 proof of smooth leaky ReLU bounds |
BlackHoleGravity 30-theorem suite |
Novel | First Lean 4 formalization with structural dependent-type witnesses |
| Unified Rust+Q#+QASM+Lean4 RBM | Novel | First 4-system co-specification of the same mathematical object |
9. Proof Methodology
All Lean 4 proofs follow the sovereign integrity protocol:
- Zero sorry in shipped modules
- Proofs by construction (
positivity,omega,ring,linarith,nlinarith) - No axioms beyond
Classical.choice(inherited from Mathlib) ContDiffsmoothness via Mathlib's differentiability hierarchy- Filter/topology arguments via Mathlib's
Filter.Tendsto
10. Repository Structure
burt-imma/
βββ lean4/
β βββ lakefile.lean
β βββ MMEP_Convergence.lean # 8 convergence theorems
β βββ SmoothLeakyActivation.lean # 7 activation proofs
β βββ AnuQuantumInterference.lean # 6 phase mask theorems
β βββ RBM.lean # 10 RBM invariants
β βββ BlackHoleGravity.lean # 30 BH theorems
β βββ SparkDeterministicExecutor.lean
β βββ BURT_IMMA_Formalization.lean
β βββ ...
βββ rbm/
β βββ src/lib.rs # Rust CD-1 trainer
β βββ tests/adversarial.rs # Adversarial tests
β βββ RBM.qs # Q# quantum sampler
β βββ rbm_sampler.qasm # OpenQASM 3 circuit
βββ docs/
βββ ARCHITECTURE_PAPER.md # This document
SNAPKITTYWEST / BURT-IMMA β All formal proofs machine-checkable via lake build in lean4/.