Skip to main content

Local LLM Inference Platform with adapter support and evaluation toolkit

Project description

ML-Clara

ML-Clara is a small, config-driven CLI + Python API for:

  • Local LLM inference with streaming (clara run)
  • Lightweight benchmarking (clara eval)
  • LoRA fine-tuning (clara train) and adapter merging (clara export)
  • Device auto-detection (MPS/CUDA/CPU)

This repository also contains Apple’s CLaRa research codebase; ML-Clara lives in the clara/ package.


Install

pip install ml-clara
clara info

If your platform needs a specific PyTorch build, install PyTorch first, then install ML-Clara.


Quickstart

Run

clara run "Explain LoRA in one paragraph" --model gpt2
clara run "Write a haiku about debugging" --model gpt2 --stream

Create a config (recommended)

clara init-config --type default -o config.yaml
clara run "Hello" --config config.yaml

Eval

clara eval --model gpt2 --benchmarks perplexity --samples 50

Fine-tune (LoRA)

clara init-config --type finetune -o finetune.yaml
clara train --config finetune.yaml

Web UI (FastAPI)

pip install "ml-clara[server]"
clara serve --model gpt2

Then open http://127.0.0.1:8000.

The server also exposes OpenAI-compatible endpoints (for Open WebUI/LangChain):

  • GET /v1/models
  • POST /v1/chat/completions (supports stream: true via SSE)

Export (merge adapter)

clara export outputs/my-adapter/final --output models/merged

Docs

  • Troubleshooting: docs/TROUBLESHOOTING.md
  • Full repository README (CLaRa research + ML-Clara section): README.md

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ml_clara-1.4.0.tar.gz (67.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ml_clara-1.4.0-py3-none-any.whl (67.4 kB view details)

Uploaded Python 3

File details

Details for the file ml_clara-1.4.0.tar.gz.

File metadata

  • Download URL: ml_clara-1.4.0.tar.gz
  • Upload date:
  • Size: 67.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.8

File hashes

Hashes for ml_clara-1.4.0.tar.gz
Algorithm Hash digest
SHA256 d9ec495dc7934b4b04664c053ef667d3bf58c709d5a95c91f87a65b379759c6c
MD5 6fb2fdc42f0521020325d9088440e8f7
BLAKE2b-256 0cea21dec971577d96aad0bab7c1902187e7edaa4fbec948f2f8231bc796c7ba

See more details on using hashes here.

File details

Details for the file ml_clara-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: ml_clara-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 67.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.8

File hashes

Hashes for ml_clara-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0848a15e9be072b30e57533e386d99248332c566caa63da7ec96e883a56ee98b
MD5 b0f99c08b56eb8e7e78dccce7991b35c
BLAKE2b-256 96e544103663dd1f86eb77990fc7901ef7aff79ff7790840d537ce7a9536c232

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page