Downloads · 30 days
16
30% of all-time downloads
rumeshmohan/kila-qwen2.5-7b-adapter
kila-qwen2.5-7b-adapter is a text generation model from rumeshmohan. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
A QLoRA adapter fine-tuned on Kila (Kirjanpitolautakunta) corpus — Finland's official accounting standards board. The adapter specialises Qwen2.5-7B-Instruct on Finnish accounting statements, exemptions, and general g…
Downloads · 30 days
16
30% of all-time downloads
All-time downloads
53
Public
Repo size
173 MB
Likes
0
Public
Click a slice to open those files.
.safetensors162 MB · 93%
From the Hugging Face model README
A QLoRA adapter fine-tuned on Kila (Kirjanpitolautakunta) corpus — Finland's official accounting standards board. The adapter specialises Qwen2.5-7B-Instruct on Finnish accounting statements, exemptions, and general guidelines (yleisohjeet) to improve factual accuracy on Finnish GAAP questions.
Qwen/Qwen2.5-7B-InstructSynthetic Finnish Q&A pairs generated from Kila corpus chunks (statements, exemptions, general guidelines). Data pipeline:
sources/kila/{date}/chunks_part-*.parquetchunk_hashGroq llama-3.3-70b-versatiledocument_id (no document appears in both splits)Dataset size:
synthetic_kila_train.jsonl (~1,878 KB)synthetic_kila_val.jsonl (~233 KB)| Parameter | Value |
|---|---|
| Training regime | bf16 mixed precision |
LoRA rank (r) | 16 |
| LoRA alpha | 32 |
| LoRA dropout | 0.05 |
| Target modules | q_proj, k_proj, v_proj, o_proj |
| Epochs | 3 |
| Batch size (per device) | 2 |
| Gradient accumulation steps | 4 |
| Learning rate | 2e-4 |
| LR scheduler | cosine |
| Warmup steps | 10 |
| Max sequence length | 2048 |
| Optimizer | paged_adamw_32bit |
bf16=True, gradient_checkpointing_kwargs={"use_reentrant": False}Judge: Groq llama-3.3-70b-versatile (temp=0.0)
Rubric (1–5 scale):
correctness — factual accuracy per Kila / kirjanpitolakigrounding — references authoritative sourcesfluency — professional Finnish grammarResults are reported in eval_summary.csv comparing base model vs fine-tuned adapter on ~12 Finnish accounting questions grounded in specific Kila documents.
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
import torch
base_model_id = "Qwen/Qwen2.5-7B-Instruct"
adapter_path = "rumeshmohan/kila-qwen2.5-7b-adapter"
tokenizer = AutoTokenizer.from_pretrained(base_model_id)
model = AutoModelForCausalLM.from_pretrained(
base_model_id,
torch_dtype=torch.bfloat16,
device_map="auto"
)
model = PeftModel.from_pretrained(model, adapter_path)
model.eval()
messages = [
{"role": "system", "content": "Olet suomalaisen kirjanpidon asiantuntija."},
{"role": "user", "content": "Miten tutkimusmenot käsitellään kirjanpidossa?"}
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=512,
temperature=0.1,
top_p=0.9,
do_sample=True
)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))