From aee2568fed0169bbe286dc9d2a2db3c721dbc9e9 Mon Sep 17 00:00:00 2001 From: Casper Hansen Date: Fri, 6 Dec 2024 17:54:50 +0000 Subject: [PATCH] Fix missing embed_tokens --- awq/models/base.py | 1 + setup.py | 1 + 2 files changed, 2 insertions(+) diff --git a/awq/models/base.py b/awq/models/base.py index 06410c44..16a63b67 100644 --- a/awq/models/base.py +++ b/awq/models/base.py @@ -309,6 +309,7 @@ def forward(self, x): max_shard_size=shard_size, safe_serialization=safetensors, force_contiguous=True, + shared_tensors_to_discard=self.model._tied_weights_keys, ) @classmethod diff --git a/setup.py b/setup.py index bc6c1d8f..77d74ed4 100644 --- a/setup.py +++ b/setup.py @@ -42,6 +42,7 @@ "accelerate", "datasets>=2.20", "zstandard", + "huggingface_hub @ git+https://github.com/huggingface/huggingface_hub@fix-discard-shared-tensors", ] setup(