# Qwen2.5-Coder-7B-Instruct 的 GPU 需求

Qwen2.5-Coder-7B-Instruct 有 7.6B 参数。部署推理时，16 位约需 18 GB 显存，8 位约 9.1 GB，4 位约 4.6 GB，其中包含约 20% 用于 KV 缓存和激活值。

[在 Arrakis 上部署](/console/#/models?model=Qwen/Qwen2.5-Coder-7B-Instruct)。

## 部署推理需要什么

| 精度 | 显存与最小配置 |
|---|---|
| 16 位 | 18 GB：一块 [RTX 4090](/zh-cn/gpus/rtx-4090.html.md) 或 [RTX 3090](/zh-cn/gpus/rtx-3090.html.md)，RTX 3090 每 GPU 小时 $0.19 起 |
| 8 位 | 9.1 GB：一块 [RTX 4090](/zh-cn/gpus/rtx-4090.html.md) 或 [RTX 3090](/zh-cn/gpus/rtx-3090.html.md)，RTX 3090 每 GPU 小时 $0.19 起 |
| 4 位 | 4.6 GB：一块 [RTX 4090](/zh-cn/gpus/rtx-4090.html.md) 或 [RTX 3090](/zh-cn/gpus/rtx-3090.html.md)，RTX 3090 每 GPU 小时 $0.19 起 |

## 微调需要什么

| 方法 | 显存与最小配置 |
|---|---|
| QLoRA | 5.3 GB：一块 [RTX 4090](/zh-cn/gpus/rtx-4090.html.md) 或 [RTX 3090](/zh-cn/gpus/rtx-3090.html.md)，RTX 3090 每 GPU 小时 $0.19 起 |
| LoRA | 18 GB：一块 [RTX 4090](/zh-cn/gpus/rtx-4090.html.md) 或 [RTX 3090](/zh-cn/gpus/rtx-3090.html.md)，RTX 3090 每 GPU 小时 $0.19 起 |
| 全量微调 | 122 GB：一块 [H200](/zh-cn/gpus/h200.html.md)，每 GPU 小时 $4.03 起 |

## 关于这个模型

| | |
|---|---|
| 参数量 | `7.6B` |
| 上下文窗口（token） | `32,768` |
| 发布精度 | `BF16` |
| 许可证 | `apache-2.0` |
| 发布日期 | `2024-09-17` |
| 权重 | [Qwen/Qwen2.5-Coder-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-Coder-7B-Instruct) |

## 自己部署

```
vllm serve Qwen/Qwen2.5-Coder-7B-Instruct --tensor-parallel-size 1
```

## 常见问题

**Qwen2.5-Coder-7B-Instruct 需要多少显存？** 推理部署时，16 位约需 18 GB，8 位约 9 GB，4 位约 5 GB，其中包含约 20% 用于 KV 缓存和激活值。微调时，QLoRA 约需 5 GB，LoRA 约需 18 GB，使用 Adam 全量微调约需 122 GB，均未计入激活值。

**Qwen2.5-Coder-7B-Instruct 能在单块 GPU 上运行吗？** 可以。16 位下约需 18 GB，一块 RTX 4090 或 RTX 3090 就能放下。

**运行 Qwen2.5-Coder-7B-Instruct 要多少钱？** 16 位下需要一块 RTX 4090 或 RTX 3090；4 位下需要一块 RTX 4090 或 RTX 3090。本页每种配置都显示 Arrakis 当前每 GPU 小时的最低价格，从预付余额中按小时扣费。

**如何在 Arrakis 上部署 Qwen2.5-Coder-7B-Instruct？** 在 Arrakis 控制台中打开 Models，粘贴 Qwen/Qwen2.5-Coder-7B-Instruct，选择 vLLM、SGLang 或 llama.cpp，然后租用一块能放下它的 GPU。你会得到一个兼容 OpenAI 的端点，带有专属 API 密钥，并可通过 root SSH 登录机器。


更多模型：[/models](/zh-cn/models.html.md)。
