隆重推出 lms
:LM Studio 的 CLI
今天,我们与 LM Studio 0.2.22 一同发布了 lms
的第一个版本——LM Studio 的配套 CLI 工具。
通过 lms
,您可以加载/卸载模型,启动/停止 API 服务器,并检查原始 LLM 输入(不仅仅是输出)。它在 GitHub 上开发,我们欢迎社区提出问题和 PR。
lms
随 LM Studio 一起发布,位于 LM Studio 的工作目录中,路径为 ~/.lmstudio/bin/
。当您更新 LM Studio 时,您的 lms
版本也会随之更新。如果您是开发者,也可以从源代码构建 lms
。
lms
您需要至少运行一次 LM Studio 才能使用 lms
。
之后,打开您的终端并根据您的操作系统运行以下命令之一
# Mac / Linux: ~/.lmstudio/bin/lms bootstrap # Windows: 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
采用 MIT 许可证,并在 GitHub 上的这个仓库中开发
https://github.com/lmstudio-ai/lms
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 log stream
调试您的提示lms log stream
允许您检查发送到模型的精确输入字符串。
这对于调试提示模板问题和其他意外的 LLM 行为特别有用。
$ lms log stream I Streaming logs from LM Studio timestamp: 5/2/2024, 9:49:47 PM type: llm.prediction.input modelIdentifier: TheBloke/TinyLlama-1.1B-1T-OpenOrca-GGUF/tinyllama-1.1b-1t-openorca.Q2_K.gguf modelPath: TheBloke/TinyLlama-1.1B-1T-OpenOrca-GGUF/tinyllama-1.1b-1t-openorca.Q2_K.gguf input: "Below is an instruction that describes a task. Write a response that appropriately completes the request. #### Instruction: Hello, what's your name? #### Response: "
lms
使用 lmstudio.js 与 LM Studio 交互。
您可以构建自己的程序,实现 lms
的功能以及更多。
lmstudio.js
处于预发布公共 alpha 阶段。在 GitHub 上关注:https://github.com/lmstudio-ai/lmstudio.js。
在 LM Studio Discord 服务器上的新 #dev-chat
频道中讨论所有关于 lms
和 lmstudio.js
的话题。
从 https://lm-studio.cn 下载适用于 Mac / Windows / Linux 的 LM Studio。
LM Studio 0.2.22 AMD ROCm - 技术预览版可在 https://lm-studio.cn/rocm 获取。
LM Studio 的 Twitter:https://twitter.com/lmstudio