Commit graph

4 commits

Author SHA1 Message Date
b879844411 0.9.11 2025-06-27 14:07:07 -07:00
bba9a0c219 feat(src/brainyData, src/utils): enhance embedding efficiency with batch processing and initialize safeguards
- Added batch embedding support with `defaultBatchEmbeddingFunction`, leveraging shared model instances for optimized performance.
- Integrated `isInitializing` flag to prevent recursive initialization and ensure smooth concurrent operation handling during `BrainyData` initialization.
- Pre-loaded Universal Sentence Encoder in `BrainyData` to prevent delays during embedding.
- Introduced fallback mechanisms in embedding initialization for better error resiliency and model reusability.
- Updated `addBatch` with support for batchSize and refactored text/vector processing logic for clearer separation and memory management.
- Improved GPU and CPU backend selection in Universal Sentence Encoder for compatibility across environments.
- Enhanced memory management by cleaning tensors after embedding operations.
- Updated README with instructions for batch embedding, threading updates, and GPU/CPU optimizations.
2025-06-27 14:06:59 -07:00
e00066119e fix(package.json): update TensorFlow dependencies for optimized backend usage
Replaced `@tensorflow/tfjs` and `@tensorflow/tfjs-layers` with `@tensorflow/tfjs-backend-webgl` to optimize backend performance and reduce unused package imports.
2025-06-26 10:48:25 -07:00
5a8a6c1ba3 Initial commit 2025-06-24 11:41:30 -07:00