summaryrefslogtreecommitdiff
path: root/convert.py
diff options
context:
space:
mode:
authorkunnis <kunnis@users.noreply.github.com>2024-04-08 10:44:19 -0500
committerGitHub <noreply@github.com>2024-04-08 17:44:19 +0200
commitcecd8d3c98b48f51aaa1d4c729e55bd319f6799c (patch)
tree976bf475a9d9758fb37118a5cc980bcadb112efb /convert.py
parentb73e564b16086845a8b4fffd26e22685d3e0c3db (diff)
Comment explaining a decision (#6531)
Diffstat (limited to 'convert.py')
-rwxr-xr-xconvert.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/convert.py b/convert.py
index 244eb758..a37aeb5e 100755
--- a/convert.py
+++ b/convert.py
@@ -139,7 +139,8 @@ class GGMLFileType(enum.IntEnum):
dt = GGML_FILE_TYPE_TO_DATA_TYPE.get(self)
if dt is None:
raise ValueError(self)
- # 1D tensors are always F32.
+ # Convert all 1D tensors to F32. Most of the codebase that takes in 1D tensors only handles F32 tensors, and most of the outputs tensors are F32.
+ # Also The 1d tensors aren't much of a performance/size issue. So instead of having to have separate F32 and F16 implementations of both, just convert everything to F32 for now.
return dt if len(tensor.shape) > 1 else DT_F32