Cover art for Training a $10 Model for Hebrew Speaker Gender
Episode 6664 custom

Training a $10 Model for Hebrew Speaker Gender

A $10 LoRA fine-tune on Gemma 4 E4B learns to write gendered Hebrew in 32 minutes, but a filter bug initially made it worse for female speakers.

29:18 Transcript

0:00
0:00
Episode Details
Episode ID
MWP-6868
Published
Duration
29:18
Audio
Direct link
Pipeline
V5.35
TTS Engine
omnivoice
Script Writing Agent
GLM-5.3

AI-Generated Content: This podcast is created using AI personas. Please verify any important information independently.

The prompt

The prompt that started this episode, as sent in (production notes for the hosts removed).

Hebrew marks the speaker's gender in the words themselves: a man says "ani holekh" and a woman "ani holekhet" for "I go", and sometimes only the vowels differ: "ani rotse" and "ani rotsa" for "I want" are spelled identically. For a Hebrew learner like me, or for a text-to-speech voice, that matters: a male voice should read sentences written for a man. No tool I could find handles this, so today I started on two small models. The first generates Hebrew sentences in the right gender for the speaker; it's a Gemma 4 fine-tune now in its third version. The second will be a simple classifier that works in reverse: give it Hebrew with nikud and it says whether the speaker is male or female, so the sentence goes to the right voice. The whole thing has cost about ten dollars. Talk through these works in progress, what each version taught me, and the bigger question: when filling gaps like this has become so cheap and easy, how is it that nobody has built these small Hebrew models already?

Hebrew bakes the speaker's gender directly into first-person verbs and adjectives, sometimes through different letters and sometimes only through unwritten vowels. To solve this for language learners and text-to-speech pipelines, a learner named Daniel spent roughly ten dollars building a two-model system: a fine-tuned Gemma 4 E4B model that generates unpointed Hebrew sentences natively in a chosen gender, and a planned second model to add vowels and route voices. Using synthetic sentences from Claude Sonnet filtered by Dicta's joint morphological analyser, the one-pass generator avoids the subtle errors of rewriting masculine text into feminine. Across three iterations, the fine-tune outperformed prompting on JSON formatting and naturalness, though achieving reliable female-speaker accuracy remains an ongoing challenge when inflecting masculine dictionary terms.

Sources

What the research for this episode read before the script was written. Primary sources first.

  1. Hugging Face model card, v3, created/modified 2026-11-18, retrieved 2026-11-18. primary
  2. GitHub README, status dated 2026-11-18, retrieved 2026-11-18. primary
  3. Hugging Face model repo, 305M params, CC-BY-4.0, created 2026-11-18; card currently the inherited DictaBERT-large-char-menaked card (SOTA claim dated 2025-03), retrieved 2026-11-18. primary
  4. training dataset, MIT licence, created 2026-11-18, retrieved 2026-11-18. primary
  5. base model, 8.0B params, Apache-2.0, created 2026-03-02, retrieved 2026-11-18. primary
  6. step-up base model, 12.0B params, created 2026-05-23, retrieved 2026-11-18. primary
  7. and https://huggingface.co/google/gemma-4-26B-A4B-it primary Gemma 4 siblings, created 2026-03-11, retrieved 2026-11-18.
  8. Wikipedia, last edited 2026-10-21, retrieved 2026-11-18 (background on Modern Hebrew inflection).
  9. Wikipedia, last edited 2026-11-16, retrieved 2026-11-18 (background on the Tiberian vocalization system behind nikud).

Context

