File size: 2,270 Bytes
e989a0a
 
 
 
 
 
 
 
 
 
636127d
e989a0a
 
 
ed00d68
 
 
e989a0a
 
 
 
 
 
 
636127d
 
 
 
 
e989a0a
 
 
ed00d68
 
 
 
 
 
 
c888403
ed00d68
 
 
 
 
 
 
54d69eb
ed00d68
 
 
 
 
 
 
e989a0a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ed00d68
 
e989a0a
 
 
 
 
 
 
 
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
---
base_model: meta-llama/Llama-3.2-1B-Instruct
datasets:
- generator
library_name: peft
license: llama3.2
tags:
- trl
- sft
- generated_from_trainer
- lora
model-index:
- name: Llama-3.2-1B-Indonesian
  results: []
language:
- id
pipeline_tag: text-generation
---

<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# Llama-3.2-1B-Indonesian

This model is a fine-tuned version of [meta-llama/Llama-3.2-1B-Instruct](https://huggingface.co/meta-llama/Llama-3.2-1B-Instruct) that has been optimized for Indonesian language understanding and generation.
<br>
<br>
The fine-tuning process utilized Low-Rank Adaptation (LoRA) to efficiently adapt the model while minimizing computational and storage overhead. This approach enables effective fine-tuning for specific tasks or domains, particularly in the Indonesian language context.


## Training and evaluation data

[Ichsan2895/alpaca-gpt4-indonesian](https://huggingface.co/datasets/Ichsan2895/alpaca-gpt4-indonesian)

### Use WIth Transformers
```python
import torch
from transformers import pipeline

model_id = "digo-prayudha/Llama-3.2-1B-Indonesian"
pipe = pipeline(
    "text-generation",
    model=model_id,
    torch_dtype=torch.bfloat16,
    device_map="auto",
)
messages = [
    {"role": "user", "content": "Tentukan subjek dari kalimat berikut: 'Film tersebut dirilis kemarin'."},
]
outputs = pipe(
    messages,
    max_new_tokens=256,
)
print(outputs[0]["generated_text"][-1])
```

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 0.0002
- train_batch_size: 1
- eval_batch_size: 8
- seed: 42
- gradient_accumulation_steps: 6
- total_train_batch_size: 6
- optimizer: Use adamw_torch_fused with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: constant
- lr_scheduler_warmup_ratio: 0.03
- num_epochs: 3
- mixed_precision_training: Native AMP

### Training results
![Train Loss]
<img src="./train_loss.svg" width="300" height="200">

### Framework versions

- PEFT 0.7.2.dev0
- Transformers 4.46.1
- Pytorch 2.4.0+cu121
- Datasets 2.16.1
- Tokenizers 0.20.1