이제 로컬에서 8GB VRAM으로 Gemma 4 파인튜닝 가능 + 버그 수정
핵심 요약
Unsloth가 Gemma 4 모델의 로컬 파인튜닝을 지원하며, 8GB VRAM 환경에서도 효율적인 학습이 가능해짐.
- 로컬 파인튜닝 지원 — 8GB VRAM만으로 Gemma 4 E2B 모델 학습 가능
- 성능 최적화 — 기존 FA2 대비 1.5배 빠른 속도와 60% 적은 VRAM 사용
- 버그 수정 완료 — 손실 폭주 및 추론 오류 등 주요 학습 문제 해결
- 다양한 도구 제공 — Unsloth Studio 및 Colab 노트북을 통한 간편한 학습 지원
여러분, 이제 무료 Unsloth 노트북에서 Gemma 4 E2B와 E4B를 파인튜닝할 수 있습니다! 로컬에서 Gemma-4-E2B를 학습하려면 8GB VRAM이 필요합니다. Unsloth는 FA2 설정보다 약 1.5배 빠르고 VRAM은 약 60% 적게 사용합니다: https://github.com/unslothai/unsloth
또한 Gemma 4 학습을 위한 버그를 발견하고 수정했습니다:
- Grad accumulation이 더 이상 손실 폭주를 일으키지 않습니다. 이전에는 300
400의 손실이 보일 수 있었지만, 이제 1015 정도로 정상화됩니다. Unsloth에서 수정했습니다. - 26B 및 31B 추론 시 발생하는 인덱스 오류를 수정했습니다. transformers 사용 시 추론이 실패하던 문제를 해결했습니다.
use_cache=False설정 시 E2B, E4B에서 깨진 텍스트가 나오던 문제를 수정했습니다. https://github.com/huggingface/transformers/issues/45242 를 참고하세요.- float16 오디오 -1e9 오버플로우 문제를 수정했습니다.
Unsloth Studio를 통해 26B-A4B와 31B를 학습하거나 UI를 통해 학습할 수도 있습니다. https://unsloth.ai/docs/models/gemma-4/train#quickstart Studio와 노트북은 비전, 텍스트, 오디오 및 추론을 모두 지원합니다.
버그 수정 세부 정보와 팁 및 요령은 블로그/가이드를 읽어보세요: https://unsloth.ai/docs/models/gemma-4/train
무료 Colab 노트북:
| E4B + E2B (Studio web UI) | E4B (Vision + Text) | E4B (Audio) | E2B (Run + Text) |
| :--- | :--- | :--- | :--- |
| https://colab.research.google.com/github/unslothai/unsloth/blob/main/studio/Unsloth_Studio_Colab.ipynb | https://colab.research.google.com/github/unslothai/notebooks/blob/main/nb/Gemma4_(E4B)-Vision.ipynb | https://colab.research.google.com/github/unslothai/notebooks/blob/main/nb/Gemma4_(E4B)-Audio.ipynb | https://colab.research.google.com/github/unslothai/notebooks/blob/main/nb/Gemma4_(E2B)-Text.ipynb |
감사합니다!


