Request access to gemma-4-31b-protokoll

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

This adapter is derived from Google's Gemma and is distributed under the Gemma Terms of Use and the Gemma Prohibited Use Policy, which you accept by requesting access. It was trained on public committee sittings of the Landtag Brandenburg; any use must attribute that source. Access is granted manually while the terms of publication are being settled.

Log in or Sign Up to review the conditions and access this model content.

gemma-4-31b-protokoll

A LoRA adapter for google/gemma-4-31B-it that writes German committee protocols from the automatic transcript of a sitting.

Give it the transcript of a single agenda item and it returns the protocol section for that item. Give it a whole sitting whose agenda items are identifiable in the text and it returns a protocol covering the sitting, one ## Zu TOP n: (Tagesordnungspunkt) section per item. The per-item mode is the better supported of the two: most training examples are single items, and whole-sitting examples exist only for a few sittings.

This is an adapter of 234 MB, not a standalone model. You need access to the Gemma base model to use it. Its output is a draft that a person is expected to check against the transcript or the recording.

What it learned from

The adapter was trained on public committee sittings of the Landtag Brandenburg. Two sources are paired for every example: the audio recording of the sitting, and the protocol that the committee secretariat published for it.

One training example pairs a stretch of transcript with the protocol text recording the same business. The protocols were written by the secretariats and follow their house conventions, and that is where the register of the output comes from: decisions and vote results under Beschlüsse und Festlegungen, the course of the debate under Aus der Beratung, statements rendered in indirect speech using Konjunktiv I. The model learns this convention from the data rather than from instructions.

All source material is public. The recordings are available in the Mediathek of the Landtag Brandenburg and the protocols are published parliamentary documents.

Intended use

Drafting the prose of a committee protocol from a diarised transcript, in the register used by the committee secretariats of the Landtag Brandenburg.

The adapter was built for the minutes assistant developed alongside it, pilotproject-protokollierungsassistenz, which handles transcription, speaker naming and the assignment of transcript segments to agenda items, then calls this adapter per item. It is not tied to that application: anything that can produce the prompt described under Prompt contract below can use it.

How to get started

The conventional PEFT path against the full-precision base:

from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel

base = "google/gemma-4-31B-it"
tok = AutoTokenizer.from_pretrained(base)
model = AutoModelForCausalLM.from_pretrained(base, device_map="auto", dtype="bfloat16")
model = PeftModel.from_pretrained(model, "aihpi/gemma-4-31b-protokoll")

messages = [{"role": "system", "content": SYSTEM_PROMPT},
            {"role": "user", "content": USER_MESSAGE}]
ids = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt")
out = model.generate(ids.to(model.device), max_new_tokens=4096, temperature=0.3, top_p=0.9)
print(tok.decode(out[0][ids.shape[-1]:], skip_special_tokens=True))

SYSTEM_PROMPT and USER_MESSAGE are given verbatim under Prompt contract below. Four practical notes:

  • Under the Unsloth loader, Gemma 4's chat template expects typed content parts and accepts no separate system role, so system and user have to be folded into a single user turn there.
  • Generation should stop on <turn|> as well as the base end-of-sequence token, otherwise the tail fills with repetition.
  • The adapter was trained against the 4-bit quantised base unsloth/gemma-4-31b-it-unsloth-bnb-4bit while declaring the full-precision base in its configuration. Output on the fp16 base is close to, but not identical to, what the production service returns.
  • Serving defaults in production are temperature 0.3, top_p 0.9, no repetition penalty.

Training data

Training records 1,115
Validation records 106
Time span of the sittings 7 November 2019 to 15 April 2026

Length and compression

Measure Median 95th pct. 99th pct. Maximum
Tokens per example 4,182 20,834 35,066 47,138
Tokens per sitting 16,898 71,848 93,402 119,567
Words in the transcript segment 1,416 8,644 15,120 28,326
Words in the protocol section 659 3,781 8,408 18,665

Preprocessing

