# Repository Briefing: llmware-ai/llmware
> Source: https://repoforai.com/repo/llmware-ai/llmware (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/llmware-ai/llmware
- **Official Docs / Website**: https://llmware-ai.github.io/llmware/
- **Category**: RAG, Data & Memory (知识库 / 爬虫 / 记忆层)
- **Primary Language**: Python
- **License**: Apache-2.0
- **Engineering Health**: A (82/100 · Maintenance 20/35 · Adoption 25/25 · Releases 17/20 · License 20/20)
- **Latest Release**: v0.4.7 (2026-10-01) — https://github.com/llmware-ai/llmware/releases
- **Review Snapshot**: 2026-12-04
- **Deployment / Stack Signals**: Self-Hosted, Local AI, GPU
- **Momentum**: 14,821 ★ total (+1 24h / +8 7d) · 2,921 forks
- **Topics**: `agents`, `generative-ai-tools`, `llamacpp`, `llm`, `onnx`, `openvino`, `parsing`, `retrieval-augmented-generation`, `small-specialized-models`
- **When to Use**: Best for: Python teams building private document search, evidence-backed Q&A, or repeatable extraction workflows with local small models and a choice of storage backends. Skip if: You need a turnkey managed service with operations handled for you, or already have a working RAG stack and only need to replace one component.

## Overview
```text
### Architecture & Core Mechanics
llmware is a Python SDK that connects document ingestion, retrieval, and inference through four main interfaces. `Library` routes files by extension, parses and chunks them, and indexes the text. A library can carry multiple embedding indexes, each configured with an embedding model and a vector backend. `Query` searches a library independently of generation, while `Prompt` attaches retrieved passages or batches document sources to fit the model's context window.

`ModelCatalog` provides a common lookup and loading interface over runtimes including llama.cpp for GGUF, OpenVINO, ONNX Runtime and its Qualcomm QNN path, Windows Local Foundry, and PyTorch. Applications can also add custom models. The main integration seam is the Python API: applications choose the model, collection database, and vector backend without tying document ingestion to an inference provider.

### Key Capabilities & Differentiators
Retrieval covers text, semantic, and hybrid search, with exact text matching and document or metadata filters where appropriate. `Prompt` can attach existing query results or run a new search against a library. It exposes prompt history and a post-generation source check, while `HumanInTheLoop` exports the prompt, response, model, and evidence to CSV for review. These are useful audit inputs, not a guarantee that an answer is correct.

The catalog covers 300+ models, including 50+ llmware fine-tunes from families such as SLIM, Bling, Dragon, and Industry-Bert. It includes 1–7B RAG-oriented models and integrations with OpenAI, Anthropic, and Google. Beyond question answering, `LLMfx` exposes task-specific calls such as field extraction, sentiment, topic tagging, and Boolean judgments, then aggregates their outputs into a report.

### Trade-offs & Limitations
Compared with assembling a parser, vector store, retriever, and model client independently, llmware reduces integration work when its library and prompt abstractions fit the application. Compared with a managed RAG service, it gives operators a local path for documents and inference, but they must provision and maintain runtimes, indexes, and storage. An application with an existing search platform or model gateway may benefit more from adding a targeted component than from adopting the full SDK.

The common model API does not make backends interchangeable in practice: model artifacts, drivers, context budgets, and output quality still need validation on the target platform. Additional embedding indexes also consume build time and storage; changing embedding models requires re-embedding the affected corpus. Test parsing on representative documents and evaluate retrieval and answer grounding separately before standardizing on a small model. The SDK's Apache-2.0 license does not automatically cover model weights or third-party services.

### Hardware & Deployment Guide
Start with a Python environment, SQLite for collections, a local vector store such as ChromaDB, and a quantized GGUF model. A laptop with 16 GB of system RAM is a reasonable trial platform for a small quantized model, not a production sizing target. For offline operation, stage the weights and dependencies before disconnecting and verify that both embedding and generation stay local. A self-hosted deployment can use PostgreSQL with pgvector for both storage roles, or operate separate services such as MongoDB and Milvus using the available Docker Compose examples.

The v0.4.7 wheel adds preconfigured llama.cpp binaries for DGX Spark, AMD GPU, Windows CUDA (4090+), and Linux CUDA (8.9+), alongside standard builds for Windows x86 and ARM64, Mac, and Linux x86. Match the build and runtime to the target hardware and drivers rather than assuming acceleration from the wheel alone. Size RAM and VRAM with the selected weights, context length, offload settings, and concurrency.
```

## Key Capabilities
```text
- Ingestion: `Library.add_files()` routes files by extension for parsing, chunking, and text indexing.
- Index selection: A single library can hold multiple embedding indexes backed by different vector stores.
- Retrieval: `Query` supports text, semantic, and hybrid search, plus document and metadata filters.
- Evidence review: `Prompt` can attach retrieved sources, check responses against those sources, and expose prompt history; `HumanInTheLoop` can export an interaction to CSV.
- Model coverage: A catalog of 300+ models includes 50+ llmware fine-tunes, alongside integrations for OpenAI, Anthropic, and Google.
- Native packaging: The v0.4.7 wheel bundles preconfigured llama.cpp binaries for selected CPU and GPU environments.
```

## Quick Start / Clone
```bash
curl -o docker-compose.yaml https://raw.githubusercontent.com/llmware-ai/llmware/main/docker-compose.yaml
docker compose up -d
```