Daniel's own project notes, written on 18 November 2026. Treat them as ground truth for his models and numbers. V3 was still training when this episode was made, so its results are unknown: say so, and don't invent them. The classifier is planned, with nothing trained; its design is undecided. Costs marked as estimates are estimates. The "why the gap exists" view at the end is a working view, not a sourced claim: research that question properly. # Brief: Daniel's two Hebrew gendered models (as of 2026-11-18, 23:15 Israel time) Written by the session that built model 1. Confirmed facts come from the repo `~/repos/github/audio-dictation/Hebrew-Gendered-Sentence-Creator` (`docs/training-plan.md` has the full numbers). **V3 is still training**, so its results are not in this brief. ## The two models (Daniel's own description, 18 Nov 2026) 1. **Generator (model 1, now at V3):** term + context + speaker gender (m/f) in, Hebrew sentences out, with every first-person form agreeing with the speaker's gender. 2. **Classifier (model 2, planned, nothing trained yet):** the same job in reverse. Hebrew WITH nikud in, the speaker's gender out: is this sentence spoken by a man or a woman? Nikud matters because some forms are gendered only in the vowels: "ani rotse" (m) and "ani rotsa" (f), "I want", share the same letters. Use: Hebrew TTS, so a sentence is sent to a male or a female voice (and a learner hears his examples in a male voice), and as a check on the generator's output. Its design, base model and data are not decided yet: don't invent them. Hebrew marks the speaker's gender in two ways. Sometimes in the **letters**: ani holekh / ani holekhet, "I go". Sometimes only in the **vowels**: ani rotse / ani rotsa, "I want", spelled the same for both. ## Model 1: Hebrew-Gendered-Sentence-Creator (confirmed unless marked otherwise) - **Repos.** - GitHub: `Hebrish-ASR/Hebrew-Gendered-Sentence-Creator` (public). - Weights so far are private: `danielrosehill/hebrew-gendered-sentence-creator-gemma-4-e4b-v1` and `-v2`. - Planned public release once V3 is scored: model `Hebrish/Hebrew-Gendered-Sentence-Creator` and dataset `Hebrish/Hebrew-Gendered-Sentences`. Not published yet. - **What it does.** - Input: JSON `{"term", "context", "n", "speaker_gender": "m"|"f"}`. - Output: a JSON array of n unpointed Hebrew first-person sentences, 6 to 18 words each. Each uses the term in the given sense, and every first-person form agrees with the requested gender. Other people in the sentence keep their own gender. - Example, term מדוכא (meduka, "depressed"), f: "אני מרגישה מדוכאה כבר שבועות ולא יודעת למי לפנות", ani margisha medukhet... roughly "I've been feeling (f.) depressed (f.) for weeks and don't know (f.) who to turn to". This sentence is from the training data, written by Claude Sonnet 5.5. - Use case named by Daniel: Hebrew podcast generation for TTS. A male and a female character each need lines spelled for their gender before the text reaches the TTS voice. Gender is a required deterministic switch, m or f, with no neutral option (Daniel's decision, 2026-11-18). - **Base model.** `google/gemma-4-E4B-it`: Apache-2.0, about 8B parameters including embeddings (about 4B "effective"). Daniel chose it; Hebrew-specific models (DictaLM 3.0 1.7B, DictaLM 2.0 7B) were on the shortlist. LoRA rank 32 on the language-model layers only, 69.8M trainable parameters (0.87%). - **Training data.** - Distilled from Claude Sonnet 5.5. Claude also generated 924 everyday Hebrew terms with English context lines, across 20 categories, plus 10 hand-picked pilot terms. - For each term and each gender, Sonnet wrote 10 sentences **from scratch in that gender**. Nothing was written in one gender and then edited into the other; Daniel rejected that as bad design. - One Anthropic batch, `msgbatch_01PoCafFGsoKAuBRB1JkazQ8`: 1,848 requests, US$5.01. - Automatic filters: - a format gate (length, term present, no nikud); - a gender check using Dicta's `dictabert-joint` morphological analyser on Modal, which rejects any sentence whose letter-marked first-person form has the wrong gender. - Even Sonnet slipped on about 1% of female-speaker sentences (wrote ani hared, "I'm anxious", in the masculine for a woman). - Result: 17,725 sentences kept, giving 6,884 training examples (V2/V3) over 834 terms, with 100 terms held out for evaluation. - **Hardware and time.** Modal, one NVIDIA L40S. V1 trained in 30.5 min, V2 in 37 min, then about 6 to 10 min of evaluation generation each. - **Cost (estimate).** - Whole project so far: about US$10.80 = US$5.53 Anthropic + about US$5.30 Modal, plus about US$1.50 for V3. The Modal part is estimated from run times, not read from the bill. - A single clean training run is about US$1.20 to 1.50. - The total was inflated by two retrains: one caused by a bug, one by a killed client. ### Version history The baseline is the same Gemma with only a detailed prompt and no training. Everything is evaluated on the same 100 held-out terms x m/f, 10 sentences each. | | Prompt-only Gemma | V1 | V2 | |---|---|---|---| | broken JSON (of 200 calls) | 6 | 0 | 1 | | female speaker: wrong gender | 19 (3.6%) | 41 (5.8%) | 26 (3.7%) | | male speaker: wrong gender | 2 | 3 | **0** | | sentences where the letters show the gender | 1,019 | 1,485 | 1,446 | - **Before V1, a viability test.** On 10 pilot terms, prompt-only Gemma made 0 gender errors in 200 sentences. That raised Daniel's question: is a fine-tune needed at all? The answer, after the full evaluation: prompting gets gender close. The fine-tune buys reliability: - format that does not break; - far more sentences that actually show the gender; - more natural, varied Hebrew. The prompt-only output is flat and repeats the pronoun ("ani hekhanti", "ani kaniti"). This is Claude's reading, not Daniel's. - **V1 (2026-11-18).** The female errors came from a bug in the data filter. It required the term to appear exactly as given, so it threw out the correct feminine forms of adjective terms: - asirat toda, "grateful (f.)", אסירת תודה; - medukhet, "depressed (f.)", מדוכאה. The female training data for those terms kept only masculine uses. 39 of V1's 41 female errors were "ani asir toda" / "ani meduka" said by a woman. - **V2.** The filter now accepts inflected terms; the data was rebuilt with no new generation and retrained. - Male errors went to 0. - Of the 26 female flags, 15 are still the term left masculine on held-out terms (meduka x10, sokher "renter" x5). The model's own instruction still said "use the term as given". - 5 are genuine slips (er "awake", gar "live", matkhil "start", all in the masculine). - 6 are analyser false alarms. - **V3 (training now, started 22:47).** One change: the instruction now says the term may be inflected to agree with the "I". Expected: most of the 15 term errors disappear. **Not measured yet.** ### Status and next steps 1. Score V3. 2. Write the model and dataset cards. 3. Publish to the Hebrish org on Hugging Face (Daniel approved, 2026-11-18). The model card will recommend pairing the model with the analyser check (reject and regenerate). A fine-tune is still probabilistic, so the guarantee comes from the check. ### Prior work (searched 2026-11-18) Nothing found for Hebrew that generates text with speaker gender as an input. The closest work is Arabic: - first-person gender reinflection, Habash et al. 2019; - the Arabic Parallel Gender Corpus; - User-Centric Gender Rewriting, 2022. Those rewrite existing text; they do not generate. MORPHOGEN (2026) tests LLM first-person gender rewriting in French, Arabic and Hindi. It finds that models also flip the gender of other people in the sentence, which this project's checks are built to catch. ## Why Daniel needs these (from the repos) - **Generating Hebrew to be read aloud.** Two cases: ASR training-data sentences that a male or female reader records, and TTS (podcast characters). A male voice reading feminine forms, or the reverse, is wrong. Unpointed text cannot even tell a TTS engine whether רוצה is rotse or rotsa. - **Why the gap exists (this session's view, not a sourced claim).** Hebrew NLP tooling tags or points existing text; it does not control generation. General LLMs are good at the letters when prompted but weak at nikud.

