From 36e226222db4eb9b624754eafd1a39d077eaef7a Mon Sep 17 00:00:00 2001 From: Tian jianyong <11429339@qq.com> Date: Fri, 28 Mar 2025 17:07:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20bug=20=E5=92=8C=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B=E8=A7=84=E6=A0=BC=EF=BC=881B=EF=BC=89=EF=BC=8C?= =?UTF-8?q?=E5=87=8F=E5=B0=91=E8=B5=84=E6=BA=90=E7=94=A8=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/train.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/train.py b/src/train.py index 0e47a85..27f8e62 100644 --- a/src/train.py +++ b/src/train.py @@ -1,4 +1,4 @@ -from unsloth import FastLanguageModel +from unsloth import FastLanguageModel, FastModel import torch from trl import SFTTrainer, SFTConfig from datasets import load_dataset @@ -29,7 +29,7 @@ fourbit_models = [ ] # More models at https://huggingface.co/unsloth model, tokenizer = FastModel.from_pretrained( - model_name = "unsloth/gemma-3-4B-it", + model_name = "unsloth/gemma-3-1B-it", max_seq_length = 2048, # Choose any for long context! load_in_4bit = True, # 4 bit quantization to reduce memory load_in_8bit = False, # [NEW!] A bit more accurate, uses 2x memory