madewithlaya

Catalog / Multilingual

0106GitHub

The at-home Darija showdown: Jev vs self-hosted Laya on Moroccan Arabic sentiment

Reproducible zero-shot benchmark on informal Moroccan Darija reviews in Arabic script and Arabizi, positive/neutral/negative. Deterministic seed-42 split, no training.

Open source ↗ github.comcostself-hosted Laya endpointtime-
mouadse/jev-vs-layaREADME ↗
# Jev vs Laya: The At-Home Darija Showdown

Can an open-weight model you control match a hosted AI service? This reproducible
zero-shot benchmark pits TypeSafe Jev against self-hosted Laya on informal Moroccan
Darija sentiment—across Arabic script and Arabizi, with `positive`, `neutral`, and
`negative` labels. No model is trained or fine-tuned.

## Setup

```bash
uv sync
cp .env.example .env
# Put the keys in .env, or export them in the shell:
export TYPESAFE_API_KEY="..."
export HF_TOKEN="..."  # authenticates dataset and Laya model downloads
export LAYA_ENDPOINT_URL="https://...modal.run"
```

The CLI loads these variables from `.env`. The checked-in `.env.example` points to
the deployed Laya endpoint but contains no credentials.

The benchmark loads the `test` split of
[`ohidaoui/darija-reviews`](https://huggingface.co/datasets/ohidaoui/darija-reviews).
The source dataset has no row ID, so source row indices are used as stable IDs.
The first data load freezes a deterministic seed-42 split under `data/splits/`:
80% dev and 20% eval, stratified by normalized sentiment and writing style when
possible.

The dataset currently contains four raw labels. The four rows labeled `negative `
with a trailing space are explicitly normalized to `negative`. Any other unknown,
blank, or null label stops the run.

## Deploy Laya on Modal

The deployment uses the repository's multilingual checkpoint directly for both
Arabic-script Darija and Arabizi. Keeping one checkpoint makes the writing-style
comparison meaningful. The weights and source revision are pinned, and the service
runs on one L4 with scale-to-zero behavior.

Create a Modal secret named `hf-secret` containing `HF_TOKEN`, then run:

```bash
uv run modal run -m darija_eval.modal_laya::download_model
uv run modal deploy -m da

Also filed under Multilingual

  1. 0115

    Laya fine-tuned for Burmese topic classification on SIB-200

    A Myanmar-language Laya checkpoint trained on Davlan/sib200, with a Gradio demo space from the same author.

    aungthuhein-dev · Multilingual · free

  2. 0114

    laya-ara: Laya fine-tuned for Arabic NLU on MASSIVE and XNLI

    An Arabic Laya checkpoint trained on AmazonScience/massive and facebook/xnli, with a companion laya-ara-rag ranking model from the same author.

    Wouze · Multilingual · free

  3. 0111

    Laya multilingual in LiteRT for Android and on-device

    Google's LiteRT community conversion of the multilingual checkpoint (tflite), tagged for Android text classification. An English LiteRT build is published alongside it.

    litert-community · Multilingual · free, on-device

  4. 0109

    Feishu message classification bench: Jev 64/64, Laya 20/64 on 64 frozen scenarios

    Synthetic Chinese workplace-chat scenarios with frozen inputs, prompts and labels. Reports classification quality, mis-generated tasks and latency: Jev 253 ms vs Laya 151 ms.

    Feng · Multilingual · 151 ms (Laya) vs 253 ms (Jev)