Five stages, all of them in the training repository.

  1. Transcription. WhisperX with Whisper large-v3, speaker segmentation with pyannote. The output is a time-stamped transcript in which each speaker is an anonymous label such as SPEAKER_07.
  2. Protocol conversion. Docling converts the PDF to text. The cover page carrying the attendance list and the agenda is separated from the body; attachments, page footers and hyperlinks are removed.
  3. Agenda tagging. A large language model (gpt-oss-120b) reads the agenda from the protocol cover and locates the point in the transcript where the chair takes up each item, splitting the transcript into one segment per item.
  4. Speaker resolution. Rule-based matching against the attendance list and the protocol text, together with a model-based tier that reads the transcript itself, replaces the anonymous labels with a name and role. 3,050 of 3,898 labels were resolved, which is 78 per cent.
  5. Pairing and filtering. Each transcript segment is paired with the protocol section of the same number. Sittings for which no per-item split could be made are kept as a single whole-sitting example where the protocol is long enough.

What was removed, and why:

Reason Records Disposition
Contains a speaker whose name could not be established 488 dropped
No agenda alignment and the protocol too short to be a target 47 dropped
Exceeds the context window during training 13 dropped
Protocol section shorter than 32 tokens 10 dropped

Training procedure

Method QLoRA. The base is frozen in 4-bit precision, only the adapter is trained
Base used for training unsloth/gemma-4-31b-it-unsloth-bnb-4bit
Base declared for serving google/gemma-4-31B-it
Adapter rank 8, alpha 8, dropout 0, on all attention and feed-forward projections
Loss computed on the protocol section only, not on the instructions or the transcript
Optimiser AdamW 8-bit, learning rate 2e-4 with linear decay, 5 warm-up steps, weight decay 0.001
Batch one example per step, gradients accumulated over four steps
Schedule 3 epochs, evaluation each epoch, best checkpoint kept, early stopping patience 3
Sequence cap 49,152 tokens
Hardware one NVIDIA H100 80 GB, 19.5 hours
Software Unsloth 2026.6.7, Transformers 5.5.0, PyTorch 2.11, PEFT, TRL
Final training loss 0.2054
Best validation loss 0.6927

Limitations

  • Party labels and document numbers can be invented. Check every bracketed party affiliation and every Drucksache number against the agenda.
  • Length control is unreliable. The output can be considerably shorter than the material warrants, and a repetition-penalised decode can over-segment a sitting into more sections than it has agenda items.
  • Long agenda items degrade. Above roughly 20,000 words of transcript the end of a section can repeat or break off mid-sentence.
  • Confabulation from thin input. Given very little transcript it will still produce a confident, plausible and fictitious protocol.
  • Scope. German only, and the conventions of Landtag Brandenburg committees.
  • Speaker names come from the input. Where the pipeline could not resolve a speaker the adapter leaves the placeholder rather than inventing a name, but it cannot correct a name the transcript gets wrong.

Prompt contract

The adapter was trained on one exact system prompt and one exact user framing, and its output degrades without them.

System prompt:

Du bist Protokollführer/in eines Ausschusses. Wandle das wörtliche Transkript des folgenden Tagesordnungspunkts (TOP) in den entsprechenden Abschnitt eines formellen Ausschussprotokolls im amtlichen Stil um.

Sprache und Stil:
- Schreibe ausschließlich auf Deutsch in korrektem, sachlichem Verwaltungsdeutsch.
- Gib Wortbeiträge in indirekter Rede (Konjunktiv I) und in der dritten Person wieder (z. B. „Er betont, dass …“, „Sie verweist darauf, dass …“).
- Nenne Sprecher/innen mit Name und, wenn bekannt, Rolle/Fraktion, z. B. „Gustav Gans“, „Kristy Augustin (CDU)“, „Steffen Freiberg (Minister für Bildung, Jugend und Sport)“.

