Skip to main content

LLMConnect API

Table of Contents

Introduction

LLMConnect API is a developer-friendly Python-based CLI utility designed to manage and evaluate Language Models including LLMs and SLMs 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.
  • Model Selection: Choose and add your custom LLMs and SLMs from HuggingFace.
  • 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.

Development & Security:

  • Developed in Python 3.x, emphasising seamless LLM integration, 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

Code Repository

LLM Connect API - GitLab

Author

CeADAR Connect Group

License

APACHE 2.0

Release files for llm-connect 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llm-connect 2.0.0
File Size Uploaded
llm_connect-2.0.0.tar.gz 7.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for llm-connect 2.0.0
File Interpreter ABI Platform
llm_connect-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 20.7 kB

Release files / llm_connect-2.0.0.tar.gz

Download URL llm_connect-2.0.0.tar.gz
Size 7.7 kB
Tags Source
SHA-256 checksum
How to use checksums
00afaf6472ec0d78b2ff05c01dbd5b594de7dacfed005c43f923e9cc721a8363
BLAKE2b-256 checksum
How to use checksums
2fb1dbd214f7a5c86ab8d46abffb167df42192d43921934d5ac7f5fc74e98823
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.13

Release files / llm_connect-2.0.0-py3-none-any.whl

Download URL llm_connect-2.0.0-py3-none-any.whl
Size 12.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b96e4d8fa4a7cd77502626f08e149bb33f5041175762155e1d1bca0af9fecf69
BLAKE2b-256 checksum
How to use checksums
b82843d39a7a1f28f14e6c80b280c9a07689b66d711c4c1f152b7e7de15d1fed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.13

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page