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 and Setupβ
Install the OpenLLM package via PyPI:
pip install openllm
LLMβ
OpenLLM supports a wide range of open-source LLMs as well as serving users' own
fine-tuned LLMs. Use openllm model
command to see all available models that
are pre-optimized for OpenLLM.
Wrappersβ
There is a OpenLLM Wrapper which supports interacting with running server with OpenLLM:
from langchain_community.llms import OpenLLM
API Reference:OpenLLM
Wrapper for OpenLLM serverβ
This wrapper supports interacting with OpenLLM's OpenAI-compatible endpoint.
To run a model, do:
openllm hello
Wrapper usage:
from langchain_community.llms import OpenLLM
llm = OpenLLM(base_url="http://localhost:3000/v1", api_key="na")
llm("What is the difference between a duck and a goose? And why there are so many Goose in Canada?")
API Reference:OpenLLM
Usageβ
For a more detailed walkthrough of the OpenLLM Wrapper, see the example notebook