**feat(models): add scripts for model compression, bundling, and optimization**
- Added new scripts under `brainy-models-package/scripts`:
- **`compress-models.js`**: Implements model compression with float16 and int8 precision to create optimized variants of Universal Sentence Encoder models.
- **`download-full-models.js`**: Downloads the complete Universal Sentence Encoder model for offline usage.
- **`download-model.js`**: Downloads reference files for TensorFlow Hub-based Universal Sentence Encoder.
- Introduced a demonstration script:
- **`demo-optional-model-bundling.js`**: Highlights the solution of bundling models to eliminate network dependency, ensuring reliability and offline capability.
- Key Features:
- **Compression**:
- Reduced model size with float16 (balanced precision and size) and int8 (low-memory environments) options.
- Generated compression summaries for quick insights into model variants and saved space.
- **Offline Reliability**:
- Bundled versions eliminate first-load delays, network dependencies, and failures.
- Ensures rapid initialization in offline and memory-constrained scenarios.
- **Dynamic Optimization**:
- Tailored optimization profiles for various use cases: general, low-memory, and high-performance.
- **Demonstration and Documentation**:
- Comprehensive demo showcasing benefits of bundled models over online loading.
- Examples for usage, testing, and integration with Brainy.
**Purpose**: Introduce essential scripts and tools to enable efficient, offline-ready model usage, streamlining the embedding workflow while ensuring reliability in production and resource-constrained environments.
2025-08-01 15:35:08 -07:00
|
|
|
{
|
2025-08-01 16:08:22 -07:00
|
|
|
"name": "@soulcraft/brainy-models-package",
|
|
|
|
|
"version": "0.0.0",
|
**feat(models): add scripts for model compression, bundling, and optimization**
- Added new scripts under `brainy-models-package/scripts`:
- **`compress-models.js`**: Implements model compression with float16 and int8 precision to create optimized variants of Universal Sentence Encoder models.
- **`download-full-models.js`**: Downloads the complete Universal Sentence Encoder model for offline usage.
- **`download-model.js`**: Downloads reference files for TensorFlow Hub-based Universal Sentence Encoder.
- Introduced a demonstration script:
- **`demo-optional-model-bundling.js`**: Highlights the solution of bundling models to eliminate network dependency, ensuring reliability and offline capability.
- Key Features:
- **Compression**:
- Reduced model size with float16 (balanced precision and size) and int8 (low-memory environments) options.
- Generated compression summaries for quick insights into model variants and saved space.
- **Offline Reliability**:
- Bundled versions eliminate first-load delays, network dependencies, and failures.
- Ensures rapid initialization in offline and memory-constrained scenarios.
- **Dynamic Optimization**:
- Tailored optimization profiles for various use cases: general, low-memory, and high-performance.
- **Demonstration and Documentation**:
- Comprehensive demo showcasing benefits of bundled models over online loading.
- Examples for usage, testing, and integration with Brainy.
**Purpose**: Introduce essential scripts and tools to enable efficient, offline-ready model usage, streamlining the embedding workflow while ensuring reliability in production and resource-constrained environments.
2025-08-01 15:35:08 -07:00
|
|
|
"description": "Pre-bundled TensorFlow models for maximum reliability with Brainy vector database",
|
|
|
|
|
"main": "dist/index.js",
|
|
|
|
|
"module": "dist/index.js",
|
|
|
|
|
"types": "dist/index.d.ts",
|
|
|
|
|
"type": "module",
|
|
|
|
|
"engines": {
|
|
|
|
|
"node": ">=18.0.0"
|
|
|
|
|
},
|
|
|
|
|
"scripts": {
|
|
|
|
|
"prebuild": "npm run download-models",
|
|
|
|
|
"build": "tsc",
|
|
|
|
|
"test": "node test/test-models.js",
|
|
|
|
|
"prepare": "npm run build",
|
2025-08-01 16:08:22 -07:00
|
|
|
"download-models": "node scripts/download-full-models.js",
|
|
|
|
|
"compress-models": "node scripts/compress-models.js",
|
|
|
|
|
"_pack": "npm pack",
|
|
|
|
|
"_release": "standard-version",
|
|
|
|
|
"_release:patch": "standard-version --release-as patch",
|
|
|
|
|
"_release:minor": "standard-version --release-as minor",
|
|
|
|
|
"_release:major": "standard-version --release-as major",
|
|
|
|
|
"_release:dry-run": "standard-version --dry-run",
|
|
|
|
|
"_github-release": "node scripts/create-github-release.js",
|
|
|
|
|
"_workflow": "node scripts/release-workflow.js",
|
|
|
|
|
"_workflow:patch": "node scripts/release-workflow.js patch",
|
|
|
|
|
"_workflow:minor": "node scripts/release-workflow.js minor",
|
|
|
|
|
"_workflow:major": "node scripts/release-workflow.js major",
|
|
|
|
|
"_workflow:dry-run": "npm run build && npm test && npm run _release:dry-run",
|
|
|
|
|
"_deploy": "npm run build && npm publish"
|
**feat(models): add scripts for model compression, bundling, and optimization**
- Added new scripts under `brainy-models-package/scripts`:
- **`compress-models.js`**: Implements model compression with float16 and int8 precision to create optimized variants of Universal Sentence Encoder models.
- **`download-full-models.js`**: Downloads the complete Universal Sentence Encoder model for offline usage.
- **`download-model.js`**: Downloads reference files for TensorFlow Hub-based Universal Sentence Encoder.
- Introduced a demonstration script:
- **`demo-optional-model-bundling.js`**: Highlights the solution of bundling models to eliminate network dependency, ensuring reliability and offline capability.
- Key Features:
- **Compression**:
- Reduced model size with float16 (balanced precision and size) and int8 (low-memory environments) options.
- Generated compression summaries for quick insights into model variants and saved space.
- **Offline Reliability**:
- Bundled versions eliminate first-load delays, network dependencies, and failures.
- Ensures rapid initialization in offline and memory-constrained scenarios.
- **Dynamic Optimization**:
- Tailored optimization profiles for various use cases: general, low-memory, and high-performance.
- **Demonstration and Documentation**:
- Comprehensive demo showcasing benefits of bundled models over online loading.
- Examples for usage, testing, and integration with Brainy.
**Purpose**: Introduce essential scripts and tools to enable efficient, offline-ready model usage, streamlining the embedding workflow while ensuring reliability in production and resource-constrained environments.
2025-08-01 15:35:08 -07:00
|
|
|
},
|
|
|
|
|
"keywords": [
|
|
|
|
|
"tensorflow",
|
|
|
|
|
"models",
|
|
|
|
|
"universal-sentence-encoder",
|
|
|
|
|
"embeddings",
|
|
|
|
|
"brainy",
|
|
|
|
|
"vector-database",
|
|
|
|
|
"offline",
|
|
|
|
|
"bundled"
|
|
|
|
|
],
|
|
|
|
|
"author": "David Snelling (david@soulcraft.com)",
|
|
|
|
|
"license": "MIT",
|
|
|
|
|
"private": false,
|
|
|
|
|
"publishConfig": {
|
|
|
|
|
"access": "public"
|
|
|
|
|
},
|
|
|
|
|
"homepage": "https://github.com/soulcraft-research/brainy",
|
|
|
|
|
"bugs": {
|
|
|
|
|
"url": "https://github.com/soulcraft-research/brainy/issues"
|
|
|
|
|
},
|
|
|
|
|
"repository": {
|
|
|
|
|
"type": "git",
|
|
|
|
|
"url": "git+https://github.com/soulcraft-research/brainy.git",
|
|
|
|
|
"directory": "brainy-models-package"
|
|
|
|
|
},
|
|
|
|
|
"files": [
|
|
|
|
|
"dist/",
|
|
|
|
|
"models/",
|
|
|
|
|
"README.md",
|
|
|
|
|
"LICENSE"
|
|
|
|
|
],
|
|
|
|
|
"dependencies": {
|
2025-08-01 16:08:22 -07:00
|
|
|
"@tensorflow-models/universal-sentence-encoder": "^1.3.3",
|
|
|
|
|
"@tensorflow/tfjs": "^4.23.0-rc.0",
|
|
|
|
|
"@tensorflow/tfjs-node": "^4.23.0-rc.0"
|
**feat(models): add scripts for model compression, bundling, and optimization**
- Added new scripts under `brainy-models-package/scripts`:
- **`compress-models.js`**: Implements model compression with float16 and int8 precision to create optimized variants of Universal Sentence Encoder models.
- **`download-full-models.js`**: Downloads the complete Universal Sentence Encoder model for offline usage.
- **`download-model.js`**: Downloads reference files for TensorFlow Hub-based Universal Sentence Encoder.
- Introduced a demonstration script:
- **`demo-optional-model-bundling.js`**: Highlights the solution of bundling models to eliminate network dependency, ensuring reliability and offline capability.
- Key Features:
- **Compression**:
- Reduced model size with float16 (balanced precision and size) and int8 (low-memory environments) options.
- Generated compression summaries for quick insights into model variants and saved space.
- **Offline Reliability**:
- Bundled versions eliminate first-load delays, network dependencies, and failures.
- Ensures rapid initialization in offline and memory-constrained scenarios.
- **Dynamic Optimization**:
- Tailored optimization profiles for various use cases: general, low-memory, and high-performance.
- **Demonstration and Documentation**:
- Comprehensive demo showcasing benefits of bundled models over online loading.
- Examples for usage, testing, and integration with Brainy.
**Purpose**: Introduce essential scripts and tools to enable efficient, offline-ready model usage, streamlining the embedding workflow while ensuring reliability in production and resource-constrained environments.
2025-08-01 15:35:08 -07:00
|
|
|
},
|
|
|
|
|
"devDependencies": {
|
2025-08-01 16:08:22 -07:00
|
|
|
"@types/node": "^20.11.30",
|
|
|
|
|
"standard-version": "^9.5.0",
|
|
|
|
|
"typescript": "^5.4.5"
|
**feat(models): add scripts for model compression, bundling, and optimization**
- Added new scripts under `brainy-models-package/scripts`:
- **`compress-models.js`**: Implements model compression with float16 and int8 precision to create optimized variants of Universal Sentence Encoder models.
- **`download-full-models.js`**: Downloads the complete Universal Sentence Encoder model for offline usage.
- **`download-model.js`**: Downloads reference files for TensorFlow Hub-based Universal Sentence Encoder.
- Introduced a demonstration script:
- **`demo-optional-model-bundling.js`**: Highlights the solution of bundling models to eliminate network dependency, ensuring reliability and offline capability.
- Key Features:
- **Compression**:
- Reduced model size with float16 (balanced precision and size) and int8 (low-memory environments) options.
- Generated compression summaries for quick insights into model variants and saved space.
- **Offline Reliability**:
- Bundled versions eliminate first-load delays, network dependencies, and failures.
- Ensures rapid initialization in offline and memory-constrained scenarios.
- **Dynamic Optimization**:
- Tailored optimization profiles for various use cases: general, low-memory, and high-performance.
- **Demonstration and Documentation**:
- Comprehensive demo showcasing benefits of bundled models over online loading.
- Examples for usage, testing, and integration with Brainy.
**Purpose**: Introduce essential scripts and tools to enable efficient, offline-ready model usage, streamlining the embedding workflow while ensuring reliability in production and resource-constrained environments.
2025-08-01 15:35:08 -07:00
|
|
|
},
|
|
|
|
|
"peerDependencies": {
|
|
|
|
|
"@soulcraft/brainy": ">=0.33.0"
|
|
|
|
|
}
|
|
|
|
|
}
|