Skip to main content

A lightweight interface for calling LLMs with strategy.

Project description

Llyra Logo

Llyra

Lightweight LLaMA Reasoning Assistant


✨ Features

  • Minimal, Configurable Inference
    Load prompts, model parameters, and tools from external files.

  • Prompt Engineering Friendly
    Easily manage system prompts, roles, and chat formats through external .json or .txt files.

  • Optional RAG Integration (Coming Soon)
    Native support for Weaviate-based retrieval-augmented generation.

  • Hybrid Backend Support (Planned)
    Use local llama-cpp-python or connect to a remote Ollama endpoint via the same interface.

  • Tool Support (Planned)
    Enable LLMs to use JSON-defined tools (function-calling style) with one argument.


⚙️ Dependencies

Llyra does not bundle any backend inference engines. You must install them manually according to your needs:

Required (choose one):

  • For local models: llama-cpp-python
  • For remote inference: any Ollama-compatible API

Optional:

  • For RAG: pip install weaviate-client

📦 Installation

pip install https://github.com/albus-shore/Llyra/releases/download/v0.1.1/llyra-0.1.1-py3-none-any.whl

🚀 Quickstart

  1. Make directary config/ in your project root.
  2. Add config.json and stategy.json to config/ directory.
  3. Make directary models/ in your project root.
  4. Rename your GGUF file as model.gguf and place it under models/ directory.
  5. Make your first iterative chat inference with follwing example:
from llyra import Model

model = Model()

response = model.chat('Evening!',keep=True)

print(response)

🛠 Configuration Example

config.json

{
    "model": "model",
    "directory": "models/",
    "strategy": "config/strategy.json",
    "gpu": false,
    "format": null,
    "ram": false
}

strategy.json:

[{
    "type": "chat",
    "role": {
        "input": "user",
        "output": "assistant"
        },
    "stop": "<|User|>",
    "max_token": 128e3,
    "temperature": 0.6
}]

🧭 Roadmap

Phase Feature Status
1 Minimal llama-cpp-python local chat ✅ Finished
2 Predefined prompts via .txt / .json ✅ Finished
3 Weaviate RAG support 🔄 Ongoing
4 Ollama remote API support ⏳ Planned
5 Tool/function-calling via JSON ⏳ Planned

🪪 License

This project is licensed under the MIT License.


📚 Attribution

Currently, this package is built on top of the following open-source libraries:

  • llama-cpp-python — licensed under the MIT License
    Python bindings for llama.cpp

This package does not include or redistribute any third-party source code.
All dependencies are installed via standard Python packaging tools (e.g. pip).

We gratefully acknowledge the authors and maintainers of these libraries for their excellent work.


🌐 About the Name

Llyra is inspired by the constellation Lyra, often associated with harmony and simplicity.
In the same way, this package aims to bring harmony between developers and language models.


Designed with care. Built for clarity.

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

llyra-0.1.2.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

llyra-0.1.2-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: llyra-0.1.2.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for llyra-0.1.2.tar.gz
Algorithm Hash digest
SHA256 a91ebab7ce57b73f0cfc23152a19cdf30c4eb8a423b17ca7495da60e2efa031b
MD5 904ce63723581b32ecd7b9b152aef3dc
BLAKE2b-256 134b23b3fc65d948066eab694c5846781b7368c5d1bf10efe736e3a0f26d3397

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llyra-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 20.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for llyra-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4d42219ffaaf3a0a9b123e89df0efcc8b6188bbb74f4c00500c193aec8add222
MD5 b6cd2e811089d070062a3f931bd2e100
BLAKE2b-256 a143fa4a30b871c650630db56e243e0601eda83e500dcdb63acee59670564cb0

See more details on using hashes here.

Supported by

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