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
reranker arguments
  • Loading branch information
sigridjineth committed Aug 24, 2024
commit f29930c9cb0c2e41602d824f58116ba8b81a4fa1
1 change: 1 addition & 0 deletions examples/example_rankllama.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ deepspeed --include localhost:4,5,6,7 --master_port 60000 --module tevatron.rera
--num_train_epochs 1 \
--logging_steps 10 \
--overwrite_output_dir
--gra
```
8 changes: 8 additions & 0 deletions src/tevatron/reranker/arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,11 @@ class DataArguments:
"enable the use of Tensor Cores on NVIDIA hardware with compute capability >= 7.5 (Volta)."
},
)

@dataclass
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)