/ Модель

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

Лицензия
CC BY-NC-SA 4.0
Базовая модель
gemma-4-E4B-it
Библиотека
gguf
Опубликована
3 ноя 2026

gemma-4-E4B-it-latex-copyedit

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

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

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

Локальная дообученная модель для точечной корректуры английских научных абзацев в LaTeX с выдачей списка исправлений.

Gemma-4-E4B-it LaTeX copy-editor v4 — локальная модель michelinolinolino для корректуры англоязычных научных абзацев в LaTeX. Она дообучена методом QLoRA на базе google/gemma-4-E4B-it и предназначена для выдачи построчного списка точечных исправлений грамматики, орфографии, пунктуации и словоупотребления либо ответа NO_ERRORS. Модель не переписывает абзац целиком; в README описано применение через Ollama, а готовая версия доступна в GGUF Q4_K_M и safetensors. Для обычного рабочего процесса предлагается применять правки только после проверки, что исходный фрагмент встречается ровно один раз и не затрагивает математические выражения или команды LaTeX.

Обучение выполнено на 82 889 примерах англоязычной научной прозы из датасета copyedit v4; зрения и аудио в базовой модели при дообучении не затрагивали. В оценке на тестовой выборке с фильтром уверенности 0,4 точность правок составила 0,53, полнота — 0,15; модель пропускает многие ошибки, а на корректных абзацах всё ещё может предлагать ложные исправления. Она рассчитана на английский и стиль научного редактирования конкретного издательского стандарта, не предназначена для перефразирования и не проверяет математику или цитирования. Лицензия — CC-BY-NC-SA-4.0.

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

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

Ограничения

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

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

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

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

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

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

Бенчмарки пользователейпока нет

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

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

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

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

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

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

    Модели ответят на каждую задачу, судья оценит ответы по шкале 0–100.

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

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

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

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

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

Открыть на Hugging Face

Gemma-4-E4B-it LaTeX copy-editor (v4)

A local model for always-on language feedback while writing LaTeX: inline grammar, spelling, punctuation and word-usage suggestions for scientific paragraphs, like a writing assistant's inline suggestions but running entirely on your machine (Ollama, ~0.8 s per paragraph on an M1 Pro).

It answers with an edit list, not a rewrite. The edits are applied to your own text, so math, \cite, \ref and \label outside the edited words cannot be damaged:

user:      In this paper we proposes a new method for sparse regression, which leverage a convex relaxation ...
assistant: proposes => propose
           leverage => leverages

or NO_ERRORS. Each line quotes a few words of the paragraph exactly (original => corrected).

Files

FileWhat
gemma-4-E4B-it-latex-copyedit-v4.Q4_K_M.ggufmerged model, Q4_K_M (5.3 GB), text only
ModelfileOllama model with the exact training chat format and system prompt, greedy decoding
adapter/the QLoRA adapter (PEFT, for unsloth/gemma-4-E4B-it-unsloth-bnb-4bit) + tokenizer / chat template
vscode-extension/latex-copyedit-0.4.1.vsixVS Code extension that shows the suggestions as diagnostics + quick fixes
eval/evaluation reports, confidence sweep and training summary

Use

hf download michelinolinolino/gemma-4-E4B-it-latex-copyedit --local-dir latex-copyedit
cd latex-copyedit && ollama create latex-copyedit -f Modelfile
code --install-extension vscode-extension/latex-copyedit-0.4.1.vsix      # optional: VS Code integration

Send the paragraph as the only user message (/api/chat, "think": false); the Modelfile supplies the system prompt the model was trained with: Copy-edit this LaTeX paragraph: one correction per line as `original words => corrected words`, or NO_ERRORS. Raw prompt format (Gemma 4): <bos><|turn>system\n{prompt}<turn|>\n<|turn>user\n{paragraph}<turn|>\n<|turn>model\n, stop at <turn|>.

Apply the edits with guards (as the VS Code extension and the evaluation do): drop an edit whose quoted words are not found exactly once in the paragraph, that would change math / \cite / \ref / \label, delete more than 8 words, add punctuation right after a display formula, or insert a word that is already next to it. Confidence: with Ollama's logprobs, score each line by its least likely token and hide lines below 0.4 (the extension's default). Lower it (0.3) for more fixes and more false alarms.

Evaluation

AESW gold edits are one editor's choices and are incomplete, so the precision numbers are pessimistic: many suggestions counted as wrong are valid corrections the editor did not make. False edits = share of already-correct paragraphs that receive any suggestion.

Q4_K_M GGUF in Ollama on an M1 Pro, held-out test split of copyedit v4 (1,874 paragraphs + 12 hand-written), with the guards above:

confidence filteredit P / R / F0.5false edits on correct textsuggestions per correct paragraphdamagedhand-written checks
none0.40 / 0.26 / 0.35926%0.550%18/29
≥ 0.30.46 / 0.21 / 0.37222%0.360%18/29
≥ 0.4 (default)0.53 / 0.15 / 0.35516%0.210%16/29
≥ 0.50.58 / 0.11 / 0.3089%0.120%15/29

The threshold was chosen on the validation split (eval/threshold_sweep_validation.md). Latency (sequential, one paragraph per request): median 0.84 s, p90 1.8 s, p99 3.2 s.

Against the prompted base model (4-bit, Kaggle T4, same 380 test paragraphs, no confidence filter):

modeledit P / R / F0.5false edits on correct textsuggestions per correct paragraphmalformed answers
Gemma-4-E4B-it (prompted with full instructions)0.18 / 0.21 / 0.18273%2.426%
this model0.42 / 0.29 / 0.38623%0.470%

It replaces the earlier Gemma-4-E2B v3 model (same test split, its best filter 0.25: 0.44 / 0.13 / 0.301, false edits 19%, 0.46 suggestions per correct paragraph): ΔF0.5 at 0.4 vs that model +0.054 [95% CI +0.030, +0.076].

Training

QLoRA (r 32, α 32, dropout 0) on the attention and MLP projections of the language model of unsloth/gemma-4-E4B-it-unsloth-bnb-4bit (vision/audio untouched), loss on the answer only, short system prompt (25 tokens), 1 epoch over the 82,889 training rows of copyedit v4 (dataset revision copyedit-v4): batch 4 × 2 accumulation × 2 GPUs (DDP), lr 2e-4 cosine, 60 warm-up steps, AdamW 8-bit, max 1,024 tokens; Unsloth 2026.10.11, Transformers 5.16.1, two Kaggle T4s, 5,181 steps in 7.8 h (Gemma 4 runs in float32 on T4s). Train loss 0.55. Merged and quantised to Q4_K_M with Unsloth / llama.cpp.

Limitations

  • English scientific prose (AESW: physics, mathematics, engineering, CS, 2006–2013 journal articles); house style of one copy-editing company (e.g. serial commas, e.g.,, hyphenated compounds).
  • Moderate recall: at the default filter it leaves many paragraphs the editors changed untouched (58%). It catches clear errors (agreement, articles, typos, confusables) much better than optional style edits.
  • Not a rewriting / paraphrasing model, and it does not check math or citations.

Licence and attribution

The training data is CC-BY-NC-SA-4.0, so this model is released under CC-BY-NC-SA-4.0 (non-commercial, share-alike); the base model (Gemma 4) is Apache-2.0. The AESW data set carries additional restrictions that also apply here: no direct or indirect data engineering or mining aimed at detecting the personal identity of the authors of the texts, and no derivative data that facilitates it.

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

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

GPU в ailist

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

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

Подбираем GPU…

Ревизия весов
598e5ee

0 моделей