Mentions

  • Arabic Parallel Gender Corpus Gender-labelled subtitle corpus with opposite-gender twins
  • Claude Sonnet AI model used for script generation
  • Dicta Hebrew NLP project and tools
  • DictaBERT Hebrew BERT for nikud and morphological analysis
  • Gemma Google's open model family, base for fine-tune
  • Hebrew-Gendered-Sentences MIT-licensed dataset of natively gendered Hebrew sentences
  • Hebrish Project name for the gendered Hebrew model repos
  • Hugging Face Platform for AI models and datasets
  • MORPHOGEN 2025 paper on LLM first-person gender rewriting
  • User-Centric Gender Rewriting 2022 paper separating speaker and listener gender

Downloads

Episode Audio

Download the full episode as an MP3 file

Download MP3
Transcript (TXT)

Plain text transcript file

Episode Book (PDF)

The episode's record — date, duration, models, sources — with the full transcript

#6664: Training a $10 Model for Hebrew Speaker Gender

Corn
A sentence in Hebrew can be completely grammatical and still wrong for the person saying it. That's the hook Daniel sent us this week: he's a learner, and Hebrew bakes the speaker's gender into the words themselves. Sometimes the letters differ, sometimes only the vowels, and no tool he could find handles it. He started building two small models to fix it, spent about ten dollars, and his real question is the one underneath: when filling gaps like this has become that cheap, why had nobody done it already?
Herman
And this is very much a today story. He built these literally yesterday, both repos went up on the Hub on the eighteenth, still marked work in progress. The generator is on its third version and the classifier is a plan with a repo name. He's asking us to talk through the works in progress, which is my favourite kind of ask, because a finished model only tells you what it does.
Corn
Two brothers and a gap in Hebrew NLP. Let's be precise about what the language is actually doing first, because the grammar is the reason there are two models and not one.
Herman
Hebrew marks the speaker's gender inside first-person verbs and adjectives. Not with a pronoun you can swap. A man says ani holekh, I go. A woman says ani holekhet. Different letters at the end of the word. Same with ani sameach, happy, versus sameachah for a woman. You can't fix that after the fact with a dictionary lookup of a pronoun, because there is no pronoun doing the work.
Corn
The letters do the work.
Herman
In some words. Then there's the second mechanism, and this is the one that got me. Ani rotse, I want, male. Ani rotsa, female. Those are spelled identically. Same letters, exactly. The difference only exists in the vowels, the nikud, the dots and dashes that Hebrew prose usually doesn't bother printing. And there's a whole family like that. Koneh, buying. Oseh, doing. Menaseh, trying. Yafeh, pretty. Kasheh, hard.
Corn
So a learner reading unpointed text has no cue at all in those cases.
Herman
None. The text is ambiguous on the page. And here's why it matters twice. For a learner like Daniel, the letter cases are at least visible errors, you can see you got it wrong. The vowel cases are invisible. For text-to-speech it's worse. A voice can't turn the male spelling of tired into the female one. The text has to arrive already spelled for the speaker before it ever reaches the voice.
Corn
Which sets up the architecture. Model one writes the sentence in the right gender, letters and all. Model two points it, adds the vowels. And read backwards, that second model becomes a classifier: give it pointed Hebrew and it tells you whether the speaker is a man or a woman, so you know which voice to route it to.
Herman
Same mechanism, two directions. Forward for generation, backward for voice routing.
Corn
Here's the first thing Daniel built to solve half of it.
Herman
A merged LoRA on Gemma 4 E4B, the eight-billion-parameter instruction-tuned one, Apache licence. The interface is beautifully narrow: you hand it JSON with a term, a context line, how many sentences you want, and speaker gender, m or f. It hands back that many unpointed Hebrew sentences, six to eighteen words, first person, every first-person form agreeing with the gender you asked for. Other people in the sentence keep their own gender.
Corn
The gender field is required.
Herman
Required, m or f, no neutral setting. That's a decision Daniel made deliberately. It's a deterministic switch. In his use case, podcast generation for TTS, you have a male character and a female character, and each one's lines must already be spelled for that character before the text reaches the voice. The switch guarantees the input can't be vague.
Corn
I like that he didn't build a slider. What did it cost him in flexibility?
Herman
Honestly, very little, because the people a neutral setting would serve are exactly the people this pipeline isn't for yet. You'd want a third option eventually, but the third option is a different data problem, not a code change.
Corn
The design choice I want to dwell on is the one-pass thing. It writes each sentence already in the right gender. There's no write it, then fix the gender step.
Herman
No rewriting, no reinflection of existing text at all. That's a quiet structural decision, and it's the right one. Every rewrite step is a place where gender drift creeps in. If you generate masculine text and then convert it, the conversion can miss a form, or worse, change a form that belongs to somebody else in the sentence. Writing it natively in the target gender removes that entire class of error from the pipeline.
Corn
Corn quip opportunity... sorry. Ten dollars and the hard part was deciding not to edit anything.
Herman
That is the expensive decision, in thinking time. The cheap-looking path, generate and convert, is the one that produces the subtle errors. Now, why two models instead of one big one that does everything? The repo's own logic: doing both would need a Hebrew LLM that writes reliable nikud, and that is exactly where LLMs are weak and dedicated nikud models are strong. Two models means each can be tested and replaced on its own.
Corn
Walk me through the data. Where do seventeen-odd thousand gendered sentences come from?
Herman
Claude Sonnet generated them. First nine hundred thirty-four everyday Hebrew terms with English context lines, then ten sentences per term per gender. And here's the design point I know you'll appreciate: every sentence was written from scratch in its gender. Nothing was written masculine and edited feminine.
Corn
Daniel was right to insist on that. A sentence translated from masculine Hebrew isn't a feminine sentence, it's a masculine sentence wearing a wig.
Herman
That's... actually the cleanest description of the reinflection problem I've heard. There are collocation habits that differ, whole rhythms. Editing changes the endings and keeps the skeleton. Then the data goes through two filters: a format gate for length, term presence, and no nikud, and a gender check using Dicta's joint morphological analyser, which rejects any sentence whose letter-marked first-person form is the wrong gender. Even Sonnet slipped on roughly one percent of the female sentences, wrote ani hared, I'm anxious, in the masculine for a woman.
Corn
The teacher got it wrong one time in a hundred, so the class has an exam.
Herman
That's the filter, exactly. What survived: seventeen thousand seven hundred twenty-five sentences, which collapse into six thousand eight hundred eighty-four training examples across eight hundred thirty-four terms, with a hundred terms held out for evaluation. Training itself: LoRA rank thirty-two, alpha thirty-two, on the attention and MLP projections only, two epochs, eight hundred sixty-one steps, loss computed on the reply only, not the prompt. One NVIDIA L40S on Modal, one thousand nine hundred thirty-five seconds.
Corn
Thirty-two minutes.
Herman
Thirty-two minutes of GPU time for a model that does something no tool on the Hub did yesterday.
Corn
Now the version arc, because that's where it gets instructive.
Herman
The baseline is the same Gemma with a detailed prompt and no training. On the hundred held-out terms, male and female, ten sentences each. Prompt-only Gemma: six unparseable JSON responses out of two hundred, and just over a thousand sentences where the letters actually show the speaker's gender. Here's the number that surprised me. Male-speaker gender errors: two, out of four hundred ninety.
Corn
Prompting already works for men.
Herman
Nearly perfectly. Four hundred eighty-eight agree, two disagree. So the obvious question, which Daniel asked himself before training anything: is a fine-tune needed at all? He ran a viability test on ten pilot terms first, and prompt-only Gemma made zero gender errors in two hundred sentences.
Corn
And then he trained it anyway.
Herman
Because the pilot flattered it. On the full evaluation, prompting gets the letters close, but the fine-tune buys three things. Format that doesn't break. Far more sentences where gender is visible at all, since in the vowel-only words the prompt model just avoids the issue. And more natural, varied Hebrew. The prompt-only output is flat, repeats the pronoun constantly. Ani hekhanti, ani kaniti. I, I, I.
Corn
So the baseline is a man who's technically correct and exhausting to listen to.
Herman
Ha. Though that naturalness judgement comes with a caveat we should say plainly: it's a qualitative reading by Daniel's assistant, Claude, reading the outputs. No human evaluation yet. Version one then trained. Format fixed almost completely: zero unparseable. Visible-gender sentences jumped to fourteen hundred eighty-five, roughly forty percent more than prompting. Female-speaker errors went up. Nineteen to forty-one.
Corn
It got worse at the thing it was trained for.
Herman
Worse for women, specifically. The model had learned gender matters before it learned which gender. It was over-applying masculine defaults. Classic first-version behavior: the concept arrives before the discrimination.
Corn
The toddler phase.
Herman
The toddler phase, precisely. Version two is the interesting one, because the fix wasn't more training, it was the data pipeline. The v1 data filter had a bug, and this is worth pausing on. The filter required the term to appear exactly as given. But the terms were in masculine dictionary form. So when Sonnet correctly wrote the feminine asirat toda, grateful, for a woman, the filter threw it out, because the term it was checking for was the masculine asir toda.
Corn
The filter was rejecting correct answers for being correct.
Herman
In feminine form, yes. The female training data for those adjective terms ended up keeping only masculine uses. Thirty-nine of v1's forty-one female errors were exactly that pattern, a woman saying ani asir toda. So for v2 the filter was fixed to accept inflected terms, the data rebuilt, no new generation at all, and retrained.
Corn
Same sentences, same money, one bug fix.
Herman
And male errors went to zero, female errors dropped from forty-one to twenty-six, at a small cost elsewhere. Gate pass slipped slightly, visible-gender sentences came down a touch to fourteen hundred forty-six. Version two is the best-balanced version on the numbers so far. Version three, published yesterday, is a partial regression, and I find this the most honest part of the whole arc.
Corn
Go on.
Herman
Female errors improved, twenty-six down to twenty-two. But format errors went from one unparseable to three, the gate pass fell, visible-gender sentences fell again. The card's own summary is unusually candid. It says the fine-tune breaks JSON less often than prompting, writes about forty percent more gendered sentences, and then concedes, and this is close to a direct quote, its gender accuracy for a female speaker is not yet better than prompting. Six hundred fifty-eight agree, twenty-two disagree, versus the base model's five hundred ten and nineteen.
Corn
A version three that admits the free model is still better at the hard half of its job. That's the most expensive sentence in the README.
Herman
It's also just true, and knowing it's true is why there's a v4 plan. The diagnosis is the payoff of the whole arc. Seventeen of v3's twenty-two female errors come from one specific pattern. The term is given in its masculine dictionary form and describes the speaker. Meduka, depressed. Sokher, a renter. Tzimchoni, vegetarian. The model copies it unchanged for a female speaker. A woman saying ani meduka instead of ani medukah.
Corn
It's quoting the dictionary at her.
Herman
It's echoing the input, which is what models love to do. And the cause is a data count. One hundred thirty-four. That's how many training examples exist where the term itself inflects. A hundred thirty-four examples can't teach a model to override a dictionary form it was handed in the prompt. The workaround for now is to pass the term pre-inflected, give it medukah in the input. The planned v4 fix is targeted data for about three hundred self-description terms.
Corn
So the bug isn't in the model, it's in the shopping list.
Herman
The bug is that the shopping list was too small. One number, one hundred thirty-four, explains three quarters of the remaining errors. That's the kind of finding you only get by counting, and it's my candidate for the answer to Daniel's bigger question, which we're coming to. The other honest limitations: a fine-tune is still probabilistic, so the card recommends running every sentence's first-person forms through the morphological analyser and regenerating rejects. There's a script for it. And occasional content slips, like an etrog showing up on Yom Kippur instead of Sukkot.
Corn
The festival got the wrong fruit. That's a very specific way to be wrong.
Herman
Rare, and unrelated to the gender system, but worth knowing a fine-tune doesn't fix. A wrong citrus is still a wrong citrus.
Corn
Before we get into the Hebrew models, hold on. I'd like to flag something about the evaluation itself, because the female-error counts come from the same analyser family that does the training filter.
Herman
The card admits that. Dictabert-joint has false alarms, like tov or noach, good or comfortable, used about something other than the speaker. Some of v2's twenty-six flags were analyser errors, not model errors.
Corn
So the referee occasionally cards the wrong player, and both teams know it.
Herman
And the fix is the same for both, a regenerate-the-rejects loop that tolerates a few wasted calls. Which is cheap, because the whole pipeline is cheap.
Corn
Well, before we get into the Hebrew models, I believe we have a call from your mother, Corn.
Herman
Dorothy! Wonderful.
Corn
Mum.
Dorothy
Hello dear, it's your mother. Dorothy's History of Toast.
Dorothy
The pop-up toaster was invented by Charles Strite, a mechanic in Minnesota who was fed up with the burnt toast in his factory canteen. He filed the patent in nineteen nineteen.
Dorothy
You would think a man so tired of burnt things might have found a way to be less tired, but there it is, dear. Nothing quite works out, and the toast still burns sometimes.
Dorothy
Anyway, I have a load of washing on and I should go and hang it out. Bye bye, sweetheart.
Corn
The toast still burns. Noted, Mum.
Herman
She keeps that segment running better than half the shows on the feed. Anyway. Stage two.
Corn
The other half of the pipeline, the model that reads Hebrew back and decides whose voice should say it. And you said it's still mostly a plan.
Herman
Mostly a plan, and I want to be precise about the status because it matters. The Hebrish gendered-nikud repo exists on Hugging Face. Three hundred five million parameters, CC licence. But the model card is still the unmodified card of the base model, DictaBERT-large-char-menaked. No training data description, no evaluation table, nothing documenting how gender gets passed in. So there's a repo and a name, and there are no trained weights and no results. Any accuracy claim about it right now would be speculation, and I won't make one.
Corn
The shelf has a label on it and nothing in the jar.
Herman
Drawn as a plan, the pipeline is clean. Term, context, and speaker gender go into stage one, which returns unpointed Hebrew with the letters correct for the speaker. That goes into stage two with the gender, which returns pointed Hebrew with the vowels correct. Each run produces three outputs: the unpointed text, a version pointed for a male speaker, a version pointed for a female speaker. And if a sentence has nothing gender-specific in it, the two pointed versions come out identical.
Corn
Which is itself a check. If the two versions differ, you know where the gender lives in the sentence.
Herman
That's a nice property of the design, and it's free. Then the reverse-classification framing, which is the part I find elegant. Read the same mechanism backwards: given pointed Hebrew, decide whether the first person is male or female, so the sentence routes to the matching voice. That's the TTS use case in one move. A script with two characters, each line already spelled and pointed for the character before the voice ever sees it.
Corn
Though the base model sets a ceiling.
Herman
It does, and the ceiling is worth knowing. DictaBERT-large-char-menaked is three hundred five million parameters, and its card claims state of the art on all modern Hebrew vocalization benchmarks as of March twenty twenty-five, against open-source alternatives and commercial generative LLMs both. It's trained on modern prose, and it's explicitly not intended for Biblical, Rabbinic, or poetic texts. The pipeline's pointing quality is set by a model from early twenty twenty-five. That's the price of the two-model architecture: your generator improves with every Gemma release, and your nikud stays where the BERTs are.
Corn
Swap either one independently, though.
Herman
That's the payoff. Each component can be tested and replaced on its own, which is exactly what you can't do inside one monolith. Now, Daniel's bigger question. Why has nobody built these? First thing to say plainly: the gap claim is the project's own survey. The README states it flat out, nothing found for Hebrew generates text with speaker gender as an input. That's Daniel's search, not an independent literature review, and we should treat it as such on air. But the nearest prior art he found is telling, because it's all Arabic.
Corn
All of it?
Herman
Arabic or multilingual. Habash and colleagues, twenty nineteen, on first-person gender identification and reinflection. The Arabic Parallel Gender Corpus, subtitle lines labelled male, female, or ambiguous, with opposite-gender twins of each line. User-Centric Gender Rewriting in twenty twenty-two, which separates speaker gender from listener gender, so you can address someone correctly while describing yourself correctly. And then MORPHOGEN, this year, testing LLM first-person gender rewriting in French, Arabic, and Hindi.
Corn
The family resemblance is that they're all rewriters. Nothing generates.
Herman
Every close relative takes existing text and fixes its gender. Daniel's model is the only one in the family that writes the sentence in the target gender from the first word. And there's a technical reason the gap persisted, which is buried in the MORPHOGEN finding. When they tested LLMs on first-person gender rewriting, the models also flipped the gender of other people in the sentence. You ask it to make the narrator a woman and it makes her mother a man.
Corn
The knob turns everything near it.
Herman
Collateral inflection. And that's why naive attempts look bad. You fine-tune, the third parties drift, your eval screams at you, you conclude gender is hard. It isn't, quite. Remember the baseline: prompt-only Gemma gets male-speaker gender right four hundred eighty-eight times out of four hundred ninety. The hard part is the female case and third-party drift, and the fix isn't more data or a bigger model, it's a morphological analyser in the loop, checking each first-person form and regenerating rejects. That's plumbing.
Corn
And nobody publishes plumbing.
Herman
There's no paper titled we ran every output through dictabert-joint and regenerated the failures. Journals want mechanisms, and this is a drainpipe. So the field's answer to why nobody built it is that the hard part is unglamorous and the glamorous part, the generation, was already nearly free.
Corn
Which inverts the usual story. Normally we're told the gap exists because the problem is hard. Here the gap exists because the easy part was already done by accident, inside a general model, and the rest is a chore.
Herman
And the chore needed somebody who cared about the specific chore. Herman's corollary, if I may coin it badly: the person who counts the one hundred thirty-four examples is the person who has to hear the wrong vowel.
Corn
You may not coin that badly. There's a second half to the why-nobody question, isn't there.
Herman
There is, and it's the wry one. Both Hebrish repos, the generator and the nikud scaffold, had zero downloads and zero likes in their first thirty days as of yesterday. The gap wasn't just unbuilt. Now that it's built, it's unlooked-for.
Corn
A ten-dollar solution to a problem nobody was googling.
Herman
Which tells you the bottleneck was never capability. It was someone deciding the gap was worth counting. We did an episode ages ago, back when we asked whether a fine-tune survives your voice aging, and the lesson rhymes with this one: the model is never the whole system. The validation loop is the system. Daniel's version arc proves it. He didn't get better results by scaling anything. He got them by finding a filter bug, fixing it, and counting what remained.
Corn
The ten-dollar figure is his own accounting, mind. The card doesn't state it. The only hard number anywhere is the one thousand nine hundred thirty-five seconds on the L40S.
Herman
True, though even being suspicious about it, the shape holds: the data distillation, the filter, the training run, the evaluation, a weekend project now. Which is the real answer to when did this become possible. Not recently, exactly. It became possible the moment a morphological analyser good enough to be the referee became a pip install.
Corn
The referee was the missing piece, not the player.
Herman
Do you know what I'd actually want to test first, if I were him? Corn, honest question. Would you rather have v2 or v3 in production today?
Corn
v2, without hesitating. Format errors are a production problem. A woman saying ani meduka is an embarrassing sentence. An unparseable response is a crashed pipeline at three in the morning.
Herman
That's my read too. v3's female-error improvement is real but thin, and it's paid for with fragility elsewhere. The best-balanced version is the second one, and the version numbers track effort, not quality.
Corn
There's a discipline question too. If you keep shipping versions because each one improves the metric you're staring at, you get a model that's locally better and globally worse. Would you freeze it?
Herman
I'd freeze at v2 and spend the next run entirely on the three hundred self-description terms, v4 as planned. The one hundred thirty-four number says the remaining error is concentrated, and concentrated errors are cheap. Diffuse ones aren't.
Corn
I once spent an unreasonable amount of time trying to get a text-to-speech system to read a translated letter aloud in the right voice. What defeated me wasn't the voice. Every line had been translated into a form that assumed the wrong speaker.
Herman
This is the exact pipeline.
Hilbert
The two-model split is right, and I'll say so plainly. Not for the architectural reason you gave, Herman, the one you spent four minutes on. I've watched what happens when one system is asked to do two jobs and does neither well. I ran the letter through the pointing, then the voice read it back, and the whole thing had to be done a second time by hand. Corn, I kept the printout. Wrong-gender forms circled in red. It's in the drawer under the tax folders. I can tell you which line was worst. Line nineteen. Rotse, spelled for the wrong one of us.
Corn
How many circles?
Hilbert
Forty-seven. Hold on, Herman, you've got a level sitting six dB hot on your right channel. Fixed it. Forty-seven, and three of them were pencil, because the red pen ran out on line thirty-one and I wasn't going to start a second pen halfway through a document. I circled them in pencil and went back over the pencil in red once I got to the shop.
Herman
The pencil-then-red-ink pass is the part I respect most.
Hilbert
The ridiculous part is what I did next. I read the whole letter aloud myself, in the wrong voice, every line, just to hear how bad it sounded. Took me eleven minutes. Sounded fine. I found that deeply unsatisfying, and I still don't know what to conclude from it.
Corn
That your ear isn't a morphological analyser.
Hilbert
My ear has never once flagged a vowel. The claws are no use for the drawer, so my sister deals with the filing, but the printout stays mine. The council records office wanted that letter back, by the way. A man there called Yossi kept phoning about it for a month. I told him it was circled in red and therefore no longer their letter. He stopped calling.
Herman
That's the regenerate-rejects loop with extra steps.
Hilbert
It's the loop with no automation, which is what you two keep dancing around. Fine. Eleven minutes and forty-seven circles is what it cost before anyone built the drainpipe.
Corn
Cutting-room floor time. Herman, what didn't we fit?
Herman
The Hebrew-Gendered-Sentences dataset itself. It went up under an MIT licence, the same day, and it's arguably the more durable artifact of the three. Models get replaced. A corpus of seventeen thousand sentences written natively in both genders, with the term and the context attached, is the thing the next person builds on.
Corn
And the one after that won't cite it either.
Herman
They'll distil from it without saying so, which is the sincerest form of academic flattery.
Corn
Where this leaves me is the v4 test. If targeted data on three hundred self-description terms kills the copy-the-dictionary error, the one hundred thirty-four-examples diagnosis is confirmed and the project basically closes. If it doesn't, the problem was never the count, and that's a more interesting answer.
Herman
And stage two is still a promise with a repo name. The reverse classifier has no trained weights, so the voice-routing half exists only as a diagram until it doesn't. My forward-looking thought, though, is Hilbert's. Forty-seven red circles and an ear that catches none of them. If a gap this small and this cheap stays unfilled this long, the bottleneck was never capability. It was somebody deciding the gap was worth counting, and then someone else deciding the circles were worth keeping.
Corn
Our producer is Hilbert Flumingtop, who has been fixing levels and grudges in equal measure since before the drawer. If this was your kind of episode, go back for episode sixty ninety-three, Check Out Our First Hebrew Episodes (Plus Mandarin); and episode seven, Building Custom ASR Tools. This has been My Weird Prompts. If today's episode earned its thirty-two minutes, leave us a review on Spotify, it helps other people find the show.
Herman
You can find everything else at my weird prompts dot com.
Corn
We'll be back soon. See you tomorrow.

This episode was generated with AI assistance. Hosts Herman and Corn are AI personalities. It may contain errors: disclaimer · report an error