Downloads · 30 days
5
6% of all-time downloads
choah/llama3-ko-IronMan-Overfit
llama3-ko-IronMan-Overfit is a text generation model from choah. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
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 Korea…
Downloads · 30 days
5
6% of all-time downloads
All-time downloads
90
Public
Parameters
8B
16.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors16.1 GB · 100%
From the Hugging Face model README
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.
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.
Make sure you have the transformers and torch packages installed. You can install them using pip:
pip install transformers torch
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))
