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
152
Safetensors
Model size
5B params
Tensor type
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ 1 Ask for provider support

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

Finetuned
(42)
this model