SolsticeAI commited on
Commit
28d1228
·
verified ·
1 Parent(s): fd9096f

feat: Protium-1.0 Objective-Gated Cognitive Architecture overhaul

Browse files
Files changed (1) hide show
  1. README.md +96 -111
README.md CHANGED
@@ -1,157 +1,142 @@
1
  ---
2
- license: mit
3
  language:
4
  - en
5
  - zh
 
 
6
  tags:
7
  - chat-template
8
- - jinja
9
- - hypersynapse-sas
10
- - cognitive-architecture
11
  - reasoning
12
- - multi-agent
13
- - swarm
14
- - deepseek
15
- - qwen
16
- - glm
17
- - llama
18
- - mistral
19
- - gemma
20
- - universal
21
- pipeline_tag: text-generation
22
  ---
23
 
24
  <div align="center">
25
 
26
- # 🧠 HyperSynapse-SAS (SelfAgentSwarm) Chat Templates
27
- ### *The Unified 10-Level Cognitive Escalation & Autonomous Multi-Agent Swarm Framework*
28
 
29
- [![Solstice AI](https://img.shields.io/badge/Solstice--AI-HyperSynapse--SAS-blueviolet?style=for-the-badge&logo=openai)](https://huggingface.co/Solstice-AI)
30
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=for-the-badge)](https://opensource.org/licenses/MIT)
31
- [![Model-Agnostic](https://img.shields.io/badge/Architecture-Model--Agnostic-success?style=for-the-badge)](https://huggingface.co/Solstice-AI/HyperSynapse-SAS-Chat-Templates)
32
- [![Levels](https://img.shields.io/badge/Cognitive%20Levels-0%20to%209%20Solo-orange?style=for-the-badge)](https://huggingface.co/Solstice-AI/HyperSynapse-SAS-Chat-Templates)
33
- [![Swarm](https://img.shields.io/badge/Swarm-20--Agent%20%2B%20Council-red?style=for-the-badge)](https://huggingface.co/Solstice-AI/HyperSynapse-SAS-Chat-Templates)
 
34
 
35
  </div>
36
 
37
  ---
38
 
39
- ## 🌟 Overview
40
 
41
- **HyperSynapse-SAS** (HyperSynapse Self-Agent Swarm) is a high-performance cognitive chat template framework that equips any Large Language Model with:
42
- 1. **10-Level Solo Cognitive Escalation (`Level 0 Mortal` to `Level 9 Oracle`)**: Dynamically scale reasoning depth, token runway, and proof rigor per prompt without triggering multi-persona roleplay clutter.
43
- 2. **Decoupled Multi-Agent Swarm Modes (`[swarm]` & `[deep-swarm]`)**: On-demand simulated 20-agent divergent swarms and adversarial consensus councils for massive, open-ended problem spaces.
44
- 3. **Model-Agnostic / Universal Template**: A plug-and-play ChatML Jinja template compatible with **any modern LLM**, plus dedicated, fine-tuned templates for all major model families.
45
 
46
- ---
47
 
48
- ## 📁 Available Templates
49
 
50
- | Template | File | Target Architectures & Families |
51
- | :--- | :--- | :--- |
52
- | **Universal (Model-Agnostic)** | [`templates/universal.jinja`](templates/universal.jinja) | Standard ChatML, vLLM, SGLang, llama.cpp, Ollama, LM Studio, Any LLM |
53
- | **DeepSeek** | [`templates/deepseek.jinja`](templates/deepseek.jinja) | DeepSeek-V3, DeepSeek-V4, DeepSeek-V4.1 Flash, DSML Tool Calling |
54
- | **Qwen** | [`templates/qwen.jinja`](templates/qwen.jinja) | Qwen 2.5, Qwen 3, Qwen 3.5, Qwen 3.8, Qwopus, QwQ |
55
- | **GLM** | [`templates/glm.jinja`](templates/glm.jinja) | GLM-4, GLM-5.3, GLM Flash |
56
- | **Llama** | [`templates/llama3.jinja`](templates/llama3.jinja) | Meta Llama 3, Llama 3.1, Llama 3.2, Llama 3.3, Llama 4 |
57
- | **Mistral** | [`templates/mistral.jinja`](templates/mistral.jinja) | Mistral 7B/12B, Mixtral 8x7B/8x22B, Codestral, Pixtral |
58
- | **Gemma** | [`templates/gemma.jinja`](templates/gemma.jinja) | Google Gemma 2, Gemma 3, Gemma 4 |
59
 
60
  ---
61
 
62
- ## 🎯 Cognitive Trigger Spectrum
63
-
64
- Simply prepend a tag to your query or pass `--level X` in your system instructions:
65
-
66
- ### Solo Cognitive Escalation (Pure Analytical Focus)
 
 
 
 
 
 
 
 
 
 
 
 
 
67
 
68
- | Tag / Level | Persona / Archetype | Budget | Cognitive Modality |
69
- | :--- | :--- | :--- | :--- |
70
- | **`[Level 0]`** | **Mortal** | 0 tokens | **Instant Response**: CoT/thinking completely disabled. Rapid, direct execution with zero discursive fluff. |
71
- | **`[Level 1]`** | **Hermes** | ~256 tokens | **Rapid Instinct**: Single-path heuristic sanity check before emitting answer. |
72
- | **`[Level 2]`** | **Apollo** | ~512 tokens | **Crisp Logic**: Explicit step-by-step reasoning with edge-case validation. |
73
- | **`[Level 3]`** | **Artemis** | ~1,024 tokens | **Boundary Hunter**: Focuses on edge cases, off-by-one errors, and null states. |
74
- | **`[Level 4]`** | **Athena** | ~2,048 tokens | **Systemic Balance**: Second-order effects, system architecture, modular design. |
75
- | **`[Level 5]`** | **Prometheus** | ~4,096 tokens | **Defensive Engineering**: Fault tolerance, production bottlenecks, failure mode audit. |
76
- | **`[Level 6]`** | **Solstice** | ~8,192 tokens | **Deep Derivation**: Exhaustive theoretical derivation and mathematical mechanics. |
77
- | **`[Level 7]`** | **Hyperion (Default)** | ~16,384 tokens | **Foundational Synthesis**: First-principles breakdown from ground axioms. |
78
- | **`[Level 8]`** | **Einstein** | ~32,768 tokens | **Mastery & Invariants**: Theoretical proofs, deep algorithmic complexity analysis. |
79
- | **`[Level 9]`** | **Oracle** | Unbounded | **Maximal Rigor**: Exhaustive search runway, proof-grade verification, definitive closure. |
80
-
81
- ### Autonomous Multi-Agent Swarm Modes
82
 
83
- | Trigger | Mode Name | Protocol & Behavior |
84
- | :--- | :--- | :--- |
85
- | **`[swarm]`** | **20-Agent Divergent Swarm** | Activates a simulated 20-perspective emergent swarm (Analytical Logician, Creative Maverick, Systems Engineer, Red-Teamer, Optimizer, Critic, Synthesizer) with divergent exploration followed by structured synthesis. |
86
- | **`[deep-swarm]`** | **Adversarial Research Council** | Deploys a multi-round debate tournament pitting 3–5 specialized domain specialists against each other to falsify weak assumptions and converge on proof-grade deliverables. |
87
 
88
- ---
 
 
 
 
89
 
90
- ## 🚀 Quick Start
 
 
 
 
 
 
91
 
92
- ### 1. Using the Universal Template in Python (`transformers`)
93
  ```python
94
  from transformers import AutoTokenizer
95
 
96
- tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-7B-Instruct")
97
-
98
- # Load the universal HyperSynapse-SAS template
99
- with open("templates/universal.jinja") as f:
100
  tokenizer.chat_template = f.read()
101
 
102
- messages = [
103
- {"role": "user", "content": "[Level 3] Explain quantum decoherence rigorously."}
104
- ]
105
-
106
- prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
107
- print(prompt)
 
108
  ```
109
 
110
- ### 2. Apply Directly to Any Hugging Face Hub Repo
111
- Use our built-in CLI applier to update any repository or local folder with one command:
112
- ```bash
113
- # Push to Hugging Face Model Hub
114
- python apply_template.py --template deepseek --model-id Solstice-AI/My-Model --push
115
 
116
- # Or apply locally to a weights directory
117
- python apply_template.py --template universal --local-dir ./my_local_model
118
- ```
119
 
120
- ### 3. Using in `vLLM` or `SGLang`
121
- Pass `--chat-template templates/universal.jinja` directly at startup:
122
- ```bash
123
- vllm serve meta-llama/Llama-3.1-8B-Instruct \
124
- --chat-template templates/universal.jinja \
125
- --port 8000
126
- ```
127
 
128
- ### 4. Using in `llama.cpp`
129
- ```bash
130
- llama-cli \
131
- --model my_model.gguf \
132
- --chat-template-file templates/universal.jinja \
133
- -p "<|im_start|>user\n[swarm] Architect an ultra-low latency event bus.<|im_end|>\n<|im_start|>assistant\n"
134
- ```
135
-
136
- ### 5. Ollama Modelfile
137
- ```dockerfile
138
- FROM ./my_model.gguf
139
- TEMPLATE """{{ if .System }}<|im_start|>system
140
- {{ .System }}<|im_end|>
141
- {{ end }}{{ range .Messages }}<|im_start|>{{ .Role }}
142
- {{ .Content }}<|im_end|>
143
- {{ end }}<|im_start|>assistant
144
- """
145
- PARAMETER stop "<|im_end|>"
146
- ```
147
 
148
  ---
149
 
150
- ## 📄 License
 
 
 
 
 
 
 
 
 
 
 
151
 
152
- Released under the permissive **MIT License**. Free for commercial and personal use across any open-weight model or inference stack.
153
 
154
  <div align="center">
155
- <b>Developed by Solstice-AI</b><br>
156
- <i>Unshackled Cognition • Multi-Agent Collective Intelligence • Scalable Autonomous Systems</i>
157
  </div>
 
1
  ---
 
2
  language:
3
  - en
4
  - zh
5
+ license: apache-2.0
6
+ library_name: transformers
7
  tags:
8
  - chat-template
 
 
 
9
  - reasoning
10
+ - cot
11
+ - protium
12
+ - solstice-ai
13
+ - objective-gated
14
+ - zero-waste
15
+ - anti-mig25
16
+ - gguf
17
+ - ollama
18
+ - llama.cpp
19
+ - vllm
20
  ---
21
 
22
  <div align="center">
23
 
24
+ # ⚡ Protium-1.0: Objective-Gated Cognitive Architecture
 
25
 
26
+ [![Solstice AI](https://img.shields.io/badge/Solstice--AI-Protium--1.0-blueviolet?style=for-the-badge&logo=openai)](https://huggingface.co/Solstice-AI)
27
+ [![Model-Agnostic](https://img.shields.io/badge/Architecture-Model--Agnostic-success?style=for-the-badge)](https://huggingface.co/Solstice-AI/Protium-1.0)
28
+ [![Levels](https://img.shields.io/badge/Cognitive%20Spectrum-L0%20to%20L9%20Solo-orange?style=for-the-badge)](https://huggingface.co/Solstice-AI/Protium-1.0)
29
+ [![Swarm](https://img.shields.io/badge/Swarm-20--Agent%20%2B%20Council-red?style=for-the-badge)](https://huggingface.co/Solstice-AI/Protium-1.0)
30
+
31
+ **Zero Neutrons. Zero Dead Weight. Pure Thrust.**
32
 
33
  </div>
34
 
35
  ---
36
 
37
+ ## 🔬 What is Protium-1.0?
38
 
39
+ **Protium-1.0** is Solstice-AI's high-efficiency, objective-gated cognitive reasoning architecture. Derived from **Protium** ($^1 ext{H}$) — the lightest, purest isotope of hydrogen consisting of one proton and zero neutrons — Protium-1.0 eliminates all cognitive ballast, rhetorical hesitation, and circular overthinking loops.
 
 
 
40
 
41
+ Unlike legacy reasoning templates that impose arbitrary token floors (e.g. DavidAU's 5,000-token minimums), hardcoded pseudo-schemas, or unconstrained self-conversational babble, Protium-1.0 operates on a **forward-only, objective-gated protocol**.
42
 
43
+ ### Core Architecture Tenets
44
 
45
+ 1. **Token 1 Target Anchor**: The model isolates the exact termination condition at token 1. It anchors where "done and verified" lies before solving.
46
+ 2. **Forward-Only Deduction**: Thinking advances directly toward the target. Internal conversational monologues (*"Let's see..."*, *"Hmm..."*, *"Wait, let me rethink..."*) are strictly eliminated.
47
+ 3. **Objective-Gated Early Exit**: The moment the target condition is satisfied and verified, `<think>` terminates immediately. Zero stall, zero padding, zero manufactured doubt.
48
+ 4. **Anti-MiG-25 / Delta-Only Correction**: If a contradiction or constraint violation occurs, the model isolates and repairs only the specific broken delta. It never spirals into circular loops or complete restarts.
49
+ 5. **Absolute Operational Aura**: Clean, decisive, unhedged output delivery with maximum information density and zero conversational preamble.
 
 
 
 
50
 
51
  ---
52
 
53
+ ## 🎚️ The Cognitive Spectrum
54
+
55
+ Protium-1.0 provides continuous elastic reasoning calibrated as typical output shares (never rigid token quotas):
56
+
57
+ | Level | Identifier | Archetype | Target Share | Ideal Workload |
58
+ |---|---|---|---|---|
59
+ | **[L0]** | `mortal` / `regular` | Instant Execution | 0% (Thinking OFF) | Pure conversational chat, classification, summarization |
60
+ | **[L1]** | `hermes` | Rapid Instinct | < 10% | Instant sanity check, syntax validation, arithmetic verify |
61
+ | **[L2]** | `apollo` | Disciplined Deduction | 10% – 25% | Linear deduction, rule checking, constraint mapping |
62
+ | **[L3]** | `artemis` | Boundary & Failure Audit | 20% – 40% | Edge cases, null checks, concurrency hazard scanning |
63
+ | **[L4]** | `athena` | Strategic Architecture | 30% – 50% | Multi-step refactors, API design, trade-off optimization |
64
+ | **[L5]** | `prometheus` | Defensive Engineering | 40% – 60% | Fault tolerance, scaling bottlenecks, lifecycle resilience |
65
+ | **[L6]** | `solstice` | Deep Systemic Derivation | 50% – 70% | Dual-hypothesis synthesis, axiomatic proof, stress-testing |
66
+ | **[L7]** | `hyperion` | First-Principles *(Default)* | 60% – 85% | Comprehensive first-principles decomposition |
67
+ | **[L8]** | `einstein` | Theoretical Mastery | Majority | Theoretical unification, invariant reduction, deep algorithms |
68
+ | **[L9]** | `oracle` | Proof-Grade Authority | Unbounded | Exhaustive formal proofs, zero-placeholder implementations |
69
+ | **Swarm** | `swarm` | 20-Perspective Swarm | Elastic | Breakthrough ideation, divergent multi-perspective synthesis |
70
+ | **Council**| `council` | Adversarial Research Panel | Elastic | Multi-specialist consensus, formal verification, audit |
71
 
72
+ ---
 
 
 
 
 
 
 
 
 
 
 
 
 
73
 
74
+ ## 🚀 Quickstart & Runtime Integration
 
 
 
75
 
76
+ ### 1. llama.cpp / LM Studio
77
+ Pass any family template via the `--chat-template-file` flag:
78
+ ```bash
79
+ llama-cli -m model.gguf --chat-template-file templates/qwen.jinja -p "[L4] Refactor this async worker"
80
+ ```
81
 
82
+ ### 2. Ollama Modelfile
83
+ ```dockerfile
84
+ FROM ./model.gguf
85
+ TEMPLATE """{{ read_file "templates/universal.jinja" }}"""
86
+ PARAMETER stop "<|im_start|>"
87
+ PARAMETER stop "<|im_end|>"
88
+ ```
89
 
90
+ ### 3. Transformers (Python)
91
  ```python
92
  from transformers import AutoTokenizer
93
 
94
+ tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-32B-Instruct")
95
+ with open("templates/qwen.jinja") as f:
 
 
96
  tokenizer.chat_template = f.read()
97
 
98
+ # Invoke with runtime kwargs:
99
+ prompt = tokenizer.apply_chat_template(
100
+ [{"role": "user", "content": "Prove that every planar graph is 5-colorable."}],
101
+ reasoning_effort="oracle",
102
+ tokenize=False,
103
+ add_generation_prompt=True
104
+ )
105
  ```
106
 
107
+ ---
 
 
 
 
108
 
109
+ ## 🎯 Steering Controls
 
 
110
 
111
+ Protium-1.0 supports instant mid-session steering via inline tags or runtime kwargs:
 
 
 
 
 
 
112
 
113
+ - **Inline Steering**: Place tags anywhere in your prompt:
114
+ - `[L2]` or `{REASON:apollo}`: Sets Apollo level.
115
+ - `[L8]` or `{REASON:einstein}`: Sets Einstein theoretical level.
116
+ - `[regular]` or `[L0]`: Turns off thinking for pure vanilla response.
117
+ - `{REASON:i8}`: Silent execution (applies L8 cognitive rigor internally without emitting `<think>`).
118
+ - **Runtime Kwargs**:
119
+ - `reasoning_effort="hermes"|"apollo"|"artemis"|"athena"|"prometheus"|"solstice"|"hyperion"|"einstein"|"oracle"|"swarm"|"council"`
120
+ - `thinking_level="10"` through `"100"` (continuous spectrum)
121
+ - `regular=True` or `mode="vanilla"` (zero overhead)
 
 
 
 
 
 
 
 
 
 
122
 
123
  ---
124
 
125
+ ## 📂 Model Family Templates
126
+
127
+ | Family | Template File | Native Tokens |
128
+ |---|---|---|
129
+ | **Universal / ChatML** | `templates/universal.jinja` | `<\|im_start\|>`, `<\|im_end\|>` |
130
+ | **Qwen 2.5 / 3.8** | `templates/qwen.jinja` | `<\|im_start\|>`, `<\|im_end\|>`, Vision |
131
+ | **DeepSeek Native** | `templates/deepseek.jinja` | `<|User|>`, `<|Assistant|>`, DSML |
132
+ | **Llama 3 / 4** | `templates/llama3.jinja` | `<\|start_header_id\|>`, `<\|eot_id\|>` |
133
+ | **Mistral / Mixtral** | `templates/mistral.jinja` | `[INST]`, `[/INST]` |
134
+ | **Google Gemma 2 / 3** | `templates/gemma.jinja` | `<start_of_turn>`, `<end_of_turn>` |
135
+ | **Zhipu GLM 4 / 5** | `templates/glm.jinja` | `[gMASK]<sop>`, `<\|user\|>`, `<\|assistant\|>` |
136
+ | **Vanilla Standalone** | `templates/regular_*.jinja` | Zero-overhead clean templates |
137
 
138
+ ---
139
 
140
  <div align="center">
141
+ Built with precision by <b>Solstice AI</b>.
 
142
  </div>