---
license: mit
language:
- en
- zh
tags:
- chat-template
- jinja
- hypersynapse-sas
- cognitive-architecture
- reasoning
- multi-agent
- swarm
- deepseek
- qwen
- glm
- llama
- mistral
- gemma
- universal
pipeline_tag: text-generation
---
# 🧠 HyperSynapse-SAS (SelfAgentSwarm) Chat Templates
### *The Unified 10-Level Cognitive Escalation & Autonomous Multi-Agent Swarm Framework*
[](https://huggingface.co/Solstice-AI)
[](https://opensource.org/licenses/MIT)
[](https://huggingface.co/Solstice-AI/HyperSynapse-SAS-Chat-Templates)
[](https://huggingface.co/Solstice-AI/HyperSynapse-SAS-Chat-Templates)
[](https://huggingface.co/Solstice-AI/HyperSynapse-SAS-Chat-Templates)
---
## 🌟 Overview
**HyperSynapse-SAS** (HyperSynapse Self-Agent Swarm) is a high-performance cognitive chat template framework that equips any Large Language Model with:
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.
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.
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.
---
## 📁 Available Templates
| Template | File | Target Architectures & Families |
| :--- | :--- | :--- |
| **Universal (Model-Agnostic)** | [`templates/universal.jinja`](templates/universal.jinja) | Standard ChatML, vLLM, SGLang, llama.cpp, Ollama, LM Studio, Any LLM |
| **DeepSeek** | [`templates/deepseek.jinja`](templates/deepseek.jinja) | DeepSeek-V3, DeepSeek-V4, DeepSeek-V4.1 Flash, DSML Tool Calling |
| **Qwen** | [`templates/qwen.jinja`](templates/qwen.jinja) | Qwen 2.5, Qwen 3, Qwen 3.5, Qwen 3.8, Qwopus, QwQ |
| **GLM** | [`templates/glm.jinja`](templates/glm.jinja) | GLM-4, GLM-5.3, GLM Flash |
| **Llama** | [`templates/llama3.jinja`](templates/llama3.jinja) | Meta Llama 3, Llama 3.1, Llama 3.2, Llama 3.3, Llama 4 |
| **Mistral** | [`templates/mistral.jinja`](templates/mistral.jinja) | Mistral 7B/12B, Mixtral 8x7B/8x22B, Codestral, Pixtral |
| **Gemma** | [`templates/gemma.jinja`](templates/gemma.jinja) | Google Gemma 2, Gemma 3, Gemma 4 |
---
## 🎯 Cognitive Trigger Spectrum
Simply prepend a tag to your query or pass `--level X` in your system instructions:
### Solo Cognitive Escalation (Pure Analytical Focus)
| Tag / Level | Persona / Archetype | Budget | Cognitive Modality |
| :--- | :--- | :--- | :--- |
| **`[Level 0]`** | **Mortal** | 0 tokens | **Instant Response**: CoT/thinking completely disabled. Rapid, direct execution with zero discursive fluff. |
| **`[Level 1]`** | **Hermes** | ~256 tokens | **Rapid Instinct**: Single-path heuristic sanity check before emitting answer. |
| **`[Level 2]`** | **Apollo** | ~512 tokens | **Crisp Logic**: Explicit step-by-step reasoning with edge-case validation. |
| **`[Level 3]`** | **Artemis** | ~1,024 tokens | **Boundary Hunter**: Focuses on edge cases, off-by-one errors, and null states. |
| **`[Level 4]`** | **Athena** | ~2,048 tokens | **Systemic Balance**: Second-order effects, system architecture, modular design. |
| **`[Level 5]`** | **Prometheus** | ~4,096 tokens | **Defensive Engineering**: Fault tolerance, production bottlenecks, failure mode audit. |
| **`[Level 6]`** | **Solstice** | ~8,192 tokens | **Deep Derivation**: Exhaustive theoretical derivation and mathematical mechanics. |
| **`[Level 7]`** | **Hyperion (Default)** | ~16,384 tokens | **Foundational Synthesis**: First-principles breakdown from ground axioms. |
| **`[Level 8]`** | **Einstein** | ~32,768 tokens | **Mastery & Invariants**: Theoretical proofs, deep algorithmic complexity analysis. |
| **`[Level 9]`** | **Oracle** | Unbounded | **Maximal Rigor**: Exhaustive search runway, proof-grade verification, definitive closure. |
### Autonomous Multi-Agent Swarm Modes
| Trigger | Mode Name | Protocol & Behavior |
| :--- | :--- | :--- |
| **`[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. |
| **`[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. |
---
## 🚀 Quick Start
### 1. Using the Universal Template in Python (`transformers`)
```python
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-7B-Instruct")
# Load the universal HyperSynapse-SAS template
with open("templates/universal.jinja") as f:
tokenizer.chat_template = f.read()
messages = [
{"role": "user", "content": "[Level 3] Explain quantum decoherence rigorously."}
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
print(prompt)
```
### 2. Apply Directly to Any Hugging Face Hub Repo
Use our built-in CLI applier to update any repository or local folder with one command:
```bash
# Push to Hugging Face Model Hub
python apply_template.py --template deepseek --model-id Solstice-AI/My-Model --push
# Or apply locally to a weights directory
python apply_template.py --template universal --local-dir ./my_local_model
```
### 3. Using in `vLLM` or `SGLang`
Pass `--chat-template templates/universal.jinja` directly at startup:
```bash
vllm serve meta-llama/Llama-3.1-8B-Instruct \
--chat-template templates/universal.jinja \
--port 8000
```
### 4. Using in `llama.cpp`
```bash
llama-cli \
--model my_model.gguf \
--chat-template-file templates/universal.jinja \
-p "<|im_start|>user\n[swarm] Architect an ultra-low latency event bus.<|im_end|>\n<|im_start|>assistant\n"
```
### 5. Ollama Modelfile
```dockerfile
FROM ./my_model.gguf
TEMPLATE """{{ if .System }}<|im_start|>system
{{ .System }}<|im_end|>
{{ end }}{{ range .Messages }}<|im_start|>{{ .Role }}
{{ .Content }}<|im_end|>
{{ end }}<|im_start|>assistant
"""
PARAMETER stop "<|im_end|>"
```
---
## 📄 License
Released under the permissive **MIT License**. Free for commercial and personal use across any open-weight model or inference stack.
Developed by Solstice-AI
Unshackled Cognition • Multi-Agent Collective Intelligence • Scalable Autonomous Systems