🧠 两小时从 0 训出你的 64M 大模型。Train your own 64M LLM from scratch in 2 hours.
update tokenizer load
gongjye34d4e9371cb
diff --git a/eval_model.py b/eval_model.pyindex a3d0eaf..fc71257 100644--- a/eval_model.py+++ b/eval_model.py@@ -33,10 +33,9 @@ def init_model(args):apply_lora(model)load_lora(model, f'./{args.out_dir}/lora/{args.lora_name}_{args.dim}.pth')else:- model = AutoModelForCausalLM.from_pretrained(- './MiniMind2',- trust_remote_code=True- )+ transformers_model_path = './MiniMind2'+ tokenizer = AutoTokenizer.from_pretrained(transformers_model_path)+ model = AutoModelForCausalLM.from_pretrained(transformers_model_path, trust_remote_code=True)print(f'MiniMind模型参数量: {sum(p.numel() for p in model.parameters() if p.requires_grad) / 1e6:.2f}M(illion)')return model.eval().to(args.device), tokenizer