Update convert.py
Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
This commit is contained in:
parent
c47b349281
commit
dd8902d3e4
1 changed files with 1 additions and 1 deletions
|
@ -980,7 +980,7 @@ class OutputFile:
|
||||||
|
|
||||||
def pick_output_type(model: LazyModel, output_type_str: Optional[str]) -> GGMLFileType:
|
def pick_output_type(model: LazyModel, output_type_str: Optional[str]) -> GGMLFileType:
|
||||||
wq_type = model["layers.0.attention.wq.weight"].data_type
|
wq_type = model["layers.0.attention.wq.weight"].data_type
|
||||||
if output_type_str == "f32" or (output_type_str is None and (wq_type == DT_F32 or wq_type == DT_BF16)):
|
if output_type_str == "f32" or (output_type_str is None and wq_type in (DT_F32, DT_BF16)):
|
||||||
return GGMLFileType.AllF32
|
return GGMLFileType.AllF32
|
||||||
if output_type_str == "f16" or (output_type_str is None and wq_type == DT_F16):
|
if output_type_str == "f16" or (output_type_str is None and wq_type == DT_F16):
|
||||||
return GGMLFileType.MostlyF16
|
return GGMLFileType.MostlyF16
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue