gemma-2-2b-it-ko / README.md
rlarkdms0315's picture
Update README.md
41dc0fd verified
---
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.