From d929361cca493671da243752e6e04c3d9b50d215 Mon Sep 17 00:00:00 2001 From: xiaotinghe Date: Fri, 18 Apr 2025 10:58:28 +0000 Subject: [PATCH] feat: add LMDB support for multimodal resources - Implement LMDB database integration for efficient loading of large multimodal datasets - Add caching mechanism for LMDB environments and transactions to improve performance - Update documentation with LMDB usage examples for both Chinese and English - Update type hints in vision_utils.py to reflect new functionality - Add graceful handling for environments without LMDB installed --- ...11\346\225\260\346\215\256\351\233\206.md" | 10 ++++- .../source_en/Customization/Custom-dataset.md | 7 ++- swift/llm/template/vision_utils.py | 44 ++++++++++++++++++- 3 files changed, 57 insertions(+), 4 deletions(-) diff --git "a/docs/source/Customization/\350\207\252\345\256\232\344\271\211\346\225\260\346\215\256\351\233\206.md" "b/docs/source/Customization/\350\207\252\345\256\232\344\271\211\346\225\260\346\215\256\351\233\206.md" index 78814ac2c8..d0d4e06f51 100644 --- "a/docs/source/Customization/\350\207\252\345\256\232\344\271\211\346\225\260\346\215\256\351\233\206.md" +++ "b/docs/source/Customization/\350\207\252\345\256\232\344\271\211\346\225\260\346\215\256\351\233\206.md" @@ -109,20 +109,26 @@ query-response格式: ### 多模态 -对于多模态数据集,和上述任务的格式相同。区别在于增加了`images`, `videos`, `audios`几个key,分别代表多模态资源的url或者path(推荐使用绝对路径),`` `