Просмотр исходного кода

ggml : model card yaml tab->2xspace (#14819)

Csaba Kecskemeti 5 месяцев назад
Родитель
Сommit
acd6cb1c41
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      gguf-py/gguf/metadata.py

+ 4 - 0
gguf-py/gguf/metadata.py

@@ -144,6 +144,10 @@ class Metadata:
         # Quick hack to fix the Norway problem
         # https://hitchdev.com/strictyaml/why/implicit-typing-removed/
         yaml_content = yaml_content.replace("- no\n", "- \"no\"\n")
+        # yaml should use 2 spaces insted of tab
+        # this issue has came up with the Qwen/Qwen3-235B-A22B-Instruct-2507 model card
+        #    (I've also sent a pr tp fix the modelcard too)
+        yaml_content = yaml_content.replace("\t", "  ")
 
         if yaml_content:
             data = yaml.safe_load(yaml_content)