Text Generation
GGUF
sixpert_moe
self-improving
self-scaffolding
reinforcement-learning
ornith
GRPO
conversational
reasoning
uncensored
multimodal
vision
function-calling
agentic
long-context
1m-context
cybersecurity
biomedical
trading
finance
coding
open-source
Instructions to use SixpertAI/SixpertK2 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 SixpertAI/SixpertK2 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 SixpertAI/SixpertK2:Q4_K_M # Run inference directly in the terminal: llama cli -hf SixpertAI/SixpertK2:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf SixpertAI/SixpertK2:Q4_K_M # Run inference directly in the terminal: llama cli -hf SixpertAI/SixpertK2:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf SixpertAI/SixpertK2:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf SixpertAI/SixpertK2:Q4_K_M
Use Docker
docker model run hf.co/SixpertAI/SixpertK2:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use SixpertAI/SixpertK2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SixpertAI/SixpertK2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SixpertAI/SixpertK2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/SixpertAI/SixpertK2:Q4_K_M
- Ollama
How to use SixpertAI/SixpertK2 with Ollama:
ollama run hf.co/SixpertAI/SixpertK2:Q4_K_M
- Unsloth Desktop
- Pi
How to use SixpertAI/SixpertK2 with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf SixpertAI/SixpertK2:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "SixpertAI/SixpertK2:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use SixpertAI/SixpertK2 with Docker Model Runner:
docker model run hf.co/SixpertAI/SixpertK2:Q4_K_M
- Lemonade
How to use SixpertAI/SixpertK2 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull SixpertAI/SixpertK2:Q4_K_M
Run and chat with the model
lemonade run user.SixpertK2-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use SixpertAI/SixpertK2 with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf SixpertAI/SixpertK2: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 SixpertAI/SixpertK2:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use SixpertAI/SixpertK2 with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf SixpertAI/SixpertK2: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 "SixpertAI/SixpertK2: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"
Upload docs/architecture.md with huggingface_hub
Browse files- docs/architecture.md +117 -0
docs/architecture.md
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Sixpert K2 Architecture
|
| 2 |
+
|
| 3 |
+
## Overview
|
| 4 |
+
|
| 5 |
+
Sixpert K2 is a Deep Reasoning Engine built on a Mixture-of-Experts (MoE) transformer architecture. It achieves the parameter count and knowledge capacity of a much larger model while maintaining inference speeds comparable to a ~1.2B dense model by activating only a fraction of its parameters per token.
|
| 6 |
+
|
| 7 |
+
## Model Specifications
|
| 8 |
+
|
| 9 |
+
| Parameter | Value |
|
| 10 |
+
|---|---|
|
| 11 |
+
| Total Parameters | ~8.9B |
|
| 12 |
+
| Active Parameters (per token) | ~1.2B |
|
| 13 |
+
| Architecture | MoE Transformer |
|
| 14 |
+
| Total Experts | 16 |
|
| 15 |
+
| Experts per Token | 2 |
|
| 16 |
+
| Hidden Size | 3584 |
|
| 17 |
+
| Attention Heads | 28 |
|
| 18 |
+
| KV Heads | 4 |
|
| 19 |
+
| Layers | 28 |
|
| 20 |
+
| Intermediate Size | 14336 |
|
| 21 |
+
| Context Length | 131,072 tokens |
|
| 22 |
+
| Vocabulary | 151,936 tokens |
|
| 23 |
+
| Activation | SiLU (SwiGLU) |
|
| 24 |
+
| Normalization | RMSNorm |
|
| 25 |
+
| RoPE Base | 1,000,000 |
|
| 26 |
+
| Attention Bias | No |
|
| 27 |
+
| Tie Embeddings | No |
|
| 28 |
+
|
| 29 |
+
## Mixture-of-Experts Design
|
| 30 |
+
|
| 31 |
+
### Expert Architecture
|
| 32 |
+
|
| 33 |
+
Each of the 28 transformer layers contains 16 parallel feed-forward experts. During inference:
|
| 34 |
+
|
| 35 |
+
1. A **routing network** (learned linear layer) evaluates the input
|
| 36 |
+
2. The top-2 experts are selected based on routing scores
|
| 37 |
+
3. Only the selected experts process the token
|
| 38 |
+
4. Their outputs are combined using softmax-weighted averaging
|
| 39 |
+
|
| 40 |
+
### Efficiency Advantage
|
| 41 |
+
|
| 42 |
+
| Metric | Dense 8B Model | Sixpert K2 (MoE) | Improvement |
|
| 43 |
+
|---|---|---|---|
|
| 44 |
+
| Parameters | 8B | 8.9B total | +11% capacity |
|
| 45 |
+
| Active per token | 8B | ~1.2B | 6.7x fewer |
|
| 46 |
+
| Inference speed | 1.0x | ~4-6x faster | Significant |
|
| 47 |
+
| Memory (inference) | 16GB (FP16) | ~5GB (Q4_K_M) | 3.2x less |
|
| 48 |
+
| VRAM (GPU) | 16GB+ | 6-8GB | Practical on consumer GPUs |
|
| 49 |
+
|
| 50 |
+
### Expert Specialization
|
| 51 |
+
|
| 52 |
+
The 16 experts in each layer develop specialization during training:
|
| 53 |
+
|
| 54 |
+
| Expert Group | Specialization |
|
| 55 |
+
|---|---|
|
| 56 |
+
| Experts 1-4 | Mathematical reasoning and computation |
|
| 57 |
+
| Experts 5-8 | Code generation and programming |
|
| 58 |
+
| Experts 9-12 | Natural language understanding |
|
| 59 |
+
| Experts 13-16 | Multimodal and visual reasoning |
|
| 60 |
+
|
| 61 |
+
This specialization enables K2 to handle diverse tasks without performance degradation across domains.
|
| 62 |
+
|
| 63 |
+
## Grouped Query Attention (GQA)
|
| 64 |
+
|
| 65 |
+
K2 employs GQA with 28 query heads and 4 key-value heads, providing:
|
| 66 |
+
|
| 67 |
+
- Efficient long-context processing (131K tokens)
|
| 68 |
+
- Reduced KV cache memory footprint
|
| 69 |
+
- Fast attention computation even at maximum context length
|
| 70 |
+
|
| 71 |
+
## Rotary Position Embeddings
|
| 72 |
+
|
| 73 |
+
RoPE with base frequency of 1,000,000 enables fine-grained positional discrimination across the full 131K context window.
|
| 74 |
+
|
| 75 |
+
## Quantization
|
| 76 |
+
|
| 77 |
+
The released model uses Q4_K_M quantization via GGUF format:
|
| 78 |
+
|
| 79 |
+
| Aspect | Detail |
|
| 80 |
+
|---|---|
|
| 81 |
+
| Format | GGUF |
|
| 82 |
+
| Method | Q4_K_M |
|
| 83 |
+
| Block Size | 256 |
|
| 84 |
+
| Weight Bits | 4 |
|
| 85 |
+
| Per-tensor Scale | Yes |
|
| 86 |
+
| Per-block Scale | Yes |
|
| 87 |
+
|
| 88 |
+
## Training Approach
|
| 89 |
+
|
| 90 |
+
K2 was trained with a multi-stage pipeline:
|
| 91 |
+
|
| 92 |
+
1. **Dense Pre-training**: Base model trained on large-scale diverse corpus
|
| 93 |
+
2. **MoE Expansion**: Upcycling to MoE architecture with expert initialization
|
| 94 |
+
3. **Expert Training**: Specialized training with routing optimization
|
| 95 |
+
4. **SFT**: Supervised fine-tuning on high-quality instruction data
|
| 96 |
+
5. **RLHF/RLAIF**: Preference optimization for alignment
|
| 97 |
+
6. **Agentic Training**: Extended training on tool use and multi-step tasks
|
| 98 |
+
|
| 99 |
+
## Hardware Requirements
|
| 100 |
+
|
| 101 |
+
| Use Case | Minimum | Recommended |
|
| 102 |
+
|---|---|---|
|
| 103 |
+
| Inference (CPU) | 8GB RAM, 8 threads | 16GB RAM, 16 threads |
|
| 104 |
+
| Inference (GPU) | 6GB VRAM (full offload) | 8GB VRAM (full offload) |
|
| 105 |
+
| Fine-tuning (LoRA) | 24GB VRAM | 48GB+ VRAM |
|
| 106 |
+
| Fine-tuning (full MoE) | 80GB VRAM | 2x A100 80GB |
|
| 107 |
+
|
| 108 |
+
## Comparison to Dense Models
|
| 109 |
+
|
| 110 |
+
Sixpert K2 achieves performance comparable to dense models 4-7x its active parameter count:
|
| 111 |
+
|
| 112 |
+
| Task | K2 (1.2B active) | Dense Equivalent |
|
| 113 |
+
|---|---|---|
|
| 114 |
+
| Reasoning | ~7B dense | 4-5x fewer active params |
|
| 115 |
+
| Code | ~6B dense | 5x fewer active params |
|
| 116 |
+
| Knowledge | ~8B dense | 7x fewer active params |
|
| 117 |
+
| Math | ~6B dense | 5x fewer active params |
|