From 9ab7365b5637f0474dec1b655680e3eda9c31c24 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Mon, 1 Apr 2024 20:25:31 -0700 Subject: [PATCH] Read rope_theta for DBRX model (thanks turboderp) --- modules/models_settings.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/models_settings.py b/modules/models_settings.py index b3d2dc64..76effa87 100644 --- a/modules/models_settings.py +++ b/modules/models_settings.py @@ -84,6 +84,8 @@ def get_model_metadata(model): if 'rope_theta' in metadata: model_settings['rope_freq_base'] = metadata['rope_theta'] + elif 'attn_config' in metadata and 'rope_theta' in metadata['attn_config']: + model_settings['rope_freq_base'] = metadata['attn_config']['rope_theta'] if 'rope_scaling' in metadata and type(metadata['rope_scaling']) is dict and all(key in metadata['rope_scaling'] for key in ('type', 'factor')): if metadata['rope_scaling']['type'] == 'linear':