LM Studio: How to Run a Local Inference Server-with Python code-Part 1

VideotronicMaker
VideotronicMaker
10 هزار بار بازدید - 6 ماه پیش - Tutorial on how to use
Tutorial on how to use LM Studio without the Chat UI using a local server.  Deploy an open source LLM on LM Studio on your pc or mac without an internet connection.  The files in this video include the function to initiate a conversation with the local-model and establishes roles and where the instructions come from.  The setup allows the script to dynamically read the system message from text file, making it easy to update the system message, system prompt or pre-prompt (known in Chat GPT as custom instructions) without changing the script's code.

LM Studio is a platform that allows you to discover, download, and run large language models (LLMs) locally on your own machine.  Start a local HTTP server that behaves like OpenAI's API by running LM Studio's Local Inference Server feature. Load a model, start the server, and run these example python scripts in your terminal.  Point to the local server and chat with an intelligent assistant locally, in your terminal.

This has advantages over using cloud-based LLMs, such as:

* *Privacy:* All your data stays local, which can be important for sensitive tasks.
* *Customizability:* You can fine-tune the LLMs to specific tasks or domains.

LM Studio also offers an alternative way to interact with LLMs.  You can use the simple interface for experimenting with LLMs through text prompts using the in-app Chat UI.  

Overall, LM Studio is a powerful tool for anyone who wants to work with LLMs.
It's especially useful for developers, researchers, and creative professionals.

00:00 Introduction
00:38 Brief Overview of LM Studio
02:18 Setup / Local Inference Server
02:45 Problem with the Sample Code ?
04:00 Fixed code version 2.0 ? /Python Code-Option 1
07:36 Code version 2.1 /Python Code-Option 2/Custom Instructions-Inline/Embedded
12:20 Code version 2.2 /Python Code-Option 3/Custom Instructions-External Reference

⌨ My GitHub Repo for this video.  Please consider following me on GitHub:
https://github.com/VideotronicMaker/L...

🌐 My website with bonus code:
https://videotronicmaker.com/arduino-...
6 ماه پیش در تاریخ 1402/11/07 منتشر شده است.
10,077 بـار بازدید شده
... بیشتر