This repository was archived by the owner on Apr 23, 2026. It is now read-only.
Add backend capabilities to chat and generate - #1420
Closed
leseb wants to merge 2 commits into
Closed
Conversation
leseb
force-pushed
the
add-backend-capabilities-chat-gen
branch
from
June 18, 2024 21:05
f4cac3d to
abf76d7
Compare
Contributor
|
It looks like we need to resolve this design doc first? instructlab/dev-docs#81 From the looks of that PR, it doesn't look like we have consensus on how to incorporate the backends into the CLI commands. |
leseb
force-pushed
the
add-backend-capabilities-chat-gen
branch
from
June 18, 2024 21:30
abf76d7 to
fdb4e22
Compare
leseb
force-pushed
the
add-backend-capabilities-chat-gen
branch
from
June 18, 2024 21:50
fdb4e22 to
ec5cf09
Compare
leseb
force-pushed
the
add-backend-capabilities-chat-gen
branch
from
June 19, 2024 12:50
ec5cf09 to
33e08b4
Compare
leseb
force-pushed
the
add-backend-capabilities-chat-gen
branch
from
June 19, 2024 13:06
33e08b4 to
b4ed798
Compare
Contributor
|
This pull request has merge conflicts that must be resolved before it can be |
leseb
force-pushed
the
add-backend-capabilities-chat-gen
branch
from
June 19, 2024 13:29
b4ed798 to
3f5591d
Compare
This commit introduces the ability to configure and automatically detect the backend for serving models in InstructLab. One new field, `backend` has been added to the configuration and the CLI to allow users to specify the backend. This field is optional. Additionally, the commit includes the implementation of backend validation and auto-detection based on the model file properties, specifically targeting GGUF file format for now. The `serve` command has been updated to utilize these new configurations and perform backend validation or auto-detection as required. Unit tests for backend validation and changes to the configuration tests to include the new fields are also part of this commit. Co-authored-by: Ali Maredia <amaredia@redhat.com> Signed-off-by: Sébastien Han <seb@redhat.com>
leseb
force-pushed
the
add-backend-capabilities-chat-gen
branch
from
June 21, 2024 13:49
3f5591d to
a2c5792
Compare
This commit refactors the backend selection and server initialization process for both the generate and chat functionalities within the application. The changes include: - Abstracting the backend selection logic by utilizing the `backends` module, which dynamically determines the appropriate backend based on the configuration file or auto-detection if no configuration is set in the serve section of config.yaml (serve.backend) - Encapsulating the conditional logic for checking if the selected backend is LLAMA - Streamlining the exception handling for backend determination and server initialization, ensuring that any failures in these processes are clearly communicated to the user and result in a graceful exit. These modifications enhance the code's structure, making it easier to understand and extend in the future, especially as new backends or initialization requirements are introduced. Signed-off-by: Sébastien Han <seb@redhat.com>
leseb
force-pushed
the
add-backend-capabilities-chat-gen
branch
from
June 21, 2024 13:56
a2c5792 to
74ed0ce
Compare
Contributor
Author
|
Closing for #1442. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 commit refactors the backend selection and server initialization
process for both the generate and chat functionalities within the
application. The changes include:
Abstracting the backend selection logic by utilizing the
backendsmodule, which dynamically determines the appropriate backend based on
the configuration file or auto-detection if no configuration is set in
the serve section of config.yaml (serve.backend)
Encapsulating the conditional logic for checking if the selected
backend is LLAMA
Streamlining the exception handling for backend determination and
server initialization, ensuring that any failures in these processes
are clearly communicated to the user and result in a graceful exit.
These modifications enhance the code's structure, making it easier to
understand and extend in the future, especially as new backends or
initialization requirements are introduced.
Signed-off-by: Sébastien Han seb@redhat.com
ON-TOP of #1415
Checklist:
conventional commits.