LM Studio in 2024: Local Models, Parallel Inference and a Local API

Matthew Berman demonstrates model downloads, hardware settings, JSON output and serving multiple local models.

MBMatthew BermanModeration · Forward Future
Kanal
Matthew Berman
Veröffentlicht
23. März 2024
Video
14:11
Lesezeit
3 Min.
Folien
4
Original
Englisch
Auf YouTube öffnen
Beim Scrollen schrumpft das Video in die rechte untere Ecke und läuft weiter. Untertitel folgen Ihrer Lesesprache.
LesespracheIn 2 Sprachen verfügbar
Diesen Artikel gibt es noch nicht auf Deutsch, daher wird das Original (Englisch) angezeigt.
ZUSAMMENFASSUNG

In 30 Sekunden

In this March 2024 tutorial, Matthew Berman shows the LM Studio interface available at the time, including model selection, parallel inference and an OpenAI-style local API. His JSON example does not always follow the requested structure. The video description discloses that Berman is an investor in LM Studio and CrewAI.

  1. 1Estimate model fitLM Studio displays file size and a compatibility estimate for quantized models.
  2. 2Hardware accelerationBerman’s example speeds up after enabling Apple Metal and GPU layers; it is a single-machine observation.
  3. 3Multiple loaded modelsGemma and Mistral are held in memory simultaneously, consuming about 7.3 GB in the demonstration.
  4. 4JSON needs verificationThe models do not consistently follow the desired structure even after JSON mode is enabled.
  5. 5Local APIA local server lets compatible clients list models and select a model for completion requests.

Das Wichtigste

  1. Model size, quantization and available memory affect whether a local model can run.
  2. Hardware acceleration improved speed in Berman’s particular test, but results vary by machine and workload.
  3. Loading multiple models permits comparison and parallel requests, with additional resource use.
  4. JSON mode and prompting do not eliminate the need to validate structured output.
  5. The local server exposes model and completion endpoints for compatible applications.
VOLLTEXT

Den bearbeiteten Text nach Kapiteln lesen

Nur das Transkript
01

Finding and loading a local model

Berman introduces the 2024 interface, selects model files and discusses memory estimates. He loads Gemma into the chat.

In this March 2024 tutorial, I revisit LM Studio and its ability to run local language models without writing code. I focus on loading multiple models, structured output and a local API. The video description discloses that I am an investor in LM Studio and CrewAI.

The version shown offers downloads for macOS, Windows and Linux. After installation, I search the interface for Mixtral models hosted on Hugging Face; compatible file formats and model availability depend on the software and model, so not every model is guaranteed to run.

Model compatibility estimates
FOLIE 1 / 4Model compatibility estimatesThe interface compares quantized files by size and estimated GPU compatibility.

LM Studio estimates whether a quantized model is likely to fit the machine and whether GPU offload may be possible. It shows file sizes and explanations of quantization, useful when choosing between smaller files and potential quality tradeoffs; these are estimates, not guarantees.

I select a model file to illustrate the download process and cancel it after showing the progress display. A suitable choice depends on available memory as well as the model and quantization.

In the chat tab I load an already downloaded 2-billion-parameter Gemma model. The application selects a preset automatically, and I send a simple joke request to demonstrate local inference.

02

Chat tools and hardware settings

He explores chat controls and enables Apple Metal acceleration, reporting speeds from his own machine.

The chat interface can branch a conversation, copy or edit messages, regenerate responses and continue output. It also reports time to first token, generation speed, CPU threads and GPU layers.

On my Apple computer, I turn on Metal support, reload the model and increase GPU layers. In this small example the displayed speed changes from about 20 to 73 tokens per second; that is an individual observation, not a universal benchmark.

03

Multiple models and JSON

The Playground loads Gemma and Mistral together. Berman tests sequential and parallel generation and observes formatting mistakes.

The Playground lets me load multiple models into memory. I choose Gemma and Mistral and assign short model identifiers that can also be used in API requests.

Both models load at once, using about 7.3 GB on the 32 GB machine shown. How many models can coexist depends on their size, context and available resources; my estimate about loading more is illustrative.

