文档
lms
— LM Studio 的 CLI
开始使用 lms
命令行工具。
LM Studio 附带 lms
,这是一个用于脚本化和自动化本地 LLM 工作流的命令行工具。
lms
采用 MIT 许可证,并在 GitHub 上的此仓库中开发:https://github.com/lmstudio-ai/lms
👉 您需要至少运行一次 LM Studio 才能使用 lms
。
lms
lms
随 LM Studio 提供,位于 LM Studio 工作目录的 /bin
下。
使用以下命令将 lms
添加到您的系统路径。
lms
在您的终端中运行以下命令
~/.lmstudio/bin/lms bootstrap
lms
在 PowerShell 中运行以下命令
cmd /c %USERPROFILE%/.lmstudio/bin/lms.exe bootstrap
打开一个新的终端窗口并运行 lms
。
这是您将获得的当前输出
$ lms lms - LM Studio CLI - v0.2.22 GitHub: https://github.com/lmstudio-ai/lmstudio-cli Usage lms <subcommand> where <subcommand> can be one of: - status - Prints the status of LM Studio - server - Commands for managing the local server - ls - List all downloaded models - ps - List all loaded models - load - Load a model - unload - Unload a model - create - Create a new project with scaffolding - log - Log operations. Currently only supports streaming logs from LM Studio via `lms log stream` - version - Prints the version of the CLI - bootstrap - Bootstrap the CLI For more help, try running `lms <subcommand> --help`
lms
自动化和调试您的工作流lms server start lms server stop
lms ls
这将反映当前 LM Studio 模型目录,您可以在应用程序的 📂 我的模型 选项卡中设置该目录。
lms ps
lms load [--gpu=max|auto|0.0-1.0] [--context-length=1-N]
--gpu=1.0
表示“尝试将 100% 的计算量卸载到 GPU”。
lms load TheBloke/phi-2-GGUF --identifier="gpt-4-turbo"
如果您想保持模型标识符的一致性,这将很有用。
lms unload [--all]
此页面的源代码可在 GitHub 上获取
本页内容
安装 lms
- 在 macOS 或 Linux 上引导 lms
- 在 Windows 上引导 lms
- 验证安装
使用 lms 自动化和调试您的工作流
启动和停止本地服务器
列出机器上的本地模型
列出当前加载的模型
加载模型(带选项)
卸载模型