unsloth/studio/backend/core/rag
Roland Tannous 810e3a80be Studio: truncate BGE-VL text inputs to CLIP's 77-token cap
BGE-VL inherits CLIP's 77-token text positional embedding table —
longer chunks crash inside the text model with a shape mismatch.
Pre-tokenize with truncation=True, max_length=77 and call
get_text_features directly so the high-level encode() (which does
not truncate) is bypassed. Log when truncation happens — text
chunks beyond the cap are silently cut, so multimodal mode is
lossy on the text channel. Image channel is unaffected.
2026-05-24 21:42:23 +04:00
..
parsers Studio: layout-aware RAG parsers + heading-aware chunking (Phase 3A) 2026-05-24 11:10:13 +04:00
__init__.py Studio: add RAG with hybrid search, reranker, chat integration 2026-05-23 18:46:15 +04:00
bm25.py Studio: add RAG with hybrid search, reranker, chat integration 2026-05-23 18:46:15 +04:00
chunking.py Studio: late chunking opt-in per KB (Phase 3B-late) 2026-05-24 12:18:09 +04:00
embeddings.py Studio: truncate BGE-VL text inputs to CLIP's 77-token cap 2026-05-24 21:42:23 +04:00
ingestion.py Studio: multimodal RAG mode (Phase 3B-multimodal) 2026-05-24 12:33:08 +04:00
reranker.py Studio: multimodal RAG mode (Phase 3B-multimodal) 2026-05-24 12:33:08 +04:00
retrieval.py Studio: always pre-fetch RAG + min-score threshold + retrieval logging 2026-05-24 18:15:02 +04:00
tool.py Studio: always pre-fetch RAG + min-score threshold + retrieval logging 2026-05-24 18:15:02 +04:00
vector_store.py Studio: switch RAG dense search to qdrant query_points API 2026-05-24 18:27:49 +04:00