Two models loaded in the Playground
FOLIE 2 / 4Two models loaded in the PlaygroundGemma and Mistral have separate model identifiers and share the machine’s resources.

The interface offers JSON mode for structured output, but model behavior still matters. I first send the same joke request to both models sequentially and inspect their outputs and reported speeds.

Simply enabling JSON mode does not produce the format I want in this example. Explicitly requesting JSON improves the results, but the two models choose different structures.

An imperfect JSON result
FOLIE 3 / 4An imperfect JSON resultThe demonstration shows that enabling structured output alone did not guarantee the desired result.

I specify a nested structure with joke, setup and punchline fields. Mistral follows the request in this attempt while Gemma does not; the demo shows why structured output should be validated, not assumed correct.

I switch off sequential sending so both loaded models generate at once. It works on the machine shown, but parallel inference can compete for memory and compute and may be unsuitable for a smaller computer.

04

Throttling and the local API

He shows a resource throttle and a local server. API requests select between the loaded models, with possible agent-framework integrations.

A throttling control reduces CPU and GPU pressure when multiple models generate simultaneously, at the cost of slower computation. I point out the default setting shown in this version.

I start the local server, which exposes API endpoints similar to those used by OpenAI clients. A request to the models endpoint lists the loaded models, and a completion request specifies the desired model identifier.

Throttling and the local server
FOLIE 4 / 4Throttling and the local serverThe 2024 interface shows resource controls and a local server for API requests.

I demonstrate changing the model name in a terminal request to switch between Gemma and Mistral without reloading them. Both remain in memory, which makes the switch convenient in this test.

I discuss using the local endpoint with agent frameworks such as AutoGen and potentially CrewAI, with different models assigned to different agents. The precise setup and compatibility depend on the versions involved.

I encourage viewers to experiment with local models and multi-agent workflows. Loading several models can make comparisons or coordination possible, but improved output quality is a hypothesis to test rather than a guarantee of the demonstration.

Mehr aus diesem Kanal

6 Folien25:50EN
MBMatthew Berman· 24. Okt. 2026Kimi K3.1 Pro Tested: Strong 3D Demos, Uneven Results and Competitive PricingMatthew Berman · Forward FutureMatthew Berman tests the open-weight model on coding, 3D rendering and visual explanations, then compares benchmark results and prices.Open-weight modelsBenchmarksAI cost & performance+1
2 Folien32:20EN
MBMatthew Berman· 23. Okt. 2026Who Is Local AI For? The Costs, Trade-offs and a Hybrid FutureMatthew Berman · Forward FutureMatthew Berman weighs data control and independence against hardware cost, setup complexity and inference speed.Local inferenceOpen-weight modelsAI cost & performance+1
Folien0:22EN
MBMatthew Berman· 21. Okt. 2026A Robot Bodyguard Video Shows Dramatic Rescue ScenariosMatthew Berman · Forward FutureMatthew Berman reacts to a short robot demonstration depicting fighting and vehicle-rescue scenarios.RoboticsEvals
45:08EN
MBMatthew Berman· 21. Okt. 2026Sam Altman on AI Discovery, Consciousness, Compute and a Human-Centered FutureMatthew Berman, Sam Altman · Forward FutureIn a conversation with Matthew Berman, Altman discusses scientific progress, personal assistants, recursive self-improvement and the importance of human agency.AI for sciencePersonal agentsConsciousness+2
0:32EN
MBMatthew Berman· 21. Okt. 2026Sam Altman on the Continuing Demand for Software WorkSam Altman, Matthew Berman · OpenAIIn a short interview excerpt, Altman says demand for software may be larger than expected even as AI changes how it is made.Future of WorkSoftware engineeringCoding-Agenten
1:02EN
MBMatthew Berman· 15. Okt. 2026From Punched Cards to AI Software FactoriesMatthew Berman · Forward FutureMatthew Berman contrasts early programming with an AI-assisted workflow and promotes Factory’s development tools.Software-FabrikenCoding-AgentenSoftware engineering+1