brainy/examples
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
..
cloud-deployments refactor: simplify build system and improve model loading flexibility 2025-08-05 16:09:30 -07:00
docker-deployment refactor: simplify build system and improve model loading flexibility 2025-08-05 16:09:30 -07:00
simple-deployment refactor: simplify build system and improve model loading flexibility 2025-08-05 16:09:30 -07:00
cli-wrapper-example.js **style(cli): update examples with consistent formatting and clean code** 2025-07-15 11:53:42 -07:00
flush-statistics-example.js **feat(examples, core, docs): add flushStatistics example, implementation, and documentation** 2025-07-25 10:55:37 -07:00
gpu-acceleration.js feat: add GPU acceleration for embeddings with smart device auto-detection 2025-08-05 20:00:04 -07:00
type-utils-example.js **feat(utils): add type utility functions and examples for runtime type management** 2025-07-31 14:24:16 -07:00
type-utils-example.ts **feat(utils): add type utility functions and examples for runtime type management** 2025-07-31 14:24:16 -07:00
write-only-mode.js **feat: add write-only mode support and example usage** 2025-07-30 13:32:30 -07:00