LLM Reference

Qwen2-7B

Released
2024-06-05
Last refreshed
2026-07-11
Status
Researched 69d ago
Open sourceCommercial use: permittedCodingRAGLong contextClassificationJSON / Tool use

Qwen2-7B is worth evaluating for coding, rag, and long context when its provider route and context window match the workload.

Use it for

  • Teams evaluating coding, rag, and long context
  • Workloads that can use a 128k context window
  • Buyers comparing 4 tracked provider routes

Do not use it for

  • Vision or document-understanding workloads
Specifications
Family
Qwen2
Released
2024-06-05
Context
128k
Parameters
7.07B
Architecture
Decoder Only
Specialization
general
Openness
Open source
License
Apache 2.0OSI-approvedCommercial use: permitted
Weights
Unknown
Code
Unknown
Training
Fine-tuned
Created by

AI research institute of Alibaba Group.

Hangzhou, Zhejiang, China
Founded 2017
Website
Pricing
Output / 1M
$0.150
Input / 1M
$0.050

Cheapest of 5 routes · DeepInfra

About

Qwen2-7B is Alibaba's Qwen2 model. It offers a 128K-token context window and scores 55.4 on GPQA.

Qwen2-7B is an open-source model in the Qwen2 family. The structured metadata tracks a 128k-token context window and structured outputs. This page tracks provider routes through DeepInfra, OctoAI API (Deprecated), Microsoft Foundry, and 2 more, with the cheapest tracked route listed at $0.05 input and $0.15 output per 1M tokens. Headline tracked benchmarks include Google-Proof Q&A 55.4, HellaSwag 92.0, and HumanEval 80.9.

Top use-case fit: coding, agents, and build tasks

Coding

Q/$ A

1 relevant benchmark in the decision map.

RAG

Included by capability and metadata signals in the decision map.

Long context

Included by capability and metadata signals in the decision map.

Provider price ladder

Compare all 5

Compare API pricing across 4 providers for input and output tokens, batch, and cached reads when available.

ProviderInput / 1MOutput / 1MRoute
DeepInfra$0.050$0.150
Serverless
Microsoft Foundry$0.150$0.150
Provisioned
Fireworks AI$0.200$0.200
Serverless
NVIDIA NIM--
ServerlessPartial

Available via routers & gateways(7)

Capabilities

Structured Outputs

Benchmark peer barsfor Coding

Benchmark scores(5)

Scores are benchmark-specific and are direction-aware: the same numeric gap can mean very different outcomes across suites. Use the leaderboard context and this model's provider route to decide whether the winning margin is meaningful for your workload.
BenchmarkScoreVersionEvaluationSource
Google-Proof Q&A55.4diamondObserved 2026-03-06Source
HellaSwag92.010-shotObserved 2026-03-06Source
HumanEval80.9pass@1Observed 2026-03-06Source
Massive Multitask Language Understanding80.25-shotObserved 2026-03-06Source
Grade School Math 8K82.7Observed 2026-05-28Source

Migration checks

No linked migration route is available for this model yet.

Compare Qwen2-7B with other models

Frequently asked questions

What is the context window of Qwen2-7B?

Qwen2-7B has a context window of 128k tokens.

How much does Qwen2-7B cost?

Qwen2-7B pricing ranges from $0.05/1M to $0.2/1M input tokens depending on the provider.

When was Qwen2-7B released?

Qwen2-7B was released on 2024-06-05.

Which providers offer Qwen2-7B?

Qwen2-7B is available from 5 providers: DeepInfra, OctoAI API (Deprecated), Microsoft Foundry, Fireworks AI, NVIDIA NIM.

What benchmarks has Qwen2-7B been tested on?

Qwen2-7B has been evaluated on 5 benchmarks, including Google-Proof Q&A, HellaSwag, HumanEval, Massive Multitask Language Understanding, Grade School Math 8K.