Commit Graph

14 Commits (a86648ed6607fa014e542c0a47d6c9bb7c9f10c2)

Author SHA1 Message Date
MiniMind-V User a86648ed66 [feat] Implement LoRA + RAG for DriveMind-V
Implemented Day 1 of DriveMind-V plan: parameter-efficient training with LoRA and retrieval-augmented generation with FAISS.

## LoRA (Low-Rank Adaptation)
- Created trainer/lora_utils.py with LoRA configuration helpers
- Created trainer/train_sft_vlm_lora.py for LoRA-enabled SFT training
- Reduces trainable parameters by 98-99% (r=16 → ~1% trainable)
- Memory savings: ~50% during training
- Checkpoint size: 2-5MB vs 100-400MB for full model

## RAG (Retrieval-Augmented Generation)
- Created rag/ package with vector search infrastructure
- rag/vector_store.py: FAISS-based vector storage
- rag/retriever.py: CLIP ViT-B/16 based image retrieval
- rag/rag_vlm.py: RAG-enhanced VLM wrapper
- scripts/build_knowledge_base.py: Build FAISS index from images
- scripts/demo_rag.py: Interactive retrieval demo

## Demo & Testing
- Built demo knowledge base from 8 eval images
- Tested retrieval: perfect match at distance 0.0
- Fixed tensor shape bug in batch encoding

## Stats
- Time: ~1.5 hours
- Files created: 11 new files
- Dependencies added: faiss-cpu==1.13.2

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-03-05 01:13:59 +00:00
jingyaogong 33db76fe10 [update] dataset name 2026-02-05 00:22:58 +08:00
jingyaogong 7e094afa59 [update] shuffle data 2026-01-18 17:02:24 +08:00
jingyaogong 326b24727e [update] sync minimind 2026-01-15 21:51:58 +08:00
jingyaogong 3684285a91 [feat] support parquet data 2025-12-27 10:49:50 +08:00
jingyaogong 32cf4c5c01 [fix] add gc 2025-12-27 01:09:33 +08:00
jingyaogong 13c3a2c093 [fix] cuda memory 2025-12-01 16:35:05 +08:00
jingyaogong a157b66ace [feat] del cuda memory 2025-11-27 19:37:39 +08:00
jingyaogong 7605850e1d [feat] update args 2025-10-30 10:50:54 +08:00
jingyaogong 778aeb2946 [feat] update trainer 2025-10-28 23:34:16 +08:00
jingyaogong 2ce5c31170 [feat] update sft 2025-10-26 21:24:19 +08:00
jingyaogong aebc6fb191 [feat] pause-training 2025-10-26 20:54:13 +08:00
jingyaogong 4c3b5bacbf [fix] 1024-bugs 2025-10-24 00:35:56 +08:00
jingyaogong 623a130c34 250427 2025-04-27 18:13:22 +08:00