-
Notifications
You must be signed in to change notification settings - Fork 15
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
Provence #40
base: main
Are you sure you want to change the base?
Conversation
just be to usre: here Provence does not do reranking right? |
it does. If |
self.device = torch.device("cuda" if torch.cuda.is_available() else "cpu") | ||
self.tokenizer = AutoTokenizer.from_pretrained(model_name) | ||
self.model = AutoModelForSequenceClassification.from_pretrained(model_name, low_cpu_mem_usage=True, torch_dtype=torch.float16).to(self.device) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two consecutive line returns: only one is allowed within functions
).logits | ||
# Use sigmoid since it's BCEWithLogitsLoss | ||
prob = torch.sigmoid(rank_score) | ||
probs+=(prob) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would use 'prob.item()' to make it a float and not a torch tensor
Can you put an assert for that ? |
|
modules/rag.py
to better accommodate context processing