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

Uploaded Source

Built Distribution

qualtop_llmapi-0.47-py3-none-any.whl (21.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: qualtop-llmapi-0.47.tar.gz
  • Upload date:
  • Size: 17.5 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.47.tar.gz
Algorithm Hash digest
SHA256 eb485c94be09ece4b51999df183e94064f00ede3356ff37ef172fc93e3c41717
MD5 14877dbb807032b3b85a3965388054cd
BLAKE2b-256 94b04172fc69d7526de6fe24d0fb2533a1762e65dc0985ec59cc97838a68ccd1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qualtop_llmapi-0.47-py3-none-any.whl
Algorithm Hash digest
SHA256 82ec49b933c6f68ffb8ed725cef6d931689061f0f060db26ea791ce470be52d0
MD5 3a6d938e026f1239038c17fba8bc226b
BLAKE2b-256 2ae547c3e1e33e71a6d7d45b887cd7c4f9081027a1fce6886a1db8b5ba90f56d

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