Codestral — Mistral AI 的本地 AI 模型

作者: Jakub Rusinowski · 最后更新:

已被取代的模型. Codestral 已被 Devstral 取代。本页仅作参考保留;更新的系列是更好的起点。 查看 Devstral →

Mistral专用的代码生成模型,在覆盖80+编程语言的庞大编程语料库上训练。擅长填充中间(FIM)补全——这是IDE自动补全的核心技术。原生集成VS Code的continue.dev和Cursor。

变体

Codestral 最小的变体在 Q4_K_M 下约需 14 GB 显存——量化权重加框架开销,不含 KV 缓存。

模型显存
Codestral 22B →
22B
~14.2 GB

显存为 Q4_K_M 下的量化权重加开销,与 GPU 与显存检测器使用同一引擎计算。

如何在本地运行 Codestral

安装 Ollama,然后拉取标签。

ollama run codestral:22b

在上方选择一个尺寸,查看它自己的显存、速度估算和安装命令。

许可证

MNPL-0.1仅限研究/非商业用途

Research / non-commercial only — this licence does NOT permit shipping a commercial product.

适用于: Codestral 22B

推荐 GPU

目录中能在本地运行 Codestral(至少 14 GB 显存)的最便宜 GPU 是 AMD Radeon RX 9060 XT 16GB (16 GB).

联盟营销声明: 本页部分链接为联盟推广链接——如果你通过它们购买,LLM Configurator 可能会获得佣金,而你无需支付任何额外费用。作为亚马逊联盟成员(Amazon Associate),LLM Configurator 会从符合条件的购买中获得收益。
AMD Radeon RX 9060 XT 16GB
16 GB VRAM · 160 W board power
2026年价格波动较大——请以当前商品页价格为准。

我的 GPU 能运行 Codestral 吗?

Codestral — 常见问题

How much VRAM does Codestral need?

Codestral needs about 14 GB VRAM at Q4_K_M quantization for its smallest variant. Variants: Codestral 22B (14 GB, Q4_K_M). On Apple Silicon, unified memory counts toward this requirement.

Can I run Codestral on an RTX 4090 (24 GB)?

Yes — Codestral runs on an RTX 4090 (24 GB) and other 24 GB cards such as the RTX 3090. Smaller variants also fit comfortably on 8–16 GB GPUs at Q4_K_M.

What quantization should I use for Codestral?

Q4_K_M is the best balance of quality and VRAM for Codestral in most cases. Choose Q8_0 for near-lossless quality if you have spare VRAM, or smaller quants (Q3/Q2) only when memory is tight.

How do I run Codestral with Ollama?

Install Ollama, then run: ollama run codestral:22b. This downloads Codestral and starts a local, OpenAI-compatible endpoint — no internet connection is needed after the initial download.