Skip to content

Run quickly a LLM in local as backend for development along with a Chat UI.

Notifications You must be signed in to change notification settings

jmformenti/local-llm-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Run LLM in local for development

Run quickly a LLM in local as backend for development along with a Chat UI.

Using Ollama and LiteLLM.

All installed via docker compose.

Requirements

Install

  1. Configure .env.
  • COMPOSE_PROFILES. gpu (you need nvidia-container-toolkit installed) or cpu.
  • MODEL. One from the ollama model library.
  1. Run docker compose.
docker compose up -d

Access to the services

Other interesting commands

Common docker compose commands useful in daily execution:

  1. Stop.
docker compose stop
  1. Show logs.
docker compose logs -f
  1. Remove all.
docker compose down -v

Use your local LLM as Open AI replacement

Example using Langchain:

from langchain_openai import ChatOpenAI

llm = ChatOpenAI(openai_api_base="http://localhost:8000", openai_api_key="ignored", model="mixtral", temperature=0.1)

print(llm.invoke("Who are you?"))

About

Run quickly a LLM in local as backend for development along with a Chat UI.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published