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: trust_remote_code
  • Loading branch information
sigridjineth committed Aug 24, 2024
commit bfb8e5a5a9ad3b9e7207d82edf70caac94ed8dc4
3 changes: 2 additions & 1 deletion src/tevatron/reranker/driver/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ def main():

tokenizer = AutoTokenizer.from_pretrained(
model_args.tokenizer_name if model_args.tokenizer_name else model_args.model_name_or_path,
cache_dir=model_args.cache_dir
cache_dir=model_args.cache_dir,
trust_remote_code=True
)
if tokenizer.pad_token_id is None:
tokenizer.pad_token_id = tokenizer.unk_token_id
Expand Down