DEV.co
Open-Source LLM · unsloth

Qwen3-8B

Qwen3-8B is an 8.2B-parameter open-source language model from Alibaba's Qwen series that supports both thinking (reasoning) and non-thinking (fast) modes within a single model. It handles 32K context natively (up to 131K with YaRN), supports 100+ languages, and is optimized for instruction-following, math, code, and agent tasks. The unsloth variant is a community distribution under Apache 2.0 license with 100K+ downloads.

Source: HuggingFace — huggingface.co/unsloth/Qwen3-8B
Unknown
Parameters
apache-2.0
License (OSI-approved)
Unknown
Context (tokens)
100.1k
Downloads (30d)

Key facts

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

FieldValue
Developerunsloth
ParametersUnknown
Context windowUnknown
Licenseapache-2.0 — OSI-approved
Modality / tasktext-generation
Gated on HuggingFaceNo
Downloads100.1k
Likes16
Last updated2025-05-13
Sourceunsloth/Qwen3-8B

What Qwen3-8B is

Causal language model with 8.2B parameters (6.95B non-embedding), 36 layers, 32 query heads + 8 key-value heads (GQA). Natively 32,768 token context; extendable to 131,072 via YaRN. Dual-mode architecture: thinking mode (wrapped in <think>...</think> tokens, reasoning-optimized) and non-thinking mode (standard chat inference). Requires transformers ≥4.51.0. Supports safetensors format; compatible with vLLM (≥0.8.4), SGLang (≥0.4.6.post1), llama.cpp, Ollama, LMStudio, MLX-LM.

Quickstart

Run Qwen3-8B locally

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

quickstart.pypython
from transformers import pipelinepipe = pipeline("text-generation", model="unsloth/Qwen3-8B")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

Complex reasoning tasks

Enable thinking mode for math problems, logic puzzles, and code debugging where step-by-step reasoning improves accuracy.

Multilingual conversational AI

Deploy with non-thinking mode disabled for rapid, multilingual customer support, chatbots, and real-time dialogue across 100+ languages.

AI agent workflows

Integrate with tool-calling frameworks (both thinking and non-thinking modes) for autonomous agent orchestration and complex task decomposition.

Running & fine-tuning it

Estimated 16–20 GB VRAM for full-precision (bfloat16) inference on a single GPU (e.g., A100 40GB, H100, RTX 6000). With 8-bit quantization: ~8–10 GB. With 4-bit (GPTQ/AWQ): ~4–6 GB. Training (full or LoRA) on a single 24GB GPU possible but memory-tight; 40GB+ recommended for comfortable multi-GPU setups.

LoRA and QLoRA fine-tuning are plausible given the 8.2B parameter count and Hugging Face Transformers support. No explicit LoRA adapter weights published in the model card. For thinking mode fine-tuning, ensure generation config respects thinking token handling (<think>...</think> preservation). Recommended: use peft library with LoRA rank 8–16 and alpha 16–32 to avoid catastrophic forgetting of reasoning behavior.

When to avoid it — and what to weigh

  • Ultra-low latency requirements — Thinking mode adds significant inference overhead (model generates hidden reasoning tokens). If sub-100ms latency is critical, disable thinking or use smaller models.
  • Constrained hardware (sub-16GB VRAM) — 8.2B model requires substantial memory even with quantization. Inference on edge devices (mobile, embedded) demands aggressive quantization; training is not feasible.
  • Proprietary model IP concerns — Model outputs are not guaranteed confidential; if generating sensitive IP or trade secrets, verify data handling policies for your deployment environment.
  • Real-time safety-critical systems — No safety audits or guarantees stated. Do not deploy in autonomous vehicles, medical diagnostics, or safety-critical control loops without independent validation.

License & commercial use

Apache License 2.0 (OSI-approved permissive license). Covers the model weights and code distribution.

Apache 2.0 is a permissive OSI license that permits commercial use, redistribution, and modification without royalties or license restrictions, provided copyright and license notices are retained. No gating or access restrictions on this variant. However, verify compliance with Alibaba/Qwen's original model terms and any third-party data licensing in your specific jurisdiction; Devco recommends legal review for enterprise deployments.

DEV.co evaluation signals

Editorial assessment — not user reviews. Directional, with an explicit confidence level.

SignalAssessment
MaintenanceActive
DocumentationStrong
License clarityClear
Deployment complexityModerate
DEV.co fitStrong
Assessment confidenceHigh
Security considerations

No explicit security audit, threat model, or adversarial robustness claims in card. Thinking mode tokens (151668 for </think>) are interpretable; hidden reasoning content may leak sensitive inference patterns. Use secure channels for production API endpoints. Quantized versions may introduce rounding artifacts; test on sensitive tasks before deployment. No data privacy guarantees stated; assume model outputs are logged by inference providers unless configured otherwise.

Alternatives to consider

Qwen2.5-7B or Qwen2.5-32B

Older Qwen generation; simpler inference, lower memory, but no built-in thinking mode. Better if reasoning overhead unacceptable and reasoning quality sufficient.

DeepSeek-R1 or DeepSeek-R1-Distill

Alternative reasoning-capable open model; different architecture and training. Compare on reasoning benchmarks and inference cost for your use case.

Llama 3.1 or Mistral 7B

Lightweight alternatives without thinking mode; faster inference, lower memory, broader community. Trade reasoning capability for latency and cost.

Software development agency

Ship Qwen3-8B with senior software developers

Explore how to integrate Qwen3-8B into your AI pipeline—whether for private LLM deployment, custom applications, or RAG systems. Our team can help you optimize inference, fine-tune for your domain, and navigate licensing & security. Start your technical evaluation today.

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.

Qwen3-8B FAQ

Can I use Qwen3-8B commercially?
Yes. Apache 2.0 license permits commercial use without royalties. However, verify compliance with Qwen's original terms and review any data/model licensing constraints in your deployment region. Consult legal counsel for enterprise use.
What GPU do I need to run this model?
For inference: A single 16–20 GB VRAM GPU (e.g., RTX 4090, A100 40GB, H100) in full precision, or 8–10 GB with 8-bit quantization. For fine-tuning (LoRA): 24 GB minimum; 40 GB+ recommended for multi-GPU. On consumer hardware: 4-bit quantization + LoRA on RTX 4060 (8GB) is tight but possible with careful settings.
How do I disable thinking mode for faster responses?
Set `enable_thinking=False` in `tokenizer.apply_chat_template()` or add `/no_think` to the user prompt in multi-turn conversations. Non-thinking mode behaves like Qwen2.5-Instruct, optimized for speed.
What is the context window and can it be extended?
Native context: 32,768 tokens. Extendable to 131,072 tokens using YaRN (yet another rope extension). Verify memory overhead and latency impact before using extended contexts in production.

Custom software development services

From first prototype to production, DEV.co delivers software development services around tools like Qwen3-8B. 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 Qwen3-8B?

Explore how to integrate Qwen3-8B into your AI pipeline—whether for private LLM deployment, custom applications, or RAG systems. Our team can help you optimize inference, fine-tune for your domain, and navigate licensing & security. Start your technical evaluation today.