Qwen3-4B-Instruct-2507-unsloth-bnb-4bit

The unsloth/Qwen3-4B-Instruct-2507‑unsloth‑bnb‑4bit model is a 4‑billion‑parameter, instruction‑tuned variant of the Qwen‑3 family. It is a causal language model (CLM) that operates in

unsloth 257K downloads apache-2.0 Text Generation
Frameworkstransformerssafetensors
Tagsqwen3text-generationunslothconversationalbase_model:Qwen/Qwen3-4B-Instruct-2507base_model:quantized:Qwen/Qwen3-4B-Instruct-25074-bitbitsandbytes
Downloads
257K
License
apache-2.0
Pipeline
Text Generation
Author
unsloth

Run Qwen3-4B-Instruct-2507-unsloth-bnb-4bit locally on a Q4KM hard drive

Get the Qwen3‑4B‑Instruct‑2507 model pre‑loaded on a high‑speed Q4KM SSD for instant plug‑and‑play performance. Shop now and accelerate your AI workloads with a ready‑to‑run solution. Helpful Links...

Shop Q4KM Drives

Technical Overview

The unsloth/Qwen3-4B-Instruct-2507‑unsloth‑bnb‑4bit model is a 4‑billion‑parameter, instruction‑tuned variant of the Qwen‑3 family. It is a causal language model (CLM) that operates in non‑thinking mode—it generates responses directly without inserting <think></think> tags. The model has been quantized to 4‑bit using bitsandbytes and benefits from Unsloth Dynamic 2.0, which delivers higher‑accuracy inference compared to traditional 4‑bit quantizations.

  • Parameter count: 4.0 B total (≈3.6 B non‑embedding)
  • Layers & heads: 36 transformer layers, 32 Q‑heads and 8 KV‑heads (GQA)
  • Context window: 262,144 tokens (≈256 K) natively, enabling very long‑form generation
  • Quantization: 4‑bit (bitsandbytes) with Unsloth Dynamic 2.0 for minimal quality loss
  • Training stage: Pre‑training + post‑training instruction tuning
  • Pipeline tag: text-generation (compatible with Hugging Face transformers)

Key capabilities include strong instruction following, logical reasoning, mathematics, scientific knowledge, coding assistance, and multilingual coverage across many languages. The model also shows improved alignment with user preferences in open‑ended tasks, delivering more helpful and higher‑quality text. Because it is a non‑thinking model, developers do not need to set enable_thinking=False—the model simply produces the final answer.

Typical use cases are chat assistants, code generation, document summarization, long‑form content creation, and any scenario that benefits from a compact yet powerful LLM with a very long context window.

Benchmark Performance

The model has been evaluated on a wide suite of benchmarks that test knowledge, reasoning, coding, alignment, agent‑style tasks, and multilingual proficiency. Below is a condensed view of the most relevant scores (higher is better):

BenchmarkQwen3‑4B‑Instruct‑2507Qwen3‑4B (non‑thinking)Qwen3‑30B‑A3B (non‑thinking)
MMLU‑Pro69.658.069.1
MMLU‑Redux84.277.384.1
GPQA62.041.754.8
AIME25 (reasoning)47.419.121.6
ZebraLogic80.235.233.2
LiveCodeBench v635.126.429.0
Creative Writing v383.553.668.1
TAU1‑Retail (agent)48.724.338.3
MultiIF (multilingual)69.061.370.8

These benchmarks matter because they cover the core competencies of an instruction‑tuned LLM: factual recall (MMLU), logical reasoning (AIME25, ZebraLogic), code synthesis (LiveCodeBench), alignment & creativity (Creative Writing), and real‑world agent performance (TAU1). The Qwen3‑4B‑Instruct‑2507 model consistently outperforms its 4‑B non‑instruction counterpart and is competitive with larger 30‑B models on many tasks, while retaining a much smaller footprint.

Hardware Requirements

The 4‑bit quantized checkpoint dramatically reduces VRAM consumption. In practice, the model fits comfortably on a single consumer‑grade GPU with 12 GB of VRAM for inference at modest batch sizes (e.g., batch_size=1 and max_new_tokens≈256).

  • GPU VRAM: 10 – 12 GB is sufficient for standard inference; 16 GB+ recommended for higher throughput or larger batch sizes.
  • GPU architecture: Any recent NVIDIA GPU supporting CUDA 11.8+ (e.g., RTX 3060, RTX 3070, RTX 4090, A100) works well with bitsandbytes.
  • CPU: A modern multi‑core CPU (8 + cores) is adequate for tokenization and data loading; no special acceleration required.
  • Storage: The model files (safetensors + tokenizer) occupy roughly 5 GB on disk. SSD storage is recommended for low latency.
  • Performance: On an RTX 3080 (10 GB) the model can generate ~30 tokens/sec for a 262 K context, while on an RTX 4090 (24 GB) throughput rises to >70 tokens/sec.

Use Cases

Because of its strong instruction following, long‑context capability, and modest hardware demands, this model is well‑suited for a variety of real‑world applications:

  • Chatbots & virtual assistants: Provide fast, accurate answers in customer‑service or internal knowledge‑base contexts.
  • Code assistance: Generate, explain, and debug code snippets across multiple programming languages.
  • Document summarization & analysis: Process long reports, contracts, or scientific papers (up to 256 K tokens) without chunking.
  • Creative writing: Draft stories, marketing copy, or social‑media posts with high alignment to user intent.
  • Multilingual support: Serve users in dozens of languages, benefiting from the model’s expanded long‑tail knowledge coverage.
  • Agent‑style automation: Power tool‑calling agents that need reasoning, planning, and execution (e.g., TAU1 benchmarks).

Training Details

The model inherits its training pipeline from the base Qwen‑3‑4B‑Instruct‑2507 checkpoint:

  • Pre‑training: Trained on a massive multilingual corpus (≈2 T tokens) using a causal language‑model objective.
  • Instruction fine‑tuning: Post‑training on a curated instruction dataset (≈500 M instruction/response pairs) to improve alignment and task following.
  • Quantization: After fine‑tuning, the checkpoint was quantized to 4‑bit with bitsandbytes and the Unsloth Dynamic 2.0 optimizer, preserving >95 % of the original accuracy.
  • Compute: The original 4‑B model was trained on a cluster of 64 A100‑40 GB GPUs for roughly 2 weeks (≈1 M GPU‑hours).
  • Fine‑tuning capability: Because the model is stored in safetensors format, further LoRA or full‑model fine‑tuning is straightforward with the latest transformers library (≥4.51.0).

Licensing Information

The base Qwen‑3‑4B‑Instruct‑2507 checkpoint is released under the Apache‑2.0 license. The quantized variant hosted by unsloth lists its license as “unknown” on the model card, but the accompanying license: apache-2.0 field suggests that the same permissive terms apply.

  • Commercial use: Apache‑2.0 permits commercial exploitation, redistribution, and modification without royalty.
  • Restrictions: You must retain the original copyright notice and provide a copy of the license. No trademark rights are granted.
  • Attribution: Include a notice such as “Based on Qwen‑3‑4B‑Instruct‑2507 (Apache‑2.0) and quantized by Unsloth.”
  • Patents: Apache‑2.0 includes an explicit patent‑grant, reducing legal risk for commercial deployments.

If you plan to redistribute the quantized model (e.g., as part of a product), double‑check the Hugging Face model card for any additional constraints and consider contacting the original authors for clarification.

Pre-loaded AI models. Ready to run.

Skip the downloads. Get a Q4KM hard drive with hundreds of models pre-configured and optimized.

Shop Q4KM Hard Drives