Views
No views yet
1<start_of_turn>system
2Kizárólag a megadott kontextus alapján válaszolj a kérdésre!<end_of_turn>
3<start_of_turn>user
4Kérdés: {question}
5Kontextus: {context}<end_of_turn>
6<start_of_turn>model
7{answer}<end_of_turn>| Metric | Value |
|---|---|
| n_samples | 113.0000 |
| exact_match | 61.9469 |
| token_f1 | 66.5318 |
| rouge_l | 66.0725 |
Training Regime: Mixed Precision (bf16), LoRA (r=64, alpha=64)
Target Modules: q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj
Optimizer: adamw_8bit
Learning Rate: 2e-5
Learning Rate Scheduler: Cosine with 20 warmup steps
Epochs: 2
Batch Size: 1 (with gradient accumulation steps = 16 -> effective batch size 16)
Maximum Sequence Length: 9216 tokens
Weight Decay: 0.001
Loss Masking: Trained on assistant responses only (ignoring prompt/user loss)
Gradient Checkpointing: Unsloth optimized1from unsloth import FastLanguageModel
2from transformers import TextStreamer
3import torch
4
5model, tokenizer = FastLanguageModel.from_pretrained(
6 model_name="GaborMadarasz/gemma_3_270_HuHotPotQA_4bit",
7 max_seq_length=9216,
8 load_in_4bit=False,
9)
10
11messages = [
12 {"role": "system", "content": "Kizárólag a megadott kontextus alapján válaszolj a kérdésre!"},
13 {"role": "user", "content": "Kérdés: Kik a főszereplői az 1956-os forradalomnak?\\nKontextus: Az 1956-os forradalom és szabadságharc..."},
14]
15
16text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True).removeprefix('<bos>')
17inputs = tokenizer(text, return_tensors="pt").to("cuda")
18
19_ = model.generate(
20 **inputs,
21 max_new_tokens=256,
22 temperature=1.0,
23 top_p=0.95,
24 top_k=64,
25 do_sample=True,
26 streamer=TextStreamer(tokenizer, skip_prompt=True),
27)
28It may hallucinate facts not present in the provided context.
It might struggle with highly complex reasoning that requires more than 2-3 steps of deduction, despite being trained on multi-step QA.
Performance is highly dependent on the quality and relevance of the provided context.
Being based on Gemma-3, it inherits the base model's biases and safety guardrails.1@software{gemma_3_huhotpotqa,
2 title = {Gemma-3-270m Finetuned on HuHotpotQA},
3 author = {Gabor Madarasz},
4 year = {2026},
5 publisher = {Hugging Face},
6 url = {https://huggingface.co/GaborMadarasz/gemma_3_270m_HuHotPotQA_16bit}
7}