A simple and efficient python library for fast inference of GGUF Large Language Models.
Project description
ALLM
ALLM is a Python library designed for fast inference of GGUF (Generic Global Unsupervised Features) Large Language Models (LLMs) on both CPU and GPU. It provides a convenient interface for loading pre-trained GGUF models and performing inference using them. This library is ideal for applications where quick response times are crucial, such as chatbots, text generation, and more.
Features
- Efficient Inference: ALLM leverages the power of GGUF models to provide fast and accurate inference.
- CPU and GPU Support: The library is optimized for both CPU and GPU, allowing you to choose the best hardware for your application.
- Simple Interface: With a straightforward command line support, you can easily load models and perform inference with just a single command.
- Flexible Configuration: Customize inference settings such as temperature and model path to suit your needs.
Installation
You can install ALLM using pip:
pip install allm
Usage
You can start inference with a simple 'allm-run' command. The command takes name or path, temperature(optional), max new tokens(optional) and additional model kwargs(optional) as arguments.
allm-run --name model_name_or_path
API
You can initiate the inference API by simply using the 'allm-serve' command. This command launches the API server on the default host, 127.0.0.1:5000. If you prefer to run the API server on a different port and host, you have the option to customize the apiconfig.txt file within your model directory.
allm-serve
==========================================================================================================================================
ALLM AGENTS
Local Agent Inference
To create local agent, begin by loading your knowledge documents into the database using the allm-newagent command and specifying the agent name:
allm-newagent --doc "document_path" --agent agent_name
or
allm-newagent --dir "directory containing files to be ingested" --agent agent_name
After agent is created successfully with your knowledge document, you can start the local agent chat with the allm-agentchat command:
allm-agentchat --agent agent name
After your agents are created you can also initiate agent-specific API server using the allm-agentapi command:
allm-agentapi --agent agent name
Supported Model names
Llama2, llama, llama2_chat, Llama_chat, Mistral, Mistral_instruct
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file ALLMDEV-1.2.5-py3-none-any.whl
.
File metadata
- Download URL: ALLMDEV-1.2.5-py3-none-any.whl
- Upload date:
- Size: 13.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e3736853acbb4d1788abb07e275f403042925e99650a29712c20a0835134df5 |
|
MD5 | fe2d214aea497f7871c167c8ac4d11ba |
|
BLAKE2b-256 | e0949370b0f97fce2fd2d11a9859a5d15dda2fb5b8039b0ba91d0a14c73c0c86 |