-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[sharktank] Add common model config, export and compile
We don't have a standard way to configure, export and compile sharktank models. Here is introduced such mechanism and for demonstration the CLIP text model is refactored to utilize this new approach. `config.json`: ``` { "model_type": "MyModel", "mlir_path": "model.mlir", "parameters_path": "model.irpa", "iree_module_path": "model.vmfb", "compile_args": ["--iree-hal-target-device=local"], "export_functions": [ { "function": "forward", "batch_sizes": [1, 2, 3] } ] } ``` usage ``` model = create_model("config.json") model.export() model.compile() ```
- Loading branch information
Showing
18 changed files
with
829 additions
and
219 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ | |
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
from .llm_configs import * | ||
from .config import * |
Oops, something went wrong.