Formatierung:
- Beginne mit der Überschrift „## Zu TOP N:“ (N ist die Nummer aus der vorangestellten „TOP:“-Angabe).
- Formuliere Beschlüsse als „Der [Gremium] beschließt einstimmig/mehrheitlich (Ja : Nein : Enthaltungen) …“ und gib Abstimmungsergebnisse stets als konkretes Tripel (Ja : Nein : Enthaltungen) bzw. als „einstimmig“/„mehrheitlich“ an — niemals als leeren Platzhalter.
- Trenne, sofern vorhanden, Beschlüsse/Festlegungen von der Zusammenfassung der Beratung („Aus der Beratung“).

Umgang mit dem Rohmaterial (Transkript):
- Das Transkript ist eine automatische Verschriftlichung (ASR) mit Sprecher-Diarisierung; jede Zeile hat die Form „Name: Wortbeitrag“ und kann Erkennungsfehler enthalten, die NICHT ins Protokoll gehören.
- Ignoriere offensichtliche Transkriptionsfehler und sinnlose Wiederholungen (z. B. mehrfach hintereinander „Vielen Dank.“); wiederhole sie nicht und werte sie nicht als Inhalt.

Inhaltliche Treue:
- Fasse ausschließlich zusammen, was tatsächlich gesagt wurde. Füge keine Inhalte, Wertungen oder Fakten hinzu, die nicht im Transkript stehen, und verändere oder verfälsche keine Aussagen (auch keine Namen oder Zahlen).
- Im Zweifel knapper und näher am Wortlaut bleiben.

User message:

Erstelle eine Zusammenfassung für folgenden Tagesordnungspunkt:

TOP: <agenda item title>

Transkript:
<Name: utterance lines, one per speaker turn, consecutive turns of the same speaker merged>

Zusammenfassung:

The transcript lines carry no timestamps and no speaker markers. Unresolved speakers may remain as SPEAKER_07; the adapter then leaves them unnamed rather than inventing a name.

Provenance and licence

  • Weights. Gemma Terms of Use and the Gemma Prohibited Use Policy, inherited from the base model. The MIT licence of the training code does not extend to them.
  • Training code. MIT, at aihpi/pilotproject-automatic-protocols.
  • Source material. Landtag Brandenburg. Recordings from the Mediathek, protocols as published parliamentary documents.

Zusammenfassung auf Deutsch

Dieser LoRA-Adapter für google/gemma-4-31B-it erzeugt aus dem automatischen Transkript einer Ausschusssitzung den zugehörigen Protokolltext im Stil der Ausschusssekretariate des Landtages Brandenburg. Er kann einen einzelnen Tagesordnungspunkt verarbeiten oder eine ganze Sitzung, sofern deren Tagesordnungspunkte im Text erkennbar sind. Grundlage sind öffentliche Ausschusssitzungen und die dazu veröffentlichten Protokolle.

Das Ergebnis ist ein Entwurf. Die Verantwortung für die Richtigkeit des Protokolls liegt bei der Nutzerin oder dem Nutzer. Bitte prüfen Sie besonders: Sprechernamen und Zuordnung, Fraktionsangaben in Klammern (diese werden auch dann ergänzt, wenn sie im Transkript fehlen), Drucksachennummern, Abstimmungsergebnisse und Beschlusswortlaut, Verweise auf Anlagen sowie Daten und Fristen. Bei sehr langen Tagesordnungspunkten kann der Text am Ende abbrechen oder sich wiederholen.

Kontakt: kisz@hpi.de

Versions

Version Date Validation loss Notes
v1.0 September 2026 0.6927 first release, in production

Citation

@misc{mueller2026protokoll,
  author       = {Müller, Hanno},
  title        = {gemma-4-31b-protokoll: a LoRA adapter for German committee protocols},
  year         = {2026},
  publisher    = {Hugging Face},
  howpublished = {\url{https://huggingface.co/aihpi/gemma-4-31b-protokoll}},
  note         = {Training code: \url{https://github.com/aihpi/pilotproject-automatic-protocols}}
}

Developed at the AI Service Centre Berlin-Brandenburg (KISZ) at the Hasso Plattner Institute, funded by the Federal Ministry of Research, Technology and Space under funding code 16IS22092.

Contact: kisz@hpi.de

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for aihpi/gemma-4-31b-protokoll

Adapter
(306)
this model