LIRA โ€” Gemma 3 1B, Italian

Italian personal-finance question answering, grounded in material published by CONSOB, that writes the same answer at three different reading levels.

Design label: gemma3-1b_ita_siaddestr_sipar_3reg โ€” trained with the retrieved paragraphs in the prompt and with all three registers. This is the deployed configuration of the LIRA system.

What is in this repository

file what it is size
adapter_model.safetensors + adapter_config.json the LoRA adapter for google/gemma-3-1b-it 26 MB
lira-gemma3-1b-ita-sipar-3reg-Q8_0.gguf base model with the adapter merged in, 8-bit 1069 MB
lira-gemma3-1b-ita-sipar-3reg-Q4_K_M.gguf the same, 4-bit โ€” about half the space, for phones 806 MB

The two GGUF files are the same model, only quantised differently. Pick Q8_0 unless memory is tight.

How to prompt it โ€” read this first

The adapter is trained for retrieval-augmented use and will not behave correctly without the retrieved passages. Every training example carries six passages in the system prompt, so it has to be prompted the same way:

Sei un assistente di finanza personale. L'utente ha conoscenze di finanza intermedie. Puoi introdurre alcuni termini tecnici, ma sempre accompagnati da una spiegazione.

REGOLE: Rispondi SOLO usando i documenti seguenti. Non inventare. Non dare consigli specifici di investimento. Rispondi in italiano in modo conciso.

DOCUMENTO [<id del passaggio>]:
<testo del passaggio>

DOCUMENTO [<id del passaggio>]:
<testo del passaggio>

... sei in tutto ...

followed by the user's question as a normal user turn.

The sentence about the reader's level is what selects the register. There are three, and they are the exact strings the model was trained on:

register sentence
base L'utente ha conoscenze base di finanza. Usa spiegazioni semplici e esempi pratici. Evita termini tecnici o complessi.
intermediate L'utente ha conoscenze di finanza intermedie. Puoi introdurre alcuni termini tecnici, ma sempre accompagnati da una spiegazione.
advanced L'utente ha conoscenze avanzate di finanza personale. Evita spiegazioni eccessivamente basilari, puoi usare termini tecnici e spiegazioni piรน approfondite.

Swap that sentence and the same question comes back rewritten for that reader โ€” shorter and plainer for base, roughly three times longer for advanced.

Quick start

With llama.cpp (4-bit):

llama-server -hf Stee201/lira-gemma3-1b-ita-sipar-3reg:Q4_K_M

With transformers + peft (the adapter on top of the base model):

from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel

base = "google/gemma-3-1b-it"
model = AutoModelForCausalLM.from_pretrained(base, dtype="float16", device_map="auto")
model = PeftModel.from_pretrained(model, "Stee201/lira-gemma3-1b-ita-sipar-3reg")
tok = AutoTokenizer.from_pretrained(base)

messages = [
    {"role": "system", "content": system_prompt_with_six_passages},
    {"role": "user", "content": question},
]
ids = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt")
print(tok.decode(model.generate(ids.to(model.device), max_new_tokens=512)[0]))

Retrieval in the paper is plain BM25 Okapi over 522 CONSOB paragraphs, top 6 โ€” the same retriever at training and at serving time.

How well it does

register correctness groundedness
base 2.83 4.21
intermediate 3.35 4.77
advanced 2.86 3.95

Judge: Unbabel/M-Prometheus-14B, 1โ€“5, on 174 held-out questions that appear nowhere in training.

Without the retrieved passages, correctness at intermediate drops to 1.92 (from 3.35): the model is trained to compose its answer out of the documents, so it depends on them.

Groundedness at advanced is lower than at intermediate across all six models. That is a property of the register, not invention: of the words used in the answers the judge marked down, only ~1.6% appear in none of the six passages โ€” the same share as in the answers it approved.

Training

LoRA rank 8, alpha 16, dropout 0.05, on the attention and feed-forward projections, loss on the answer tokens only. 4 epochs, learning rate 5e-5, checkpoint chosen by lowest validation loss. Passage order is shuffled per example and per epoch.

Training examples are byte-for-byte identical in shape to what the server sends (persona + level instruction + six documents + question); the base and advanced variants of each answer were generated by a language model constrained to rephrase only the aligned source paragraph, then filtered by six automatic checks.

Limitations

  • It needs its passages. Correctness without them is far below the numbers above.
  • It is grounded in CONSOB material only, and answers nothing outside it.
  • It gives no specific investment advice, by construction, and must not be used as financial advice.
  • The judge is a model (M-Prometheus-14B), not a human panel.

The other five models

The GGUF files contain Gemma 3 weights with the adapter merged in, so they are governed by the Gemma Terms of Use and the Prohibited Use Policy, which carry over to anyone who downloads them. The LoRA adapter alone is our own work.

Replaces Stee201/gemma3-1b-finance-it, which held the same adapter under the older naming and only the 8-bit file.

Downloads last month
90
GGUF
Model size
1.0B params
Architecture
gemma3
Hardware compatibility
Log In to add your hardware

4-bit

8-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for Stee201/lira-gemma3-1b-ita-sipar-3reg

Adapter
(198)
this model

Collection including Stee201/lira-gemma3-1b-ita-sipar-3reg