Add /v1/internal/model/load endpoint (tentative)

This commit is contained in:
oobabooga 2023-11-07 20:58:06 -08:00
parent 43c53a7820
commit 2358706453
5 changed files with 47 additions and 4 deletions

View file

@ -216,8 +216,7 @@ if __name__ == "__main__":
model_name = shared.model_name
model_settings = get_model_metadata(model_name)
shared.settings.update({k: v for k, v in model_settings.items() if k in shared.settings}) # hijacking the interface defaults
update_model_parameters(model_settings, initial=True) # hijacking the command-line arguments
update_model_parameters(model_settings, initial=True) # hijack the command-line arguments
# Load the model
shared.model, shared.tokenizer = load_model(model_name)