/ Модель

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

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

iris-gemma-4-e2b-it-mlx

Генерация текстаТекст → текст3 профессии
487скачиваний за 30 дней0лайковвеса обновлены30 ноя 2026

Описание модели

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

Дообученная Gemma 4 E2B для локального исправления ошибок и изменения тона сообщений на английском, хинди и хинглише с ответами на английском.

Iris Gemma 4 E2B (MLX) — дообученная модель для приложения Iris, разработанная для локальной коррекции и переписывания сообщений. Она исправляет орфографию, грамматику, регистр и пунктуацию, стараясь сохранить исходные слова и разговорный стиль, а также меняет тон на профессиональный, дружелюбный, более краткий, ясный или шутливый, сохраняя смысл и вопросы.

Модель построена на плотной архитектуре Gemma 4 E2B IT и представлена в 4-битном формате safetensors для MLX; в README указан размер загрузки 3,72 ГБ. Она читает английский, хинди на деванагари и хинглиш, но всегда отвечает по-английски. Предназначена для локального запуска на Apple Silicon; карточка указывает лицензию Apache-2.0.

Сильная сторона модели — специализированная настройка для правки и стилистического переписывания коротких сообщений. Это не универсальный чат-ассистент: модель может переписать вопрос вместо ответа на него, ввод изображений не обучался и не тестировался. Качество на хинди ниже, чем у версии E4B, а шутливый тон — самый слабый из доступных.

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

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

Ограничения

Модель отвечает только на английском и не предназначена для диалога или ответов на вопросы; изображения не обучались и не тестировались. Качество на хинди слабее, чем у версии E4B, а шутливый тон показал самые слабые результаты в тестах README.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

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

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

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

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

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

Открыть на Hugging Face

Iris Gemma 4 E2B: a draft, its Fix and its Professional rewrite

Iris Gemma 4 E2B (MLX)

The writing model inside Iris, an on-device grammar and tone app: "Lighter" in the app. It does two jobs and is trained for nothing else:

  • Fix corrects spelling, grammar, capitals and punctuation, and changes nothing else. Your words, short forms, slang and casual voice stay as you typed them. A message with no mistakes comes back unchanged.
  • Tones rewrite a message as Professional, Friendly, Shorter, Clearer or Funny, keeping every point, who does what, and the questions as questions.

It reads English, Hindi (Devanagari) and Hinglish (Hindi typed in English letters), and always answers in English.

Status in IrisEarlier lighter model — replaced in Iris 0.7.0 by Fast (Qwen 3.5 2B) (iris-qwen-3.5-2b-mlx), which matches E2B in English at less than half the download size and ~1.4× the speed on Windows 11. Kept here for existing users and direct use.
Current Iris sizesBest quality (Gemma 4 E4B): iris-gemma-4-e4b-it-mlx · Fast (Qwen 3.5 2B): iris-qwen-3.5-2b-mlx · Tiny (Qwen 3.5 0.8B): iris-qwen-3.5-0.8b-mlx
All Iris modelsIris writing models
FilesMLX, 4-bit (group size 64), with the MLP layers at 8-bit as in the quantization-aware copy it was trained from, 3.72 GB (this repo). For Windows and llama.cpp: iris-gemma-4-e2b-it-gguf (2.81 GB).
Based onGoogle's google/gemma-4-E2B-it, fine-tuned with LoRA
LicenseApache 2.0, a modified version of Gemma 4 (see License)

Which one should I use?

Your computerUseMemory it needs
Mac with 16 GB or moreBest quality: iris-gemma-4-e4b-it-mlx3.6 GB peak (MLX)
Mac with 8 GBFast: iris-qwen-3.5-2b-mlx1.4 GB peak (MLX, 1.08 GB download)
Mac (lightest memory / fastest English)Tiny: iris-qwen-3.5-0.8b-mlx0.87 GB peak (MLX, 444 MB download)
Windows PC with 16 GB+ (best Hindi / Hinglish)Best quality: iris-gemma-4-e4b-it-gguf~5.5 GB working set (4.58 GB download)
Windows PC with 8 GB or more (recommended default)Fast: iris-qwen-3.5-2b-gguf1.58 GB working set on Win 11 (1.25 GB download)
Windows PC with 4 GB / older laptopTiny: iris-qwen-3.5-0.8b-gguf0.84–0.90 GB working set on Win 11 (505 MB download)

Note: Starting with Iris 0.7.0, Fast (Qwen 3.5 2B) replaced this Gemma 4 E2B model as Iris's default smaller model. Fast ties E2B across English Fix and tones while using less than half the download size and noticeably less RAM on 8 GB Windows PCs and Macs. This repo remains available for anyone who already downloaded it or wants to use Gemma 4 E2B directly.

