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 = "rajpurkar/squad"
@ -14,7 +16,7 @@ if __name__ == "__main__":
ctx = sample["context"]
if ctx not in ctx_qa_dict:
ctx_qa_dict[ctx] = {"prompts": [], "responses": []}
question = sample["question"]
question = closed_qa_prompting(sample["question"])
answer = sample["answers"]["text"][0]
ctx_qa_dict[ctx]["prompts"].append(question)
ctx_qa_dict[ctx]["responses"].append(answer)