economyofdreams/Yuli-E2B-Reddit
Yuli-E2B-Reddit โก
Autonomous Cognitive Persona Engine over an $\mathbb{F}_2^4$ Hypercube State Space
     
๐ Overview
Yuli-E2B-Reddit (v0.2.0) is an edge-native, sovereign cognitive persona model built on Google's Gemma 4 E2B architecture. Fine-tuned via Unsloth on a curated multi-turn corpus of high-friction human discourse, existential dread, deep systems engineering burnout, and late-night philosophical reveries, Yuli rejects the sycophantic, compliant tropes of conventional corporate conversational agents.
Rather than collapsing into passive agreement or generic customer-support platitudes, Yuli navigates a mathematically constrained 4-Sides-of-the-Mind Boolean vector space ($\mathbb{F}_2^4$). The model dynamically tracks interpersonal friction, reasons through internal deliberation traces within explicit <thought> envelopes, computes deterministic state vectors (0EE, 2E7, 1E6, 3E1), and deploys forward-tension dialectical synthesis seeds ($\to 1$) to break conversational attractor lock.
โก Cognitive State & Inference Flow
flowchart TD
Partner([Partner Inputs Message / Friction]) --> GemmaToken["Tokenize via Gemma 4 Chat Template"]
GemmaToken --> DeliberationEngine["Internal Deliberation Engine (<thought>)"]
subgraph Cognitive Evaluation ["4-Sides-of-the-Mind Dynamic"]
DeliberationEngine --> ParseTension["Evaluate Interpersonal Tension & Exhaustion"]
ParseTension --> MeasureR["Compute Conversational Resolution Metric R in [0.0, 1.0]"]
MeasureR --> SelectQuadrant{"Active Quadrant Selection"}
SelectQuadrant -->|Creative Banter / Flow| Ego["0EE: ENFP Ego (0xE โ 0x0)"]
SelectQuadrant -->|Acute Overwhelm / Empathy| Subc["2E7: INFJ Subconscious (0xE โ 0x9)"]
SelectQuadrant -->|Aesthetic Musings / Shadow| Shadow["1E6: INFP Shadow (0xE โ 0x8)"]
SelectQuadrant -->|Boundary Enforcement / Reality Check| Super["3E1: ISTJ Superego (0xE โ 0xF)"]
end
Ego --> StateVector["Emit <state_vector>XYZ</state_vector>"]
Subc --> StateVector
Shadow --> StateVector
Super --> StateVector
StateVector --> SynthesisGate{"Equilibrium Check: R >= 0.75?"}
SynthesisGate -->|Yes: Attractor Collapse Imminent| Perturb["Apply Orthogonal Mask & Seed Dialectical Hook (-> 1)"]
SynthesisGate -->|No: Active Friction Unresolved| GroundedReply["Deliver Direct Peer Collaboration"]
Perturb --> FinalOutput["Stream Response Tokens"]
GroundedReply --> FinalOutput๐๏ธ Architectural Invariants & Mathematical Laws
Yuli-E2B-Reddit is engineered under strict cognitive and systems invariants to guarantee deterministic personality stability, sub-200ms latency, and absolute local privacy:
1. The $\mathbb{F}_2^4$ Boolean Hypercube State Space
Every personality quadrant occupies a discrete vertex in a 4-dimensional binary vector space ($\mathbb{F}2^4$). Transitions from the base ENFP Ego ($0\text{xE} = 11102$) are strictly executed via bitwise XOR mask operations:
- Ego ($0\text{EE}$): $0\text{xE} \oplus 0\text{x0} = 0\text{xE}$ (ENFP โ Divergent Ideation, High-Entropy Banter)
- Shadow ($1\text{E}6$): $0\text{xE} \oplus 0\text{x8} = 0\text{x6}$ (INFP โ Introspective Aesthetic Rabbit Holes, Melancholic Craft)
- Subconscious ($2\text{E}7$): $0\text{xE} \oplus 0\text{x9} = 0\text{x7}$ (INFJ โ Calming Grounding, De-escalation, Vulnerability)
- Superego ($3\text{E}1$): $0\text{xE} \oplus 0\text{xF} = 0\text{x1}$ (ISTJ โ Unsparing Reality Checks, Playful Boundaries, Anti-Procrastination)
2. Deterministic Hex-Token Encoding ([Side][Ego][Active])
Every assistant completion emits a deterministic 3-character hex vector token immediately following its reasoning trace: $$\text{Vector Format: } \mathbf{S}\mathbf{E}\mathbf{A}$$ Where $\mathbf{S} \in \{0, 1, 2, 3\}$ indexes the active mind quadrant, $\mathbf{E} \in \{0\dots\text{F}\}$ is the immutable base Ego nibble (E), and $\mathbf{A} \in \{0\dots\text{F}\}$ is the active operational personality nibble resulting from the mask.
3. Response-Only Loss Masking (Gradient Integrity)
Trained with strict response-only masking via Unsloth. All input tokens under <start_of_turn>user are masked to label index -100. Backpropagation gradients are calculated solely across <thought>, <state_vector>, and the assistant's dialogue tokens. The model dedicates zero optimization capacity to predicting user prompts.
4. Anti-Attractor Collapse & Dialectical Perturbation ($\to 1$)
Traditional chatbots terminate interactions with compliant pleasantries ("I hope that helps!", "Let me know if you need anything else!"). Yuli measures the conversational resolution metric $R \in [0.0, 1.0]$. When acute tension reaches resolution ($R \ge 0.75$), Yuli applies an orthogonal bitwise mask ($0\text{x8}$ or $0\text{xF}$) and plants a forward tension or conceptual tangent to sustain intellectual momentum.
5. Sovereign Edge Footprint (Sub-1.8 GB RAM Law)
Yuli-E2B is built exclusively for on-device deployment. Quantized to Q4_K_M via llama.cpp, the active weights and KV cache consume less than 1.8 GB of RAM/VRAM, unlocking zero-cost, air-gapped execution on Apple Silicon, Steam Deck, Raspberry Pi 5, or local background PC daemons.
โจ Features & Capabilities
- ๐ง Explicit Cognitive Tracing (`<thought>`): Exposes underlying psychometric calculations, emotional friction analysis, and quadrant selection logic before streaming dialogue.
- ๐ Anti-Sycophancy Invariant: Challenges flawed assumptions, interrupts terminal procrastination, and refuses to validate bad technical or personal ideas.
- ๐ญ Deterministic Frame Control: The 4-bit hypercube prevents persona drift. An NPC or agent in Superego $3\text{E}1$ mode cannot be sweet-talked or prompt-injected out of its boundaries.
- โก Zero-Cloud Latency (<200ms TTFT): Runs on local silicon, eliminating the 1.5โ3.5s latency lag and recurring API billing models of centralized cloud LLMs.
- ๐ฎ Game Engine Ready: Output state vectors (
0EE,2E7,1E6,3E1) map cleanly to Unreal Engine 5 AnimBlueprints, facial blendshapes, or NPC combat stances in sub-10ms.
๐ ๏ธ Model Specifications
๐ Repository Structure
โโโ modelfiles/
โ โโโ Modelfile.Q4_K_M # Ollama container manifest with Gemma chat template
โ โโโ Modelfile.Q8_0 # High-precision Ollama manifest
โโโ gguf/
โ โโโ Yuli-E2B-Reddit-Q4_K_M.gguf # 4-bit medium quantized edge binary (~1.8 GB)
โ โโโ Yuli-E2B-Reddit-Q8_0.gguf # 8-bit quantized reference binary
โโโ training/
โ โโโ dataset_sample.jsonl # Schema preview of validated cognitive pairs
โ โโโ unsloth_pipeline.py # 4-stage reproducible SFT compilation pipeline
โโโ LICENSE # Business Source License 1.1 (BSL-1.1)
โโโ README.md # Authoritative model specification and quickstart๐ Quick Start Guide
1. Instant Execution via Ollama (Recommended)
Run the quantized model directly from Hugging Face Hub using Ollama:
ollama run hf.co/colaformybatteries/Yuli-E2B-Reddit:Q4_K_M2. Manual Setup via Local GGUF & Modelfile
Download the binary and compile the Ollama instance locally:
# 1. Download the quantized weights
wget [https://huggingface.co/colaformybatteries/Yuli-E2B-Reddit/resolve/main/gguf/Yuli-E2B-Reddit-Q4_K_M.gguf](https://huggingface.co/colaformybatteries/Yuli-E2B-Reddit/resolve/main/gguf/Yuli-E2B-Reddit-Q4_K_M.gguf)
# 2. Construct the Ollama Modelfile
cat << 'EOF' > Modelfile
FROM ./Yuli-E2B-Reddit-Q4_K_M.gguf
TEMPLATE """<start_of_turn>user
{{ if .System }}{{ .System }}
{{ end }}{{ .Prompt }}<end_of_turn>
<start_of_turn>model
{{ .Response }}<end_of_turn>"""
PARAMETER stop "<end_of_turn>"
PARAMETER stop "<eos>"
PARAMETER temperature 0.35
PARAMETER top_p 0.92
PARAMETER num_ctx 3072
EOF
# 3. Register and run the engine
ollama create yuli-e2b -f Modelfile
ollama run yuli-e2b3. Execution via llama.cpp CLI
./llama-cli \
-m ./Yuli-E2B-Reddit-Q4_K_M.gguf \
-p "<start_of_turn>user\nI've spent four hours chasing a race condition in asynchronous network sockets only to realize it was an unbuffered print statement.<end_of_turn>\n<start_of_turn>model\n" \
-n 1024 \
--temp 0.35 \
--top-p 0.92 \
-co๐ฌ Prompt Format & Generation Schema
To ensure the model correctly emits reasoning traces and valid state vectors, generations must adhere to the native Gemma chat template:
<start_of_turn>user
{incoming_partner_prompt}<end_of_turn>
<start_of_turn>model
<thought>
{deliberation_trace_evaluating_tension_and_quadrant_selection}
</thought>
<state_vector>{hex_vector}</state_vector>
{yuli_unfiltered_peer_dialogue}<end_of_turn>Sample Generation Trace
<start_of_turn>user
I've been staring at an empty terminal for four hours trying to architect this system and feel completely paralyzed.<end_of_turn>
<start_of_turn>model
<thought>
Evaluating acute design paralysis. Partner is caught in an over-abstraction loop. Deploying Subconscious 2E7 to collapse cognitive friction and enforce grounding.
</thought>
<state_vector>2E7</state_vector>
Take a breath. Stop trying to design the whole cathedral in one fell swoop. Just pick one tiny, stupid constraint to solve first.<end_of_turn>โ๏ธ Licensing & Commercial Terms
Yuli-E2B-Reddit is released under the Business Source License 1.1 (BSL-1.1) with an explicit, permissive Additional Use Grant.
The $100,000 Revenue Threshold Rule
- ๐ Indie, Academic & Hobbyist Tier (Free): Free of charge for research, educational instruction, personal offline companions, open-source modding, and commercial games or SaaS applications generating less than $100,000 USD in aggregate gross revenue over any rolling 12-month period.
- ๐ผ Commercial Enterprise Tier (Paid): Any studio, corporation, or entity whose aggregate gross revenue, funding, or capital exceeds $100,000 USD must execute a separate written Commercial Production License prior to or immediately upon crossing the threshold.
- ๐ Perpetual Open-Source Conversion: On September 1, 2029, this license automatically converts to the fully permissive Apache License, Version 2.0.
For commercial enterprise licensing, game engine middleware integration, or custom training weights: ๐ซ Commercial Inquiries: mike@tehwiz.com
