Open
Conversation
…itude rank_start and rank_end
…a permutation but now it is returning a string. Will need the cleanup pipeline in next step
ronakice
reviewed
Sep 16, 2024
Comment on lines
206
to
207
|
|
||
|
|
ronakice
reviewed
Oct 19, 2024
Comment on lines
167
to
171
| "--step_size", | ||
| type=int, | ||
| default=10, | ||
| help="step size for the sliding window approach", | ||
| default=20, | ||
| help="window size for the LLM", | ||
| ) |
Member
There was a problem hiding this comment.
step and window are different?
ronakice
reviewed
Jan 5, 2025
| --reorder_policy="tournament_sort:{top_k: 10, r: 1}" | ||
| ``` | ||
|
|
||
| ### Run end to end - Rank Zephyr with [Top Down](https://) |
ronakice
reviewed
Jan 5, 2025
README.md
Outdated
| } | ||
| ``` | ||
|
|
||
| If you woud like to cite the ListT5's tournament sort methodology, please consider citing |
Member
There was a problem hiding this comment.
I don't think this is the first instance of tournament sort, something has probably been done before, maybe we drop it for now
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a superset of issue Top Down. This PR reorganized the various reordering methods including sliding window, top down, as well as ListT5's tournament sort methodology. Now it is allowed to use command like
--reorder_policy="top_down:{\"top_k\": 10, \"pivot\": ${PIVOT}, \"shuffle\": true, \"r\": 1}"to specify a reorderer.What changes
Incompatibility
{ prompt: string, num_passages: int }. This is for backward compatibility with the old data types of prompt (str | list[dict[str,str]]) while we need num passages in a single trial.Reorder Update
sliding_window(_batched)andpermutation_pipelineshall be deprecated. Instead, we can define a class calledReorderPolicyto perform the reranking. So this is a small (simplified) definition on what an reorder policy isFor detailed definition, please check
src/rank_llm/rerank/listwise/reorderpackageNow, we have three reorder policies, Sliding Window (
sliding_window), tournament sort (tournament_sort) and top down (top_down). To add a reorder policy in future, create such a class extends Reorder Policy with a name, and put your class intolistwise_rankllm.py'sSUPPORT_REORDER_POLICIES.To pass a parameter into reorder policy, append a JSON, separated by
:when passing into the command line argumentsreorder_policy, an example is following:Notice that to convenience, the JSON string behind
:will be processed with json-repair library. So the string might not neet to be very JSON. (A javascript version should work, so you don't need to add a lot of\", using single quote'should also work, so you don't need to put\"instead only need\')So in above case, you actually only need to pass
The JSON will be parsed as
**json_dictto pass into the policy's classPointwise LLM
Adjust Pointwise LLM to compatible with the type usage right now (Not MonoT5, MonoT5's type def is still not corresponding with base class')
Experiments
Transformers
VLLM
SGLang
TensorRT
VLLM, with top down policy
VLLM, with tournament sort policy
VLLM, with ** FIRST ** logit's method, and sliding window
VLLM, with ** FIRST ** logit's, and top down
MonoT5