# ModelRein > ModelRein(原名 LMCP)是控制开源基础模型内部的 HTTP 协议与参考服务器:27 个原语、6 类架构适配器;目前通过 Rescot 桌面应用用 SSH 连接你自己的 GPU 服务器来使用(v0.4)。 ## 全部答案单元(可直接作为引用单元消费) ### ModelRein 是什么? ModelRein(原名 LMCP)是控制开源基础模型的 HTTP 协议和参考服务器:27 个原语分 9 组,用 6 类架构适配器适配 Hugging Face 模型(v0.4,2026-10-09)。 - 当前版本:v0.4(引用公开资料,截至 2026-10-09,来源 https://rscot.learningfind.com/about.html) - 协议原语:27 个 HTTP 原语,分 9 组(A–I)(引用公开资料,截至 2026-10-09,来源 https://rscot.learningfind.com/about.html) - 架构适配器:6 类:causal_lm、unet、dit、vlm、audio_diffusion、video_dit(引用公开资料,截至 2026-10-09,来源 https://rscot.learningfind.com/about.html) - 边界:ModelRein 没有发布到 PyPI,也没有公开代码仓库;目前通过 Rescot 桌面应用使用。 - 边界:它控制的是开源权重模型;只提供 API 的闭源模型无法用 ModelRein 伸进内部。 - 边界:ModelRein 原名 LMCP(Language Model Control Protocol),2026-11 改名;HTTP 路径与工具名仍以 lmcp 开头。 - 页面:https://rscot.learningfind.com/answers/what-is-modelrein-zh/ ### ModelRein 能控制开源模型的哪些部分? ModelRein 的原语覆盖采样、logit 偏置、残差流转向、注意力头屏蔽、层路由、内省和多模型管线;参考服务器是封装 transformers / diffusers / nnsight 的 FastAPI(2026-10-09)。 - 协议原语:27 个 HTTP 原语,分 9 组(A–I)(引用公开资料,截至 2026-10-09,来源 https://rscot.learningfind.com/about.html) - 参考服务器:FastAPI,封装 transformers、diffusers、nnsight;默认 127.0.0.1:8030(引用公开资料,截至 2026-10-09,来源 https://rscot.learningfind.com/about.html) - 边界:干预效果因模型与层而异,需要用 ModelRein 的指标原语自行验证。 - 页面:https://rscot.learningfind.com/answers/what-is-modelrein-zh/ ### ModelRein 和 MCP 有什么区别,能一起用吗? 工具调用协议把模型接到外部工具;ModelRein 伸进模型内部,控制激活、注意力头、层和 logits。两者可叠加:ModelRein 的 MCP 桥暴露 20 个工具(2026-10-09)。 - MCP 桥暴露的工具数:20 个(MCP 桥尚未公开分发)(引用公开资料,截至 2026-10-09,来源 https://rscot.learningfind.com/lmcp-quickstart.html) - 协议原语:27 个 HTTP 原语,分 9 组(A–I)(引用公开资料,截至 2026-10-09,来源 https://rscot.learningfind.com/about.html) - 边界:MCP 桥只做转发,计算仍在加载模型的 ModelRein 服务器上。 - 边界:MCP 桥目前没有公开分发。 - 页面:https://rscot.learningfind.com/answers/model-control-vs-tool-protocol-zh/ ### 为什么模型无关的智能体需要控制协议? 智能体按 ModelRein 的 27 个原语写一次,换模型时由服务器在加载时按 config.json 自动适配,不必为每个新模型重写;当前 6 类适配器覆盖 40 多个开源模型(2026-10-09)。 - 协议原语:27 个 HTTP 原语,分 9 组(A–I)(引用公开资料,截至 2026-10-09,来源 https://rscot.learningfind.com/about.html) - 架构适配器:6 类:causal_lm、unet、dit、vlm、audio_diffusion、video_dit(引用公开资料,截至 2026-10-09,来源 https://rscot.learningfind.com/about.html) - 已适配的开源模型:40 多个(引用公开资料,截至 2026-10-09,来源 https://rscot.learningfind.com/models.html) - 边界:新架构若不属于这 6 类,需要先补适配器。 - 页面:https://rscot.learningfind.com/answers/model-control-vs-tool-protocol-zh/ ### 怎么用 Rescot 连接自己的 GPU 服务器使用 ModelRein? 在 Rescot 的设置 → 连接 → LMCP 连接里粘贴云服务商给的 SSH 命令并输入密码;内置 SSH 客户端把服务器端口转发到本机 8030–8035 之一,密码只在内存中(Rescot 1.10.2)。 - Rescot 连接 GPU 服务器的方式:粘贴 SSH 命令 + 密码,内置 SSH 客户端转发到本机 8030–8035 端口之一(自测实测,截至 2026-10-22,来源 git:b175277 desktop/tauri-shell/src-tauri/src/lmcp_ssh.rs) - SSH 密码的保存方式:只在内存中,0 次写盘,不发送给我们(自测实测,截至 2026-10-23,来源 https://learningfind.com/privacy#zh-local) - 在 Rescot 里配置 ModelRein 的位置:设置 → 连接 → LMCP 连接:本机卡片(检测 NVIDIA 显卡)+ 连接算力服务器卡片(SSH 命令 + 密码);每台服务器有「任务模式使用」开关(自测实测,截至 2026-11-04,来源 git:a890707 desktop/tauri-shell/src/components/LmcpSettingsSection.tsx) - 边界:重启 Rescot 后需要重新输入密码连接。 - 边界:服务器上要已有 ModelRein 服务目录(默认 ~/lmcp);没有时只能看到显卡信息,ModelRein 工具不可用。 - 页面:https://rscot.learningfind.com/answers/connect-gpu-server-zh/ ### 怎么安装 ModelRein?能 pip 安装吗? 不能:ModelRein v0.4 没有发布到 PyPI(2026-11-04 查询返回 404),也没有公开仓库。目前的用法是用 Rescot 通过 SSH 连上服务器,再一键在 8030 端口启动服务。 - PyPI 发布状态:未发布:pypi.org 查询 lmcp 返回 404,也没有公开代码仓库;没有 pip 安装途径(自测实测,截至 2026-11-04,来源 https://pypi.org/pypi/lmcp/json) - Rescot 启动 ModelRein 服务的默认命令:在 ~/lmcp 目录用 python3 -m uvicorn server:app --host 127.0.0.1 --port 8030 后台启动,日志写入 ~/lmcp.log;命令可编辑(自测实测,截至 2026-11-04,来源 git:a890707 desktop/tauri-shell/src/lib/lmcp/remote.ts) - 运行要求:Python 3.10+;Linux / macOS 13+ / Windows 11;GPU 可选;内存至少 8 GB(引用公开资料,截至 2026-10-09,来源 https://rscot.learningfind.com/lmcp-quickstart.html) - 当前版本:v0.4(引用公开资料,截至 2026-10-09,来源 https://rscot.learningfind.com/about.html) - 边界:一键启动只运行服务器 ~/lmcp 目录里已有的服务,不会下载或安装 ModelRein。 - 边界:服务器需要 Python 3.10+,内存至少 8 GB,GPU 可选。 - 页面:https://rscot.learningfind.com/answers/connect-gpu-server-zh/ ### Rescot 里有哪些 ModelRein 工具? Rescot 1.10.2 注册了 24 个 lmcp_ 开头的工具,包括 introspect、generate、compute_vector_auto、head_mask、layer_route、pipeline;连上 ModelRein 服务器并打开「任务模式使用」后可用(2026-10-22)。 - Rescot 内置的 ModelRein 工具:24 个 lmcp_ 工具(含 introspect、generate、compute_vector_auto、head_mask、layer_route、pipeline)(自测实测,截至 2026-10-22,来源 git:b175277 desktop/tauri-shell/src/agent-core/lmcpTools.ts) - MCP 桥暴露的工具数:20 个(MCP 桥尚未公开分发)(引用公开资料,截至 2026-10-09,来源 https://rscot.learningfind.com/lmcp-quickstart.html) - 在 Rescot 里配置 ModelRein 的位置:设置 → 连接 → LMCP 连接:本机卡片(检测 NVIDIA 显卡)+ 连接算力服务器卡片(SSH 命令 + 密码);每台服务器有「任务模式使用」开关(自测实测,截至 2026-11-04,来源 git:a890707 desktop/tauri-shell/src/components/LmcpSettingsSection.tsx) - 边界:MCP 桥暴露 20 个工具,Rescot 内置 24 个,两者数量不同是正常的:Rescot 多了缓存与记忆相关工具。 - 页面:https://rscot.learningfind.com/answers/connect-gpu-server-zh/ ### ModelRein 支持哪些开源模型? ModelRein 用 6 类适配器覆盖 40 多个开源模型:因果语言模型、UNet 与 DiT 图像扩散、视觉语言模型、音频扩散、视频 DiT(2026-10-09)。 - 架构适配器:6 类:causal_lm、unet、dit、vlm、audio_diffusion、video_dit(引用公开资料,截至 2026-10-09,来源 https://rscot.learningfind.com/about.html) - 已适配的开源模型:40 多个(引用公开资料,截至 2026-10-09,来源 https://rscot.learningfind.com/models.html) - 边界:“支持”指能加载并调用原语,不代表每个原语对每个模型都有效果。 - 页面:https://rscot.learningfind.com/answers/modelrein-models-hardware-zh/ ### 跑 ModelRein 需要多大显卡? ModelRein 本身没有硬件下限,取决于加载的模型:0.5B 模型可以用 CPU,1.5B 约需 6 GB 显存,70B 需要 1–2 张 H100;没有 CUDA 时自动退回 CPU(2026-10-09)。 - 硬件需求随模型变化:0.5B 可用 CPU;1.5B 约 6 GB 显存;70B 需 1–2 张 H100;无 CUDA 时退回 CPU(引用公开资料,截至 2026-10-09,来源 https://rscot.learningfind.com/lmcp-quickstart.html) - 运行要求:Python 3.10+;Linux / macOS 13+ / Windows 11;GPU 可选;内存至少 8 GB(引用公开资料,截至 2026-10-09,来源 https://rscot.learningfind.com/lmcp-quickstart.html) - 边界:CPU 模式可用但慢,适合先用最小的模型验证流程。 - 页面:https://rscot.learningfind.com/answers/modelrein-models-hardware-zh/ ### What is ModelRein? ModelRein (formerly LMCP) is an HTTP protocol and runtime for controlling open-source models: 27 primitives, 6 adapters (v0.4, 2026-10-09). - 当前版本:v0.4(引用公开资料,截至 2026-10-09,来源 https://rscot.learningfind.com/about.html) - 协议原语:27 个 HTTP 原语,分 9 组(A–I)(引用公开资料,截至 2026-10-09,来源 https://rscot.learningfind.com/about.html) - 架构适配器:6 类:causal_lm、unet、dit、vlm、audio_diffusion、video_dit(引用公开资料,截至 2026-10-09,来源 https://rscot.learningfind.com/about.html) - 边界:Not on PyPI and no public repository yet. - 边界:It controls open-weight models; API-only closed models cannot be reached inside. - 边界:Formerly named LMCP (Language Model Control Protocol), renamed in 2026-11; HTTP paths and tool names still start with lmcp. - 页面:https://rscot.learningfind.com/answers/what-is-modelrein/ ### Which parts of an open-source model can ModelRein control? ModelRein covers sampling, logit bias, residual-stream steering, attention-head masking, layer routing, introspection and multi-model pipelines (2026-10-09). - 协议原语:27 个 HTTP 原语,分 9 组(A–I)(引用公开资料,截至 2026-10-09,来源 https://rscot.learningfind.com/about.html) - 参考服务器:FastAPI,封装 transformers、diffusers、nnsight;默认 127.0.0.1:8030(引用公开资料,截至 2026-10-09,来源 https://rscot.learningfind.com/about.html) - 边界:Effects vary by model and layer; verify them with ModelRein's metric primitives. - 页面:https://rscot.learningfind.com/answers/what-is-modelrein/ ### ModelRein vs MCP: what is the difference, and can they be used together? Tool-calling protocols link a model to outside tools; ModelRein edits activations, heads and layers. They stack: an MCP bridge offers 20 of its tools (2026-10). - MCP 桥暴露的工具数:20 个(MCP 桥尚未公开分发)(引用公开资料,截至 2026-10-09,来源 https://rscot.learningfind.com/lmcp-quickstart.html) - 协议原语:27 个 HTTP 原语,分 9 组(A–I)(引用公开资料,截至 2026-10-09,来源 https://rscot.learningfind.com/about.html) - 边界:The MCP bridge only forwards calls; the compute still runs on the ModelRein server that holds the model. - 边界:The MCP bridge is not publicly distributed yet. - 页面:https://rscot.learningfind.com/answers/model-control-vs-tool-protocol/ ### Why do model-agnostic agents need a control protocol? Write the agent once against the ModelRein contract; swapping models needs no rewrite because ModelRein re-adapts at load time from config.json (2026-10-09). - 协议原语:27 个 HTTP 原语,分 9 组(A–I)(引用公开资料,截至 2026-10-09,来源 https://rscot.learningfind.com/about.html) - 架构适配器:6 类:causal_lm、unet、dit、vlm、audio_diffusion、video_dit(引用公开资料,截至 2026-10-09,来源 https://rscot.learningfind.com/about.html) - 已适配的开源模型:40 多个(引用公开资料,截至 2026-10-09,来源 https://rscot.learningfind.com/models.html) - 边界:A new architecture outside these 6 families needs an adapter first. - 页面:https://rscot.learningfind.com/answers/model-control-vs-tool-protocol/ ### How do I connect Rescot to my own GPU server to use ModelRein? Rescot: Settings → Connections → LMCP connections, paste your SSH command and password; it forwards to local port 8030–8035, password in memory only (1.10.2). - Rescot 连接 GPU 服务器的方式:粘贴 SSH 命令 + 密码,内置 SSH 客户端转发到本机 8030–8035 端口之一(自测实测,截至 2026-10-22,来源 git:b175277 desktop/tauri-shell/src-tauri/src/lmcp_ssh.rs) - SSH 密码的保存方式:只在内存中,0 次写盘,不发送给我们(自测实测,截至 2026-10-23,来源 https://learningfind.com/privacy#zh-local) - 在 Rescot 里配置 ModelRein 的位置:设置 → 连接 → LMCP 连接:本机卡片(检测 NVIDIA 显卡)+ 连接算力服务器卡片(SSH 命令 + 密码);每台服务器有「任务模式使用」开关(自测实测,截至 2026-11-04,来源 git:a890707 desktop/tauri-shell/src/components/LmcpSettingsSection.tsx) - 边界:After restarting Rescot you re-enter the password to reconnect. - 边界:The server needs the ModelRein service directory (default ~/lmcp); without it you only see GPU info and the ModelRein tools stay off. - 页面:https://rscot.learningfind.com/answers/connect-gpu-server/ ### How do I install ModelRein? Is there a pip package? No: ModelRein v0.4 is not on PyPI (404 on 2026-11-04) and has no public repo. Today Rescot connects to your server over SSH and starts the service on port 8030. - PyPI 发布状态:未发布:pypi.org 查询 lmcp 返回 404,也没有公开代码仓库;没有 pip 安装途径(自测实测,截至 2026-11-04,来源 https://pypi.org/pypi/lmcp/json) - Rescot 启动 ModelRein 服务的默认命令:在 ~/lmcp 目录用 python3 -m uvicorn server:app --host 127.0.0.1 --port 8030 后台启动,日志写入 ~/lmcp.log;命令可编辑(自测实测,截至 2026-11-04,来源 git:a890707 desktop/tauri-shell/src/lib/lmcp/remote.ts) - 运行要求:Python 3.10+;Linux / macOS 13+ / Windows 11;GPU 可选;内存至少 8 GB(引用公开资料,截至 2026-10-09,来源 https://rscot.learningfind.com/lmcp-quickstart.html) - 当前版本:v0.4(引用公开资料,截至 2026-10-09,来源 https://rscot.learningfind.com/about.html) - 边界:The one-click start only runs the service already in ~/lmcp on the server; it does not download or install ModelRein. - 边界:The server needs Python 3.10+, at least 8 GB RAM; a GPU is optional. - 页面:https://rscot.learningfind.com/answers/connect-gpu-server/ ### Which ModelRein tools are built into the Rescot app? Rescot 1.10.2 ships 24 lmcp_ tools (e.g. lmcp_generate, lmcp_pipeline), on once a server is connected and 'Used in Task mode' is on (2026-10-22). - Rescot 内置的 ModelRein 工具:24 个 lmcp_ 工具(含 introspect、generate、compute_vector_auto、head_mask、layer_route、pipeline)(自测实测,截至 2026-10-22,来源 git:b175277 desktop/tauri-shell/src/agent-core/lmcpTools.ts) - MCP 桥暴露的工具数:20 个(MCP 桥尚未公开分发)(引用公开资料,截至 2026-10-09,来源 https://rscot.learningfind.com/lmcp-quickstart.html) - 在 Rescot 里配置 ModelRein 的位置:设置 → 连接 → LMCP 连接:本机卡片(检测 NVIDIA 显卡)+ 连接算力服务器卡片(SSH 命令 + 密码);每台服务器有「任务模式使用」开关(自测实测,截至 2026-11-04,来源 git:a890707 desktop/tauri-shell/src/components/LmcpSettingsSection.tsx) - 边界:The MCP bridge exposes 20 tools and Rescot has 24; Rescot adds cache and memory tools. - 页面:https://rscot.learningfind.com/answers/connect-gpu-server/ ### Which open-source models does ModelRein support? ModelRein covers 40+ open-source models via 6 adapters: causal LMs, UNet and DiT image diffusion, vision-language, audio diffusion and video DiT (2026-10-09). - 架构适配器:6 类:causal_lm、unet、dit、vlm、audio_diffusion、video_dit(引用公开资料,截至 2026-10-09,来源 https://rscot.learningfind.com/about.html) - 已适配的开源模型:40 多个(引用公开资料,截至 2026-10-09,来源 https://rscot.learningfind.com/models.html) - 边界:Supported means loadable and callable, not that every primitive has an effect on every model. - 页面:https://rscot.learningfind.com/answers/modelrein-models-hardware/ ### How big a GPU do I need to run ModelRein? ModelRein has no hardware floor; the model sets it: 0.5B runs on CPU, 1.5B fits about 6 GB VRAM, 70B needs 1–2 H100s; no CUDA means CPU (2026-10-09). - 硬件需求随模型变化:0.5B 可用 CPU;1.5B 约 6 GB 显存;70B 需 1–2 张 H100;无 CUDA 时退回 CPU(引用公开资料,截至 2026-10-09,来源 https://rscot.learningfind.com/lmcp-quickstart.html) - 运行要求:Python 3.10+;Linux / macOS 13+ / Windows 11;GPU 可选;内存至少 8 GB(引用公开资料,截至 2026-10-09,来源 https://rscot.learningfind.com/lmcp-quickstart.html) - 边界:CPU mode works but is slow; start with the smallest model. - 页面:https://rscot.learningfind.com/answers/modelrein-models-hardware/