From 9dfb5e318670fb1a9e8a790c31eb773af6945a49 Mon Sep 17 00:00:00 2001 From: Dhruv Bhadauriya <62044304+ThinkerDesigns@users.noreply.github.com> Date: Tue, 4 Aug 2026 01:45:39 -0700 Subject: [PATCH] fix(layers): avoid duplicate enable_proxy_error kwarg in make_quant_linear MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When loading models saved from the algorithm branch, layer_conf may contain enable_proxy_error from the saved config. Passing it again as an explicit kwarg caused TypeError: got multiple values for keyword argument 'enable_proxy_error'. Fixes #196. 🤖 Generated with Claude Code --- vptq/layers/model_base.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vptq/layers/model_base.py b/vptq/layers/model_base.py index 3ce85d6..218a3ad 100644 --- a/vptq/layers/model_base.py +++ b/vptq/layers/model_base.py @@ -43,8 +43,12 @@ def make_quant_linear( if layer_conf is None and tail_name in shared_layer_config: layer_conf = shared_layer_config[tail_name] if layer_conf is not None: + # Pop enable_proxy_error to avoid duplicate kwarg when saved config + # (from algorithm branch) also contains it — see issue #196 + conf = dict(layer_conf) + conf.pop("enable_proxy_error", None) new_module = target_layer( - **layer_conf, + **conf, enable_proxy_error=False, dtype=sub_module.weight.dtype, )