LoRA adapter for Qwen3.5-9B that
marks animals in Early Modern and 18th–19th-century Dutch text. For each
sentence it answers with the task's JSON schema
({"spans": [{"text": ..., "label": "Animal"}]}). With genannote, decoding
runs under a hard JSON-schema constraint (outlines).
It was trained without any human-labelled training data: on the same
2,250 sentences, labelled by gpt-6-luna, as
gysbert-animals-nov26-v2,
and it scores about 9 points higher than that GysBERT model. It is an
experiment in building a tagger without human labels, not a finished
research instrument.
Animal marks a word or phrase that names an animal: a whole animal of any kind (also specific young-animal words like veulen, kalf), a group of animals (vee, Dieren), eggs or larvae treated as animals, an animal word used figuratively (also for a person: wat ben jij een ezel), or a dead animal written about as an animal. Not marked: people and human body parts, the general jongen, parts of animals, animal products and food (herring sold or eaten), and compounds mainly about something else (Haringh-vanghst). Spans are the animal noun, with a modifier only when it says which animal is meant (woldraghende vee).
The full guidelines (prompt v3) are in task.json. The adapter was trained
with these instructions as the system prompt, so pass the same prompt at
inference.
gpt-6-luna (reasoning effort medium) under the v3 guidelines. They
were chosen by an active-learning loop with a GysBERT student from a pool
of 940,472 DBNL sentences: half found by a yes/no animal filter, the rest
the sentences GysBERT was least sure about, plus 125 random ones. Every
sentence of the books the dev and test sets come from was removed from the
pool, as were near-copies of the evaluation sentences.Scores are token-level and positives-only, plus span-level F1, computed with genannote after reloading the saved adapter.
Test set: the animals_ner_dutch test set, 250 sentences from 7 DBNL
texts, gold-standard annotations.
| Model | token F1 (P / R) | span F1 |
|---|---|---|
| this adapter | 0.890 (0.96 / 0.83) | 0.881 |
| gysbert-animals-nov26-v2 (same labels) | 0.801 (0.89 / 0.73) | 0.763 |
gpt-6-luna, zero-shot (the teacher) |
0.961 (0.96 / 0.97) | 0.953 |
The v3 guidelines were written from the teacher's mistakes on this test set, which flatters the teacher's score here.
Check set: the 1,192 human-checked sentences of the animals_ner_dutch
training set, which this adapter never trained on (some come from the same
DBNL books as its training sentences).
| Model | token F1 (P / R) | span F1 |
|---|---|---|
| this adapter | 0.872 (0.90 / 0.85) | 0.873 |
| gysbert-animals-nov26-v2 (same labels) | 0.780 (0.84 / 0.73) | 0.782 |
gpt-6-luna, zero-shot (the teacher) |
0.902 (0.92 / 0.89) | 0.897 |
metrics.json has the full scores for both sets.
from huggingface_hub import hf_hub_download
from genannote.tasks import load_task_from_file
from genannote.trainers.hf_causal import HFCausalAnnotator
from genannote.core import Example
repo = "ArjanvD95/qwen35-9b-animals-nov26-v1"
task = load_task_from_file(hf_hub_download(repo, "task.json"))
ann = HFCausalAnnotator.from_pretrained(repo, task=task, dtype="bfloat16")
pred = ann.predict([Example(id="1", text="Den Vos sach van verre den Leeu.")])[0]
print(pred.label.spans)
Without genannote: load Qwen/Qwen3.5-9B with this adapter (PEFT), apply the
tokenizer's chat template to a system message with task.json's
instructions and a user message with the sentence, with
add_generation_prompt=True and enable_thinking=False, and generate until
the end-of-turn token. Decoding is then unconstrained, so validate the JSON.
Qwen/Qwen3.5-9B