LM Studio – 傻瓜、一站式本地的大语言模型,支持直接对话和 API 调用

3 min


LM Studio 是一款将目前主流大模型 LLM 元素打包在一起的,可以让你在自己的电脑上,“0 门槛”运行本地大语言模型 LLM,并且用起来就像 那样。支持 、Linux。

👾 LM Studio – Discover and run local LLMs

LM Studio is an easy to use desktop for experimenting with local and open-source Large Language Models (LLMs). The LM Studio cross platform desktop app allows you to download and run any ggml-compatible model from Hugging Face, and provides a simple yet powerful model configuration and inferencing UI.

傻瓜、一站式部署本地大语言模型,大概就是打开电脑 > 双击运行程序 > 开始提问 > 获得 回答这样三步走。

LM Studio

我觉得 LM Studio 就是这样的,它长这样:

LM Studio – 傻瓜、一站式本地的大语言模型,支持直接对话和 API 调用

你唯一需要操心的事情,就是挑选模型,然后使用,就好了。

下载模型

直接在目前的主流模型托管 huggingface 搜索你需要的模型,比如 Meta-Llama-3.1-8B-Instruct-GGUF,然后找到对应的 Files 页面,挑选你需要的模型,点击那个下载按钮

最终,你将得到一个类似 Meta-Llama-3.1-8B-Instruct-Q4_K_M.gguf 的文件,很大,一般都好几个 GB。

安装模型

LM Studio 默认的模型保存路径在 C:\Users\appinn.cache\lm-studio\models,可以更换:

不过这里注意,你需要使用 ${Publisher}/${Repository}/${ModelFile}这样的路径结构,如上图第二个红色框框,需要将手动下载的 .gguf 模型文件保存在路径的两级文件夹下才能正确识别。

然后,就能提问了。会自动使用你的 CPU、GPU…

本地 LLM 服务器

LM Studio 也支持 类的服务器,即可以在第三方服务器上使用这个 LLM,就像使用 OpenAI API 一样,只不过这里的 API 服务器是你自己的。

OpenAI 一样,使用过 /v1/chat/completions 、 /v1/completions 、 /v1/embeddings 即可。


Like it? Share with your friends!

0
Anonymous

Choose A Format
Story
Formatted Text with Embeds and Visuals
List
The Classic Internet Listicles
Countdown
The Classic Internet Countdowns
Open List
Submit your own item and vote up for the best submission
Ranked List
Upvote or downvote to decide the best list item
Video
Youtube and Vimeo Embeds