fix(grok): adapt huihui-ai/grok-2 (#21522)
Co-authored-by: Jianzhao Xu <xujianchao@huawei.com>
This commit is contained in:
co-authored by
Jianzhao Xu
parent
494bb86169
commit
73fc87a74f
@@ -983,6 +983,9 @@ def _prepare_presharded_weights(
|
||||
for pattern in allow_patterns:
|
||||
hf_weights_files += glob.glob(os.path.join(hf_folder, pattern))
|
||||
|
||||
if not hf_weights_files:
|
||||
return old_prepare_weights(self, model_name_or_path, revision, fall_back_to_pt)
|
||||
|
||||
if hf_weights_files[0].endswith("safetensors"):
|
||||
use_safetensors = True
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user