ezlocalai is an easy to set up local artificial intelligence server with OpenAI Style Endpoints.
Project description
ezlocalai
ezlocalai is an easy set up artificial intelligence server that allows you to easily run multimodal artificial intelligence from your computer. It is designed to be as easy as possible to get started with running local models. It automatically handles downloading the model of your choice and configuring the server based on your CPU, RAM, and GPU specifications. It also includes OpenAI Style endpoints for easy integration with other applications using ezlocalai as an OpenAI API proxy with any model. Additional functionality is built in for voice cloning text to speech and a voice to text for easy voice communication as well as image generation entirely offline after the initial setup.
Prerequisites
- Git
- PowerShell 7.X
- Docker Desktop (Windows or Mac)
- CUDA Toolkit (NVIDIA GPU only)
Additional Linux Prerequisites
- Docker
- Docker Compose
- NVIDIA Container Toolkit (NVIDIA GPU only)
Installation
git clone https://github.com/DevXT-LLC/ezlocalai
cd ezlocalai
Environment Setup
Expand Environment Setup if you would like to modify the default environment variables, otherwise skip to Usage. All environment variables are optional and have useful defaults. Change the default model that starts with ezlocalai in your .env
file.
Environment Setup (Optional)
None of the values need modified in order to run the server. If you are using an NVIDIA GPU, I would recommend setting the GPU_LAYERS
and MAIN_GPU
environment variables. If you plan to expose the server to the internet, I would recommend setting the EZLOCALAI_API_KEY
environment variable for security. THREADS
is set to your CPU thread count minus 2 by default, if this causes significant performance issues, consider setting the THREADS
environment variable manually to a lower number.
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.
EZLOCALAI_URL
- The URL to use for the server. Default ishttp://localhost:8091
.EZLOCALAI_API_KEY
- The API key to use for the server. If not set, the server will not require an API key when accepting requests.NGROK_TOKEN
- The ngrok token to use for the server. If not set, ngrok will not be used. Using ngrok will allow you to expose your ezlocalai server to the public with as simple as an API key. Get your free NGROK_TOKEN here.DEFAULT_MODEL
- The default model to use when no model is specified. Default isphi-2-dpo
.LLM_MAX_TOKENS
- The maximum number of tokens to use for the language model. If set to0
, it will automatically use the max tokens for the model. Default is0
.WHISPER_MODEL
- The model to use for speech-to-text. Default isbase.en
.AUTO_UPDATE
- Whether or not to automatically update ezlocalai. Default istrue
.THREADS
- The number of CPU threads ezlocalai is allowed to use. Default is 4.GPU_LAYERS
(Only applicable to NVIDIA GPU) - The number of layers to use on the GPU. Default is0
. YourGPU_LAYERS
will automatically determine a number of layers to use based on your GPU's memory if it is set to-1
and you have an NVIDIA GPU. If it is set to-2
, it will use the maximum number of layers requested by the model.MAIN_GPU
(Only applicable to NVIDIA GPU) - The GPU to use for the language model. Default is0
.IMG_ENABLED
- If set to true, models will choose to generate images when they want to based on the user input. This is only available on GPU. Default isfalse
.SD_MODEL
- The stable diffusion model to use. Default isstabilityai/sdxl-turbo
.
Usage
./start.ps1
Linux:
sudo pwsh start.ps1
For examples on how to use the server to communicate with the models, see the Examples Jupyter Notebook.
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ezlocalai-0.1.4.tar.gz
.
File metadata
- Download URL: ezlocalai-0.1.4.tar.gz
- Upload date:
- Size: 5.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7fc692c4836a2ab78f15d11bde4c2eb0fa639162f16517a43386231092bba34 |
|
MD5 | 1230b9ae165eccb92b7f2269da5083de |
|
BLAKE2b-256 | 11ca327af7346455560f3000369973477c610c6732a76028dcf8d4278430e3d5 |
File details
Details for the file ezlocalai-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: ezlocalai-0.1.4-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8facfcec601904a3660b1f03b0c7b7060eab660622a08a4d9b9e02ef551d08c |
|
MD5 | 6d738227f9c9c6fcec39cabf78b378eb |
|
BLAKE2b-256 | b73b53db63731bf4bd1f70037e1411bd0f7b814bf94b8746243231aca5408c97 |