Skip to main content

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

qualtop-llmapi-0.43.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

qualtop_llmapi-0.43-py3-none-any.whl (20.1 kB view details)

Uploaded Python 3

File details

Details for the file qualtop-llmapi-0.43.tar.gz.

File metadata

  • Download URL: qualtop-llmapi-0.43.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for qualtop-llmapi-0.43.tar.gz
Algorithm Hash digest
SHA256 257faa1571293fcc76ad6cda31991bba485c76e7df55aeae006759bc1bb994f6
MD5 3c51b06ae903b48756c44c2cc07279cf
BLAKE2b-256 442505b90a3b67618a6e61cc2deac51997526fb66fb5fe8d592b52b35dc0acec

See more details on using hashes here.

File details

Details for the file qualtop_llmapi-0.43-py3-none-any.whl.

File metadata

File hashes

Hashes for qualtop_llmapi-0.43-py3-none-any.whl
Algorithm Hash digest
SHA256 df32e71696ea2216fa605b1bab87d5b24d2f6584808b7c587893bd9c7342f098
MD5 cdd27bfdc0f589072d50757f8d11ab42
BLAKE2b-256 7ac7b825a4dcd349ee49df7a86e5024598ce1099cec03c0d0a242a009cad2684

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