Gemma-4-31B HebNLI LoRA adapter

LoRA adapter (rank 16, alpha 32, all linear projection matrices, bfloat16) that adapts google/gemma-4-31B to 3-class Hebrew NLI on HebNLI. It is one of the Strategy 2 denoisers of the HeRE paper. The model is prompted as

משפט 1: {premise} משפט 2: {hypothesis}

and the label is read from the first generated token (היסק = entailment, סתירה = contradiction, ניטרלי = neutral); in HeRE the soft score is derived from the first-token log-probabilities of the three label tokens.

Training

Learning rate 5e-5, batch size 16, up to 8,000 steps; the checkpoint with the best validation macro-F1 was retained (step 7,920). Single run, seed 42.

Results

HebNLI dev macro-F1 HebNLI test macro-F1 HeRE gold validation F1
Gemma-4-31B 0.870 0.905 0.849 (Strategy 2, template hypothesis).

Usage

from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
tok = AutoTokenizer.from_pretrained("ronke21/hebnli-gemma-4-31b-lora")
model = AutoModelForCausalLM.from_pretrained("google/gemma-4-31B", torch_dtype="bfloat16", device_map="auto")
model = PeftModel.from_pretrained(model, "ronke21/hebnli-gemma-4-31b-lora")

License

The adapter is released under the base model's license (apache-2.0); using it requires accepting the base model's terms. Paper resources: dataset https://huggingface.co/datasets/ronke21/HeRE, code https://github.com/Ronke21/HeRE.

Citation

Keinan, R., Cohen, A. D. N., and Tsarfaty, R. (2026). HeRE: A Novel Benchmark for Hebrew Relation Extraction via LLM-Guided Denoising of Knowledge Graph Alignments. In Proceedings of the 15th International Joint Conference on Natural Language Processing and the 5th Conference of the Asia-Pacific Chapter of the Association for Computational Linguistics (Volume 1: Long Papers), pages 5311-5329, Hengqin, China. Association for Computational Linguistics. https://aclanthology.org/2026.aacl-long.237/

@inproceedings{keinan-etal-2026-novel,
    title = "{H}e{RE}: A Novel Benchmark for {H}ebrew Relation Extraction via {LLM}-Guided Denoising of Knowledge Graph Alignments",
    author = "Keinan, Ron  and
      Cohen, Amir David Nissan  and
      Tsarfaty, Reut",
    editor = "Zhang, Yue  and
      Xu, Ruifeng  and
      Purwarianti, Ayu  and
      Rong, Tong  and
      Suzuki, Jun",
    booktitle = "Proceedings of the 15th International Joint Conference on Natural Language Processing and the 5th Conference of the {A}sia-Pacific Chapter of the {A}ssociation for {C}omputational {L}inguistics (Volume 1: Long Papers)",
    month = nov,
    year = "2026",
    address = "Hengqin, China",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2026.aacl-long.237/",
    doi = "10.18653/2026.aacl-long.237",
    pages = "5311--5329",
    ISBN = "979-8-89176-439-2"
}
Downloads last month
33
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for ronke21/hebnli-gemma-4-31b-lora

Adapter
(4)
this model

Collection including ronke21/hebnli-gemma-4-31b-lora