Update 5-dpo_train.py

Modify the huggingface warehouse address to facilitate direct retrieval
pull/90/head
LeiZhang 2024-11-14 19:47:26 +08:00 committed by GitHub
parent f7127e4310
commit 4486170ff1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -12,8 +12,8 @@ warnings.filterwarnings('ignore')
def init_model(): def init_model():
device = 'cuda:0' device = 'cuda:0'
# Do model patching and add fast LoRA weights # Do model patching and add fast LoRA weights
model_name_or_path = "minimind-v1" model_name_or_path = "jingyaogong/minimind-v1"
tokenizer_name_or_path = "minimind-v1" tokenizer_name_or_path = "jingyaogong/minimind-v1"
model = AutoModelForCausalLM.from_pretrained(model_name_or_path, trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained(model_name_or_path, trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained(tokenizer_name_or_path, trust_remote_code=True, use_fast=False) tokenizer = AutoTokenizer.from_pretrained(tokenizer_name_or_path, trust_remote_code=True, use_fast=False)
tokenizer.pad_token = tokenizer.eos_token tokenizer.pad_token = tokenizer.eos_token