# Mastering Jev and Laya: companion code

Runnable examples from the article
https://angsuman.com/blog/mastering-jev-and-laya/

Every script was run on an NVIDIA RTX 3090 with Python 3.11 and the versions
pinned in `requirements.txt`. The first run downloads Laya checkpoints from
Hugging Face. A GPU is strongly recommended; CPU works but is slow.

    python -m venv .venv && . .venv/bin/activate
    pip install -r requirements.txt
    python 01_quickstart.py

| Script | Article section |
| --- | --- |
| 01_quickstart.py | Lesson 1: your first decision |
| 02_decompose.py | Lessons 2 and 3: small questions, checkpoint choice |
| 03_schema_gating.py | Lesson 4: typed schemas and confidence gating |
| 07_evaluate.py | Lesson 5: evaluation and calibration |
| 08a_flat_and_shortlist.py | Lesson 6: flat 34-option choice vs shortlisting |
| 08b_hierarchy.py | Lesson 6: two-stage tree |
| 06_benchmark.py | Lesson 7: latency and throughput |
| 04_llm_router.py | Use case: routing requests to the right LLM |
| 05_multilingual.py | Use case: multilingual intake |

Laya itself is Apache 2.0 licensed.
