mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-04-23 16:02:10 +00:00
fix the usual merge mess
This commit is contained in:
parent
9401e10210
commit
74e6d6e54e
@ -176,3 +176,18 @@ class Weights:
|
|||||||
else:
|
else:
|
||||||
weight = self.get_sharded(f"{prefix}.weight", dim=1)
|
weight = self.get_sharded(f"{prefix}.weight", dim=1)
|
||||||
return weight
|
return weight
|
||||||
|
|
||||||
|
def get_gptq_qparams(self) -> Tuple[int, int]:
|
||||||
|
try:
|
||||||
|
bits = self.get_tensor("gptq_bits").item()
|
||||||
|
groupsize = self.get_tensor("gptq_groupsize").item()
|
||||||
|
except (SafetensorError, RuntimeError) as e:
|
||||||
|
try:
|
||||||
|
import os
|
||||||
|
|
||||||
|
bits = int(os.getenv("GPTQ_BITS"))
|
||||||
|
groupsize = int(os.getenv("GPTQ_GROUPSIZE"))
|
||||||
|
except Exception:
|
||||||
|
raise e
|
||||||
|
|
||||||
|
return bits, groupsize
|
Loading…
Reference in New Issue
Block a user