[BugFix] Fix the accuracy issue of multimodal input. (#1020)
Signed-off-by: amy-why-3459 <wuhaiyan17@huawei.com> Co-authored-by: Rein Yang <ruiruyang2@gmail.com>
This commit is contained in:
1 parent
5b8ade8446
commit
dd518973de
7 files changed
+87
-68
No files matched your search
@@ -114,7 +114,7 @@ class OmniRequestState(RequestState):
|
||||
if k == "audio":
|
||||
# When the audio tensor shape is inconsistent, torch.cat will fail.
|
||||
# We need to use torch.cat in -1 dimension.
|
||||
self.mm_accumulated[k] = torch.cat(v, dim=-1)
|
||||
continue
|
||||
else:
|
||||
self.mm_accumulated[k] = torch.cat(v, dim=0)
|
||||
except Exception:
|
||||
|
||||
Reference in new issue
Block a user