No description
Find a file
2025-12-29 23:17:46 -08:00
.githooks feat: add GitLab npm publishing config and docs 2025-12-29 21:39:33 -08:00
bin initial: model-loader package with CI 2025-12-28 04:32:35 -08:00
dist initial: model-loader package with CI 2025-12-28 04:32:35 -08:00
node_modules initial: model-loader package with CI 2025-12-28 04:32:35 -08:00
python/lilith_model_loader initial: model-loader package with CI 2025-12-28 04:32:35 -08:00
src initial: model-loader package with CI 2025-12-28 04:32:35 -08:00
.gitignore feat: add GitLab npm publishing config and docs 2025-12-29 21:39:33 -08:00
.gitlab-ci.yml initial: model-loader package with CI 2025-12-28 04:32:35 -08:00
HANDOFF.md initial: model-loader package with CI 2025-12-28 04:32:35 -08:00
package-lock.json initial: model-loader package with CI 2025-12-28 04:32:35 -08:00
package.json chore: bump version to 1.0.1 2025-12-29 23:17:46 -08:00
pyproject.toml initial: model-loader package with CI 2025-12-28 04:32:35 -08:00
README.md feat: add GitLab npm publishing config and docs 2025-12-29 21:39:33 -08:00
tsconfig.json initial: model-loader package with CI 2025-12-28 04:32:35 -08:00

lilith-model-loader

Unified ML model loading, caching, and device management for the Lilith Platform.

Features

  • GGUF Loader: Load llama-cpp-python models from manifest or direct paths
  • HuggingFace Loader: Load transformers models with automatic device placement
  • Diffusers Loader: Load Stable Diffusion and SDXL pipelines
  • Model Registry: Manifest-based model discovery and caching
  • Device Management: Automatic GPU/CPU selection with memory tracking

Installation

# Core package (no ML frameworks)
pip install -e .

# With GGUF support
pip install -e ".[gguf]"

# With all ML frameworks
pip install -e ".[ml]"

Usage

from lilith_model_loader.gguf_loader import GGUFModelLoader

loader = GGUFModelLoader()
await loader.load("ministral-3b-instruct")

response = loader.generate("Hello, world!")

Manifest

Models are discovered via ~/.cache/models/manifest.json. The loader supports:

  • Model ID lookup (e.g., "ministral-3b-instruct")
  • Direct file paths (e.g., "/path/to/model.gguf")
  • Remote fetching via rsync