mirror of
https://github.com/nod-ai/SHARK-Studio.git
synced 2026-01-09 22:07:55 -05:00
[MiniGPT4] Add MiniGPT4 to SHARK (#1554)
* [MiniGPT4] Add MiniGPT4 to SHARK -- This is the first installment of MiniGPT4 in SHARK. Signed-off-by: Abhishek Varma <abhishek@nod-labs.com> * Add int8 support for MiniGPT4 -- This commit adds int8 support for MiniGPT4. Signed-off-by: Abhishek Varma <abhishek@nod-lab.com> * Update .spec for MiniGPT4's config files * black format MiniGPT4 --------- Signed-off-by: Abhishek Varma <abhishek@nod-labs.com> Signed-off-by: Abhishek Varma <abhishek@nod-lab.com>
This commit is contained in:
@@ -56,3 +56,14 @@ for line in fileinput.input(path_to_lazy_loader, inplace=True):
|
||||
)
|
||||
else:
|
||||
print(line, end="")
|
||||
|
||||
# For getting around timm's packaging.
|
||||
# Refer: https://github.com/pyinstaller/pyinstaller/issues/5673#issuecomment-808731505
|
||||
path_to_timm_activations = Path(
|
||||
get_python_lib() + "/timm/layers/activations_jit.py"
|
||||
)
|
||||
for line in fileinput.input(path_to_timm_activations, inplace=True):
|
||||
if "@torch.jit.script" in line:
|
||||
print("@torch.jit._script_if_tracing", end="\n")
|
||||
else:
|
||||
print(line, end="")
|
||||
|
||||
Reference in New Issue
Block a user