-
Notifications
You must be signed in to change notification settings - Fork 722
Add an interface for LLM runner #6356
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/6356
Note: Links to docs will display an error until the docs builds have been completed. ❌ 3 New FailuresAs of commit bc1f420 with merge base 2c43190 ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
In case we have custom LLM runners other than llama runner, we want to have a uniform interface
a5929ca to
81a2055
Compare
| namespace extension { | ||
| namespace llm { | ||
|
|
||
| class ET_EXPERIMENTAL RunnerInterface { |
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.
Maybe call it IRunner? Also what is the actual usage of having this interface? Can you also include the changes you want to make, to reduce duplicate code?
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.
Maybe call it IRunner
Works for me
That code is not ready yet
c326957 to
0bf4f4a
Compare
| virtual ~IRunner() = default; | ||
|
|
||
| // Checks if the model is loaded. | ||
| virtual bool is_loaded() const = 0; |
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.
This can have a default implementation right?
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.
Maybe not.
executorch/examples/models/llama/runner/runner.cpp
Lines 62 to 65 in 516a417
| bool Runner::is_loaded() const { | |
| return module_->is_loaded() && tokenizer_ && text_decoder_runner_ && | |
| text_prefiller_ && text_token_generator_; | |
| } |
it's quite impl detail
|
Please fix the CI failures |
|
@kirklandsign has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
|
@kirklandsign merged this pull request in 4d7b294. |
In case we have custom LLM runners other than llama runner, we want to have a uniform interface