feat: support llama-cpp-python v0.3.2 (backport #2825)#2883
Merged
mergify[bot] merged 1 commit intorelease-v0.22instructlab/instructlab:release-v0.22from Jan 10, 2025
mergify/bp/release-v0.22/pr-2825instructlab/instructlab:mergify/bp/release-v0.22/pr-2825Copy head branch name to clipboard
Merged
feat: support llama-cpp-python v0.3.2 (backport #2825)#2883mergify[bot] merged 1 commit intorelease-v0.22instructlab/instructlab:release-v0.22from mergify/bp/release-v0.22/pr-2825instructlab/instructlab:mergify/bp/release-v0.22/pr-2825Copy head branch name to clipboard
mergify[bot] merged 1 commit intorelease-v0.22instructlab/instructlab:release-v0.22from
mergify/bp/release-v0.22/pr-2825instructlab/instructlab:mergify/bp/release-v0.22/pr-2825Copy head branch name to clipboard
Conversation
6 tasks
cdoern
approved these changes
Jan 9, 2025
alinaryan
approved these changes
Jan 9, 2025
57c4cd3 to
68b31b0
Compare
Contributor
|
@Mergifyio rebase |
Contributor
Author
☑️ Nothing to doDetails
|
version 0.3.2 has granite 3.0 support and does not have this issue. Bump to this version this required some additions to how we handle chat exceptions. As of these newer 0.3.z llama-cpp-python versions, a bad request causes the server to die. This requires us to know the max_ctx_size of the server before passing a completions request so that we can maintain the behavior of trimming messages until we can respond to one that fits. in order to do this, the config now contains a `current_max_ctx_size` field that we will update when spinning up a server. in the case that a user implicitly starts a llama-cpp-python server when calling `ilab model chat`, we set the max_tokens to the current `max_ctx_size` in the serve config. Signed-off-by: Charlie Doern <cdoern@redhat.com> (cherry picked from commit b29efdd) Signed-off-by: Charlie Doern <cdoern@redhat.com>
68b31b0 to
75d854c
Compare
|
E2E (NVIDIA L40S x4) workflow launched on this PR: View run |
|
e2e workflow succeeded on this PR: View run, congrats! |
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.
version 0.3.5 of llama-cpp-python has a known issue abetlen/llama-cpp-python#1861 version 0.3.2 has granite 3.0 support and does not have this issue. Bump to this version
this required some additions to how we handle chat exceptions. As of these newer 0.3.z llama-cpp-python versions,
a bad request causes the server to die. This requires us to know the max_ctx_size of the server before passing a completions request so that
we can maintain the behavior of trimming messages until we can respond to one that fits.
in order to do this, the config now contains a
current_max_ctx_sizefield that we will update when spinning up a server.in the case that a user implicitly starts a llama-cpp-python server when calling
ilab model chat, we set the max_tokens to thecurrent
max_ctx_sizein the serve config.Checklist:
conventional commits.
This is an automatic backport of pull request #2825 done by [Mergify](https://mergify.com).