Llama-KoEmpathy / README.md
byeolki's picture
Update README.md
d34183e verified
|
raw
history blame
3.25 kB
metadata
license: mit
datasets:
  - byeolki/KoLlama-Empathy-Dataset
language:
  - ko
base_model:
  - unsloth/Meta-Llama-3.1-8B
tags:
  - korean
  - 한국어
  - empathy
  - 공감
  - chatbot
  - 챗봇

🤗 KoLlama-Empathy 💝

KoLlama-Empathy는 Llama-3.1-8B를 한국어 공감 대화 데이터셋으로 파인튜닝한 언어 모델입니다. 이 모델은 사용자의 감정을 이해하고 공감하는 대화를 생성하는 것을 목표로 합니다. 💭✨

📋 Model Description

⚙️ Training Configuration

  • 📏 Max Sequence Length: 2048
  • 📦 Batch Size: 128
  • 🔄 Gradient Accumulation Steps: 4
  • 📈 Learning Rate: 2e-4
  • 🛠️ Optimizer: AdamW 8bit
  • 💾 Quantization: GGUF q8_0
  • 🔁 Training Epochs: 3

TIP: 데이터의 크기나 Epoch을 늘리면 좀 더 좋은 결과를 가져올 수 있을거에요!

💻 Usage

모델을 사용하는 방법은 다음과 같습니다:

from unsloth import FastLanguageModel

model, tokenizer = FastLanguageModel.from_pretrained("byeolki/KoLlama-Empathy", load_in_4bit=True)  

alpaca_prompt = """아래는 작업을 설명하는 지시사항입니다. 입력된 내용을 바탕으로 적절한 응답을 작성하세요.
### 지시사항:
입력에 대해서 공감해주세요.
### 입력:
{input}
### 응답:
"""

FastLanguageModel.for_inference(model) 
input_text = "안녕하세요. 저 오늘 기분이 안 좋아요."

inputs = tokenizer([alpaca_prompt.format(input=input_text)], return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=64, use_cache=True)

generated_text = tokenizer.batch_decode(outputs, skip_special_tokens=True)[0]
print(generated_text)

💬 Example Conversations

👤 User: 나 오늘 속상한 일이 있었어. 🤖 Assistant: 무슨 일인데 그래? 기분이 많이 안 좋았나 보네.

👤 User: 나 살이 너무 많이 찐거 같아서 속상해. 🤖 Assistant: 살이 쪄서 속상하다니. 왜 그래?

⚖️ License

MIT License

Copyright (c) 2024 byeolki

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.