Skip to main content

OpenLLM

๐Ÿฆพ OpenLLM lets developers run any open-source LLMs as OpenAI-compatible API endpoints with a single command.

  • ๐Ÿ”ฌ Build for fast and production usages
  • ๐Ÿš‚ Support llama3, qwen2, gemma, etc, and many quantized versions full list
  • โ›“๏ธ OpenAI-compatible API
  • ๐Ÿ’ฌย Built-in ChatGPT like UI
  • ๐Ÿ”ฅ Accelerated LLM decoding with state-of-the-art inference backends
  • ๐ŸŒฅ๏ธ Ready for enterprise-grade cloud deployment (Kubernetes, Docker and BentoCloud)

Installationโ€‹

Install openllm through PyPI

%pip install --upgrade --quiet  openllm

Launch OpenLLM server locallyโ€‹

To start an LLM server, use openllm hello command:

openllm hello

Wrapperโ€‹

from langchain_community.llms import OpenLLM

server_url = "http://localhost:3000" # Replace with remote host if you are running on a remote server
llm = OpenLLM(base_url=server_url, api_key="na")
API Reference:OpenLLM
llm("To build a LLM from scratch, the following are the steps:")

Was this page helpful?


You can also leave detailed feedback on GitHub.