Skip to main content

LLM Connect API

Project description

LLMConnect API

Table of Contents

Introduction

LLMConnect API is a developer-friendly Python-based CLI utility designed to manage and execute Large Language Models (LLMs) on local servers or clusters. It enables users to run a variety of standard and custom tasks with popular models such as Llama-2, Mistral, Falcon, etc., and also supports the integration of new LLMs.

Features

  • Task Versatility: Execute predefined tasks like NER, Sentiment Analysis, Summarisation, or craft your own.
  • LLM Selection: Choose from an array of predefined models or add your custom LLMs.
  • Configurable Parameters: Adjust model settings like token limits and temperature for optimal performance.
  • Adaptable Environments: Operate seamlessly on local servers and extend to local network clusters.
  • Hardware Compatibility: Ensure efficient LLM functioning with GPU compatibility checks and memory monitoring.

CLI Interface:

  • Navigate tasks, models, and hardware diagnostics with simple, intuitive commands. :female-technologist: Development & Security:
  • Developed in Python 3.x, emphasising seamless LLM integration, comprehensive testing (via pytest), and detailed documentation.
  • Features enhanced input validation for secure, reliable operations.

Deployment:

  • Eager to experience the power of Large Language Models through a Python-based Command Line Interface? LLMConnect API is your gateway to harnessing this technology on your local systems!

Installation

Required libraries

  • Python 3.10
  • click==8.1.7
  • setuptools~=68.2.0
  • transformers
  • torch~=2.1.0
  • accelerate
  • bitsandbytes
  • colorama

Commands

  • lc list
List all available tasks or models.

  Usage:
    lc list [OPTIONS] COMMAND [ARGS]

  Options:
    -h, --help  Show this message and exit.

  Commands:
    models  List available models
    tasks   List available tasks
  • lc add
Add new Hugging Face Model. 

  Usage:
    lc add [OPTIONS]
    Model format: repo_id/model_id

  Options:
    --model TEXT  [required]
    -h, --help    Show this message and exit.
  • lc remove
  Remove an existing HuggingFace Model.

  Usage:
    lc remove [OPTIONS]
    Model format: repo_id/model_id

  Options:
    --model TEXT  [required]
    -h, --help    Show this message and exit.
  • lc hardware
Check hardware compatibility for given Hugging Face model.

  Usage: 
    lc hardware [OPTIONS]
    Model format: repo_id/model_id.

  Options:
    --model TEXT  Model name in format: repoID/modelID  [required]
    -h, --help    Show this message and exit.
  • lc exec
Execute an input prompt with given model and given task.

  Usage: 
    lc exec [OPTIONS]

  Options:
    --task TEXT   Specify the task name  [required]
    --model TEXT  Specify the model name (repoID/modelID)  [required]
    --input TEXT  Specify input text (optional)
    -h, --help    Show this message and exit.
  • lc fetch
Fetch the logs of previous sessions.

  Usage:
    lc fetch [OPTIONS]

  Options:
    -h, --help  Show this message and exit.

Predefined tasks

Command

lc list tasks

Output

Available Tasks:

  • NER
  • Summary
  • AnalyseSentiment
  • DetectBias
  • TagTopic
  • Custom

Command examples

  • lc list models
  • lc list tasks
  • lc add --model ceadar-ie/FinanceConnect-13B
  • lc remove --model ceadar-ie/FinanceConnect-13B
  • lc hardware --model ceadar-ie/FinanceConnect-13B
  • lc exec --task NER --model ceadar-ie/FinanceConnect-13B --input "Hi! I'm LLMConnect API"
  • lc fetch

Author

CeADAR Connect Group

License

APACHE 2.0

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

llm_connect-1.1.1.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

llm_connect-1.1.1-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file llm_connect-1.1.1.tar.gz.

File metadata

  • Download URL: llm_connect-1.1.1.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.13

File hashes

Hashes for llm_connect-1.1.1.tar.gz
Algorithm Hash digest
SHA256 9c007e21ec4c001e7ca7748ddd373893e463e12e9de53708f9b7472c8ccef942
MD5 f9fe2f3ea36f26d3d98172ac2001b51d
BLAKE2b-256 a37bd1ab529e7d8b9b65584cac6d423ee3cbe73c42d0f9770c680fb5fba23604

See more details on using hashes here.

File details

Details for the file llm_connect-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: llm_connect-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 13.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.13

File hashes

Hashes for llm_connect-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2a2ef7a7ab9c0b036f56f154665d74f642a6a46ee4e357551f796c1066012505
MD5 bb15b9577a3f7facb384cf46f6e01923
BLAKE2b-256 1fd6d0943d541c2260f8be3b13d72d3ea5abe2ca8992b730d0156102328d37ee

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