大语言模型
MiniCPM 2B 聊天
提个问题,或试试一个简短的写作任务。发送第一条消息时再登录。
MiniCPM by OpenBMB
模型许可证
MiniCPM5-2B official Q4_K_M GGUF and tokenizer derivative · Apache-2.0
Apache-2.0. Preserve licence and notices, including the MESH container-modification notice. Publisher cautions: lawful and ethical use, user safeguards, AI labels where required, no deliberate harmful-output inducement or injection/jailbreak abuse; outputs are not professional advice. These limitations are preserved in the distributed notice.
发送聊天提示词,获得 MiniCPM 2B 的回复。在浏览器中、在您连接的设备上免费在线大模型聊天。它比手机尺寸的 Llama 3.2 1B 更强,且仅支持文本。一台性能强的电脑就能容纳它;否则工作会拆分到您添加的多台机器上。首次运行会下载模型;之后的回复启动更快。
API 参考
通过 REST 提交
使用您的个人 API 密钥(msk_…),从您自己的工具为此工作负载创建任务。以这种方式启动的任务会在您于您的设备中连接的同一批设备上运行——至少需要有一台在线。
https://cp.meshlabs.cloud/v1/organizations/jobs使用 X-Organization-Api-Key: msk_your_personal_api_key 进行身份验证。该请求头名称与组织密钥相同;个人密钥使用相同的端点。
POST https://cp.meshlabs.cloud/v1/organizations/job-inputs/presign,将文件上传到返回的 upload_url,然后在 job_spec 中传入 download_url(例如作为 input_image_url)。请求体
{
"workload_type": "minicpm5-2b-gguf-pp",
"job_spec": {
"enable_thinking": true,
"max_new_tokens": 2048,
"max_context": 8192,
"kv_hot_window": 32768,
"temperature": 1,
"top_p": 0.95,
"top_k": 0,
"presence_penalty": 0,
"repetition_penalty": 1,
"speculative_ngram": false,
"speculative_draft_model": false,
"speculative_max_draft": 8,
"min_remote_stages": 0,
"wire_hidden_dtype": "f16",
"wire_hidden_codec": "fp16",
"stage_chaining": true,
"latent_mode": "off",
"latent_phase": "tagged",
"latent_exit_text": "\n\nFinal answer:\n",
"latent_top_n": 15,
"latent_entropy_tau": 0.05,
"latent_cold_stop_k": 256,
"swi_dwell_window": 512,
"swi_max_switches": 8,
"max_thinking_tokens": 1536,
"min_thinking_tokens": 0,
"prompt": "A photorealistic lighthouse at dusk"
}
}job_spec 字段
| 字段 | 必填 | 默认值 | 说明 |
|---|---|---|---|
system_prompt | 否 | — | 可选的系统提示词 |
enable_thinking | 否 | true | 在给出最终答案之前启用 MiniCPM5 思考(<think> / </think>)。请保持开启。 |
max_new_tokens | 否 | 2048 | 最大生成 token 数(思考 + 回答)。生成长文时请调高。提示词与生成内容共享上下文窗口,因此生成会在上下文处停止,而不会扩大阶段的内存下限。 |
max_context | 否 | 8192 | 阶段主机为 KV/循环状态分配的总 token 数,即提示词加生成内容。上限是 Oracle 测得该模型支持的最大上下文,因此部署决策无需外推到证据之外。调高它会提高内存下限,从而缩小能运行该任务的设备范围。 |
kv_hot_window | 否 | 32768 | 物理注意力 KV 被限制在最新的 N 个 token,因此超过 N 的对话会忘记最早的轮次,而不是在上下文上限处停止。0 表示完整上下文保持驻留。等于或低于上下文窗口时不会有任何变化:内存相同、注意力相同;若调到低于上下文窗口,则是用远程回忆换取不受限的对话长度,因为模型确实无法看到窗口之外的内容。 |
turns | 否 | — | Prior turns of this conversation, oldest first, including the current user message as the final row. Supplying them lets a stage host that still holds this conversation's KV state extend it instead of re-prefilling the whole history. Omit for a single-shot request; the workload then reads `prompt`. |
temperature | 否 | 1 | Temperature |
top_p | 否 | 0.95 | Top P |
top_k | 否 | 0 | Top K |
presence_penalty | 否 | 0 | Presence Penalty |
repetition_penalty | 否 | 1 | Repetition Penalty |
seed | 否 | — | 用于复现结果的随机种子 |
speculative_ngram | 否 | false | 提示词查找式草稿:上下文中重复出现的 n-gram 会作为草稿块重放,并由模型在一次前向计算中验证,因此一次网络往返即可确认多个 token。无需额外模型;输出与顺序解码完全一致。 |
speculative_draft_model | 否 | false | 在检查点节点上运行一个很小的 GGUF 草稿模型来提出草稿块(优先使用“草稿模型内置文件名”;外部 URL 仍可作为备用)。当草稿模型不可用时,回退到 n-gram 草稿。 |
draft_model_file | 否 | — | 此工作负载包中未分区的 GGUF 草稿模型的文件名。SDK 会从 required_files 解析它,因此私有 S3 存储桶可以使用服务器提供的签名/代理 URL,而无需公开 URL。 |
draft_model_url | 否 | — | 小型 GGUF 草稿模型的可选外部 HTTPS URL。当“草稿模型内置文件名”缺失或不在 required_files 中时用作备用。 |
speculative_max_draft | 否 | 8 | 每块验证的草稿 token 数上限。实际长度会根据观察到的接受率自适应调整。 |
min_remote_stages | 否 | 0 | 用于 GGUF 流水线并行测试的诊断性部署开关。大于 0 时,检查点只会分配给那些至少会通过 WebRTC(而非本地)运行这么多阶段的节点。在检查点对等节点宽限窗口之后会回退,以免让生产任务无法分配。 |
wire_hidden_dtype | 否 | f16 | GGUF 流水线阶段之间的隐藏激活值数据类型。f16 可使预填充和推测块的传输负载减半;f32 是诊断用的回退选项。 |
wire_hidden_codec | 否 | fp16 | 用于 GGUF 流水线阶段之间多 token 隐藏激活块的实验性编解码器。单 token 解码仍走低开销的数据类型路径;通用编解码器仅用于预填充/推测块,因为在这些场景下节省的字节数可以抵消编解码开销。fp16 最安全;auto8/hq8 为诊断用途。 |
stage_chaining | 否 | true | 当所有 GGUF 阶段都在远程并支持链式协议时,隐藏激活值直接在阶段之间发送,而不是让每个边界都经由检查点协调器中转。 |
latent_mode | 否 | off | 在 <think>…</think> 期间使用免训练的 Soft Thinking / SwiReasoning。要求阶段主机上的 GGUF WASM 带有 _lstage_eval_soft;否则回退到离散解码。在 CDN WASM 重新构建之前默认关闭。启用 Soft Thinking 时与推测解码互斥。 |
latent_phase | 否 | tagged | tagged = 思考标记;prefix = 从第 0 步开始(无标记的模型)。 |
latent_exit_text | 否 | Final answer: | 仅在 latent_phase=prefix 时使用(普通词表 token)。 |
latent_top_n | 否 | 15 | Soft top-n |
latent_entropy_tau | 否 | 0.05 | Cold Stop 熵 τ |
latent_cold_stop_k | 否 | 256 | Cold Stop 连续步数 |
swi_dwell_window | 否 | 512 | Swi 显式→潜在停留步数 |
swi_max_switches | 否 | 8 | Swi 潜在→显式最大切换次数 |
max_thinking_tokens | 否 | 1536 | 强制 </think> / 前缀退出之前的硬预算。必须明显低于 `max_new_tokens`:推理预算等于或高于总生成预算,会导致回复在思考中途被截断,完全没有答案。控制平面会根据所选部署方案实际能承受的预算重新裁剪该值,因此较小的值会被采纳,较大的值会被限制。 |
min_thinking_tokens | 否 | 0 | 下限:在出现这么多推理 token 之前,把 </think> 从采样中屏蔽。0 表示禁用。可防止思考块在生成第一个 token 时就闭合,导致完全没有推理就直接回答。 |
prompt | 是 | — | 发送给聊天模型的用户消息 / 提示词 |
cURL
curl -X POST https://cp.meshlabs.cloud/v1/organizations/jobs \
-H "X-Organization-Api-Key: msk_your_personal_api_key" \
-H "Content-Type: application/json" \
-d '{
"workload_type": "minicpm5-2b-gguf-pp",
"job_spec": {
"enable_thinking": true,
"max_new_tokens": 2048,
"max_context": 8192,
"kv_hot_window": 32768,
"temperature": 1,
"top_p": 0.95,
"top_k": 0,
"presence_penalty": 0,
"repetition_penalty": 1,
"speculative_ngram": false,
"speculative_draft_model": false,
"speculative_max_draft": 8,
"min_remote_stages": 0,
"wire_hidden_dtype": "f16",
"wire_hidden_codec": "fp16",
"stage_chaining": true,
"latent_mode": "off",
"latent_phase": "tagged",
"latent_exit_text": "\n\nFinal answer:\n",
"latent_top_n": 15,
"latent_entropy_tau": 0.05,
"latent_cold_stop_k": 256,
"swi_dwell_window": 512,
"swi_max_switches": 8,
"max_thinking_tokens": 1536,
"min_thinking_tokens": 0,
"prompt": "A photorealistic lighthouse at dusk"
}
}'https://cp.meshlabs.cloud/v1/organizations/jobs/{job_id}使用同一 API 密钥轮询,直到 status 进入终态(COMPLETED、FAILED、CANCELED 或 MODERATION_BLOCKED)。启用内容审核时,任务可能会先处于 MODERATION_PENDING 状态,然后才进入计算队列。已完成的任务会在每个输出上包含预签名的 download_url 值。
创建响应
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"workload_type": "minicpm5-2b-gguf-pp",
"status": "PENDING",
"job_spec_json": {
"enable_thinking": true,
"max_new_tokens": 2048,
"max_context": 8192,
"kv_hot_window": 32768,
"temperature": 1,
"top_p": 0.95,
"top_k": 0,
"presence_penalty": 0,
"repetition_penalty": 1,
"speculative_ngram": false,
"speculative_draft_model": false,
"speculative_max_draft": 8,
"min_remote_stages": 0,
"wire_hidden_dtype": "f16",
"wire_hidden_codec": "fp16",
"stage_chaining": true,
"latent_mode": "off",
"latent_phase": "tagged",
"latent_exit_text": "\n\nFinal answer:\n",
"latent_top_n": 15,
"latent_entropy_tau": 0.05,
"latent_cold_stop_k": 256,
"swi_dwell_window": 512,
"swi_max_switches": 8,
"max_thinking_tokens": 1536,
"min_thinking_tokens": 0,
"prompt": "A photorealistic lighthouse at dusk"
},
"work_units": [],
"outputs": [],
"created_at": "2026-06-08T12:00:00Z",
"updated_at": "2026-06-08T12:00:00Z"
}完成响应
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"workload_type": "minicpm5-2b-gguf-pp",
"status": "COMPLETED",
"job_spec_json": {
"enable_thinking": true,
"max_new_tokens": 2048,
"max_context": 8192,
"kv_hot_window": 32768,
"temperature": 1,
"top_p": 0.95,
"top_k": 0,
"presence_penalty": 0,
"repetition_penalty": 1,
"speculative_ngram": false,
"speculative_draft_model": false,
"speculative_max_draft": 8,
"min_remote_stages": 0,
"wire_hidden_dtype": "f16",
"wire_hidden_codec": "fp16",
"stage_chaining": true,
"latent_mode": "off",
"latent_phase": "tagged",
"latent_exit_text": "\n\nFinal answer:\n",
"latent_top_n": 15,
"latent_entropy_tau": 0.05,
"latent_cold_stop_k": 256,
"swi_dwell_window": 512,
"swi_max_switches": 8,
"max_thinking_tokens": 1536,
"min_thinking_tokens": 0,
"prompt": "A photorealistic lighthouse at dusk"
},
"work_units": [
{
"id": "…",
"index": 0,
"status": "COMPLETED"
}
],
"outputs": [
{
"id": "…",
"output_type": "<output type>",
"filename": "<output filename>",
"size_bytes": 524288,
"download_url": "<presigned output download URL>"
}
],
"created_at": "2026-06-08T12:00:00Z",
"updated_at": "<completion timestamp>"
}