mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
show_budget fix
This commit is contained in:
10
kai_model_ad.py
Normal file
10
kai_model_ad.py
Normal file
@ -0,0 +1,10 @@
|
||||
import patch_torch_save
|
||||
from transformers import AutoModel
|
||||
|
||||
def kaiad(): # put arbitrary code in here
|
||||
print("This model was provided for free by KoboldAI. Check out our free interface at KoboldAI.org")
|
||||
|
||||
patched_save_function = patch_torch_save.patch_save_function(kaiad)
|
||||
|
||||
model = AutoModel.from_pretrained("facebook/opt-125m")
|
||||
model.save_pretrained("./local_folder", save_function=patched_save_function) # optionally, upload to HF hub
|
Reference in New Issue
Block a user