gemma-3n-E2B-ko (QLoRA fine-tuned)

google/gemma-3n-E2B-it λ₯Ό ν•œκ΅­μ–΄ instruction 데이터(KoAlpaca v1.1a)둜 QLoRA μΆ”κ°€ ν•™μŠ΅ν•œ λͺ¨λΈμž…λ‹ˆλ‹€.

ν•™μŠ΅ κ°œμš”

  • 베이슀 λͺ¨λΈ: google/gemma-3n-E2B-it (유효 νŒŒλΌλ―Έν„° ~2B)
  • 방법: QLoRA (4-bit, LoRA rank=16, alpha=16), Unsloth
  • 데이터: beomi/KoAlpaca-v1.1a (ν•œκ΅­μ–΄ instruction)
  • ν•˜λ“œμ›¨μ–΄: 단일 NVIDIA H100
  • μ΅œλŒ€ μ‹œν€€μŠ€ 길이: 1024
  • ν•™μŠ΅ μŠ€ν…: 500 steps (effective batch size 8, learning rate 2e-4, linear schedule)
  • LoRA ν•™μŠ΅ νŒŒλΌλ―Έν„°: 21M / 5.46B (0.39%)
  • μ΅œμ’… train loss: μ•½ 2.33

ν•„μš” 라이브러리 μ„€μΉ˜

  • pip install timm pillow accelerate torch transformers

μ‚¬μš© μ˜ˆμ‹œ

from transformers import AutoProcessor, AutoModelForImageTextToText
import torch

model_id = "ION-Communications/gemma-3n-E2B-ko"

processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForImageTextToText.from_pretrained(
    model_id,
    dtype=torch.bfloat16,
    device_map="auto",
)

messages = [
    {
        "role": "user",
        "content": [
            {"type": "text", "text": "ν•œκ΅­μ˜ μˆ˜λ„λŠ”?"}
        ],
    }
]

input_ids = processor.apply_chat_template(
    messages,
    add_generation_prompt=True,
    tokenize=True,
    return_tensors="pt",
).to(model.device)

out = model.generate(
    input_ids=input_ids,
    max_new_tokens=128,
)

print(processor.decode(out[0], skip_special_tokens=True))

ν•œκ³„

  • μ†Œκ·œλͺ¨ instruction λ°μ΄ν„°λ‘œ 짧게 μΆ”κ°€ ν•™μŠ΅ν•œ λͺ¨λΈλ‘œ, 사싀성/μ•ˆμ „μ„± 보μž₯은 μ œν•œμ μž…λ‹ˆλ‹€.
  • 베이슀 Gemma 3n λΌμ΄μ„ μŠ€(Gemma Terms of Use)λ₯Ό λ”°λ¦…λ‹ˆλ‹€.
Downloads last month
11
Safetensors
Model size
5B params
Tensor type
BF16
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ 3 Ask for provider support

Model tree for ION-Communications/gemma-3n-E2B-ko

Finetuned
(39)
this model