No description
Find a file
2025-12-31 19:27:47 -08:00
.forgejo/workflows Add CI workflow for build and publish 2025-12-31 19:27:46 -08:00
.githooks feat: add GitLab npm publishing config and docs 2025-12-29 21:39:33 -08:00
.turbo chore: rename package @lilith/model-loader -> @lilith/ml-model-loader 2025-12-31 01:32:00 -08:00
bin chore: rename package @lilith/model-loader -> @lilith/ml-model-loader 2025-12-31 01:32:00 -08:00
dist chore: rename package @lilith/model-loader -> @lilith/ml-model-loader 2025-12-31 01:32:00 -08:00
node_modules chore: rename package @lilith/model-loader -> @lilith/ml-model-loader 2025-12-31 01:32:00 -08:00
src chore: rename package @lilith/model-loader -> @lilith/ml-model-loader 2025-12-31 01:32:00 -08:00
src_python/tqftw_model_loader chore: rename package @lilith/model-loader -> @lilith/ml-model-loader 2025-12-31 01:32:00 -08:00
.gitignore feat: add GitLab npm publishing config and docs 2025-12-29 21:39:33 -08:00
HANDOFF.md chore: rename package @lilith/model-loader -> @lilith/ml-model-loader 2025-12-31 01:32:00 -08:00
package-lock.json chore: rename package @lilith/model-loader -> @lilith/ml-model-loader 2025-12-31 01:32:00 -08:00
package.json chore: bump version to 1.0.3 2025-12-31 19:27:47 -08:00
pyproject.toml chore: rename package @lilith/model-loader -> @lilith/ml-model-loader 2025-12-31 01:32:00 -08:00
README.md chore: rename package @lilith/model-loader -> @lilith/ml-model-loader 2025-12-31 01:32:00 -08:00
tsconfig.json chore: rename package @lilith/model-loader -> @lilith/ml-model-loader 2025-12-31 01:32:00 -08:00

tqftw-model-loader

Unified ML model loading, caching, and device management.

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 tqftw_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