Uploaded model
- Developed by: saemzzang
- License: apache-2.0
- Finetuned from model : yanolja/EEVE-Korean-Instruct-10.8B-v1.0
This llama model was trained 2x faster with Unsloth and Huggingface's TRL library.
model = FastLanguageModel.get_peft_model(
model,
r=8, # 0λ³΄λ€ ν° μ΄λ€ μ«μλ μ ν κ°λ₯! 8, 16, 32, 64, 128μ΄ κΆμ₯λ©λλ€.
lora_alpha=16, # LoRA μν κ°μ μ€μ ν©λλ€.
lora_dropout=0.05, # λλ‘μμμ μ§μν©λλ€.
target_modules=[
"q_proj",
"k_proj",
"v_proj",
"o_proj",
"gate_proj",
"up_proj",
"down_proj",
], # νκ² λͺ¨λμ μ§μ ν©λλ€.
bias="none", # λ°μ΄μ΄μ€λ₯Ό μ§μν©λλ€.
# True λλ "unsloth"λ₯Ό μ¬μ©νμ¬ λ§€μ° κΈ΄ 컨ν
μ€νΈμ λν΄ VRAMμ 30% λ μ¬μ©νκ³ , 2λ°° λ ν° λ°°μΉ ν¬κΈ°λ₯Ό μ§μν©λλ€.
use_gradient_checkpointing="unsloth",
random_state=123, # λμ μνλ₯Ό μ€μ ν©λλ€.
use_rslora=False, # μμ μμ ν LoRAλ₯Ό μ§μν©λλ€.
loftq_config=None, # LoftQλ₯Ό μ§μν©λλ€.
)
from trl import SFTTrainer
from transformers import TrainingArguments
tokenizer.padding_side = "right" # ν ν¬λμ΄μ μ ν¨λ©μ μ€λ₯Έμͺ½μΌλ‘ μ€μ ν©λλ€.
# SFTTrainerλ₯Ό μ¬μ©νμ¬ λͺ¨λΈ νμ΅ μ€μ
trainer = SFTTrainer(
model=model, # νμ΅ν λͺ¨λΈ
tokenizer=tokenizer, # ν ν¬λμ΄μ
train_dataset=dataset, # νμ΅ λ°μ΄ν°μ
eval_dataset=dataset,
dataset_text_field="text", # λ°μ΄ν°μ
μμ ν
μ€νΈ νλμ μ΄λ¦
max_seq_length=max_seq_length, # μ΅λ μνμ€ κΈΈμ΄
dataset_num_proc=2, # λ°μ΄ν° μ²λ¦¬μ μ¬μ©ν νλ‘μΈμ€ μ
packing=False, # 짧μ μνμ€μ λν νμ΅ μλλ₯Ό 5λ°° λΉ λ₯΄κ² ν μ μμ
args=TrainingArguments(
per_device_train_batch_size=2, # κ° λλ°μ΄μ€λΉ νλ ¨ λ°°μΉ ν¬κΈ°
gradient_accumulation_steps=4, # κ·ΈλλμΈνΈ λμ λ¨κ³
warmup_steps=5, # μμ
μ€ν
μ
num_train_epochs=3, # νλ ¨ μν μ
max_steps=120, # μ΅λ μ€ν
μ
do_eval=True,
evaluation_strategy="steps",
logging_steps=1, # logging μ€ν
μ
learning_rate=2e-4, # νμ΅λ₯
fp16=not torch.cuda.is_bf16_supported(), # fp16 μ¬μ© μ¬λΆ, bf16μ΄ μ§μλμ§ μλ κ²½μ°μλ§ μ¬μ©
bf16=torch.cuda.is_bf16_supported(), # bf16 μ¬μ© μ¬λΆ, bf16μ΄ μ§μλλ κ²½μ°μλ§ μ¬μ©
optim="adamw_8bit", # μ΅μ ν μκ³ λ¦¬μ¦
weight_decay=0.01, # κ°μ€μΉ κ°μ
lr_scheduler_type="cosine", # νμ΅λ₯ μ€μΌμ€λ¬ μ ν
seed=123, # λλ€ μλ
output_dir="outputs", # μΆλ ₯ λλ ν 리
),
)
- Downloads last month
- 17
Model tree for saemzzang/EEVE-Korean-Instruct-10.8B-v1.0-saemzzang2-q4_k_s-gguf
Base model
upstage/SOLAR-10.7B-v1.0
Finetuned
yanolja/EEVE-Korean-10.8B-v1.0
Finetuned
yanolja/EEVE-Korean-Instruct-10.8B-v1.0