Qwen2-7B-Instruct
Qwen (Alibaba) (China) · Language (text)
🧠 7.6B📄 32K context🔓 Open weights (downloadable)⚖️ apache-2.0
Which way is for me?
💻 On my own computer
- Download and install LM Studio (free): lmstudio.ai
- In LM Studio open Search (the magnifier) and type exactly:
Qwen/Qwen2-7B-Instruct-GGUF - From the list of files pick the version the check above suggested; if unsure, take Q4_K_M (compressed, slightly lower quality, less memory).
- Press Download, then Load, and start talking in Chat.
Or, if you use Ollama, this one command is enough:
ollama run hf.co/Qwen/Qwen2-7B-Instruct-GGUF🧑💻 For developers
vLLM
vllm serve Qwen/Qwen2-7B-InstructTransformers (Python)
from transformers import pipeline
pipe = pipeline("text-generation", model="Qwen/Qwen2-7B-Instruct")llama.cpp
llama-server -hf Qwen/Qwen2-7B-Instruct-GGUFWords used here
- GGUF
- The file format LM Studio, Ollama and llama.cpp use to run a model.
- Quantization (Q4, Q8)
- Shrinking a model by storing numbers less precisely: Q4 smallest and slightly weaker, Q8 almost full, FP16 full.
- VRAM
- The graphics card's memory (or shared memory on a Mac); the model has to fit in it.
- Context
- The most text the model can see at once in a conversation (questions, answers and files).
- Tokens per second
- How fast the answer is written; 20 is about reading speed, 5 is slow.
From the Hugging Face model card
Qwen2 is the new series of Qwen large language models. For Qwen2, we release a number of base language models and instruction-tuned language models ranging from 0.5 to 72 billion parameters, including a Mixture-of-Experts model. This repo contains the instruction-tuned 7B Qwen2 model.
Benchmarks (from the model card)
| Datasets | Llama-3-8B-Instruct | Yi-1.5-9B-Chat | GLM-4-9B-Chat | Qwen1.5-7B-Chat | Qwen2-7B-Instruct |
|---|---|---|---|---|---|
| English | |||||
| MMLU | 68.4 | 69.5 | 72.4 | 59.5 | 70.5 |
| MMLU-Pro | 41.0 | - | - | 29.1 | 44.1 |
| GPQA | 34.2 | - | - | 27.8 | 25.3 |
| TheroemQA | 23.0 | - | - | 14.1 | 25.3 |
| MT-Bench | 8.05 | 8.20 | 8.35 | 7.60 | 8.41 |
| Coding | |||||
| Humaneval | 62.2 | 66.5 | 71.8 | 46.3 | 79.9 |
Source: Hugging Face · Qwen/Qwen2-7B-Instruct · License: apache-2.0
Hardware and running it
Local Weights are published and it runs on your own hardware.
- Minimum Q4
- 5.1 GB
- Recommended Q8
- 9.1 GB
- Full quality FP16
- 18.3 GB
On common hardware
| RTX 4060 · 8 GB | Usable | Q4 · ≈ 23–38 tokens/s |
|---|---|---|
| RTX 4090 · 24 GB | Great | FP16 · ≈ 24–40 tokens/s |
| RTX 5090 · 32 GB | Great | FP16 · ≈ 42–71 tokens/s |
| Mac M4 Max · 128 GB | Usable | FP16 · ≈ 13–21 tokens/s |
| H100 · 80 GB | Great | FP16 · ≈ 79–130 tokens/s |
| 8× H100 · 640 GB | Great | FP16 · ≈ 630–1,050 tokens/s |
Speeds are estimates. estimated speed for one user, from memory bandwidth
Links come from the vendor's official site and the model card the vendor published · Updated: