Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DRAFT] Add support gradient cache for Reranker #148

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
fix: parser
  • Loading branch information
sigridjineth committed Aug 24, 2024
commit 851f01b0e167285b61bacbcff5ff9291d4a873b8
5 changes: 2 additions & 3 deletions src/tevatron/reranker/arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,5 @@ class DataArguments:
class TevatronTrainingArguments(TrainingArguments):
warmup_ratio: float = field(default=0.1)

grad_cache: bool = field(default=False, metadata={"help": "Use gradient cache update"})
gc_q_chunk_size: int = field(default=4)
gc_p_chunk_size: int = field(default=32)
grad_cache: bool = field(default=False, metadata={"help": "Use gradient cache"})
gc_chunk_size: Optional[int] = field(default=None, metadata={"help": "Chunk size for gradient cache"})