If you're looking for the Summer Intern version (lightweight, experimental, or early prototype features), please switch to the
summer_internbranch.
Example:git clone -b summer_intern https://github.com/Anderson-ops-oss/Vessel-LLM.git
**Current Status: EXTREME RESOURCE USAGE **
This branch contains experimental integrations of the Qwen3-VL family models. The current implementation imposes massive requirements on system resources.
Tested Environment:
- VRAM: 22 GB (RTX 2080 Ti Modified / Quadro equivalent) -> FAILED (OOM / Full)
- System RAM: 48 GB -> FAILED (Full Saturation)
Conclusion: The current setup (running Qwen3-VL-8B-Thinking + Qwen3-VL-Embedding-2B + Qwen3-VL-Reranker-2B simultaneously) is NOT executable on consumer hardware with < 24GB VRAM, and likely struggles even on an RTX 4090 (24GB).
- Removed LM Studio Dependency: The system no longer relies on an external LM Studio API server.
- Local Inference Engine: Integrated
transformersandacceleratedirectly intoserver.pyfor native Python inference. - Streaming Refactor: Re-implemented streaming using
TextIteratorStreamerwith multi-threading to support real-time token generation from local models.
- Main LLM: Updated to
Qwen/Qwen3-VL-8B-Thinking(configured for 4-bit quantization viabitsandbytes). - Multimodal Support: Backend now supports processing Images and PDF-to-Image conversion directly for visual question answering.
- Custom Embedding Adapter:
- Implemented
Qwen3VLEmbeddingclass to bypass LlamaIndex's incompatibility withQwen3VLConfig. - Manually implements Mean Pooling to extract dense vectors from the generative model.
- Implemented
- Custom Reranker Adapter:
- Implemented
Qwen3VLRerankerclass. - Due to the generative nature of Qwen3-VL (lack of classification head), the Reranker now operates in a Bi-Encoder mode (Cosine Similarity of embeddings) instead of a traditional Cross-Encoder mode.
- Implemented
- Singleton Model Loading: Refactored
server.pyto load Embedding and Reranker models only once globally, sharing the instance across all RAG knowledge bases to prevent exponential VRAM usage. - Mixed Precision:
- Main LLM: 4-bit Quantization (NF4).
- RAG Models: FP16 (Standard Precision) - Note: This is the current bottleneck causing high VRAM usage.
- OOM / High VRAM: The combined footprint of one 8B LLM and two 2B FP16 models exceeds 22GB VRAM.
- System RAM Spike: Loading
bitsandbytesmodels andAutoModelsimultaneously spikes system RAM usage, potentially causing crashes on systems with < 64GB RAM. - Quantization Incompatibility: 4-bit quantization for the RAG models (Embedding/Reranker) caused
weight is not an nn.Moduleerrors due to conflicts with Qwen3-VL's custom remote code, forcing a rollback to FP16.
- Investigate lower precision (4B model) or alternative embedding models to fit consumer hardware.
- Explore 8-bit loading for RAG models or fix the 4-bit compatibility issue.