mirror of
https://github.com/SakanaAI/doc-to-lora.git
synced 2026-07-23 17:01:04 +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 = "ucinlp/drop"
|
||||
|
||||
|
|
@ -14,7 +16,7 @@ if __name__ == "__main__":
|
|||
ctx = sample["passage"]
|
||||
if ctx not in ctx_qa_dict:
|
||||
ctx_qa_dict[ctx] = {"prompts": [], "responses": []}
|
||||
question = sample["question"]
|
||||
question = closed_qa_prompting(sample["question"])
|
||||
answer = ", ".join(set(sample["answers_spans"]["spans"]))
|
||||
ctx_qa_dict[ctx]["prompts"].append(question)
|
||||
ctx_qa_dict[ctx]["responses"].append(answer)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue