File size: 3,367 Bytes
8c00675
 
 
 
 
41dc0fd
8c00675
 
 
 
 
 
 
 
 
 
41dc0fd
8c00675
41dc0fd
8c00675
41dc0fd
 
8c00675
 
 
41dc0fd
8c00675
41dc0fd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8c00675
 
41dc0fd
8c00675
 
 
41dc0fd
 
 
8c00675
41dc0fd
 
 
 
8c00675
41dc0fd
 
 
 
8c00675
41dc0fd
8c00675
 
41dc0fd
8c00675
41dc0fd
8c00675
41dc0fd
 
 
8c00675
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
---
library_name: transformers
tags: []
---

# Gemma-2-2b-it Fine-Tuned on KoAlpaca-v1.1a

<!-- Provide a quick summary of what the model is/does. -->




### Model Description

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

This model is a fine-tuned version of the google/gemma-2-2b-it model on the Korean dataset beomi/KoAlpaca-v1.1a. It is designed to generate coherent, contextually appropriate responses in Korean. The fine-tuning process has enhanced the model's ability to handle conversational prompts in a colloquial style, responding with contextually aware and polite expressions.

The base model, Gemma-2-2B-it, is a large pre-trained language model built for multilingual text generation tasks. With the fine-tuning on the KoAlpaca dataset, the model has been optimized to perform better on Korean text generation, offering more natural and conversational outputs.


### Training Process

<!-- Provide the basic links for the model. -->

The model was fine-tuned using the KoAlpaca-v1.1a dataset, which is designed for instruction-following tasks in Korean. The dataset contains various examples of questions and corresponding responses in Korean, which helped the model learn polite conversational structures.

Dataset
- **Dataset Used:** beomi/KoAlpaca-v1.1a
- **Type of Data:** Instruction-following examples in Korean, with both the instruction and expected response provided in each entry.
Training Configuration
- **Model Base:** google/gemma-2-2b-it
- **LoRA Configuration:** Applied LoRA with the following parameters:
- **Quantization:** 4-bit quantization (bnb_4bit) for efficient fine-tuning
- **Training Hyperparameters:**
  - **Steps:** 3000
  - **Learning Rate:** 2e-4
  - **Batch Size:** 1
  - **Warmup Steps:** 100
  - **Gradient Accumulation:** 4 steps
  - **Optimizer:** paged_adamw_8bit
  - **Precision:** FP16


### Results and Performance

<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->

Example Input:
β€œλ°°κ°€ κ³ νŒŒμ„œ λ§ˆλΌνƒ•μ„ λ¨Ήμ—ˆμ–΄μš”.”
(I was feeling hungry, so I ate maratang.)

- Before Fine-tuning:
    Output:β€œλ§ˆλΌνƒ• (maratang): This is a Korean soup made with various ingredients like meat, vegetables, and noodles.  
            고파 (gopa): This means β€˜to be hungry.’  
            λ¨Ήμ—ˆμ–΄μš” (meok-eosseoyo): This is the polite way to say β€˜I ate.’”  

- After Fine-tuning:
Output:
β€œλ§›μžˆκ²Œ λ“œμ…¨κ΅°μš”! 저도 μ΄λ ‡κ²Œ ν•˜λ©΄ μ’‹κ² μŠ΅λ‹ˆλ‹€. 내일은 μ–΄λ–€ μŒμ‹μ„ ν•΄λ³ΌκΉŒ μƒκ°ν•΄λ³΄μ„Έμš”?”
(It sounds like you enjoyed your meal! I should try that too. What do you plan to cook tomorrow?)

The fine-tuned model shows a significant improvement in contextual understanding and produces more conversational and polite responses in Korean. It also demonstrates an ability to provide helpful follow-up suggestions, which is essential in conversational agents.


### Future Work

<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->

- Further fine-tuning on larger or more diverse Korean datasets could improve the model's versatility.
- Exploring different LoRA configurations and quantization techniques could yield more efficient results for deployment on smaller devices.
- Evaluation with human raters to measure improvements in conversation quality.