Skip to main content

Local-LLM is a llama.cpp server in Docker with OpenAI Style Endpoints.

Project description

Local-LLM

Local-LLM is a llama.cpp server in Docker with OpenAI Style Endpoints that allows you to send the model name as the name of the model as it appears in the model list, for example phi-2-dpo. It will automatically download the model from Hugging Face if it isn't already downloaded and configure the server for you. It automatically configures the server based on your CPU, RAM, and GPU. It is designed to be as easy as possible to get started with running local models.

Table of Contents 📖

Environment Setup

Modify the .env file to your desired settings. Assumptions will be made on all of these values if you choose to accept the defaults.

Replace the environment variables with your desired settings. Assumptions will be made on all of these values if you choose to accept the defaults.

  • LOCAL_LLM_API_KEY - The API key to use for the server. If not set, the server will not require an API key.
  • THREADS - The number of threads to use. Default is your CPU core count minus 1.

The following are only applicable to NVIDIA GPUs:

  • GPU_LAYERS - The number of layers to use on the GPU. Default is 0.
  • MAIN_GPU - The GPU to use for the main model. Default is 0.

Run Local-LLM

You can choose to run locally with the instructions below, or with Docker. Both are not needed. Instructions to run with Docker or Docker Compose can be found here.

Prerequisites

Installation

git clone https://github.com/Josh-XT/Local-LLM
cd Local-LLM
pip install -r requirements.txt

Usage

Make your modifications to the .env file or proceed to accept defaults running on CPU without an API key.

./start.ps1

OpenAI Style Endpoint Usage

OpenAI Style endpoints available at http://<YOUR LOCAL IP ADDRESS>:8091/v1 by default. Documentation can be accessed at that http://localhost:8091 when the server is running. There are examples for each of the endpoints in the Examples Jupyter Notebook.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

local-llm-0.0.45.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

local_llm-0.0.45-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file local-llm-0.0.45.tar.gz.

File metadata

  • Download URL: local-llm-0.0.45.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for local-llm-0.0.45.tar.gz
Algorithm Hash digest
SHA256 3f851c36b2af45f4fe7c94e0c636119fafcaac97aba6eb0dbe7ceef540f85610
MD5 94bc73941581f62a29cd186582076c64
BLAKE2b-256 00179de7560ef765fb2a358bcc9c432c515c10078652d6639df56e43d8cde871

See more details on using hashes here.

File details

Details for the file local_llm-0.0.45-py3-none-any.whl.

File metadata

  • Download URL: local_llm-0.0.45-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for local_llm-0.0.45-py3-none-any.whl
Algorithm Hash digest
SHA256 e726b39385b7a985ab4a0b5be02a0615c49dd0ca5041af2a90ac031b6c056ed2
MD5 89742af67ab3ba9d4efa35ec3cbd54b6
BLAKE2b-256 1836de1ebac4ce9efc7ac3a152d3ced3caf3957cffd2eddd5dd109aee8a88d76

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page