Centralized model caching and serving layer for Lamina OS
Project description
🧱 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-serveis 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 modelsGET /models/<name>– Get specific model infoGET /backends– List available backendsPOST /download– Download a modelGET /health– Server health check
Start the server:
python -m lamina_llm_serve.server --port 8000
🥐 Setup Instructions
-
Install the package:
pip install lamina-llm-serve
-
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
-
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lamina_llm_serve-0.2.0.tar.gz.
File metadata
- Download URL: lamina_llm_serve-0.2.0.tar.gz
- Upload date:
- Size: 23.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60f7bd2e17146287dc495bfa0e4a69340262456bd12ee47fc2853fe15395b93d
|
|
| MD5 |
8902b47cdfc1246498ac230b0c81b766
|
|
| BLAKE2b-256 |
e06b2c91993cad330ab6315a4c0af7fb842c8237a4a119cfc45909d73a6b5a15
|
File details
Details for the file lamina_llm_serve-0.2.0-py3-none-any.whl.
File metadata
- Download URL: lamina_llm_serve-0.2.0-py3-none-any.whl
- Upload date:
- Size: 17.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d4492f23859bcc6611c97496add5aa98b67bf5fe35c667c572b98b445efdf1c
|
|
| MD5 |
3b396cb674ae958e9d482a65f8f94eb5
|
|
| BLAKE2b-256 |
7c454f544c3191bcdd9126ac416a66080b476b6d949c0e17f06bf6d95de01d9b
|