If Hindi or Hinglish matters most, use Best quality (E4B) whenever your computer has 16 GB or more.

Results

How often the answer was good enough: untrained Gemma 4 E4B-it, Iris Lighter and Iris Best quality on six jobs

Gemma 4 E4B-it, untrainedIris Lighter (E2B)Iris Best quality (E4B)
English Fix: accepted (50 drafts)52%86%90%
Professional and Friendly: would send (100 answers)86%88%93%
Shorter and Clearer: would send (100 answers)75%86%90%
Funny: would send (50 answers)4%56%66%
Hindi and Hinglish, Fix (into English): accepted (82 drafts)91%71%95%
Hindi and Hinglish, tones (into English): would send (240 answers)71%47%76%

Judged blind by an AI model, answer by answer, on drafts written only for testing (see How it was tested). Gaps under about 8 points are within noise.

The Lighter model against Google's untrained E2B, from earlier judging rounds (so not on the chart): English Fix 86% against 60% (measured on the previous training round, which shares its English lessons), Hindi tones would send 47% against 36%, Hindi Fix 62 to 65% against 63% (no change). For Hindi and Hinglish, use the E4B model.

Examples

Real answers from this file, unedited, to drafts written for this card (temperature 0, Iris's prompts). All 30 answers are in examples.jsonl.

Drafthey are we still on for tmrw? i didnt got the slides yet, can u send them before 10
Fixhey are we still on for tmrw? I didn't get the slides yet, can u send them before 10?
ProfessionalHi, are we still on for tomorrow? I have not received the slides yet. Could you send them before 10?
FriendlyHey, are we still on for tomorrow? I haven't got the slides yet, so could you send them before 10? Thanks!
ShorterHey, still on for tmrw? I haven't got the slides yet, can u send them before 10?
ClearerHey, are we still on for tomorrow? Can you send the slides before 10? I haven't got them yet.
FunnyHey are we still on for tmrw? I didn't get the slides yet, can u send them before 10?

Hinglish and Hindi come back in English, keeping who does what:

DraftModeAnswer
bhai kal meeting 11 baje hai, report tum bhej dena main slides bana dungaFixbro the meeting is at 11 tomorrow, you send the report I'll make the slides
ProfessionalThe meeting is at 11 tomorrow. Please send the report. I will prepare the slides.
माफ़ कीजिए, आज मैं थोड़ा देर से आऊँगा, ट्रेन लेट है।FixSorry, I'll be a little late today, the train is late.

A complaint stays a complaint, and Funny stays out of it:

DraftModeAnswer
the new pump arrived damaged, this is the second time this month and nobody from your team has called me backProfessionalThe new pump arrived damaged. This is the second time this month, and nobody from your team has called me back.
FunnyThe new pump arrived damaged, this is the second time this month and nobody from your team has called me back.

Memory and speed

Peak memory and seconds per answer for both models on Mac and Windows

  • Mac (MLX, Apple silicon): peak 2.9 GB (3.3 GB at the longest message Iris takes, 6,000 characters), measured through Iris's own loader after a real download; about 0.2 s for a typical answer on an M5 Pro.
  • Windows 11 (GGUF, Iris bundled llama-server.exe b12110, CPU only, --no-repack):
    • 8 GB RAM / 4 vCPU Windows 11 VM: 1.72 GB peak working set (2.81 GB mapped file, 4.12 GB system RAM free), 1.87 s load, 2.40 s median warm Fix (19.1 tok/s), 7.59 s median Tone.
    • 4 GB RAM / 2 vCPU Windows 11 VM: 1.72 GB peak working set (only 620 MB system RAM free), 2.79 s load, 4.52 s median warm Fix (10.4 tok/s), 14.7 s median Tone.
    • For 4–8 GB Windows laptops, Fast (Qwen 3.5 2B) and Tiny (Qwen 3.5 0.8B) leave significantly more free memory and reply faster.

How to use

Python (mlx-lm)

Tested with mlx-lm 0.32.2 on Apple silicon; it gives the same answers as the Iris app:

from mlx_lm import load, generate

model, tokenizer = load("ImAXISOG/iris-gemma-4-e2b-it-mlx")

FIX = ("Proofread the message between <message> and </message>. Correct only clear mistakes in spelling, grammar, "
       "capitalization and punctuation. Change nothing else: keep the writer's words, style, short forms, emoji, "
       "numbers and line breaks. Copy placeholders like {{1}} exactly once. If there are no mistakes, return the "
       "message exactly as it is. Reply with only the corrected message.")

TONE = ("Rewrite the message in a {tone} tone. {instruction}\nKeep every point of the draft and add nothing. "
        "Keep who does what, and keep questions as questions. Fix grammar and spelling. Copy placeholders like "
        "{{{{1}}}} exactly once. No em dashes. Reply with only the rewritten message.")
SHORTER = "Make it as short as possible by cutting filler words and repetition. Every fact, question, request, and condition stays."

def ask(system, user):
    messages = [{"role": "system", "content": system}, {"role": "user", "content": user}]
    prompt = tokenizer.apply_chat_template(messages, add_generation_prompt=True, enable_thinking=False)
    return generate(model, tokenizer, prompt=prompt, max_tokens=400)  # greedy (temperature 0) by default

draft = "hey are we still on for tmrw? i didnt got the slides yet, can u send them before 10"
print(ask(FIX, f"<message>\n{draft}\n</message>"))                           # Fix wraps the draft in <message> tags
print(ask(TONE.format(tone="shorter", instruction=SHORTER), draft))           # tones take the bare draft

mlx-lm loads the whole model and peaks at about 4.6 GB. Iris reads the per-layer word table (embed_tokens_per_layer) from disk a row at a time and skips the picture layers, which brings the peak down to 2.9 GB with the same answers word for word. Iris also uses the drafter mlx-community/gemma-4-E2B-it-qat-assistant-bf16 to answer faster.

In Iris

Iris downloads this model when you pick "Lighter" in setup or Settings, and runs it on your Mac.

The prompts it was trained with

The model learned Iris's short instructions, with thinking turned off. Other prompts work but were not measured.

The draft goes in the user turn as <message>\n...\n</message>.

Proofread the message between <message> and </message>. Correct only clear mistakes in spelling, grammar, capitalization and punctuation. Change nothing else: keep the writer's words, style, short forms, emoji, numbers and line breaks. Copy placeholders like {{1}} exactly once. If there are no mistakes, return the message exactly as it is. Reply with only the corrected message.

Iris sends this system prompt, then one example pair (user: maine invoice bhej diya hai, kal tak payment aa jayega, assistant: I've sent the invoice, the payment will come by tomorrow), then the draft as it is.

The user's message is written in Hindi, usually in Latin letters (Hinglish), sometimes in Devanagari. Translate it into natural English.

- Keep the meaning, facts, names, numbers, and requests exactly. Keep commitments as firm as written.
- Keep who does what: "bhej dena" asks the reader to send; "bhej dunga" means the writer will send.
- Keep the tone: a casual message stays casual. Don't add greetings or sign-offs.
- Placeholders like {{1}} stand for names, links, and code. Copy every placeholder exactly once, in the same place.
- Reply with only the English translation: no Hindi words, no quotes, no labels, no explanation.

The draft goes in the user turn as it is. {tone} is the tone's name in lower case.

Rewrite the message in a {tone} tone. {instruction}
Keep every point of the draft and add nothing. Keep who does what, and keep questions as questions. Fix grammar and spelling. Copy placeholders like {{1}} exactly once. No em dashes. Reply with only the rewritten message.
  • Professional: Sound clear and professional, like a capable colleague. Not stiff or flowery: no "I hope this finds you well", no "kindly". Professional changes how a thing is said, never whether it is said: a complaint, a disagreement, a refusal, frustration, an apology, thanks, and a courtesy like "I know it's late" all stay, put calmly and plainly. Never drop a point because it is blunt, and never soften a complaint into a request. Keep the point, not the wording: say each point in plain professional words, turning slang, sarcasm, insults and filler words like "really" or "super" into calm, direct language, so it reads as a colleague wrote it, not as the draft with its spelling fixed.
  • Friendly: Sound warm and easygoing, like a teammate people enjoy working with. Use contractions and plain, everyday words. Show warmth with words, never emoji: every rewrite gets one warm touch, such as a thanks, a word of acknowledgment, or a friendly opener like "Hey" or "Quick heads-up:". When the message is routine, one light, good-natured turn of phrase can make it friendlier; leave it out for bad news, apologies, complaints, or anything urgent, and never use sarcasm or joke about anyone. At most one exclamation mark. No filler openers like "Hope you're doing well". Be warm in the wording, never by hedging: if it says something will happen, it still will.
  • Shorter: Make it as short as possible by cutting filler words and repetition. Every fact, question, request, and condition stays.
  • Clearer: Restructure it so the reader knows what to do on the first read: put the main point or request in the first sentence, then the details. Split long sentences, use everyday words, and use a short list when there are several items or steps.
  • Funny: Add one light, good-natured touch of humor beside the message and change nothing else: keep the message's own words, and invent no facts or details. Never joke about people, mistakes, or anything sensitive. When humor doesn't fit (bad news, an apology, a complaint), only tidy the message.

How it was made

How it was made: Gemma 4 E2B-it, writing lessons, LoRA training, merged and quantized, MLX and GGUF

Starting pointGoogle's google/gemma-4-E2B-it, as the 4-bit MLX copy mlx-community/gemma-4-E2B-it-qat-4bit (what Iris used before), with thinking switched off in the chat template
Lessons8,851 distinct examples (10,741 rows: some lessons appear more than once), 408 held back to check progress
Where lessons came fromDrafts and answers written and reviewed with AI models; Hindi and Hinglish translations reviewed by AI reviewers who corrected tense, idiom and who-does-what. None is taken from the test drafts, and lessons that resembled a test draft were dropped. Not released.
MethodLoRA on every layer: rank 16, scale 20, dropout 0.05; loss on the answers only (prompts masked)
ScheduleOne pass, 2,686 steps, batch 4, learning rate 5e-5 with cosine decay to 2e-6, 20 warm-up steps, up to 2,048 tokens
HardwareOne Apple M5 Pro Mac, 1 h 6 min, with mlx-lm
Held-back loss0.268
AfterwardsAdapter merged into the weights; 4-bit (group size 64), with the MLP layers at 8-bit as in the quantization-aware copy it was trained from; audio weights removed (picture weights kept so stock loaders work)
GGUFConverted with llama.cpp's convert_hf_to_gguf.py, quantized to Q4_K_M, with the per-layer word table (per_layer_token_embd) at Q4_K

How it was tested

  • Drafts: messages people type at work and to friends and family, written only for testing and never shown to whoever wrote the lessons: 50 English drafts (Fix and all five tones), 82 Hindi and Hinglish drafts for Fix, and 240 tone answers on Hindi and Hinglish drafts.
  • Answers: through the same code the app uses. The trained models at temperature 0 with Iris's short prompts; the untrained model as Iris ran it before, with Iris's longer prompts (worked examples included) and its usual settings.
  • Judge: an AI model, blind: the answers of all three models to a draft were shown together in shuffled order, with no model names, and judged against written rules.
  • Fix "accepted": no real mistake left and nothing changed beyond trivial tidying (a reworded phrase, an expanded short form or a lost casual voice counts against it). For Hindi drafts: an accurate, natural English version.
  • Tones "would send": the writer could send it in place of the draft: the same meaning, the tone asked for, and it reads naturally.
  • The GGUF file was judged on the answers that differ from the MLX model's. Against the MLX model, counted over two judging rounds (MLX against the standard Q4_K_M, then that against this smaller file): English tones 2 fewer good answers of 200, Hindi and Hinglish Fix 1 fewer of 82, English Fix 1 more of 50 (the 4 answers that differ in the first round were read by hand and came out even). Funny and Hindi tones were not compared with the MLX model; against the standard Q4_K_M this file gave 2 fewer good Funny answers of 50 and the same on Hindi tones.

Limitations

  • Answers in English only. Hindi and Hinglish drafts are read and answered in English.
  • Not a chat assistant. It was trained for Fix and the five tones; questions or other tasks in a draft are rewritten, not answered. Picture input was not trained or tested.
  • Funny is the weakest tone: good enough to send 56% of the time in the test. Hindi is weaker on this model than on the E4B model.
  • Judged by an AI model, not by people. Its rules are strict, but it can still be wrong.
  • Not tested yet: an 8 GB Mac or a real Windows laptop, long documents (memory only), custom tones, a writer's own style rules, and the drafter in llama.cpp.
  • Iris checks every answer before showing it (for example, that names, links and code kept as placeholders come back exactly once). Used on its own, the model has no such checks.

About Iris

Iris is a grammar and tone app that runs entirely on your computer: press a shortcut in any app to fix or rewrite what you wrote. macOS now, Windows planned.

License

Apache License 2.0 (LICENSE). This is a modified version of Google's Gemma 4 E2B-it (google/gemma-4-E2B-it, Gemma 4 license): fine-tuned with LoRA on writing lessons, merged, quantized, audio weights removed.

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

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

GPU в ailist

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

Нельзя запустить

MLX-модели работают только на Apple Silicon, на GPU NVIDIA они не запускаются.

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

0 моделей