From dd8902d3e4aa8fdc75c0a8eb9049b8bd2525fcfc Mon Sep 17 00:00:00 2001 From: Ivan Stepanov Date: Thu, 4 May 2023 13:46:33 +0300 Subject: [PATCH] Update convert.py Co-authored-by: Pavol Rusnak --- convert.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/convert.py b/convert.py index 1de01dbcf..e639851bc 100644 --- a/convert.py +++ b/convert.py @@ -980,7 +980,7 @@ class OutputFile: def pick_output_type(model: LazyModel, output_type_str: Optional[str]) -> GGMLFileType: 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 if output_type_str == "f16" or (output_type_str is None and wq_type == DT_F16): return GGMLFileType.MostlyF16