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.42.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: qualtop-llmapi-0.42.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.42.tar.gz
Algorithm Hash digest
SHA256 17483dfe2f81c8f70fba19fc6f61394daee4cf1be3e76ddcf5a62a4132eeb16f
MD5 f051342c81d0903ca3dfa2e3217ae597
BLAKE2b-256 50dc71765a0ae3b1d14c235a3f3412aecdc0784e8345e5c8361a13a67459cfa2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qualtop_llmapi-0.42-py3-none-any.whl
Algorithm Hash digest
SHA256 f7bb8d2b957efbcd7471bae7bf3cf90330403c3152eadac67d7fe9be90e31a8f
MD5 32ff05d2dea683dfb538db40c8ddf185
BLAKE2b-256 0bbbe408c6dba4837a2a05fa96c32f355ba31a380f77794d6c89068114788307

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