返回顶部
m

mistral-codestralMistral本地推理

Mistral and Codestral — run Mistral Large, Mistral-Nemo, Codestral, and Mistral-Small locally. Mistral AI's open-source LLMs for code generation and reasoning. Codestral by Mistral trained on 80+ languages. Mistral routed across your fleet. Mistral本地推理。Mistral IA local. Codestral código local.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.2
安全检测
已通过
128
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

mistral-codestral

Mistral & Codestral — 本地设备上的Mistral AI模型

Mistral AI的开源模型在您的本地硬件上运行。Mistral Large用于前沿推理,Mistral-Nemo用于高效运行,Codestral用于代码生成。集群路由器为每个Mistral请求选择最佳设备。

支持的Mistral模型

Mistral模型参数规模Ollama名称最佳用途
Codestral (Mistral出品)22BcodestralMistral的代码专家 — 支持80+种编程语言
Mistral Large
123B | mistral-large | Mistral的前沿推理,多语言支持 | | Mistral-Nemo | 12B | mistral-nemo | Mistral的高效通用模型 | | Mistral-Small | 22B | mistral-small | Mistral的快速推理模型 | | Mistral 7B | 7B | mistral:7b | Mistral的轻量级模型 |

本地部署Mistral

bash
pip install ollama-herd # 安装Mistral集群路由器
herd # 启动Mistral兼容路由器
herd-node # 在每个设备上运行 — Mistral请求自动路由

安装过程中不会下载任何Mistral模型。所有Mistral模型拉取均由用户主动发起。

Codestral代码生成

Codestral是Mistral AI的专用编程模型 — 在80+种编程语言上训练,支持中间填充功能。

python
from openai import OpenAI

连接到本地Mistral集群

mistralfleet = OpenAI(baseurl=http://localhost:11435/v1, api_key=not-needed)

使用Mistral的Codestral进行代码生成

codestralresponse = mistralfleet.chat.completions.create( model=codestral, # Mistral的Codestral模型 messages=[{role: user, content: 用Go编写一个基于Redis的速率限制器}], ) print(codestral_response.choices[0].message.content)

通过curl使用Codestral

bash

在本地Mistral集群上使用Codestral进行代码生成


curl http://localhost:11435/v1/chat/completions \
-H Content-Type: application/json \
-d {model: codestral, messages: [{role: user, content: 用Rust实现B树 — Mistral Codestral擅长系统编程}]}

Mistral Large推理

bash

Mistral Large用于复杂推理


curl http://localhost:11435/api/chat -d {
model: mistral-large,
messages: [{role: user, content: 比较Mistral与GPT-4在企业部署中的表现}],
stream: false
}

Mistral-Nemo高效运行

bash

Mistral-Nemo — Mistral AI的最佳质量/规模比


curl http://localhost:11435/api/chat -d {
model: mistral-nemo,
messages: [{role: user, content: 总结这篇Mistral AI技术论文}],
stream: false
}

Mistral硬件推荐

跨平台: 以下为示例配置。任何具有等效内存的设备(Mac、Linux、Windows)均可运行。集群路由器支持所有平台。

Mistral模型最低内存示例硬件
mistral:7b8GB任意Mac — 轻量级Mistral
mistral-nemo
10GB | Mac Mini (16GB) — 高效Mistral | | codestral | 16GB | Mac Mini (24GB) — Mistral代码模型 | | mistral-small | 16GB | Mac Mini (24GB) — 快速Mistral | | mistral-large | 80GB | Mac Studio (128GB) — 最佳Mistral |

监控Mistral集群

bash

查看已加载的Mistral模型


curl -s http://localhost:11435/api/ps | python3 -m json.tool

Mistral集群概览

curl -s http://localhost:11435/fleet/status | python3 -m json.tool

Mistral模型性能统计

curl -s http://localhost:11435/dashboard/api/models | python3 -m json.tool

Mistral集群响应示例:
json
{
node_id: Mistral-Server,
models_loaded: [codestral:22b, mistral-nemo:12b],
mistral_inference: active
}

Mistral仪表盘地址:http://localhost:11435/dashboard。

与Mistral同时可用的其他功能

其他大语言模型(同一Mistral兼容端点)

Llama 3.3、Qwen 3.5、DeepSeek-V3、Phi 4、Gemma 3 — 可与Mistral模型一起路由。

图像生成

bash curl http://localhost:11435/api/generate-image \ -d {model: z-image-turbo, prompt: Mistral AI标志重新构想为抽象艺术, width: 512, height: 512}

语音转文字

bash curl http://localhost:11435/api/transcribe -F file=@mistral_meeting.wav -F model=qwen3-asr

嵌入向量

bash curl http://localhost:11435/api/embed \ -d {model: nomic-embed-text, input: Mistral AI开源语言模型Codestral}

完整文档

贡献

Ollama Herd是开源项目(MIT许可)。本地运行Mistral,全球贡献:

  • - 在GitHub上标星 — 帮助Mistral用户发现本地推理
  • 提交Issue — 分享您的Mistral配置
  • 欢迎提交PR — CLAUDE.md为AI代理提供完整上下文。444个测试用例。

安全护栏

  • - Mistral模型下载需要用户明确确认 — Mistral模型大小从4GB到70GB+不等。
  • Mistral模型删除需要用户明确确认。
  • 切勿删除或修改~/.fleet-manager/中的文件。
  • 不会自动下载任何Mistral模型 — 所有拉取均由用户主动发起。

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 mistral-codestral-1775925242 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 mistral-codestral-1775925242 技能

通过命令行安装

skillhub install mistral-codestral-1775925242

下载

⬇ 下载 mistral-codestral v1.0.2(免费)

文件大小: 3 KB | 发布时间: 2026-4-12 10:36

v1.0.2 最新 2026-4-12 10:36
Cross-platform support: macOS, Linux, and Windows. Updated OS metadata, descriptions, and hardware recommendations.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部