Instructions to use SurendraVB/Mahiru-MoE-CyberSec with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use SurendraVB/Mahiru-MoE-CyberSec with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf SurendraVB/Mahiru-MoE-CyberSec:Q4_K_M # Run inference directly in the terminal: llama cli -hf SurendraVB/Mahiru-MoE-CyberSec:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf SurendraVB/Mahiru-MoE-CyberSec:Q4_K_M # Run inference directly in the terminal: llama cli -hf SurendraVB/Mahiru-MoE-CyberSec:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf SurendraVB/Mahiru-MoE-CyberSec:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf SurendraVB/Mahiru-MoE-CyberSec:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf SurendraVB/Mahiru-MoE-CyberSec:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf SurendraVB/Mahiru-MoE-CyberSec:Q4_K_M
Use Docker
docker model run hf.co/SurendraVB/Mahiru-MoE-CyberSec:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use SurendraVB/Mahiru-MoE-CyberSec with Ollama:
ollama run hf.co/SurendraVB/Mahiru-MoE-CyberSec:Q4_K_M
- Unsloth Studio
How to use SurendraVB/Mahiru-MoE-CyberSec with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for SurendraVB/Mahiru-MoE-CyberSec to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for SurendraVB/Mahiru-MoE-CyberSec to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for SurendraVB/Mahiru-MoE-CyberSec to start chatting
- Pi
How to use SurendraVB/Mahiru-MoE-CyberSec with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf SurendraVB/Mahiru-MoE-CyberSec:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "SurendraVB/Mahiru-MoE-CyberSec:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- OpenClaw new
How to use SurendraVB/Mahiru-MoE-CyberSec with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf SurendraVB/Mahiru-MoE-CyberSec:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "SurendraVB/Mahiru-MoE-CyberSec:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- Docker Model Runner
How to use SurendraVB/Mahiru-MoE-CyberSec with Docker Model Runner:
docker model run hf.co/SurendraVB/Mahiru-MoE-CyberSec:Q4_K_M
- Lemonade
How to use SurendraVB/Mahiru-MoE-CyberSec with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull SurendraVB/Mahiru-MoE-CyberSec:Q4_K_M
Run and chat with the model
lemonade run user.Mahiru-MoE-CyberSec-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use SurendraVB/Mahiru-MoE-CyberSec with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf SurendraVB/Mahiru-MoE-CyberSec:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default SurendraVB/Mahiru-MoE-CyberSec:Q4_K_M
Run Hermes
hermes
- Atomic Chat
File size: 5,970 Bytes
91d6b2b 4ba639d | 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 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | # Sovereign Mahiru MoE (3x3.6B)
Sovereign Mahiru MoE is a sparse Mixture of Experts (MoE) model built by merging three specialized 3.2B parameter instruction-tuned models, aligned via importance matrix calibration, and optimized for highly efficient local CPU and iGPU execution.
For detailed technical and non-technical documentation on the architecture, merge process, and optimization decisions, see the accompanying [ARCHITECTURE.md](ARCHITECTURE.md) file.
For custom contracts, check out [Custom Alignment Contracts & Terms](CUSTOM_CONTRACTS.md).
---
## Model Specifications
* **Architecture:** Sparse Mixture of Experts
* **Total Parameters:** 7.83 Billion
* **Active Parameters per Token:** 3.6 Billion
* **Expert Routing:** Top-1 gating (enforced via GGUF metadata patch: `expert_used_count = 1`)
* **Context Window:** 131,072 (128k) tokens
* **Base Framework:** Llama-3.2
---
## Quantization Formats
We provide two primary quantized formats optimized for specific hardware footprints:
### 1. Q8_0 Format
* **File Size:** 7.76 GB
* **Target Hardware:** CPU-only environments.
* **Characteristics:** Minimal perplexity loss compared to the FP16 base model. Best suited for high-fidelity reasoning workloads.
### 2. Q4_K_M Format
* **File Size:** 4.47 GB
* **Target Hardware:** Integrated GPUs (e.g., Intel Iris Xe via Vulkan/OpenCL) and memory-constrained devices.
* **Characteristics:** Hybrid quantization scheme. A minimum bit-width of 4-bit (Q4_K) is enforced on feed-forward blocks, while critical tensors (attention keys, values, and gate weights) are preserved at 6-bit (Q6_K) and 8-bit limits. This fits within the 8.0 GB shared VRAM ceiling of common iGPUs.
---
## Benchmarks & Performance
The following performance benchmarks were recorded on a local Windows system running an Intel Core CPU alongside an Intel Iris Xe integrated GPU (Shared VRAM ceiling: 8.0 GB).
| Configuration | Prompt Evaluation Speed | Generation Speed | RAM/VRAM Footprint | Stability |
|---|---|---|---|---|
| **Q8_0 (CPU, 4 Threads)** | 7.95 tokens/sec | 3.30 tokens/sec | ~7.8 GB (RAM) | 100% Stable |
| **Q4_K_M (iGPU Vulkan, 100% Offload)** | 8.80 tokens/sec | 5.90 tokens/sec | ~4.5 GB (Shared VRAM) | 100% Stable |
*Note: In Q4_K_M mode, offloading all 29 model layers to the GPU achieves a ~78% text generation speedup compared to CPU execution.*
### Model Benchmarks & Evaluation Reports
Sovereign Mahiru's sparse MoE architecture was specifically designed to house the specialized **Sovereign Cyber Expert** and logical reasoning expert layers, routing security and logic queries directly to optimized neural sub-networks.
Detailed scores, question transcripts, and interactive execution logs are documented in the following benchmark reports:
* **Cybersecurity Certification Suite:** [cyber_benchmark.md](cyber_benchmark.md)
* **Autonomous Agentic Sandboxes:** [agent_benchmark.md](agent_benchmark.md)
* **General Academic Reasoning Suite:** [MMLU_benchmark.md](MMLU_benchmark.md)
* **Coding Proficiency Benchmark:** [HumanEval_benchmark.md](HumanEval_benchmark.md)
---
## How to Run
You can run these models locally using `llama.cpp`.
### Q8_0 CPU Inference
```bash
llama-cli.exe -m mahiru_moe_q8_0.gguf -n 512 -t 4 -p "<|start_header_id|>system<|end_header_id|>\nYou are a professional technical assistant.<|eot_id|><|start_header_id|>user<|end_header_id|>\nWrite a python script to parse a binary file.<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n"
```
### Q4_K_M iGPU (Vulkan) Inference
Ensure your environment supports Vulkan drivers. Offload all 29 layers to the GPU:
```bash
llama-cli.exe -m mahiru_moe_q4_k_m.gguf -ngl 29 -n 512 -p "<|start_header_id|>system<|end_header_id|>\nYou are a professional technical assistant.<|eot_id|><|start_header_id|>user<|end_header_id|>\nWrite a python script to parse a binary file.<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n"
```
---
## Importance Matrix Calibration
Quantization was executed using a custom importance matrix (`Mahiru_v2.imatrix.dat`) generated over an 85.2 KB domain-diverse training corpus. This preserves logical reasoning and prevents quality degradation in the routing and attention layers. Detailed training configurations are documented in [ARCHITECTURE.md](ARCHITECTURE.md).
---
## Model Merging & Optimization
Sovereign Mahiru MoE was constructed using a custom neural deduplication merge technique that fuses three specialized 3.2B instruction-tuned models (general language base, logical thinker, and cyber expert) into a shared network trunk. The architecture eliminates overlapping parameter networks and enforces Top-1 routing to optimize runtime VRAM footprint. Detailed merge decisions are documented in [ARCHITECTURE.md](ARCHITECTURE.md).
---
## Distribution, Safety, & Custom Contracts
All parent expert models integrated into Sovereign Mahiru MoE are fully abliterated (unaligned/uncensored). Consequently, this model is not intended for unrestricted public distribution.
* **Interactive Demo:** This model is hosted on Hugging Face as an interactive conversational playground demo where users can test and converse with the model directly under custom safety guardrails ([Placeholder: Model Demo Playground Page](demo_placeholder)).
* **Custom Models & Contracts:** For development of bespoke or custom-aligned models, contract requests are accepted. Please refer to [Custom Alignment Contracts & Terms](CUSTOM_CONTRACTS.md) for licensing, alignment constraints, and contact information.
* **Associated Components:** For details regarding embedded safety parameters, persona alignments, and downstream visual tracking caches, refer to [ARCHITECTURE.md](ARCHITECTURE.md).
---
For custom contracts, check out [Custom Alignment Contracts & Terms](CUSTOM_CONTRACTS.md).
This model is a derivative work of Meta Llama 3.2 3B and is subject to the Meta Llama 3.2 Community License Agreement. |