mirror of
https://github.com/SakanaAI/doc-to-lora.git
synced 2026-07-26 17:11:02 +02:00
tiny configs + fix dataset gen (remove repeated response + qa template for compact ds) + add ropes and drop eval ds
This commit is contained in:
parent
e4cb1ffa55
commit
28eb85a2f3
19 changed files with 626 additions and 36 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue