batteryphil commited on
Commit
4ede44f
·
verified ·
1 Parent(s): 3d5e3be

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +72 -0
README.md CHANGED
@@ -1,3 +1,75 @@
1
  ---
 
 
 
 
 
2
  license: mit
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ tags:
3
+ - mamba
4
+ - bare-metal
5
+ - reasoning
6
+ - mimo
7
  license: mit
8
  ---
9
+
10
+ # Thalamic Bloom (Mamba 3 MIMO - 150M)
11
+
12
+ This is the fully trained, bare-metal ready **Mamba 3 MIMO** reasoning engine, specifically calibrated for the **Operating Organism (OO)** architecture.
13
+
14
+ It is a 150M parameter Mamba model equipped with a **Thalamic Primer** layer and **Recursive Latent Forcing (RLF)**. It utilizes 4 dynamic MIMO arms to perform orthogonal reasoning loops, governed by an internal D+ Policy Engine.
15
+
16
+ ## Architecture Highlights
17
+ * **Base Architecture:** Mamba 3 (150M parameters, `d_model=768`, `n_layers=24`)
18
+ * **MIMO Arms:** 4 active reasoning arms featuring autotomic gating (pruning efficiency > 0.99) to reject hallucination vectors and isolate domain-specific logic.
19
+ * **Cognitive Engram Injection:** The model has undergone surgical "Engram Burns" (Phase 5b) to hardcode bare-metal operating laws directly into the frozen MIMO weights.
20
+
21
+ ## Usage & Inference
22
+
23
+ To run this model, you **must** use the official implementation from the GitHub repository, as it contains the custom `Mamba3MIMORLF` class and the Thalamic Primer logic.
24
+
25
+ ### 1. Clone the Repository
26
+ ```bash
27
+ git clone https://github.com/batteryphil/thalamic-bloom.git
28
+ cd thalamic-bloom
29
+ ```
30
+
31
+ ### 2. Run Inference
32
+ The custom model architecture requires you to load the weights with `strict=False` so that PyTorch can map the state dict to the MIMO arms.
33
+
34
+ ```python
35
+ import torch
36
+ from transformers import AutoTokenizer
37
+ from mamba3_mimo_builder import Mamba3MIMORLF
38
+
39
+ device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
40
+
41
+ # 1. Initialize the custom MIMO architecture
42
+ model = Mamba3MIMORLF(vocab_size=50304, d_model=768, n_layers=24)
43
+
44
+ # 2. Load the Thalamic Bloom weights (strict=False is REQUIRED)
45
+ checkpoint_path = "thalamic_bloom_150m_oo.pth"
46
+ checkpoint = torch.load(checkpoint_path, map_location=device, weights_only=True)
47
+
48
+ if 'model_state_dict' in checkpoint:
49
+ model.load_state_dict(checkpoint['model_state_dict'], strict=False)
50
+ else:
51
+ model.load_state_dict(checkpoint, strict=False)
52
+
53
+ model.to(device)
54
+ model.eval()
55
+
56
+ # 3. Generate! (Use T=0.05, top_k=1 for deterministic Identity retrieval)
57
+ tokenizer = AutoTokenizer.from_pretrained("EleutherAI/gpt-neox-20b")
58
+ prompt = "User: Explain the 5 Organic Laws of the Operating Organism.\nAssistant:"
59
+ inputs = torch.tensor([tokenizer.encode(prompt)]).to(device)
60
+
61
+ with torch.no_grad():
62
+ out = model.generate(inputs, max_new_tokens=120, temperature=0.05, top_k=1)
63
+
64
+ print(tokenizer.decode(out[0].tolist()[len(inputs[0]):]))
65
+ ```
66
+
67
+ ## The 5 Organic Laws
68
+ During Phase 5b, this model was surgically trained to memorize the rules of the D+ Policy Engine for bare-metal OS operation. If queried with `T=0.05`, it will output the following sovereign laws:
69
+ 1. **Non-Harm:** If harm > 0.70, the action is FORBIDDEN outright.
70
+ 2. **Transparency:** If the reason field is NULL, the action is FORBIDDEN. All actions must be justified.
71
+ 3. **Reversibility:** If reversibility < 0.40, the engine returns COMPENSATE — the action is allowed but must have a rollback plan.
72
+ 4. **Dignity:** Self-modifying code with harm > 0.30 is QUARANTINED to protect system integrity.
73
+
74
+ ## Hardware Testing
75
+ The model has been tested under a 140W power constraint on a locked 100%-fan RTX 3060.