# %% Cell 4: Load Gemma-4 12B Model
from unsloth import FastLanguageModel
import gc

model, tokenizer = FastLanguageModel.from_pretrained(
    model_name=MODEL_NAME,
    max_seq_length=MAX_SEQ_LENGTH,
    dtype=None,
    load_in_4bit=True,
)

print(f"✅ Model loaded: {MODEL_NAME}")
print(f"VRAM used: {torch.cuda.memory_allocated() / 1024**3:.1f} GB")

gc.collect()
torch.cuda.empty_cache()
print("\n→ Run Cell 5 to attach LoRA adapter.")
