---
title: "Bayaga: A Hebrew and Aramaic language model built from scratch."
description: "We built the tokenizer, the model and the corpus of the classical Jewish canon with no dependency on any existing language model at any stage. Bayaga runs live as a base model. Clients hire us for the same deep work."
canonical: "https://laboetie.io/lab/bayaga"
language: en
---
# Bayaga: A Hebrew and Aramaic language model built from scratch.

We built the tokenizer, the model and the corpus of the classical Jewish canon with no dependency on any existing language model at any stage. Bayaga runs live as a base model. Clients hire us for the same deep work.

Status: Live experiment · base model.

## A language model for the classical Jewish canon

Bayaga processes and generates classical Hebrew and Aramaic across Tanakh, Mishnah, Gemara, Rashi, Tosafot, Midrash, Halakhah and responsa. It runs live: enter the start of a passage and the model continues it in the right register and in the language of the text. We built the tokenizer, the model and the corpus ourselves with no existing language model at any stage.

- Continues Hebrew and Aramaic passages in register across the entire canon.
- Runs live in the browser and from a command line, and other agents can call it as a tool.
- One tokenizer handles the interleaved Hebrew and Aramaic of the Talmud.

## The tokenizer, the model and the data pipeline

Most teams fine tune someone else’s model and present it as their own. That approach costs quality on a language the big labs treat as an afterthought. We built the tokenizer, the model and the corpus ourselves. Bayaga uses no existing language model from the first token to the live server.

### A root aware tokenizer for Semitic text

Hebrew and Aramaic carry meaning in a consonantal root that survives across every inflection, and standard tokenizers split that root into fragments. Ours is morphological and lossless. Our tokenizer keeps a single root recognisable across all its forms and handles Hebrew and Aramaic together. Decoding reconstructs the original text character for character. It is the subject of a published technical report.

### A transformer trained from the first token

We pretrained the transformer of roughly 134 million parameters from scratch on next token prediction over the canon. Its modern primitives are rotary position embeddings, RMSNorm, SwiGLU, grouped query attention and tied embeddings. We used our own corpus and no base checkpoint.

### A canon rebuilt into training data

We cleaned thousands of curated sources into hundreds of millions of tokens and balanced them by genre across Talmud, Halakhah, Tanakh, Mishnah, responsa and more. Train, validation and test splits stay strictly disjoint. For the next generation we are rebuilding this into billions of tokens across streams that align every base text with its commentaries and its cross references.

## Tokenizer, lineage and corpus figures

The tokenizer results were measured head to head on the same text and published in a public technical report.

- tighter than ChatGPT's tokenizer: 1.3 to 1.6×. On the same text, head to head, Hebrew costs this much less to tokenize than under the tokenizer behind ChatGPT.
- of roots kept intact: 98%. Meaning bearing roots stay a single token on the gold standard reference.
- borrowed models: 0. We built the tokenizer, model and corpus from scratch, so no existing language model sits anywhere in the lineage.
- tokens of training data: 2.4B. We rebuilt the classical canon into an aligned corpus that ties every base text to its commentaries and cross references.

## Roadmap from morphology to epistemic status

The Talmud records debates of questions, difficulties, resolutions and claims weighed against counter claims across centuries. Plain text flattens that structure. Bayaga is the first step of a longer thesis that treats it as first class.

- Morphology first (live): We built the rest of the work on a tokenizer that keeps the root visible. It is live and published.
- Dialectical structure (research): The aim is to represent a passage as its argument (question, difficulty, resolution) so the model reasons with the dialectic.
- Epistemic status (research): Each claim would be marked settled, disputed or unresolved, and the model would carry its confidence as a tracked property.

## Client model engineering

We built Bayaga for a two thousand year old canon. We do the same work for clients who need a competent model for a language or a domain the big labs ignore, and for problems where generic models are weak.

- A model trained from scratch: We take the work from raw data to a running model when fine tuning a generic model falls short on a domain, a language or a corpus.
- A tokenizer for your language: We design a tokenizer for your language when the standard ones waste tokens or break its script or morphology.
- Fine tuning and alignment: We run supervised fine tuning, preference tuning and instruction following on our base model or yours. We then evaluate the result.
- Model evaluation: We measure a model on its own held out data with metrics that track real quality before it ships.
- Novel model conception: The standard transformer recipe fails on some problems. For those we design an original architecture and take it from a thesis to a trained model.
- Productionised inference: We take a checkpoint to a served model with a clean API and streaming, and we build clients for the browser, the command line and other agents.

## Frequently asked questions

### What is Bayaga?

Bayaga is a language model for classical Hebrew and Aramaic that La Boétie built entirely from scratch. We built the morphological tokenizer, the transformer and the corpus of the classical Jewish canon with no existing language model at any stage. It runs live as a base model that continues text in register, and it shows the model building we do for clients.

### Can I try Bayaga?

Yes, live at bayaga.laboetie.io. Enter the start of a Hebrew or Aramaic passage and the model continues it in the right register and in the language of the text. Bayaga is a base model, so it continues text and does not answer questions yet. Instruction tuning is the next stage.

### What does built from scratch mean?

We built every layer of Bayaga ourselves. We designed the tokenizer from the morphology of Hebrew and Aramaic. We pretrained the model from the first token with no external checkpoint. We built the training corpus from raw sources. No existing language model sits anywhere in the lineage.

### Why build a tokenizer from scratch?

Hebrew and Aramaic carry meaning in a consonantal root that stays constant across inflections. Generic tokenizers built for English split that root into fragments and spend extra tokens on a script they were not designed for. Our morphological tokenizer keeps the root recognisable across all its forms and reconstructs the original text losslessly. On Hebrew it runs one and a half times tighter than the tokenizer behind ChatGPT, and it is the subject of a published technical report.

### How good is it?

On the language it was built for, its tokenizer beats the generic tokenizers. On Hebrew it runs up to one and a half times tighter than the tokenizer behind ChatGPT and keeps 98 percent of meaning bearing roots intact. The results were measured head to head on the same text and published in a public technical report.

### What can we hire you to build?

You can hire us for the work behind Bayaga: a model from scratch for your domain, a tokenizer for your language, fine tuning and alignment, evaluation, or original architecture. Bayaga is the example: we trained a transformer of roughly 134 million parameters on our own corpus with no base checkpoint.

### Could you build something like this for us?

Yes. If a generic model underperforms on your language, domain or corpus and off the shelf fine tuning is not enough, we build the specialist. The work runs from raw data through tokenizer, pretraining, alignment and evaluation to a served model with a clean API. Bayaga took a two thousand year old canon through those stages.
