Skip to content

Commit

Permalink
Update models_settings.py: add default alpha_value, add proper compre…
Browse files Browse the repository at this point in the history
…ss_pos_emb for newer GGUFs (oobabooga#6111)
  • Loading branch information
mefich authored and PoetOnTheRun committed Oct 22, 2024
1 parent 28ed560 commit 4d706ca
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/models_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def get_fallback_settings():
'n_ctx': 2048,
'rope_freq_base': 0,
'compress_pos_emb': 1,
'alpha_value': 1,
'truncation_length': shared.settings['truncation_length'],
'skip_special_tokens': shared.settings['skip_special_tokens'],
'custom_stopping_strings': shared.settings['custom_stopping_strings'],
Expand Down Expand Up @@ -58,6 +59,8 @@ def get_model_metadata(model):
model_settings['rope_freq_base'] = metadata[k]
elif k.endswith('rope.scale_linear'):
model_settings['compress_pos_emb'] = metadata[k]
elif k.endswith('rope.scaling.factor'):
model_settings['compress_pos_emb'] = metadata[k]
elif k.endswith('block_count'):
model_settings['n_gpu_layers'] = metadata[k] + 1

Expand Down

0 comments on commit 4d706ca

Please sign in to comment.