ihtesham0345 commited on
Commit
efb4fe4
Β·
1 Parent(s): 6e467d1

feat: Add 3-tier quantization with auto hardware detection

Browse files

- Tier 1: Qwen2.5-7B with 4-bit NF4 quantization (needs GPU 5.5GB+)
- Tier 2: Qwen2.5-1.5B with 8-bit quantization (GPU or CPU)
- Tier 3: Qwen2.5-0.5B bfloat16 fallback (CPU, default)
- Auto-detect GPU/CPU and select optimal quantization
- Auto-fallback: 7B→1.5B if GPU VRAM insufficient
- Configurable via .env: QUANTIZATION=auto/4bit/8bit/none
- Graceful fallback if bitsandbytes not installed
- Update requirements.txt with bitsandbytes>=0.43.0
- Update Dockerfile with GPU base image option

4 files changed +141 -10
Files changed (4)
.env.example+10
Dockerfile+5
requirements.txt+1
services/model_loader.py+125-10