Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dalm/datasets/reading_comprehension_generation/regex_based.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ def get_all_templates(self, entry: Dict[str, Any], random_seed: int) -> List[Tup
("What is the result of the following sentence?\n{cause}\nResult:", "{effect}"),
('Q: What happens after "{cause}"? A:', "{effect}"),
("{cause}\nWhat happens next?", "{effect}"),
# More varaiations
# More variations
("Considering the cause: {cause}\nWhat could be the resulting effect?", "{effect}"),
("Given that: {cause}\nWhat do you anticipate as the outcome?", "{effect}"),
('What could stem from "{cause}"?', "{effect}"),
Expand Down Expand Up @@ -495,7 +495,7 @@ def format_single_demo(self, entry: Dict[str, Any], random_seed: int) -> List[Di
elif entry["relation"] == "Effect-cause":
kw_dic["cause"] = entry["sentence2"][0].upper() + entry["sentence2"][1:]
kw_dic["effect"] = entry["sentence1"]
elif entry["relation"] == "Explanantion":
elif entry["relation"] == "Explanation":
kw_dic["sentence1"] = entry["sentence1"]
kw_dic["sentence2"] = entry["sentence2"][0].upper() + entry["sentence2"][1:]

Expand Down
2 changes: 1 addition & 1 deletion dalm/training/rag_e2e/train_rage2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ def train_e2e(
generator_tokenizer = rag_model.generator_tokenizer
generator_tokenizer.pad_token = generator_tokenizer.eos_token

# TODO: check if this is depdendent on the tokenizer installed
# TODO: check if this is dependent on the tokenizer installed
generator_tokenizer.add_eos_token = True

processed_datasets = dataset.map(
Expand Down