Skip to main content

🧱 Lamina LLM Serve

Lamina LLM Serve is a local-first, centralized model-serving layer for Lamina OS. It manages downloads and runs models so agents share consistent, persistent access—ensuring efficiency and symbolic alignment across the sanctuary.


🌱 Purpose

lamina-llm-serve solves common issues in multi-agent AI environments:

  • Prevents redundant downloads of large models
  • Offers a unified directory and manifest for all system models
  • Supports multiple backends (e.g., llama.cpp, mlc, vllm)
  • Keeps model configuration cleanly decoupled from agent implementation

It serves as the source of truth for all LLM usage across lamina-core.


🤩 Directory Structure

lamina-llm-serve/
├── lamina_llm_serve/
│   ├── __init__.py
│   ├── model_manager.py    # Model discovery and validation
│   ├── backends.py         # Backend abstraction layer
│   ├── downloader.py       # Multi-source model downloads
│   └── server.py          # HTTP REST API server
├── models/                 # Downloaded models (gitignored)
├── scripts/
│   └── model-manager.py   # CLI tool for model operations
├── models.yaml            # Model manifest
└── README.md

🎞️ Model Manifest (models.yaml)

Each model is described with its local path and associated runtime backend:

models:
  llama3-70b-q4_k_m:
    path: /models/llama3-70b-q4_k_m/model.gguf
    backend: llama.cpp
  yi-34b-awq:
    path: /models/yi-34b-awq/
    backend: mlc
  llama3-70b-q5_k_m:
    path: /models/llama3-70b-q5_k_m/
    backend: llama.cpp
  mistral-7b-instruct:
    path: /models/mistral-7b-instruct/
    backend: llama.cpp

💠 Usage Within Lamina OS

In lamina-core, agents reference models through this service:

  • Model-to-agent mapping occurs within Lamina OS
  • lamina-llm-serve is model aware, acting as a unified server rather than a simple cache
  • Ensures consistent, centralized loading and version control

Example usage:

from lamina_llm_serve import ModelManager

manager = ModelManager()
models = manager.list_models()
print(f"Available models: {models}")

🔧 Backends Supported

Backend Format Usage
llama.cpp .gguf Local CPU or quantized models
mlc-serve AWQ compiled Metal-accelerated on Apple Silicon
vllm .safetensors Batch eval, future extensions

🧪 REST API

The included HTTP server provides:

  • GET /models – List all available models
  • GET /models/<name> – Get specific model info
  • GET /backends – List available backends
  • POST /download – Download a model
  • GET /health – Server health check

Start the server:

python -m lamina_llm_serve.server --port 8000

🥐 Setup Instructions

  1. Install the package:

    pip install lamina-llm-serve
    
  2. Download models using the CLI:

    # List available models for download
    python scripts/model-manager.py list-downloadable
    
    # Download a specific model
    python scripts/model-manager.py download llama3.2-1b-q4_k_m --source huggingface
    
  3. Validate your setup:

    python scripts/model-manager.py validate
    

🛡️ Philosophy

Models are not interchangeable engines—they are vessels for vow-bound symbolic presence. This serving layer anchors those vessels with intention, clarity, and breath.


📜 License

Mozilla Public License 2.0 - see LICENSE for details.

Metadata

Release files for lamina-llm-serve 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lamina-llm-serve 0.2.0
File Size Uploaded Provenance
lamina_llm_serve-0.2.0.tar.gz 23.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for lamina-llm-serve 0.2.0
File Interpreter ABI Platform
lamina_llm_serve-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 40.6 kB

Release files / lamina_llm_serve-0.2.0.tar.gz

Download URL lamina_llm_serve-0.2.0.tar.gz
Size 23.5 kB
Tags Source
SHA-256 checksum
How to use checksums
60f7bd2e17146287dc495bfa0e4a69340262456bd12ee47fc2853fe15395b93d
BLAKE2b-256 checksum
How to use checksums
e06b2c91993cad330ab6315a4c0af7fb842c8237a4a119cfc45909d73a6b5a15
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.8

Release files / lamina_llm_serve-0.2.0-py3-none-any.whl

Download URL lamina_llm_serve-0.2.0-py3-none-any.whl
Size 17.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1d4492f23859bcc6611c97496add5aa98b67bf5fe35c667c572b98b445efdf1c
BLAKE2b-256 checksum
How to use checksums
7c454f544c3191bcdd9126ac416a66080b476b6d949c0e17f06bf6d95de01d9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.8

Security for lamina-llm-serve 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page