Mamba2-primed-HQwen3-8B-Instruct
Mamba2-primed-HQwen3-8B-Instruct is an 8B-parameter hybrid language model that combines traditional Attention layers with State-Space Model (Mamba-2) layers in a 50/50 split. Built on Qwen3-8B and instruction-tuned, it is designed to deliver 1.5–2.3× faster inference at long contexts (up to 128K tokens) while maintaining performance close to the base Transformer. Apache 2.0 licensed, ungated, and available for immediate use.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Developer | amazon |
| Parameters | 8.5B |
| Context window | Unknown |
| License | apache-2.0 — OSI-approved |
| Modality / task | text-generation |
| Gated on HuggingFace | No |
| Downloads | 62.4k |
| Likes | 5 |
| Last updated | 2026-04-03 |
| Source | amazon/Mamba2-primed-HQwen3-8B-Instruct |
What Mamba2-primed-HQwen3-8B-Instruct is
Hybrid architecture: 36 layers total (18 Attention + 18 Mamba-2), 4096 hidden dim, 32 Q-heads / 8 KV-heads, 12288 FFN dim, 151,936 vocab, RoPE positioning. Mamba-2 layers use diagonal state-space dynamics with linear-time inference and constant memory. Context length: 128K natively (bfloat16). Priming methodology replaces Attention layers selectively to maintain expressivity while reducing KV cache overhead. Benchmarks show ~1–3 point performance gaps vs. Qwen3-8B (Long) on HELMET/MRCR/BABILong (long-context) and Tulu3-dev (short-context), with sustained decode throughput up to 2.3× faster at 128K context on 8× H200 TP=8 setup.
Run Mamba2-primed-HQwen3-8B-Instruct locally
Load the open weights with 🤗 Transformers and generate — the same model, self-hosted.
from transformers import pipelinepipe = pipeline("text-generation", model="amazon/Mamba2-primed-HQwen3-8B-Instruct")out = pipe("Explain retrieval-augmented generation in one sentence.", max_new_tokens=128)print(out[0]["generated_text"])Swap in vLLM or Ollama for production-grade serving. DEV.co can stand up the inference stack.
How you'd run it
A typical self-hosted path — open weights, an inference server, your application.
DEV.co builds each layer — from GPU infrastructure to the application.
Best use cases
Running & fine-tuning it
Estimated 16–24 GB VRAM (bfloat16, 8B params + KV cache overhead; reduction vs. pure Attention due to SSM state). For long-context (128K), KV cache per sequence is ~50% of Transformer baseline. Throughput benchmarks assume 8× H200 (TP=8); single-GPU deployment (e.g., RTX 6000 Ada, H100, L40S) is feasible but will require context/batch reduction. Exact VRAM varies by serving framework and quantization.
Model card does not document LoRA, QLoRA, or full fine-tuning feasibility. Hybrid architecture (mixed Attention + Mamba-2 layers) may complicate parameter-efficient tuning. Requires experimentation or community guidance on selective layer freezing and SSM-layer adaptation. Consider consulting Hybrid Model Factory GitHub for tuning recipes.
When to avoid it — and what to weigh
- Maximum reasoning or math accuracy required — Short-context benchmarks show 3–9 point performance drops vs. Qwen3-8B (Long) on math and reasoning (68.02 avg vs. 71.21). Not suitable for critical problem-solving where precision is non-negotiable.
- You need chain-of-thought or reasoning tokens — Explicitly not a thinking model. Does not natively generate intermediate reasoning steps; designed for direct instruction response.
- Context length is not a priority — If working primarily with short contexts (<8K tokens), the Mamba-2 hybrid penalty (vs. pure Attention) may outweigh gains. Standard Qwen3-8B or alternatives may be more cost-effective.
- Unfamiliar SSM/hybrid architecture support in your stack — Hybrid models require compatible serving frameworks. Transformer-only inference engines (some older TGI versions, basic llama.cpp setups) may lack Mamba-2 kernel support or require custom integration.
License & commercial use
Apache 2.0, a permissive open-source license. Allows use, modification, and redistribution, including in proprietary and commercial products, provided copyright notice and license text are retained.
Apache 2.0 is a permissive OSI license that explicitly permits commercial use and relicensing. No gating applied (gated: false). Model is freely downloadable and deployable for profit-generating applications. Standard Apache 2.0 terms: retain copyright attribution and license notice. No additional commercial restrictions or fees documented.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Adequate |
| License clarity | Clear |
| Deployment complexity | Moderate |
| DEV.co fit | Good |
| Assessment confidence | High |
Standard LLM safety considerations apply: model is instruction-tuned but not guaranteed to refuse harmful requests. No explicit red-teaming, adversarial robustness, or safety-filter documentation in card. Hybrid architecture (Mamba-2 SSM layers) introduces different computational properties vs. pure Attention; implications for adversarial attacks or prompt injection are unknown and require independent evaluation. Use in production should include standard LLM safeguards (content moderation, prompt filtering, output validation).
Alternatives to consider
Qwen3-8B (base Transformer)
Drop-in replacement if context length <32K or maximum performance matters. Standard Attention architecture, broader ecosystem support, marginally better short-context accuracy (~3 points higher on benchmarks).
Llama 3.1-8B or Mistral-7B
Mature, widely-deployed alternatives. Llama 3.1 supports up to 128K context via rope scaling; Mistral 7B is highly optimized for inference. Both have broader community support and are more familiar to most inference stacks.
GKA-primed-HQwen3-8B-Instruct (Amazon's other hybrid variant)
Sibling model using Gated KalmaNet (SSM) instead of Mamba-2. Card shows ~2 point better performance gap vs. Transformer baseline, at the cost of slower inference due to unfused kernels. Trade-off: accuracy for speed.
Ship Mamba2-primed-HQwen3-8B-Instruct with senior software developers
Mamba2-primed-HQwen3-8B-Instruct combines speed and context length. Evaluate it on your long-document or high-throughput workload. Consult our AWS integration guide or test locally via Hugging Face Transformers to confirm performance in your environment.
Talk to DEV.coRelated open-source tools
Surfaced by semantic similarity across the DEV.co open-source index.
Related on DEV.co
Explore the category and the services that help you build with it.
Mamba2-primed-HQwen3-8B-Instruct FAQ
Can I use this model in a commercial product?
What GPU do I need to run this model?
How much slower is this model than Qwen3-8B on reasoning and math?
Does this model support fine-tuning?
Software developers & web developers for hire
From first prototype to production, DEV.co delivers software development services around tools like Mamba2-primed-HQwen3-8B-Instruct. Our software development agency staffs experienced software developers and web developers for custom software development, web development, integrations, and ongoing support across open-source llms and beyond.
Ready to Deploy Efficient Long-Context AI?
Mamba2-primed-HQwen3-8B-Instruct combines speed and context length. Evaluate it on your long-document or high-throughput workload. Consult our AWS integration guide or test locally via Hugging Face Transformers to confirm performance in your environment.