Views
No views yet
Qwen/Qwen2.5-7B-Instructsources/kila/{date}/chunks_part-*.parquetchunk_hashGroq llama-3.3-70b-versatiledocument_id (no document appears in both splits)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}llama-3.3-70b-versatile (temp=0.0)correctness — factual accuracy per Kila / kirjanpitolakigrounding — references authoritative sourcesfluency — professional Finnish grammareval_summary.csv comparing base model vs fine-tuned adapter on ~12 Finnish accounting questions grounded in specific Kila documents.1from transformers import AutoTokenizer, AutoModelForCausalLM
2from peft import PeftModel
3import torch
4
5base_model_id = "Qwen/Qwen2.5-7B-Instruct"
6adapter_path = "rumeshmohan/kila-qwen2.5-7b-adapter"
7
8tokenizer = AutoTokenizer.from_pretrained(base_model_id)
9model = AutoModelForCausalLM.from_pretrained(
10 base_model_id,
11 torch_dtype=torch.bfloat16,
12 device_map="auto"
13)
14model = PeftModel.from_pretrained(model, adapter_path)
15model.eval()
16
17messages = [
18 {"role": "system", "content": "Olet suomalaisen kirjanpidon asiantuntija."},
19 {"role": "user", "content": "Miten tutkimusmenot käsitellään kirjanpidossa?"}
20]
21
22text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
23inputs = tokenizer(text, return_tensors="pt").to(model.device)
24
25with torch.no_grad():
26 outputs = model.generate(
27 **inputs,
28 max_new_tokens=512,
29 temperature=0.1,
30 top_p=0.9,
31 do_sample=True
32 )
33
34print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))