# qwenlm/qwen3 architecture

> Architecture diagram of the GitHub repository qwenlm/qwen3, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/qwenlm/qwen3
- Repository: https://github.com/qwenlm/qwen3

## Overview

Qwen3 is an open-weight language-model release repository whose main user workflow is to obtain a checkpoint and follow guidance to run inference. The README also presents local serving, large-scale deployment, quantization, post-training, and application-framework integration as distinct capabilities. The repository contains no model runtime implementation in the supplied tree; these capabilities are represented by their documentation paths. A separate sampled evaluation workflow generates answers through an OpenAI-compatible endpoint, saves JSONL output, then dispatches configured scoring. Relationships for documented capabilities use README evidence; source-level evaluation links are limited to the excerpts shown.

Main entry points: [`eval/generate_api_answers/infer_multithread.py`](https://github.com/qwenlm/qwen3/blob/main/eval/generate_api_answers/infer_multithread.py) (Answer generation), [`docs/source/getting_started/quickstart.md`](https://github.com/qwenlm/qwen3/blob/main/docs/source/getting_started/quickstart.md) (Quickstart demos), [`eval/generate_api_answers/utils_vllm.py`](https://github.com/qwenlm/qwen3/blob/main/eval/generate_api_answers/utils_vllm.py) (Chat API client), [`eval/eval/eval.py`](https://github.com/qwenlm/qwen3/blob/main/eval/eval/eval.py) (Evaluation runner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_model["Model access"]
  node_release["Qwen3 checkpoints<br/>[README.md]"]
end

subgraph group_inference["Inference and serving"]
  node_quickstart["Quickstart demos<br/>[quickstart.md]"]
  node_transformers["Transformers inference<br/>[transformers.md]"]
  node_local["Local runtimes"]
  node_deployment["Inference deployment"]
  node_quant["Quantization guides"]
  node_frameworks["Application frameworks"]
end

subgraph group_adapt["Model adaptation"]
  node_training["Post-training guides"]
end

subgraph group_evaluation["Evaluation tooling"]
  node_benchmarks["Performance benchmarks"]
  node_answergen["Answer generation"]
  node_apihelper["Chat API client<br/>[utils_vllm.py]"]
  node_jsonl["Generated answers"]
  node_evalrunner["Evaluation runner<br/>[eval.py]"]
  node_arc["ARC-AGI scorer<br/>[arc_agi_1.py]"]
  node_scores["Detailed scores"]
end

node_user(("Model user"))
node_hub["Model hubs"]
node_evaluser(("Evaluation operator"))
node_vllm["OpenAI-compatible server"]

node_user -->|"searches checkpoints"| node_hub
node_hub -->|"provides weights"| node_release
node_user -->|"follows guidance"| node_quickstart
node_quickstart -->|"guides inference"| node_transformers
node_user -->|"runs locally"| node_local
node_user -->|"deploys at scale"| node_deployment
node_user -->|"quantizes checkpoints"| node_quant
node_user -->|"post-trains models"| node_training
node_user -->|"integrates applications"| node_frameworks
node_user -->|"checks performance"| node_benchmarks
node_evaluser -->|"runs generation"| node_answergen
node_answergen -->|"requests completions"| node_apihelper
node_apihelper -->|"calls chat API"| node_vllm
node_answergen -->|"appends generations"| node_jsonl
node_evaluser -->|"runs configured scoring"| node_evalrunner
node_evalrunner -->|"dispatches task scorer"| node_arc
node_arc -->|"writes detailed scores"| node_scores

click node_release "https://github.com/qwenlm/qwen3/blob/main/README.md"
click node_quickstart "https://github.com/qwenlm/qwen3/blob/main/docs/source/getting_started/quickstart.md"
click node_transformers "https://github.com/qwenlm/qwen3/blob/main/docs/source/inference/transformers.md"
click node_local "https://github.com/qwenlm/qwen3/tree/main/docs/source/run_locally"
click node_deployment "https://github.com/qwenlm/qwen3/tree/main/docs/source/deployment"
click node_quant "https://github.com/qwenlm/qwen3/tree/main/docs/source/quantization"
click node_frameworks "https://github.com/qwenlm/qwen3/tree/main/docs/source/framework"
click node_training "https://github.com/qwenlm/qwen3/tree/main/docs/source/training"
click node_benchmarks "https://github.com/qwenlm/qwen3/tree/main/examples/speed-benchmark"
click node_answergen "https://github.com/qwenlm/qwen3/blob/main/eval/generate_api_answers/infer_multithread.py"
click node_apihelper "https://github.com/qwenlm/qwen3/blob/main/eval/generate_api_answers/utils_vllm.py"
click node_jsonl "https://github.com/qwenlm/qwen3/tree/main/eval/output"
click node_evalrunner "https://github.com/qwenlm/qwen3/blob/main/eval/eval/eval.py"
click node_arc "https://github.com/qwenlm/qwen3/blob/main/eval/eval/arc_agi_1.py"
click node_scores "https://github.com/qwenlm/qwen3/tree/main/eval/eval_res"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_release,node_user toneBlue
class node_quickstart,node_transformers,node_local,node_deployment,node_quant,node_frameworks toneAmber
class node_training,node_vllm toneMint
class node_benchmarks,node_answergen,node_apihelper,node_jsonl,node_evalrunner,node_arc,node_scores toneRose
class node_hub,node_evaluser toneIndigo
```

## Components

### Model access

- [Qwen3 checkpoints](https://github.com/qwenlm/qwen3/blob/main/README.md): `README.md`

### Inference and serving

- [Quickstart demos](https://github.com/qwenlm/qwen3/blob/main/docs/source/getting_started/quickstart.md): `docs/source/getting_started/quickstart.md`
- [Transformers inference](https://github.com/qwenlm/qwen3/blob/main/docs/source/inference/transformers.md): `docs/source/inference/transformers.md`
- [Local runtimes](https://github.com/qwenlm/qwen3/tree/main/docs/source/run_locally): `docs/source/run_locally`
- [Inference deployment](https://github.com/qwenlm/qwen3/tree/main/docs/source/deployment): `docs/source/deployment`
- [Quantization guides](https://github.com/qwenlm/qwen3/tree/main/docs/source/quantization): `docs/source/quantization`
- [Application frameworks](https://github.com/qwenlm/qwen3/tree/main/docs/source/framework): `docs/source/framework`

### Model adaptation

- [Post-training guides](https://github.com/qwenlm/qwen3/tree/main/docs/source/training): `docs/source/training`

### Evaluation tooling

- [Performance benchmarks](https://github.com/qwenlm/qwen3/tree/main/examples/speed-benchmark): `examples/speed-benchmark`
- [Answer generation](https://github.com/qwenlm/qwen3/blob/main/eval/generate_api_answers/infer_multithread.py): `eval/generate_api_answers/infer_multithread.py`
- [Chat API client](https://github.com/qwenlm/qwen3/blob/main/eval/generate_api_answers/utils_vllm.py): `eval/generate_api_answers/utils_vllm.py`
- [Generated answers](https://github.com/qwenlm/qwen3/tree/main/eval/output): `eval/output`
- [Evaluation runner](https://github.com/qwenlm/qwen3/blob/main/eval/eval/eval.py): `eval/eval/eval.py`
- [ARC-AGI scorer](https://github.com/qwenlm/qwen3/blob/main/eval/eval/arc_agi_1.py): `eval/eval/arc_agi_1.py`
- [Detailed scores](https://github.com/qwenlm/qwen3/tree/main/eval/eval_res): `eval/eval_res`

### Other components

- **Model user**
- **Model hubs**
- **Evaluation operator**
- **OpenAI-compatible server**

## Connections

- Model user → Model hubs: searches checkpoints (evidence: `README.md`)
- Model hubs → Qwen3 checkpoints: provides weights (evidence: `README.md`)
- Model user → Quickstart demos: follows guidance (evidence: `README.md`)
- Quickstart demos → Transformers inference: guides inference (evidence: `README.md`)
- Model user → Local runtimes: runs locally (evidence: `README.md`)
- Model user → Inference deployment: deploys at scale (evidence: `README.md`)
- Model user → Quantization guides: quantizes checkpoints (evidence: `README.md`)
- Model user → Post-training guides: post-trains models (evidence: `README.md`)
- Model user → Application frameworks: integrates applications (evidence: `README.md`)
- Model user → Performance benchmarks: checks performance (evidence: `README.md`)
- Evaluation operator → Answer generation: runs generation (evidence: `eval/generate_api_answers/infer_multithread.py`)
- Answer generation → Chat API client: requests completions (evidence: `eval/generate_api_answers/infer_multithread.py`)
- Chat API client → OpenAI-compatible server: calls chat API (evidence: `eval/generate_api_answers/utils_vllm.py`)
- Answer generation → Generated answers: appends generations (evidence: `eval/generate_api_answers/infer_multithread.py`)
- Evaluation operator → Evaluation runner: runs configured scoring (evidence: `eval/eval/eval.py`)
- Evaluation runner → ARC-AGI scorer: dispatches task scorer (evidence: `eval/eval/eval.py`)
- ARC-AGI scorer → Detailed scores: writes detailed scores (evidence: `eval/eval/arc_agi_1.py`)
