Skip to main content

A local-first LLM orchestration library

Project description

Adaptera 🌌

A local-first LLM orchestration library with native support for Hugging Face, PEFT/LoRA, QLoRA — without hiding the model and giving advanced users the full control.


Note: This project is in its early development phase and may undergo significant changes. However, the core goal of providing local LLM processing will remain consistent. Once the agentic part of the module is stable, we will work on making a fine-tuner for it so that this library can be used as a quick way of prototyping local agentic models.

Feel free to contribute, please do not spam pull requests. Any and all help is deeply appreciated.


Features

  • Local-First: Built for running LLMs on your own hardware efficiently.
  • Native PEFT/QLoRA: Seamless integration with Hugging Face's PEFT for efficient model loading.
  • Persistent Memory: Vector-based memory using FAISS with automatic text embedding (SLM).
  • Strict ReAct Agents: Deterministic agent loops using JSON-based tool calls.
  • Model Transparency: Easy access to the underlying Hugging Face model and tokenizer.

Installation

Using python

pip install adaptera

Using Anaconda/Miniforge

conda activate < ENV NAME >
pip install adaptera

(Note: Requires Python 3.12+)

Quick Start

from adaptera import Agent, AdapteraModel, VectorDB, Tool

# 1. Initialize Vector Memory
db = VectorDB(index_file="memory.index")

# 2. Load a Model (with 4-bit quantization)
model = AdapteraModel(
    model_name="unsloth/Llama-3.2-3B-Instruct",
    quantization="4bit",
    vector_db=db
)

# 3. Define Tools
def add(a, b):
    """Adds two numbers together"""
    return a + b

tools = [
    Tool(name="add", func=add, description="Adds two numbers together. Input: 'a,b'")
]

# 4. Create and Run Agent
agent = Agent(model, tools=tools)
print(agent.run("What is 15 + 27?"))

Project Structure

  • adaptera/chains/: Agentic workflows and ReAct implementations.
  • adaptera/model/: Hugging Face model loading and generation wrappers.
  • adaptera/memory/: FAISS-backed persistent vector storage.
  • adaptera/tools/: Tool registry and definition system.
  • adaptera/experimental/: Experimental features

Non-goals

This library does not aim to be a full ML framework or replace existing tools like LangChain. It focuses on providing a clean, minimal interface for local-first LLM orchestration.

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

adaptera-0.1.2.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

adaptera-0.1.2-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file adaptera-0.1.2.tar.gz.

File metadata

  • Download URL: adaptera-0.1.2.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for adaptera-0.1.2.tar.gz
Algorithm Hash digest
SHA256 0ab11ee0781e87557a30afd48dc8d263097203d741cfa4589b5f917b79bfbf39
MD5 1c87e4856ce8634f3137264e7d5dfaec
BLAKE2b-256 96815fd3b2c6fcde8907f172a05486be316b2af038e02905f61d48a10b91ae36

See more details on using hashes here.

File details

Details for the file adaptera-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: adaptera-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for adaptera-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8180225fc2701842b8945106aede980c600121c48ffcaf5fcd436bfc4c3075ce
MD5 3a208fb8ba2fe9f3015424b71d726352
BLAKE2b-256 8a8abab0acff644d7fb883cbd0246ff82111f862fed7fba739fa60dc8d27c852

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page