Experimental libraries for communication with LLMs.
Project description
Implementation of the OpenAI API for local LLM use
Implementation of the OpenAI API. Currently supports two end points (ChatCompletion and Embeddings) with the following models:
ChatCompletion models:
- 'mistral-7b': 7B Instruct model trained by MistralAI.
- 'llama-13b': 13B Llama 2 model trained by Meta.
- 'llama-7b': 7B Instruct Llama 2 model trained by Together AI (32K context).
- 'codellama-13b': 13B CodeLlama model trained by Meta.
Embeddings models:
- 'mistral-7b' : Encodes documents into 4096-dimension vectors.
- 'bert' : Encodes documents into 386-dimension vectors.
Getting Started
Can be installed directly with pip (a setup.py
file is provided, if needed).
Once installed, the FastAPI server (Uvicorn) can be started with:
run_server
Prompts
Currently, two kinds of prompts are supported.
- Open ended questions to engage in conversation with the model.
- Instruct prompts for vector-based retrieval over some test collections.
Some considerations
This project is by no means production ready. The ChatCompletion endpoint in particular has been tailored to communicate with the QOPA-LLM demo. A lot of work is needed security-wise to avoid data leaking.
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
Built Distribution
File details
Details for the file qualtop-llmapi-0.41.tar.gz
.
File metadata
- Download URL: qualtop-llmapi-0.41.tar.gz
- Upload date:
- Size: 16.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cecb7707348628b316cc31449ece05991288e34e0da2af60192d255181c3f931 |
|
MD5 | 62a0b8a0e6c68882a60d3493b91b0815 |
|
BLAKE2b-256 | 727327472c1f87cfe21ecc49f64c250c28d8db65370be599d3590ce4e5d277d6 |
File details
Details for the file qualtop_llmapi-0.41-py3-none-any.whl
.
File metadata
- Download URL: qualtop_llmapi-0.41-py3-none-any.whl
- Upload date:
- Size: 20.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ed0517be59eacabbff1c26d54236db44e137a7deaa391d2b38e86d75687658f |
|
MD5 | 45c5cdc92e4de79482868977d1af55af |
|
BLAKE2b-256 | 4b4569352b574eb8c94a94c8167a6c4e6af86578c81ebaec8b933f95ced897a7 |