/ Модель

Характеристики

Лицензия
Apache 2.0
Архитектура
gemma4 · dense
Базовая модель
gemma-4-E4B-it
Библиотека
transformers
Опубликована
18 ноя 2026

Hebrew-Gendered-Sentence-Creator

Генерация текстаТекст → текст3 профессии

Модель создаёт предложения на иврите с заданным словом и формой первого лица, соответствующей указанному полу говорящего.

155скачиваний за 30 дней0лайковвеса обновлены18 ноя 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Hebrew-Gendered-Sentence-Creator — дообученная модель семейства Gemma 4, созданная проектом Hebrish на базе google/gemma-4-E4B-it. Она генерирует естественные предложения на иврите без огласовок, используя заданное слово в контексте и учитывая пол говорящего от первого лица: параметр m или f передаётся на входе, а ответ оформляется как JSON-массив строк. Модель предназначена, например, для подготовки реплик персонажей в сценариях иврийских подкастов перед синтезом речи.

Модель дообучена методом LoRA на корпусе Hebrew-Gendered-Sentences: в финальный набор вошли 17 725 предложений и 6 884 обучающих примера. В тесте на 100 отложенных слов модель реже нарушала формат JSON и чаще выдавала предложения с заметным по написанию родом говорящего, чем базовая модель с одним лишь промптом. При этом человеческой оценки качества не проводилось, а точность женских форм пока не превосходит результат базовой модели с промптом. Репозиторий распространяется по лицензии Apache-2.0.

Это версия в процессе разработки. Модель часто оставляет мужскую форму прилагательного или существительного без изменения, если слово дано в мужском роде и описывает женщину; рекомендуется передавать такой термин уже в женской форме. Род форм, различающихся только огласовками, модель не обрабатывает. Возможны ошибки в JSON, фактические и лексические огрехи; для строгой проверки родовых форм автор рекомендует морфологический анализ и повторную генерацию отклонённых предложений.

Сценарии применения

  • генерация реплик персонажа-мужчины для сценария на иврите
  • генерация реплик персонажа-женщины для сценария на иврите
  • подготовка гендерно согласованных предложений перед синтезом речи на иврите
  • создание примеров употребления заданного слова в контексте
  • формирование набора предложений на иврите в формате JSON

Ограничения

Модель часто сохраняет мужскую форму заданного слова, даже когда говорит женщина; для слов, различающихся по роду только огласовками, она не предназначена. Формат JSON и грамматические формы могут содержать ошибки, поэтому для надёжного результата нужна дополнительная проверка.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Hebrew-Gendered-Sentence-Creator (work in progress, v3)

Status: work in progress (2026-11-18). It is usable, with a known weakness described under Limitations. Code, training scripts and the full experiment log are in Hebrish-ASR/Hebrew-Gendered-Sentence-Creator.

The model writes natural unpointed Hebrew sentences that use a given term in the sense its context describes, with the gender of the sentence's first person (the "I", usually the speaker) as an input. Each sentence is written in one pass, directly in that gender. Existing text is not rewritten.

Hebrew marks the speaker's gender in the letters (אני הולך / אני הולכת, הייתי עייף / הייתי עייפה). Text meant to be read aloud by a male or female voice must already be spelled for that speaker before it reaches TTS. Example use: a Hebrew podcast script with a male and a female character, where each character's lines come from this model with m or f. Forms whose gender shows only in the vowels (אני רוצה: rotse/rotsa) are spelled the same for both genders. They need a gender-aware nikud model, which is the planned stage 2, Hebrew-Gendered-Nikud.

This is a merged LoRA fine-tune of google/gemma-4-E4B-it, which is Apache-2.0 licensed.

Usage

import json, torch
from transformers import AutoModelForCausalLM, AutoTokenizer

repo = "Hebrish/Hebrew-Gendered-Sentence-Creator"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, dtype=torch.bfloat16, device_map="auto")

