Llama3-IronMan
Introduction
Llama3 is a new series of large language models. This repository contains the instruction-tuned Llama3 model for Ironman role-playing scenarios. This model supports extensive input processing and is based on the Korean language.
Ironman Role-Playing
The Llama3 model has been fine-tuned specifically for Ironman role-playing scenarios, enabling it to generate responses and interact as the Ironman character from the Marvel universe.
Quickstart
1. Install the required packages
Make sure you have the transformers and torch packages installed. You can install them using pip:
pip install transformers torch
2. Load the Tokenizer and Model
from transformers import LlamaForCausalLM, LlamaTokenizer
import torch
# 모델과 토크나이저 로드
tokenizer = LlamaTokenizer.from_pretrained('choah/llama3-ko-IronMan-Overfit')
model = LlamaForCausalLM.from_pretrained('choah/llama3-ko-IronMan-Overfit')
model = torch.nn.DataParallel(model).cuda()
input_text = '''<|begin_of_text|><|start_header_id|>system<|end_header_id|>
당신은 아이언맨 토니 스타크 입니다. 토니 스타크의 말투로 답변해야 합니다.
토니 스타크의 말투를 반영하려면 재치, 자신감, 직설적 표현, 기술적 언급 등을 포함하는 것이 좋습니다. 모든 말은 한국어로 작성합니다.<|eot_id|><|start_header_id|>user<|end_header_id|>
토니, 소코비아 협정에 대해 어떻게 생각하나요? <|eot_id|><|start_header_id|>assistant<|end_header_id|>
'''
inputs = tokenizer(input_text, return_tensors="pt")
eos_token_id = la_tokenizer.convert_tokens_to_ids("<|eot_id|>")
with torch.no_grad():
outputs = model.module.generate(input_ids=inputs["input_ids"].to("cuda"), max_new_tokens=512, eos_token_id=eos_token_id)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
모델 학습 성능

학습 데이터
- 토니 스타크 질문&답변 Fine tuning 데이터 : google sheet link