Downloads · 30 days
3
6% of all-time downloads
DomainLLM/gemma-3-12b-it-german-geralayqa-paraphrased-lora
gemma-3-12b-it-german-geralayqa-paraphrased-lora is a question answering model from DomainLLM. Use it when the input is a question plus a passage. It is set up for peft. The card lists the license as apache-2.0.
This is a LoRA (Low-Rank Adaptation) adapter for the Gemma 3 12B Instruct model, fine-tuned on the German legal question-answering dataset (GerLayQA paraphrased).
Downloads · 30 days
3
6% of all-time downloads
All-time downloads
50
Public
Repo size
434 MB
Likes
0
Public
Click a slice to open those files.
.safetensors262 MB · 60%
From the Hugging Face model README
This is a LoRA (Low-Rank Adaptation) adapter for the Gemma 3 12B Instruct model, fine-tuned on the German legal question-answering dataset (GerLayQA paraphrased).
To use this adapter with the base model:
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
# Load base model
base_model = AutoModelForCausalLM.from_pretrained(
"unsloth/gemma-3-12b-it",
device_map="auto",
torch_dtype="auto"
)
# Load tokenizer
tokenizer = AutoTokenizer.from_pretrained("unsloth/gemma-3-12b-it")
# Load LoRA adapter
model = PeftModel.from_pretrained(base_model, "DomainLLM/gemma-3-12b-it-german-geralayqa-paraphrased-lora")
# Generate text
prompt = "Was ist ein Werkvertrag nach deutschem Recht?"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
If you want to merge the LoRA weights into the base model:
from transformers import AutoModelForCausalLM
from peft import PeftModel
# Load base model
base_model = AutoModelForCausalLM.from_pretrained(
"unsloth/gemma-3-12b-it",
device_map="auto",
torch_dtype="auto"
)
# Load and merge LoRA adapter
model = PeftModel.from_pretrained(base_model, "DomainLLM/gemma-3-12b-it-german-geralayqa-paraphrased-lora")
merged_model = model.merge_and_unload()
# Save merged model
merged_model.save_pretrained("./merged-gemma-german-legal")
This model is designed for:
If you use this model, please cite:
@misc{gemma-german-legal-lora,
title={Gemma 3 12B IT - German Legal QA LoRA Adapter},
author={DomainLLM},
year={2025},
howpublished={\url{https://huggingface.co/DomainLLM/gemma-3-12b-it-german-geralayqa-paraphrased-lora}}
}
This adapter is released under the Apache 2.0 License, consistent with the base Gemma model.