Maple-Preview 20B (Q4NX & TQ2_0 Quantized for FastFlowLM / AMD Ryzen AI NPU)

This repository contains the FastFlowLM Q4NX & TQ2_0 quantized weights of DeepGrove's Maple-Preview (20B-A1B ternary reasoning MoE model), optimized for high-speed inference on AMD Ryzen AI NPUs (XDNA 2 / Strix Point) and modern AVX2/FMA CPUs.

๐Ÿš€ Model & Runtime Highlights

  • Base Architecture: 20B Total Parameters (~1B active per token, 256 experts with Top-8 routing).
  • Hybrid 3:1 Attention: 18 Sliding Window Attention layers (512-token span) + 6 Full Global Attention layers.
  • Native 128K Context Window: Full 131,072 token context support with $O(1)$ constant 18.9 MB SWA memory overhead.
  • Hardware NPU Acceleration: Achieves >185โ€“202 tokens/second on AMD Ryzen AI 9 HX 370 NPU (/dev/accel/accel0).
  • OpenAI-Compatible REST Server: Native /v1/chat/completions and streaming <think> reasoning support.

๐Ÿ“ฆ File Inventory

  • model.q4nx: FastFlowLM packed ternary/quantized weights for NPU & CPU runtime.
  • maple-preview-TQ2_0-head-Q4_K.gguf: GGUF format checkpoint for cross-runtime compatibility.
  • config.json: Architecture configuration and hyperparameter specifications.
  • tokenizer.json & tokenizer_config.json: Byte-level BPE tokenizer (151,936 vocabulary).
  • chat_template.jinja: Jinja chat template with reasoning toggle (<think> ... </think>).

๐Ÿ› ๏ธ Quickstart with FastFlowLM

1. Clone Runtime & Setup

git clone https://github.com/phantomic12/maple-flm.git
cd maple-flm
bash install.sh

2. Download Weights via Hugging Face CLI (hf)

hf download phantomic12/maple-preview-20b-q4nx --local-dir models/maple-preview-20b

3. Run Inference on NPU

# Interactive Chat
bash scripts/chat_maple.sh

# Launch OpenAI-Compatible REST Server
bash scripts/serve_maple.sh

# Run Hardware Benchmarks
bash scripts/benchmark_npu.sh

๐Ÿ“Š Performance Benchmarks (AMD Ryzen AI 9 HX 370 NPU)

Context Length Prefill Speed Decode Speed Memory Footprint
4K Context 199.6 tok/s 190.2 tok/s ~5.6 GB RAM
32K Context 200.1 tok/s 187.9 tok/s ~5.9 GB RAM
128K Context 202.6 tok/s 185.6 tok/s ~7.1 GB RAM
1M Context (Extreme) 193.2 tok/s 175.4 tok/s ~18.4 GB RAM

๐Ÿ“œ Citation & Credits

Downloads last month
61
GGUF
Model size
20B params
Architecture
maple
Hardware compatibility
Log In to add your hardware

2-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for phantomic12/maple-preview-20b-q4nx

Quantized
(12)
this model