Read GGUF metadata (#3873)

This commit is contained in:
oobabooga 2023-09-11 18:49:30 -03:00 committed by GitHub
parent 39f4800d94
commit 9331ab4798
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 154 additions and 52 deletions

View file

@ -7,10 +7,7 @@ from modules import shared
from modules.chat import generate_chat_reply
from modules.LoRA import add_lora_to_model
from modules.models import load_model, unload_model
from modules.models_settings import (
get_model_settings_from_yamls,
update_model_parameters
)
from modules.models_settings import get_model_metadata, update_model_parameters
from modules.text_generation import (
encode,
generate_reply,
@ -132,7 +129,7 @@ class Handler(BaseHTTPRequestHandler):
shared.model_name = model_name
unload_model()
model_settings = get_model_settings_from_yamls(shared.model_name)
model_settings = get_model_metadata(shared.model_name)
shared.settings.update(model_settings)
update_model_parameters(model_settings, initial=True)