# LLMWare

> Unified framework for building local, private, knowledge-based LLM applications

- Category: Retrieval & Knowledge (RAG) / RAG Frameworks & Platforms
- Language: Python
- Licence: Apache-2.0
- Repository: https://github.com/llmware-ai/llmware
- Website: https://llmware-ai.github.io/llmware/
- Canonical page: https://ai-tldr.dev/tools/llmware/

## In short

LLMWare is a Python framework for building knowledge-based LLM applications that run locally, privately, and securely. It is optimized for AI PCs, laptops, edge devices, and self-hosted deployment across Windows, Mac, and Linux, with support for inference backends like GGUF, OpenVINO, ONNX Runtime, and PyTorch. It sits in the RAG Frameworks & Platforms category of the Retrieval & Knowledge (RAG) tools and is open-source, written in Python and licensed Apache-2.0.

## Overview

LLMWare is a Python framework for building knowledge-based LLM applications that run locally, privately, and securely. It is optimized for AI PCs, laptops, edge devices, and self-hosted deployment across Windows, Mac, and Linux, with support for inference backends like GGUF, OpenVINO, ONNX Runtime, and PyTorch.

The framework has two main parts. The first is a model catalog with 300+ prepackaged models, including 50+ small, RAG-optimized models from LLMWare's own SLIM, BLING, DRAGON, and Industry-BERT families, plus access to cloud models from OpenAI, Anthropic, and Google. The second is an integrated RAG pipeline that handles parsing, text chunking, embedding, and querying documents so you can connect your own knowledge sources to a model.

## What it does

- Model catalog of 300+ models accessed through one consistent interface, covering GGUF, OpenVINO, ONNX Runtime, Hugging Face, Sentence Transformers, and major API-based models
- 50+ small (1-7B parameter) RAG-optimized models (BLING, DRAGON, SLIM, Industry-BERT) designed to run locally with provided context
- Universal ingestion that parses and text-chunks mixed file types including PDF, DOCX, PPTX, XLSX, TXT, CSV, MD, JSON, HTML, and images
- Library construct that organizes a knowledge base and lets you install and mix multiple embedding models and vector databases such as Milvus and ChromaDB
- Flexible querying with text, semantic, hybrid, and metadata filters against an indexed library
- Prompt-with-sources workflow that combines retrieval and inference, with post-inference fact-checking against the source evidence

## Getting started

LLMWare is installed from PyPI and runs on Python 3.10 through 3.14. Most use cases work with the minimal base install; a larger install adds commonly used optional libraries.

1. Install LLMWare

   Install the base package, or use the full install to pull in commonly used optional dependencies.

```bash
pip3 install llmware
# or, for the larger install with extra libraries:
pip3 install 'llmware[full]'
```

2. Load a model and run inference

   Every model is accessed through the ModelCatalog. Load a small, RAG-optimized model and run an inference with your own context.

```python
from llmware.models import ModelCatalog

my_model = ModelCatalog().load_model("llmware/bling-phi-3-gguf")
output = my_model.inference("what is the future of AI?", add_context="Here is the article to read")
```

3. Build a knowledge library

   Create a library, add a folder of mixed document types (they are parsed, chunked, and indexed automatically), then install an embedding model with a vector database.

```python
from llmware.library import Library

lib = Library().create_new_library("my_library")
lib.add_files("/folder/path/to/my/files")
lib.install_new_embedding(embedding_model_name="mini-lm-sbert", vector_db="milvus", batch_size=500)
```

4. Prompt with sources

   Combine retrieval and inference: load a model into a Prompt, attach a source document filtered by a query, then run the prompt against your knowledge.

```python
from llmware.prompts import Prompt

prompter = Prompt().load_model("llmware/bling-tiny-llama-v0")
source = prompter.add_source_document("/folder/to/one/doc/", "filename", query="fast query")
responses = prompter.prompt_with_source("my query")
```

## When to use it

- Building private, on-device RAG applications over internal documents such as contracts, invoices, and policies without sending data to the cloud
- Running small, RAG-optimized models locally on a laptop or edge device to keep inference fast and cost-effective
- Creating scalable enterprise knowledge bases that index mixed document types and support semantic and hybrid search
- Automating enterprise tasks by combining knowledge retrieval with LLM inference and post-inference fact-checking against the source evidence
