Using OpenLLM to Serve Open Models Through an API

Matthew Berman demonstrates a local model server, its interactive API and a Python client in a 2023 walkthrough.

MBMatthew BermanVortrag · Forward Future
Kanal
Matthew Berman
Veröffentlicht
22. Juni 2023
Video
8:17
Lesezeit
3 Min.
Folien
3
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 June 2023, Matthew Berman walks through installing OpenLLM, serving OPT and Falcon, testing generation and metadata endpoints, and packaging a model. The example distinguishes a working API from the quality of the model’s answers. Commands and feature availability reflect the version demonstrated in 2023.

  1. 1Install in an isolated environmentBerman creates a Conda environment, installs OpenLLM and checks the CLI.
  2. 2Start and test a local serverAn OPT server exposes generation and metadata endpoints through a browser interface.
  3. 3Call the model from PythonA short client sends a query to the local HTTP server; its poor answer illustrates model limitations.
  4. 4Try FalconOptional dependencies enable the Falcon example and its metadata endpoint identifies Falcon 7B.
  5. 5Build a BentoThe demonstration shows a packaging command and model variant selection.

Das Wichtigste

  1. OpenLLM provides a server and API interface around supported open models.
  2. A separate Python environment can help manage dependencies.
  3. An API can respond successfully while the model produces a poor answer.
  4. Different model families may require additional dependencies.
  5. Packaging a model is one step toward deployment, not a complete production setup.
  6. The commands and planned features shown are historical and may differ in current releases.
VOLLTEXT

Den bearbeiteten Text nach Kapiteln lesen

Nur das Transkript
01

OpenLLM and supported models

Berman introduces the project and describes its 2023 integration and deployment plans.

In this June 2023 tutorial I introduce OpenLLM, an open-source project intended to make serving and building applications with open models easier. It exposes a simple API, supports several model families and offers integrations and deployment options. The commands and feature status in this walkthrough reflect the version shown at the time and may have changed.

The repository lists supported families including StableLM, Falcon, Dolly, FLAN, ChatGLM and StarCoder. It describes API testing, integrations with the BentoML and Hugging Face ecosystem, and ways to package a server or deploy it through BentoCloud. Fine-tuning is described as coming soon, not a feature I demonstrate.

02

Install and start a server

He creates a Conda environment, installs the package and launches an OPT server.

I first create a separate Conda environment named `ol` with Python 3.11.3, then activate it and install OpenLLM using `pip install openllm`. An isolated environment helps avoid dependency conflicts. I run `openllm -h` to confirm the command is available and inspect its options.

I start the default OPT example with `openllm start opt`. Once the local server is running, I open its documentation interface at `localhost:3000`. The interface exposes generation and metadata endpoints, and it also lets me send a request without writing a separate client.

03

Test the API and Python client

The browser and a short Python script call the local model. Responses reveal the limits of the small model.

To test generation, I choose the endpoint, enter a prompt asking for a joke in the JSON payload and execute it. The page displays response codes and generation settings such as maximum new tokens, minimum length and early stopping. Server logs show the requests arriving.

Interactive API response settings
FOLIE 1 / 3Interactive API response settingsThe documentation interface shows response information and generation configuration.

The generated response is not particularly coherent, which I attribute to the small model used in this example. A successful API call shows that the serving path works; it does not establish that the model's answer is accurate or useful.

Next I write a short Python script that imports `openllm`, creates an HTTP client for the local server, sends a query and prints the response. The demonstration produces BentoML warnings about JSON encoders, but the request returns. Its explanation of “further” and “farther” is again nonsensical, illustrating the difference between connectivity and output quality.

Python client for the local server
FOLIE 2 / 3Python client for the local serverA short script creates an HTTP client, sends a query and prints the result.
04

Install Falcon and package a model

Berman adds model-specific dependencies, launches Falcon and demonstrates packaging and model selection.

The version shown supports additional models through optional packages. I open a second terminal, activate the same environment and install the Falcon extra with `pip install openllm[falcon]`. I note that my first attempt had missing dependencies; OpenLLM reported them and I installed them separately before retrying.

I start a Falcon server with `openllm start falcon`. The console mentions dependencies such as einops, xformers and safetensors, and the metadata endpoint identifies the model as Falcon 7B. The exact dependencies and installation process depend on the model and software version.

Building a Falcon Bento
FOLIE 3 / 3Building a Falcon BentoThe terminal shows the historical command used to package the Falcon model.

For deployment, I demonstrate `openllm build falcon`, which creates a Bento package for the model. I also explain that a model ID can select a specific variant when starting the server. The tutorial shows a packaging command, not a complete production deployment.

Finally, I point to Hugging Face agents integration and discuss LangChain support. The video describes some integrations and fine-tuning as upcoming, so consult the project's current documentation before assuming that a 2023 feature status or command still applies.

Mehr aus diesem Kanal

12 Folien34:21EN
Matthew Berman· 27. Okt. 2026Matthew Berman Examines Anthropic’s IPO Filing, AI Growth and GovernanceMatthew Berman, Sam Altman · Forward FutureThe presenter reviews the S-1’s financial metrics, compute strategy and voting structure while questioning the tension between rapid AI development and safety.AnthropicAI SafetyEnterprise-KI+2
2 Folien0:36EN
Matthew Berman· 25. Okt. 2026Kimi K3.1 and a Rubik’s Cube Solver DemonstrationMatthew Berman · Forward FutureMatthew Berman shows a scrambled virtual cube being solved and gives the Kimi K3.1 test a favorable assessment.EvalsCoding-AgentenOpen-weight models
6 Folien25:50EN
Matthew 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
Matthew 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
6 Folien1:03:37EN
Matthew Berman· 23. Okt. 2026Matthew Berman’s Team Tests Kimi K3.1 on Animation, Games, and ChartsMatthew Berman, Alex, Brian · Forward FutureA live team AMA turns into an informal test of Kimi K3.1, from personal-agent workflows to motion graphics, a browser game, and a benchmark chart.Coding-AgentenGenerative mediaEvals+2
0:53EN
Matthew Berman· 22. Okt. 2026Sam Altman on AI and the Discovery of New KnowledgeSam Altman · OpenAIAltman expects progress in mathematical discovery to extend to biology, materials and energy.AI for scienceMathematicsComputational Biology+1