Text Classification
Transformers
Safetensors
Laya
system-one
calibrated-decisions
rlcd
classification
routing
scoring
guardrails
moderation
reinforcement-learning
commercial-use
Instructions to use convaiinnovations/laya with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use convaiinnovations/laya with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="convaiinnovations/laya")# pip install -U transformers accelerate # Load model directly from transformers import LayaTypedDecisions model = LayaTypedDecisions.from_pretrained("convaiinnovations/laya", device_map="auto") - Laya
How to use convaiinnovations/laya with Laya:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Inference
- Notebooks
- Google Colab
- Kaggle
docs: comprehensive vs-Jev figure, preload guidance
Browse files
README.md
CHANGED
|
@@ -15,7 +15,7 @@ maximise reward. It never generates text, so there is nothing to parse and nothi
|
|
| 15 |
hallucinate.
|
| 16 |
|
| 17 |
<p align="center">
|
| 18 |
-
<img src="assets/
|
| 19 |
</p>
|
| 20 |
|
| 21 |
**This repo holds all three checkpoints** and is the hub for the family. The English checkpoint
|
|
@@ -75,8 +75,16 @@ router.predict({"body": "मुझसे दो बार शुल्क लि
|
|
| 75 |
router.predict(state, questions, model="typed-decisions") # explicit
|
| 76 |
```
|
| 77 |
|
| 78 |
-
|
| 79 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
|
| 81 |
> **If `laya.load()` hangs:** `transformers` probes for TensorFlow at import, and when TF is
|
| 82 |
> installed its abseil runtime can deadlock model construction. Run with `USE_TF=0`.
|
|
|
|
| 15 |
hallucinate.
|
| 16 |
|
| 17 |
<p align="center">
|
| 18 |
+
<img src="assets/laya_vs_jev_full.png" alt="Laya versus TypeSafe Jev: accuracy, every application workflow, all 51 languages, speed, calibration and routing cost" width="100%" />
|
| 19 |
</p>
|
| 20 |
|
| 21 |
**This repo holds all three checkpoints** and is the hub for the family. The English checkpoint
|
|
|
|
| 75 |
router.predict(state, questions, model="typed-decisions") # explicit
|
| 76 |
```
|
| 77 |
|
| 78 |
+
**Preload for a server or a demo.** A cold checkpoint build costs seconds; detection costs
|
| 79 |
+
microseconds. At the default `max_loaded=1`, alternating languages rebuilds a model on every
|
| 80 |
+
request — measured at a 7.4 s median on CPU and 10.3 s on a T4.
|
| 81 |
+
|
| 82 |
+
```python
|
| 83 |
+
router = Router(preload=True) # every checkpoint resident, routing is free
|
| 84 |
+
router.attach("english", existing_agent) # reuse one you already built
|
| 85 |
+
```
|
| 86 |
+
|
| 87 |
+
On a mixed workload this is worth up to **4.8×** at 50% non-English traffic.
|
| 88 |
|
| 89 |
> **If `laya.load()` hangs:** `transformers` probes for TensorFlow at import, and when TF is
|
| 90 |
> installed its abseil runtime can deadlock model construction. Run with `USE_TF=0`.
|