From 34dc7306b8cb8976ea55b692bbe4260629dd8f56 Mon Sep 17 00:00:00 2001 From: Panchovix Date: Wed, 13 Sep 2023 02:35:09 -0300 Subject: [PATCH] Fix NTK (alpha) and RoPE scaling for exllamav2 and exllamav2_HF (#3897) --- modules/exllamav2.py | 6 +++--- modules/exllamav2_hf.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/exllamav2.py b/modules/exllamav2.py index c64714e8..6d4603c5 100644 --- a/modules/exllamav2.py +++ b/modules/exllamav2.py @@ -28,9 +28,9 @@ class Exllamav2Model: config.prepare() config.max_seq_len = shared.args.max_seq_len - config.rope_scale = shared.args.compress_pos_emb - config.rope_alpha = shared.args.alpha_value - + config.scale_pos_emb = shared.args.compress_pos_emb + config.scale_alpha_value = shared.args.alpha_value + model = ExLlamaV2(config) split = None diff --git a/modules/exllamav2_hf.py b/modules/exllamav2_hf.py index 65b98596..a8837af1 100644 --- a/modules/exllamav2_hf.py +++ b/modules/exllamav2_hf.py @@ -116,7 +116,7 @@ class Exllamav2HF(PreTrainedModel): config.prepare() config.max_seq_len = shared.args.max_seq_len - config.rope_scale = shared.args.compress_pos_emb - config.rope_alpha = shared.args.alpha_value + config.scale_pos_emb = shared.args.compress_pos_emb + config.scale_alpha_value = shared.args.alpha_value return Exllamav2HF(config)