brainy/src/utils
David Snelling cff9ae8215 feat: add GPU acceleration for embeddings with smart device auto-detection
Add comprehensive GPU support for embedding generation while maintaining optimized CPU processing for distance calculations:

- Add device option to TransformerEmbeddingOptions (auto, cpu, webgpu, cuda, gpu)
- Implement smart auto-detection of best available GPU (WebGPU for browsers, CUDA for Node.js)
- Add automatic CPU fallback if GPU initialization fails
- Fix misleading GPU acceleration claims in distance functions and HNSW search
- Update documentation to accurately reflect GPU usage (embeddings only)
- Add comprehensive example demonstrating GPU acceleration usage
- Maintain full backward compatibility with existing code

Performance improvements: 3-5x faster embedding generation when GPU is available, while keeping faster CPU processing for 384-dim vector distance calculations.
2025-08-05 20:00:04 -07:00
..
autoConfiguration.ts feat(auto-configuration): implement automatic configuration system for optimal settings 2025-08-03 17:27:01 -07:00
cacheAutoConfig.ts feat(pagination): implement cursor-based pagination and enhance search caching 2025-08-04 14:25:05 -07:00
crypto.ts feat(distributed): add distributed mode with multi-instance coordination 2025-08-04 12:18:58 -07:00
distance.ts feat: add GPU acceleration for embeddings with smart device auto-detection 2025-08-05 20:00:04 -07:00
embedding.ts feat: add GPU acceleration for embeddings with smart device auto-detection 2025-08-05 20:00:04 -07:00
environment.ts **feat(core): enhance vector handling, model loading, and compatibility** 2025-07-16 13:51:00 -07:00
fieldNameTracking.ts **feat(search): enhance JSON document search with field-level filtering and prioritization** 2025-08-01 08:27:39 -07:00
index.ts refactor: clean up deprecated functions and unused code 2025-08-05 10:16:05 -07:00
jsonProcessing.ts **feat(search): enhance JSON document search with field-level filtering and prioritization** 2025-08-01 08:27:39 -07:00
logger.ts fix(storage): resolve pagination warnings and improve S3 adapter performance 2025-08-05 07:22:05 -07:00
operationUtils.ts **feat: implement robust error-handling and operation utilities for storage adapters** 2025-07-30 11:35:09 -07:00
searchCache.ts feat(pagination): implement cursor-based pagination and enhance search caching 2025-08-04 14:25:05 -07:00
statistics.ts **feat(core, storage, tests): add service-level statistics tracking and storage adapter enhancements** 2025-07-24 11:35:52 -07:00
statisticsCollector.ts fix(core): resolve TypeScript compilation errors and test failures 2025-08-04 20:00:38 -07:00
textEncoding.ts fix: resolve test failures and browser environment issues 2025-08-05 19:38:26 -07:00
typeUtils.ts **feat(utils): add type utility functions and examples for runtime type management** 2025-07-31 14:24:16 -07:00
version.ts refactor: clean up deprecated functions and unused code 2025-08-05 10:16:05 -07:00
workerUtils.ts **feat(tests): add tests for TextEncoder, TensorFlow.js, and fallback mechanisms** 2025-07-11 11:11:56 -07:00