-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨Deepsparse Backend implementation #29
base: main
Are you sure you want to change the base?
Conversation
* settings.py::DeepsparseSettings includes all the settings * tests/unit/backend/deepsparse.py includes unit tests * `TestTextGenerationPipeline` mocks the `deepsparse.pipeline.Pipeline`
from deepsparse import Pipeline | ||
from deepsparse import Pipeline, TextGeneration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean deepsparse is a dep of guidellm? We should keep it optional at most IMO, so could this be in a try catch with an informational message to install?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, since the backend/deepsparse/__init__.py
exists we determine it as a module so before you reach the deepsparse/backend.py
you are going to run such a validation.
Also, all the imports are like from guidellm.backend import Backend, BackendEngine
but if you need the deepsparse just from .guidellm.backend.deepsparse import DeepsparseBackend
which runs this validation.
Also the deepsparse
is an optional dependency. At least it is in optional section
* `DeepsparseSettings` is completely removed
`backend.DeepsparseBackend` -> `backend.deepsparse.DeepsparseBackend`
Summary
The Deepsparse Backend interface is implemented.
pyproject.toml
fileruff
errors are suppressedDeepsparseBackend
gets configurations from CLI, environment or defaultssettings.py::DeepsparseSettings
includes all the settingstests/unit/backend/deepsparse.py
includes unit testsTestTextGenerationPipeline
mocks thedeepsparse.pipeline.Pipeline
Usage
This is an example of a command you can use in your terminal:
--data=openai_humaneval
: determines the dataset--model=/local/path/my_model
: determines the local path to the model object. If not specified - the env variable will be used.Environment configuration
The model could also be set with
GUIDELLM__LLM_MODEL
. If the CLI value or environment variable is not set, then the default will be used. Currently, the default model is:mistralai/Mistral-7B-Instruct-v0.3
.