CoolFace
Modelpublic

Ooriginador/LLaMA-3.2-3B-ArkCompact-1.58bit

sourceHugging Faceapache-2.0updated 26d agoView on Hugging Face
0likes
Model Card

LLaMA-3.2-3B-ArkCompact-1.58bit

Sovereign 1.58-Bit Base-3 Ternary Model (3.21B) — Powered by ArkheionNet & ArkCompact

Meta LLaMA 3.2 3B Instruct quantized to 1.58-bit Base-3 ternary format (5 trits/byte). Ideal for general dialogue, reasoning and edge mobile execution.


⚡ Verified Hardware Performance (AMD Radeon RX 6600M & RDNA2)

MetricMeasured ValueNotes
Parameters3.21BBase Architecture
Context Window128kFull RoPE Scaling
Single-Stream Throughput185.0 tok/sZero Jitter / Minimal Latency
Speculative Boost (Tree-Attention)290.0 tok/s2D Causal Verification
Peak Wave32 GPU Batch Throughput10,927.0 tok/s ⚡In-Place Fused MatVec
VRAM Footprint804.9 MB7.6x to 16x Smaller than FP16
Quantization Format1.58-bit Base-35 Trits / Byte ($w \in \{-1, 0, +1\}$)
Mathematical Fidelity (Pearson $\rho$)$\ge 0.942$Across all 2D Linear Layers

🏛️ Mathematical Quantization Architecture

ArkCompact quantizes weights into ternary states using Base-3 Packing (5 trits per byte): $$w_{i,j} \in \{-\alpha, 0, +\alpha\}, \quad 3^5 = 243 \le 256$$

This eliminates 16-bit floating-point multiplications, replacing them with integer accumulations and fused Wave32 bitwise masks:

  • —Zero-Copy Memory-Mapped Loading (`mmap`): Model initializes in $< 450\text{ ms}$.
  • —Multi-Head Latent Attention (MLA): KV-Cache footprint reduced by $-85.9\%$.
  • —Chunked Prefill: Eliminates Head-of-Line blocking in continuous batching.

🚀 Quickstart & Inference

1. Run natively with ark-engine (Rust Server)

bash
# Clone and build ArkheionNet
git clone https://github.com/Arkheion/ArkheionNet.git
cd ArkheionNet
cargo build --release -p ark-engine

# Start sovereign server on port 11500
./target/release/ark-engine server --port 11500 --model output/llama-3.2-3b.ark

2. Query via OpenAI-Compatible REST API

bash
curl http://localhost:11500/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "LLaMA-3.2-3B-ArkCompact-1.58bit",
    "messages": [
      {"role": "user", "content": "Explain quantum decoherence in simple terms."}
    ],
    "temperature": 0.2,
    "max_tokens": 512
  }'

3. Use via ark-sdk (Rust)

rust
use ark_sdk::ArkClient;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = ArkClient::new("http://localhost:11500");
    let mut stream = client.generate_stream("LLaMA-3.2-3B-ArkCompact-1.58bit", "Hello Arkheion!").await?;
    
    while let Some(chunk) = stream.next().await {
        print!("{}", chunk?.response);
    }
    Ok(())
}

📄 License & Attribution