Text Generation
Transformers
PyTorch
English
burt-imma
custom-architecture
matrix-memory
equilibrium-propagation
cifg
sovereign
snapkitty
no-backprop
formal-verification
lean4
agents
python
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")# pip install -U transformers accelerate # 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
File size: 3,271 Bytes
b88c26d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | /-
AnuQuantumInterference
Phase mask operations with constructive/destructive interference
-/
import Mathlib
noncomputable section
open Real
-- ============================================================
-- Core Definitions
-- ============================================================
/-- Apply a phase mask: true = constructive (keep), false = destructive (negate) -/
def apply_phase_mask (w : β) (constructive : Bool) : β :=
if constructive then w else -w
/-- Phase shift values for a layer -/
def phase_shift (layer_idx : Nat) (n_layers : Nat) : β :=
2 * Real.pi * (layer_idx : β) / (n_layers : β)
/-- Perturbation: small noise added to weights -/
def perturb (w : β) (epsilon : β) : β :=
w + epsilon
/-- Pipeline: sequence of phase-masked operations -/
def pipeline (weights : List β) (masks : List Bool) : List β :=
List.zipWith apply_phase_mask weights masks
-- ============================================================
-- Theorems (6)
-- ============================================================
/-- Destructive interference negates the weight -/
theorem destructive_cancellation (w : β) :
apply_phase_mask w false = -w := by
simp [apply_phase_mask]
/-- Constructive interference preserves the weight -/
theorem constructive_preservation (w : β) :
apply_phase_mask w true = w := by
simp [apply_phase_mask]
/-- Phase shift values are in [0, 2*pi) for valid layer indices -/
theorem phase_shift_values (layer_idx n_layers : Nat)
(h_valid : layer_idx < n_layers)
(h_pos : n_layers > 0) :
0 β€ phase_shift layer_idx n_layers β§
phase_shift layer_idx n_layers < 2 * Real.pi := by
have hβ : (layer_idx : β) β₯ 0 := by exact_mod_cast Nat.zero_le layer_idx
have hβ : (n_layers : β) > 0 := by exact_mod_cast h_pos
have hβ : (layer_idx : β) < (n_layers : β) := by exact_mod_cast h_valid
have hβ
: (layer_idx : β) / (n_layers : β) < 1 := by
rw [div_lt_one hβ]; exact_mod_cast h_valid
constructor
Β· simp [phase_shift]
positivity
Β· simp [phase_shift]
have : (layer_idx : β) / (n_layers : β) < 1 := hβ
have hpi : 0 < Real.pi := Real.pi_pos
nlinarith
/-- Small perturbation preserves sign structure -/
theorem perturbation_preserves_structure (w epsilon : β)
(h_small : |epsilon| < |w|)
(h_w_pos : w > 0) :
perturb w epsilon > 0 := by
have hβ : |w| = w := abs_of_pos h_w_pos
have hβ : |epsilon| < w := by rwa [hβ] at h_small
have hβ : -w < epsilon := (abs_lt.mp hβ).1
simp only [perturb]
linarith
/-- Pipeline produces output for every input with a matching mask -/
theorem pipeline_soundness (weights : List β) (masks : List Bool)
(h_len : weights.length = masks.length) :
(pipeline weights masks).length = weights.length := by
simp only [pipeline, List.length_zipWith, h_len, min_self]
/-- Pipeline output fully determined by inputs (no hidden state) -/
theorem pipeline_completeness (weights1 weights2 : List β) (masks1 masks2 : List Bool)
(h_w : weights1 = weights2)
(h_m : masks1 = masks2) :
pipeline weights1 masks1 = pipeline weights2 masks2 := by
rw [h_w, h_m]
end
|