mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-10 20:04:52 +00:00
Load quantize_config.json
from local path
This commit is contained in:
parent
9f18f4c006
commit
987b0fff3a
@ -220,8 +220,12 @@ class Weights:
|
|||||||
|
|
||||||
return bits, groupsize
|
return bits, groupsize
|
||||||
|
|
||||||
def _set_gptq_params(self, model_id):
|
def _set_gptq_params(self, model_id: str):
|
||||||
try:
|
try:
|
||||||
|
potential_local_path = Path(model_id, "quantize_config.json")
|
||||||
|
if potential_local_path.exists():
|
||||||
|
filename = potential_local_path
|
||||||
|
else:
|
||||||
filename = hf_hub_download(model_id, filename="quantize_config.json")
|
filename = hf_hub_download(model_id, filename="quantize_config.json")
|
||||||
with open(filename, "r") as f:
|
with open(filename, "r") as f:
|
||||||
data = json.load(f)
|
data = json.load(f)
|
||||||
|
Loading…
Reference in New Issue
Block a user