metadata
library_name: transformers
license: mit
language:
- id
metrics:
- bleu
- bertscore
base_model:
- meta-llama/Llama-3.2-1B
pipeline_tag: text-generation
datasets:
- kodetr/hukum-indo-qa-v1
Model Description
Konsultasi(Q&A) hukum di indonesia menggunakan ai
- Developed by: Tanwir
- Language : Indonesia
Training
Information Result Training
Evaluation (ROUGE)
- ROUGE Base Model: {'rouge1': 0.010078955805785689, 'rouge2': 0.0010782076211080282, 'rougeL': 0.008359498894171894, 'rougeLsum': 0.008501491288108246}
- ROUGE Finetuned Model: {'rouge1': 0.012345676185364394, 'rouge2': 0.0015236094542167386, 'rougeL': 0.010369116143308318, 'rougeLsum': 0.010345376512436985}
BERTSCORE
- BERTScore Base Model - F1: 0.5445
- BERTScore Finetuned Model - F1: 0.5520
Use with transformers
Pastikan untuk memperbarui instalasi transformer Anda melalui pip install --upgrade transformer.
import torch
from transformers import pipeline
model_id = "kodetr/hukum-indo-qa-v1"
pipe = pipeline(
"text-generation",
model=model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
)
messages = [
{"role": "system", "content": "Undang-undang yang sifatnya lex specialis untuk DPRD, apakah UU No.17 Tahun 2014 atau UU No.23 Tahun 2014?"},
{"role": "user", "content": ""},
]
outputs = pipe(
messages,
max_new_tokens=256,
)
print(outputs[0]["generated_text"][-1])