DEV.co
Open-Source LLM · amazon

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.

Source: HuggingFace — huggingface.co/amazon/Mamba2-primed-HQwen3-8B-Instruct
8.5B
Parameters
apache-2.0
License (OSI-approved)
Unknown
Context (tokens)
62.4k
Downloads (30d)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Developeramazon
Parameters8.5B
Context windowUnknown
Licenseapache-2.0 — OSI-approved
Modality / tasktext-generation
Gated on HuggingFaceNo
Downloads62.4k
Likes5
Last updated2026-04-03
Sourceamazon/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.

Quickstart

Run Mamba2-primed-HQwen3-8B-Instruct locally

Load the open weights with 🤗 Transformers and generate — the same model, self-hosted.

quickstart.pypython
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.

Deployment

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

Long-context document analysis and RAG

Process 32K–128K token contexts (e.g., long research papers, contract analysis) with 1.5–2.3× throughput gain. Ideal when batch memory is tight and context dominates compute.

High-throughput inference at scale

Deploy with limited GPU memory. Hybrid architecture supports ~2× more concurrent sequences before hitting VRAM limits, making it cost-efficient for multi-user or multi-batch inference.

Instruction-following and chat applications

Trained for instruction compliance and conversational response generation. Suitable for customer support, Q&A, and general-purpose assistant tasks where performance gaps of 1–3 points are acceptable.

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.

SignalAssessment
MaintenanceActive
DocumentationAdequate
License clarityClear
Deployment complexityModerate
DEV.co fitGood
Assessment confidenceHigh
Security considerations

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.

Software development agency

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.co

Related 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?
Yes. Apache 2.0 is a permissive open-source license that explicitly permits commercial use. You must retain copyright attribution and the license text in your product. There are no additional fees or restrictions.
What GPU do I need to run this model?
Estimated 16–24 GB VRAM for single-GPU deployment at bfloat16 with moderate batch sizes. H100, H200, RTX 6000 Ada, or L40S are suitable. For long-context (128K), KV cache is ~50% smaller than Qwen3-8B due to SSM layers, but still memory-intensive. Benchmarks assume 8× H200 for optimal throughput.
How much slower is this model than Qwen3-8B on reasoning and math?
On short-context benchmarks (Tulu3-dev), Mamba2-primed lags ~3.2 points overall (68.02 vs. 71.21). Math and reasoning are weakest: ~6–8 points lower on GSM8K, MATH, and BigBenchHard. If you need high-accuracy reasoning, consider the base Qwen3-8B or the GKA-primed variant (only ~2 point gap).
Does this model support fine-tuning?
Not documented. The hybrid Attention + Mamba-2 architecture may complicate LoRA or QLoRA. Consult the Hybrid Model Factory GitHub or run initial experiments on a small dataset to validate fine-tuning feasibility.

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.