File size: 1,711 Bytes
14e2b69
 
6a6ccc4
 
 
 
 
 
 
 
 
14e2b69
 
 
 
 
 
6a6ccc4
14e2b69
6a6ccc4
 
14e2b69
6a6ccc4
14e2b69
6a6ccc4
14e2b69
6a6ccc4
14e2b69
6a6ccc4
14e2b69
6a6ccc4
14e2b69
6a6ccc4
 
14e2b69
6a6ccc4
14e2b69
6a6ccc4
 
14e2b69
6a6ccc4
14e2b69
6a6ccc4
14e2b69
6a6ccc4
 
 
14e2b69
6a6ccc4
 
 
 
 
 
 
14e2b69
6a6ccc4
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
---
library_name: transformers
license: mit
language:
- id
metrics:
- bleu
- bertscore
base_model:
- meta-llama/Llama-3.2-1B
pipeline_tag: text-generation
---

### Model Description

<!-- Provide a longer summary of what this model is. -->

Konsultasi(Q&A) hukum di indonesia menggunakan ai

- **Developed by:** Tanwir
- **Language :** Indonesia

### Training

![image/png](https://cdn-uploads.huggingface.co/production/uploads/65d6d2f8b06abf924b24349d/OwNXqmQIslGJkfEZ9HPin.png)

### Information Result Training

![image/png](https://cdn-uploads.huggingface.co/production/uploads/65d6d2f8b06abf924b24349d/t_jkAFJcEjZLyikzGRZaE.png)

### 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.

```python
import torch
from transformers import pipeline

model_id = "kodetr/stunting-qa-v3"
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])
```