Modern AI pipelines often burn compute using 8B+ parameter generative models just to answer questions like:
- "Is this support ticket urgent?"
- "Does this comment violate moderation policies?"
- "Should this request route to the billing or tech support department?"
Autoregressive generation for classification introduces high latency (waiting for token-by-token decoding), unpredictable JSON formatting errors, and unnecessary costs.
laya-cli is a high-performance CLI and daemon wrapper around Laya — providing typed decisions (choice, score, noul) in a single forward pass without autoregressive token generation.
Key Capabilities
-
Deterministic Typed Outputs in One Pass:
-
choice: Discrete labels with calibrated probabilities. -
score: Ordinal expected values (e.g. priority 1 to 5). -
noul: Probability that an assertion is true.
-
- Speed: ~33ms for single predictions, ~7ms per item when batched.
-
Resident Daemon: Run
laya-cli serveto keep weights resident in memory, eliminating cold starts for subsequent CLI or sub-process calls. - Unix Pipeline Compatibility: Native streaming support for JSON and JSONL feeds.
Quick Installation
uv tool install laya-cli
# or: pip install laya-cli
Usage Examples
Interactive Categorization
laya-cli predict "User reports database timeout after running migrations" --preset triage
Streaming Pipeline
cat incoming_events.jsonl | laya-cli classify --preset moderation --format jsonl >> audited.jsonl
Links & Community
- GitHub — github.com/MIt9/laya-cli
- PyPI — pypi.org/project/laya-cli

Top comments (0)