Conversation
5b31ef2 to
919e73c
Compare
Co-authored-by: Nathan Ordonez <Nathan.Ordonez@ibm.com> Signed-off-by: Thomas Parnell <tpa@zurich.ibm.com> Signed-off-by: Nathan Ordonez <nathanaxcan@gmail.com>
Signed-off-by: Nathan Ordonez <nathanaxcan@gmail.com>
Signed-off-by: Nathan Ordonez <nathanaxcan@gmail.com>
Signed-off-by: Nathan Ordonez <nathanaxcan@gmail.com>
An initial implementation of span semantics in vLLM. Please note that this has a known bug dealing with concurrent sequences that re-use the same span in different locations. We are working on a solution for this, but in the meantime accuracy may be negatively affected. n/a n/a --- <details> <summary> Essential Elements of an Effective PR Description Checklist </summary> - [x] The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)". - [ ] The test plan, such as providing test command. - [ ] The test results, such as pasting the results comparison before and after, or e2e results - [ ] (Optional) The necessary documentation update, such as updating `supported_models.md` and `examples` for a new model. - [ ] (Optional) Release notes update. If your change is user facing, please update the release notes draft in the [Google Doc](https://docs.google.com/document/d/1YyVqrgX4gHTtrstbq8oWUImOyPCKSGnJ7xtTpmXzlRs/edit?tab=t.0). </details> --------- Signed-off-by: Thomas Parnell <tpa@zurich.ibm.com> Signed-off-by: Nathan Ordonez <nathanaxcan@gmail.com> Co-authored-by: Nathan Ordonez <Nathan.Ordonez@ibm.com> Co-authored-by: Nathan Ordonez <nathanaxcan@gmail.com>
… benefits) Signed-off-by: Nathan Ordonez <nathanaxcan@gmail.com>
Signed-off-by: Nathan Ordonez <nathanaxcan@gmail.com>
919e73c to
3998c6f
Compare
Signed-off-by: Nathan Ordonez <nathanaxcan@gmail.com>
Signed-off-by: Nathan Ordonez <nathanaxcan@gmail.com>
Member
Author
|
currently running evals to check accuracy... |
Member
|
i see that this addresses the regression in SPANS_DEBUG. but the hashes printed out aren't useful. to turn # just for example...
b = bytes.fromhex("abcd1234")
# turn b back into the string "abcd":
from binascii import hexlify
def pretty(b):
return hexlify(b).decode('utf-8')[:4]
pretty(b)
abcdwhereas this PR uses |
2b047d1 to
6ff59f0
Compare
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 PR implements block duplication.
Previously, span cache-hits were treated the same way prefix caching does it: same memory reference, different request being served.
But while the same memory reference contains the same semantic content (it refers to KV vectors of the same input tokens), it cannot contain two different positional encodings at once.
So, instead of using the same memory reference, we let vLLM allocate new blocks, but instead of prefilling those blocks we copy the KV vectors with adjusted (if needed) positional encodings.