Skip to main content

ESA Local-LLM

ESA 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 Mistral-7B-OpenOrca. 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 📖

Run with Docker

You can choose to run with Docker or Docker Compose. Both are not needed. Instructions to run with Docker Compose can be found here.

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

  • ESA_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.

Prerequisites

Run without NVIDIA GPU support

docker pull experian-sales-advisor/esa-local-llm:cpu
docker run -d --name esa-local-llm -p 8091:8091 experian-sales-advisor/esa-local-llm:cpu -e THREADS="10" -e ESA_LOCAL_LLM_API_KEY=""

Run with NVIDIA GPU support

If you're using an NVIDIA GPU, you can use the CUDA version of the server. You must have the NVIDIA Container Toolkit installed if using NVIDIA GPU.

docker pull experian-sales-advisor/esa-local-llm:cuda
docker run -d --name esa-local-llm -p 8091:8091 --gpus all experian-sales-advisor/esa-local-llm:cuda -e THREADS="10" -e GPU_LAYERS="0" -e MAIN_GPU="0" -e ESA_LOCAL_LLM_API_KEY=""

OpenAI Style Endpoint Usage

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

Shout Outs

  • ggerganov/llama.cpp - For constantly improving the ability for anyone to run local models. It is one of my favorite and most exciting projects on GitHub.
  • abetlen/llama-cpp-python - For making it easy to extend the functionality of llama.cpp in Python.
  • TheBloke - For helping enable the ability to run local models by quantizing them and sharing them with a great readme on how to use them in every repository.
  • Meta - For the absolutely earth shattering open source releases of the LLaMa models and all other contributions they have made to Open Source.
  • OpenAI - For setting good standards for endpoints and making great models.
  • Hugging Face - For making it easy to use and share models.
  • As much as I hate to do it, I can't list all of the amazing people building and fine tuning local models, but you know who you are. Thank you for all of your hard work and contributions to the community!

Metadata

Release files for esa-local-llm 0.0.15

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for esa-local-llm 0.0.15
File Size Uploaded Provenance Actions
esa-local-llm-0.0.15.tar.gz 57.4 kB Without provenance Details for esa-local-llm-0.0.15.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for esa-local-llm 0.0.15
File Interpreter ABI Platform Actions
esa_local_llm-0.0.15-py3-none-any.whl Python 3 none any Details for esa_local_llm-0.0.15-py3-none-any.whl

Total release size: 63.8 kB

Release files / esa-local-llm-0.0.15.tar.gz

Download URL esa-local-llm-0.0.15.tar.gz
Size 57.4 kB
Tags Source
SHA-256 checksum
How to use checksums
80a697080b209b6eefc4f69a5575fbb079830c210955ddcd137c5608202398e8
BLAKE2b-256 checksum
How to use checksums
8e0e99f2ab3efada2780ef4db6f38c0670e8770148e7834b7675890a60ef6493
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Release files / esa_local_llm-0.0.15-py3-none-any.whl

Download URL esa_local_llm-0.0.15-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fca714ad561d7feb974196efcf8e3b25add2c1e4626a4a2049dbab8b50749928
BLAKE2b-256 checksum
How to use checksums
6e4d602edbafe587b656f1c05936a30d6822fcdd8e42440dcb1457eb27a427f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Security for esa-local-llm 0.0.15

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.15 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page