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
- Downloads last month
- 10
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.