patch for gemma cpt

Former-commit-id: fc0b19c62f52a90d78b63761dda3d8970a42f2da
This commit is contained in:
hiyouga 2024-03-12 21:21:54 +08:00
parent 282edb9161
commit e6ab1a57ea
2 changed files with 5 additions and 1 deletions

View File

@ -37,6 +37,10 @@ def preprocess_pretrain_dataset(
k: [t[i : i + block_size] for i in range(0, total_length, block_size)]
for k, t in concatenated_examples.items()
}
if data_args.template == "gemma":
for i in range(len(result["input_ids"])):
result["input_ids"][i][0] = tokenizer.bos_token_id
return result

View File

@ -503,7 +503,7 @@ register_model_group(
},
"OLMo-7B-Chat": {
DownloadSource.DEFAULT: "allenai/OLMo-7B-Instruct",
}
},
},
module="att_proj",
template="olmo",