Skip to content
This repository was archived by the owner on Apr 23, 2026. It is now read-only.

Add backend configuration and auto-detection support - #1415

Closed
leseb wants to merge 1 commit into
instructlab:mainfrom
leseb:add-backend-flag
Closed

Add backend configuration and auto-detection support#1415
leseb wants to merge 1 commit into
instructlab:mainfrom
leseb:add-backend-flag

Conversation

@leseb

@leseb leseb commented Jun 18, 2024

Copy link
Copy Markdown
Contributor

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

Checklist:

  • Commit Message Formatting: Commit titles and messages follow guidelines in the
    conventional commits.
  • Changelog updated with breaking and/or notable changes for the next minor release.
  • Documentation has been updated, if necessary.
  • Unit tests have been added, if necessary.
  • Integration tests have been added, if necessary.

@leseb
leseb requested review from cdoern, russellb and tiran June 18, 2024 16:06
@mergify mergify Bot added the testing Relates to testing label Jun 18, 2024
@leseb

leseb commented Jun 18, 2024

Copy link
Copy Markdown
Contributor Author

TODO:

Comment thread src/instructlab/model/backends/backends.py Outdated
Comment thread src/instructlab/model/backends/backends.py Outdated
@leseb
leseb force-pushed the add-backend-flag branch from 7b86e18 to 29a7f7c Compare June 18, 2024 18:48
@mergify mergify Bot added the ci-failure PR has at least one CI failure label Jun 18, 2024
@leseb
leseb force-pushed the add-backend-flag branch from 29a7f7c to b3eb82d Compare June 18, 2024 18:51
russellb
russellb previously approved these changes Jun 18, 2024
@leseb
leseb force-pushed the add-backend-flag branch from b3eb82d to 51e13e9 Compare June 18, 2024 18:51
@mergify mergify Bot added one-approval PR has one approval from a maintainer and removed ci-failure PR has at least one CI failure labels Jun 18, 2024
@leseb
leseb requested review from russellb and tiran June 18, 2024 18:52
@mergify mergify Bot removed the one-approval PR has one approval from a maintainer label Jun 18, 2024
russellb
russellb previously approved these changes Jun 18, 2024
@mergify mergify Bot added the one-approval PR has one approval from a maintainer label Jun 18, 2024
@leseb
leseb force-pushed the add-backend-flag branch from 51e13e9 to 3f3e071 Compare June 18, 2024 18:57
@mergify mergify Bot removed the one-approval PR has one approval from a maintainer label Jun 18, 2024
@leseb
leseb requested a review from russellb June 18, 2024 19:25
russellb
russellb previously approved these changes Jun 18, 2024
@mergify mergify Bot added the one-approval PR has one approval from a maintainer label Jun 18, 2024
@leseb
leseb force-pushed the add-backend-flag branch from 3f3e071 to aa0f1d2 Compare June 18, 2024 19:47
@mergify mergify Bot removed the one-approval PR has one approval from a maintainer label Jun 18, 2024
@leseb
leseb force-pushed the add-backend-flag branch 2 times, most recently from a362d5c to db5f600 Compare June 18, 2024 19:49
@leseb
leseb force-pushed the add-backend-flag branch from 9223734 to c029c51 Compare June 19, 2024 12:43

@chudegao chudegao left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread scripts/functional-tests.sh Outdated

test_loading_session_history(){
ilab serve --max-ctx-size 128 &
ilab serve --backend llama --max-ctx-size 128 &

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about use engine instead of backend?

@mergify mergify Bot added the ci-failure PR has at least one CI failure label Jun 19, 2024
@leseb
leseb force-pushed the add-backend-flag branch from c029c51 to b041a77 Compare June 19, 2024 13:08
@mergify mergify Bot added needs-rebase This Pull Request needs to be rebased and removed ci-failure PR has at least one CI failure labels Jun 19, 2024
@mergify

mergify Bot commented Jun 19, 2024

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be
merged. @leseb please rebase it. https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@leseb
leseb force-pushed the add-backend-flag branch from b041a77 to bc4901b Compare June 19, 2024 13:25
@mergify mergify Bot removed the needs-rebase This Pull Request needs to be rebased label Jun 19, 2024
@leseb
leseb force-pushed the add-backend-flag branch 2 times, most recently from a1f6638 to 4697bcb Compare June 19, 2024 13:39
@mergify mergify Bot added the ci-failure PR has at least one CI failure label Jun 19, 2024
@leseb
leseb force-pushed the add-backend-flag branch from 4697bcb to 0a1174e Compare June 19, 2024 13:46
@mergify mergify Bot removed the ci-failure PR has at least one CI failure label Jun 19, 2024
Comment thread src/instructlab/model/backends/backends.py Outdated
Comment thread pyproject.toml
@leseb
leseb force-pushed the add-backend-flag branch from 0a1174e to 1dc44cc Compare June 20, 2024 07:18
Comment thread src/instructlab/model/backends/backends.py Outdated
@leseb
leseb force-pushed the add-backend-flag branch from 1dc44cc to bdf8bf2 Compare June 21, 2024 06:45
@mergify mergify Bot added the ci-failure PR has at least one CI failure label Jun 21, 2024
@leseb
leseb force-pushed the add-backend-flag branch from bdf8bf2 to e88ac1f Compare June 21, 2024 06:49
@leseb
leseb requested a review from tiran June 21, 2024 06:50
@leseb
leseb force-pushed the add-backend-flag branch 2 times, most recently from 87c6dfa to a30a983 Compare June 21, 2024 12:57
@mergify mergify Bot added ci-failure PR has at least one CI failure and removed ci-failure PR has at least one CI failure labels Jun 21, 2024
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
leseb force-pushed the add-backend-flag branch from a30a983 to 082b18b Compare June 21, 2024 13:32
@mergify mergify Bot removed the ci-failure PR has at least one CI failure label Jun 21, 2024
@leseb

leseb commented Jun 21, 2024

Copy link
Copy Markdown
Contributor Author

#1442 contains all of that now.

@leseb leseb closed this Jun 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

testing Relates to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants