tiny configs + fix dataset gen (remove repeated response + qa template for compact ds) + add ropes and drop eval ds

This commit is contained in:
51616 2025-06-30 16:10:52 +09:00
parent e4cb1ffa55
commit 28eb85a2f3
19 changed files with 626 additions and 36 deletions

View file

@ -3,6 +3,8 @@ import gc
from datasets import Dataset, load_dataset
from tqdm import tqdm
from ctx_to_lora.data.processing import closed_qa_prompting
if __name__ == "__main__":
ds_name = "allenai/ropes"
@ -16,7 +18,7 @@ if __name__ == "__main__":
bg_txt = sample["background"]
situation_txt = sample["situation"]
ctx = ctx_template.format(background=bg_txt, situation=situation_txt)
q = sample["question"]
q = closed_qa_prompting(sample["question"])
if ctx not in ctx_qa_dict:
ctx_qa_dict[ctx] = {"prompts": [], "responses": []}
ctx_qa_dict[ctx]["prompts"].append(q)