patch for gemma cpt

Former-commit-id: 70a3052dd8a2d1322fa01ab19e369e465842d416
This commit is contained in:
hiyouga 2024-03-12 21:21:54 +08:00
parent c28818c39f
commit 096c31bfb6
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",