mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-04-04 14:17:28 +00:00
Add a --torch-compile flag for transformers
This commit is contained in:
parent
11af199aff
commit
c0f600c887
5 changed files with 9 additions and 2 deletions
|
|
@ -254,6 +254,9 @@ def huggingface_loader(model_name):
|
|||
print()
|
||||
model = LoaderClass.from_pretrained(path_to_model, **params)
|
||||
|
||||
if shared.args.torch_compile:
|
||||
model = torch.compile(model)
|
||||
|
||||
return model
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue