Spaces:
Paused
Paused
Commit History
-
Switch to Qwen3-VL-4B-Thinking for single-GPU simplicity
Architecture change: - Vision: 30B MoE (4 GPU TP) → 4B Dense (single GPU) - tensor_parallel_size: 4 → 1 - gpu_memory_utilization: 0.50 → 0.80 - Removed NCCL workarounds (not needed for single GPU) Why: 30B MoE model failed on 4xL4 due to vLLM V1 + NCCL issues (L4s lack NVLINK). 4B dense model fits on single L4 (22GB), eliminates all multi-GPU coordination problems. Memory: ~18GB total (10GB vision + 4GB embed + 4GB rerank) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>14c59e5 -
Reduce context/memory to minimize NCCL overhead on L4s
Changes: - max_model_len: 16384 → 8192 (half context length) - gpu_memory_utilization: 0.70 → 0.50 (less memory pressure) L4 GPUs lack NVLINK, making tensor parallelism communication slow via PCIe. Reducing these values minimizes NCCL overhead. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>7d5c713 -
Force vLLM V0 engine + reduce max_model_len for stability
- VLLM_USE_V1=0: Force stable V0 engine instead of V1 - Reduce max_model_len from 32768 to 16384 for memory safety - Keep NCCL and spawn settings for multi-GPU reliability Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>3c9a722 -
Frontend simplification (4→2 tabs) + lazy imports for HF Spaces
Major changes: - Consolidate 4 tabs into 2: Input (room+images+observations) and Results+Chat - Add chat interface for Q&A and document modifications (pipeline/chat.py) - Lazy imports throughout to defer chromadb until needed - Auto-build RAG index on startup if empty - Default mock_models=False for production Files added: - ui/tabs/input_tab.py: Combined input tab with accordions - ui/tabs/results_tab.py: Results display with chat interface - pipeline/chat.py: Chat handler using vision model in text-only mode Import chain fixes (HF Spaces compatibility): - pipeline/__init__.py: __getattr__ lazy imports - rag/__init__.py: __getattr__ lazy imports - pipeline/main.py, dispositions.py, generator.py: TYPE_CHECKING + deferred imports - rag/retriever.py: Lazy vectorstore import in __init__ FDAM methodology fixes: - Public/Childcare lead threshold: 4.3 → 0.54 µg/100cm² (FDAM §1.4) - Sample density tiers for large areas (FDAM §2.3) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>78caafb -
Replace dual 8B with single 30B-A3B FP8 vision model
Simplify pipeline architecture: - Vision: Qwen3-VL-30B-A3B-Thinking-FP8 (~30-35GB) replaces dual 8B - Embedding: 2B model (2048-dim) replaces 8B - Reranker: 2B model replaces 8B - Total VRAM: ~38-43GB (was ~68GB), 45GB+ headroom on 4xL4 Key changes: - vLLM with FP8 quantization (built-in, no autoawq needed) - Proper Qwen3-VL chat template formatting via processor - Removed dual-model Thinking→Instruct pipeline - Single model handles analysis + structured JSON output Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>706520f -
Reduce thinking model max_new_tokens to fix slow inference
Root cause: max_new_tokens=32768 caused ~27 min inference time, appearing as a "hang". Reduced to 8192 for ~7 min thinking stage. The device mismatch warning is expected behavior - transformers handles routing internally for device_map="auto" models. Also includes ruff auto-fixes for unused imports. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>0699c5f -
Replace 30B MoE with dual 8B models (Thinking + Instruct)
Architecture change: - Vision: Qwen3-VL-30B-A3B-Instruct → dual Qwen3-VL-8B-Thinking + 8B-Instruct - Two-stage pipeline: Thinking (deep analysis) → Instruct (JSON formatting) - VRAM: 90GB → 68GB (~22GB savings, 20GB headroom on 4xL4) Key changes: - models/real.py: New DualVisionModel with token-based </think> parsing - config/settings.py: Dual model paths (vision_model_thinking, vision_model_instruct) - config/inference.py: ThinkingInferenceConfig (temp=0.6, max_tokens=32768) - Removed all lazy loading code (load_vision/unload_vision/load_rag) - All 4 models now load simultaneously at startup Per Qwen3-VL GitHub recommended hyperparameters for thinking models. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>333c083
-
Fix critical model implementations and add sample scenarios
Model Fixes (verified against official Qwen3-VL-Embedding repo): - Embedding: Use last-token pooling instead of mean pooling - Embedding: Fix dimension from 768/384 to 4096 - Reranker: Use yes/no LM head weights + sigmoid instead of CLS norm - Apply fixes in both models/real.py and rag/vectorstore.py Additional Changes: - Add sample scenarios with real fire damage images - Add E2E tests with Playwright - Fix Gradio 6.x tab navigation tests - Add logging configuration - Improve UI form handling All 179 unit tests pass. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>f3ebc82 -
Initial commit: FDAM AI Pipeline v4.0.1
- Gradio-based fire damage assessment application - Qwen3-VL vision model integration (mock + real) - RAG-based knowledge retrieval with ChromaDB - FDAM-compliant calculations (ACH, sample density) - PDF generation with WeasyPrint - Session persistence via localStorage - 151 passing tests Ready for HuggingFace Spaces deployment on 4xL4 (96GB VRAM) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>88bdcff