File size: 1,293 Bytes
c542bd2
 
06c4f74
 
 
 
 
 
 
 
 
 
c542bd2
 
 
 
 
 
06c4f74
c542bd2
06c4f74
 
c542bd2
06c4f74
c542bd2
06c4f74
c542bd2
06c4f74
c542bd2
06c4f74
c542bd2
06c4f74
c542bd2
06c4f74
c542bd2
06c4f74
 
 
c542bd2
06c4f74
 
 
 
 
 
 
c542bd2
06c4f74
 
 
 
 
 
 
 
 
 
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
---
library_name: transformers
tags:
- medical
datasets:
- kodetr/stunting-qa
language:
- id
metrics:
- accuracy
- bleu
pipeline_tag: question-answering
---

### Model Description

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

Konsultasi terkait stunting pada anak

- **Developed by:** Tanwir
- **Language(s) (NLP):** Indonesia

### Evaluation

**Evaluations:** GLUE

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

### Use with transformers

Starting with transformers >= 4.43.0 onward, you can run conversational inference using the Transformers pipeline abstraction or by leveraging the Auto classes with the generate() function.

Make sure to update your transformers installation via pip install --upgrade transformers.

```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": "Jelaskan definisi 1000 hari pertama kehidupan."},
    {"role": "user", "content": "Apa itu 1000 hari pertama kehidupan?"},
]
outputs = pipe(
    messages,
    max_new_tokens=256,
)
print(outputs[0]["generated_text"][-1])
```