Major refactoring to improve performance and add GPU support:
- Migrate from numpy (.npy) to PyTorch tensors (.pt) for embeddings
- Add automatic GPU detection and device selection (cuda/cpu)
- Unify tensor operations - single tensor works for both CPU and GPU
- Fix argsort error in multi-topic similarity computation
- Add Docker GPU support with --gpus flag in run.sh
- Improve performance with vectorized PyTorch operations (40x speedup)
- Maintain backward compatibility with CPU-only environments
Changes:
- Add cache-dir/embeddings_all-mpnet-base-v2_norvig_100000.pt (238MB)
- Update thematic_word_service.py for unified PyTorch tensors
- Add GPU/CPU mode selection in run.sh and build.sh scripts
- Update .gitattributes to track .pt files with Git LFS
Performance improvements:
- GPU acceleration when available (GTX 1650 tested)
- Vectorized operations for multi-topic similarity
- Direct PyTorch tensor operations without numpy conversions
Signed-off-by: Vimal Kumar <vimal78@gmail.com>
feat: add essential cache files for WordNet clue generation
- Add norvig embeddings (239MB) for 100k vocabulary
- Add WordNet corpus for clue generation
- Add OMW-1.4 (Open Multilingual WordNet) corpus
- Add averaged_perceptron_tagger for POS tagging
- Include necessary zip archives
- Exclude punkt tokenizers (not used by application)
clearing up all references to large files in cache-dir
- Includes sentence-transformers model (418MB)
- Pre-computed embeddings (293MB)
- NLTK WordNet data
- Configured Docker to use cache at /app/backend-py/cache
- Setup Git LFS for large files (899MB total)
Signed-off-by: Vimal Kumar <vimal78@gmail.com>