SYSTEM = ("Write exactly n different natural Hebrew sentences, unpointed, 6 to 18 words each, that each use the term "
          "once, in the meaning the context describes; the term may take a prefix and may be inflected to agree with "
          "the \"I\". The sentences are in the first person, and every first-person form agrees with speaker_gender "
          "(m = the \"I\" is a man, f = a woman); other people keep their own gender. Reply with a JSON array of strings.")
user = json.dumps({"term": "מילואים", "context": "IDF reserve duty", "n": 5, "speaker_gender": "f"}, ensure_ascii=False)
msgs = [{"role": "system", "content": SYSTEM}, {"role": "user", "content": user}]
ids = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(ids, max_new_tokens=600, do_sample=True, temperature=0.8, top_p=0.95)
print(json.loads(tok.decode(out[0, ids.shape[1]:], skip_special_tokens=True)))
  • Use exactly this system prompt; the model was trained with it.
  • speaker_gender is required and must be m or f.
  • The reply is a JSON array of n strings.

Training

  • Data: Hebrish/Hebrew-Gendered-Sentences.
    • Claude Sonnet 5.5 generated 934 everyday Hebrew terms with context lines. For each term and gender it then wrote 10 sentences, natively in that gender.
    • Filters: a format gate (length, term present, no nikud) and a first-person gender check with dicta-il/dictabert-joint.
    • Result: 17,725 sentences kept, 6,884 training examples over 834 terms. 100 terms are held out.
  • LoRA: rank 32, alpha 32, dropout 0.05, on the language model's attention and MLP projections only. lr 2e-4, cosine schedule, 2 epochs, effective batch 16 (4 x 4), 861 steps. Loss on the reply only.
  • Hardware: one NVIDIA L40S on Modal, 1,935 s.

Evaluation

100 held-out terms x {m, f}, n=10, temperature 0.8. A "disagree" is a first-person form whose letters show the wrong gender, as judged by the dictabert-joint analyser with rules. The analyser has some false alarms, for example טוב or נוח used about something other than the speaker.

Gemma 4 E4B, prompt onlyv1v2v3 (this)
unparseable JSON (of 200)6013
gate pass1,855/1,9401,956/2,0001,921/1,9901,902/1,970
female "I": agree / disagree510 / 19668 / 41680 / 26658 / 22
male "I": agree / disagree488 / 2773 / 3740 / 0762 / 2
sentences whose letters show the speaker's gender1,0191,4851,4461,440

Compared with prompting the base model, the fine-tune:

  • breaks the JSON format less often;
  • writes about 40% more sentences in which the speaker's gender is actually visible;
  • writes more natural, varied Hebrew. This is a qualitative reading by the developer's assistant; no human evaluation has been done yet.

Its gender accuracy for a female speaker is not yet better than prompting.

Limitations

  • Masculine adjective terms with a female speaker. If the term is given in its masculine dictionary form and describes the speaker (מדוכא, אסיר תודה, שוכר, צמחוני), the model often copies it unchanged for f ("אני מדוכא"). That accounts for 17 of v3's 22 female errors. The cause is too few training examples where the term inflects (134).
    • Workaround: pass the term already inflected for the speaker ("term": "מדוכאה").
    • Fix planned for v4: targeted data for about 300 self-description terms.
  • No guarantee. A fine-tune is still probabilistic. To be sure, check each sentence's first-person forms with a morphological analyser and regenerate the rejects; the analyser code is in the GitHub repo (scripts/analyse_modal.py).
  • Content. Occasional factual or lexical slips, for example "האטיג", or an etrog on Yom Kippur.
  • Vowel-only gender (רוצה, קונה, יפה) is out of scope; see stage 2.

Licence

The weights are Apache-2.0, following the Gemma 4 base. The training code is MIT (GitHub).

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers

Можно запустить

Подбираем GPU…

Класс архитектуры
Gemma4ForConditionalGeneration
Ревизия весов
8685ab4

0 моделей