diff --git a/003加载自己的数据集微调.py b/003加载自己的数据集微调.py index 9c31b3d..a005e05 100644 --- a/003加载自己的数据集微调.py +++ b/003加载自己的数据集微调.py @@ -23,18 +23,23 @@ dataset = dataset.map(to_chatml) # print("\n", dataset[0]) + + # 加载预训练模型 model, tokenizer = FastLanguageModel.from_pretrained( # model_name = "unsloth/Qwen3-1.7B-unsloth-bnb-4bit", - # model_name = "unsloth/Qwen3-8B-unsloth-bnb-4bit", - model_name = "deepseek-ai/DeepSeek-V2-Lite", + model_name = "unsloth/Qwen3-8B-unsloth-bnb-4bit", + # model_name = "deepseek-ai/DeepSeek-V2-Lite", # model_name = "unsloth/Qwen3-4B-unsloth-bnb-4bit", trust_remote_code=True, # ✅ 允許遠端自訂程式碼, deepseek 系列模型使用 max_seq_length = 2048, # Context length - can be longer, but uses more memory + # max_seq_length = 512, # Context length - can be longer, but uses more memory load_in_4bit = True, # 4bit uses much less memory , 启用QLoRA load_in_8bit = False, # A bit more accurate, uses 2x memory full_finetuning = False, # We have full finetuning now! # token = "hf_...", # use one if using gated models + + ) model = FastLanguageModel.get_peft_model( @@ -100,7 +105,7 @@ _ = model.generate( # model.cpu() model.save_pretrained_gguf( - "DeepSeek-V2-Lite", + "Qwen3-8B", tokenizer, # quantization_method="q4_k_m", # 或 "q8_0" # 量化模式--默认 q8_0, 可选f16, "q4_k_m", "q8_0", "q5_k_m", maximum_memory_usage=0.7 # 限制使用 GPU 显存为总容量的 50% diff --git a/unsloth_compiled_cache/UnslothAlignPropTrainer.py b/unsloth_compiled_cache/UnslothAlignPropTrainer.py index 625d24f..9cf76af 100644 --- a/unsloth_compiled_cache/UnslothAlignPropTrainer.py +++ b/unsloth_compiled_cache/UnslothAlignPropTrainer.py @@ -130,7 +130,7 @@ class UnslothAlignPropConfig(AlignPropConfig): ) def __init__( self, - exp_name = '003加载自己的数据集微调', + exp_name = '003微调deepseek', run_name = '', seed = 3407, log_with = None, diff --git a/unsloth_compiled_cache/UnslothDDPOTrainer.py b/unsloth_compiled_cache/UnslothDDPOTrainer.py index 148c30b..a28d2a5 100644 --- a/unsloth_compiled_cache/UnslothDDPOTrainer.py +++ b/unsloth_compiled_cache/UnslothDDPOTrainer.py @@ -146,7 +146,7 @@ class UnslothDDPOConfig(DDPOConfig): ) def __init__( self, - exp_name = '003加载自己的数据集微调', + exp_name = '003微调deepseek', run_name = '', seed = 3407, log_with = None,