mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-10 20:04:52 +00:00
support local model config file
This commit is contained in:
parent
c5de7cd886
commit
5f76dae04a
@ -179,6 +179,9 @@ def download_weights(
|
||||
import json
|
||||
|
||||
|
||||
if is_local_model:
|
||||
config_filename = os.path.join(model_id, "config.json")
|
||||
else:
|
||||
config_filename = hf_hub_download(model_id, revision=revision, filename="config.json")
|
||||
with open(config_filename, "r") as f:
|
||||
config = json.load(f)
|
||||
|
Loading…
Reference in New Issue
Block a user