文档
lms
— LM Studio 的命令行工具
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]
本页内容
安装 lms
- 在 macOS 或 Linux 上设置 lms
- 在 Windows 上设置 lms
- 验证安装
使用 lms 自动化和调试您的工作流
启动和停止本地服务器
列出机器上的本地模型
列出当前已加载的模型
加载模型(带选项)
卸载模型