-
Notifications
You must be signed in to change notification settings - Fork 42
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
Pointwise ABC, MonoT5, New Unit Tests #128
Conversation
…filename into the init function in PointwiseRankLLM, add PromptMode.MONOT5 = monot5 as prompt_mode
Pointwise changes
Changes:
|
…rting docs to prompts in pointwise by using the listwise functions, fix sorting order of monot5, add batching for run_llm_batched in pointwise_rankllm
…g to pointwise_rankllm class instead of individual pointwise model classes
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.
LGTM!
try: | ||
from vllm import LLM, SamplingParams | ||
except: | ||
LLM = None | ||
SamplingParams = None | ||
|
||
logger = logging.getLogger(__name__) |
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.
not needed?
self, | ||
model: str, | ||
prompt_mode: str = "monot5", | ||
context_size: int = 512, |
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.
Create a new issue s.t., we support longer sequences eventually, nothing is limiting T5 usage with longer context (we've done it before)
truth_logit = logit_tensor[1176] | ||
false_logit = logit_tensor[6136] | ||
score = math.exp(truth_logit) / ( |
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.
this is hardcoded and won't scale in the future to other T5 base models, note this as a T5 todo
outputs = self._tokenizer.decode( | ||
output_ids, skip_special_tokens=True, spaces_between_special_tokens=False | ||
) | ||
truth_logit = logits[0][0][1176] |
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.
same here
Summary of Changes
extract_kwargs
functionretrieve_and_rerank
Rank_LLM
ABC parameters (missing kwargs)...more changes below (@IR3KT4FUNZ)