Skip to content

Commit 648f24b

Browse files
committed
docs
1 parent 94df089 commit 648f24b

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [2.4.4] - 2025-07-05
6+
### ✨ Added
7+
- New config option `device` to specify device to use for embedding calculations (e.g., 'cpu' [default], 'webgpu')
8+
- Web UI now supports `device` option
9+
510
## [2.4.3] - 2025-01-30
611
### 📦 Updated
712
- Updated `sentence-parse` to v1.3.1 (wont crash on null inputs)

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ const myChunks = await chunkit(documents, chunkitOptions);
7777
- `combineChunksSimilarityThreshold`: Float (optional, default `0.5`) - Threshold for combining chunks based on similarity during the rebalance and combining phase.
7878
- `onnxEmbeddingModel`: String (optional, default `Xenova/all-MiniLM-L6-v2`) - ONNX model used for creating embeddings.
7979
- `dtype`: String (optional, default `fp32`) - Precision of the embedding model (options: `fp32`, `fp16`, `q8`, `q4`).
80+
- `device`: String (optional, default `cpu`) - The execution provider to use for the model (options: `cpu`, `webgpu`).
8081
- `localModelPath`: String (optional, default `null`) - Local path to save and load models (example: `./models`).
8182
- `modelCacheDir`: String (optional, default `null`) - Directory to cache downloaded models (example: `./models`).
8283
- `returnEmbedding`: Boolean (optional, default `false`) - If set to `true`, each chunk will include an embedding vector. This is useful for applications that require semantic understanding of the chunks. The embedding model will be the same as the one specified in `onnxEmbeddingModel`.
@@ -214,6 +215,12 @@ The behavior of the `chunkit` function can be finely tuned using several optiona
214215
Link to a filtered list of embedding models converted to ONNX library format by Xenova.
215216
Refer to the Model table below for a list of suggested models and their sizes (choose a multilingual model if you need to chunk text other than English).
216217

218+
### `device`
219+
220+
- **Type**: String
221+
- **Default**: `cpu`
222+
- **Description**: Specifies the execution provider for the model. Options are `cpu` and `webgpu`. Use `webgpu` to leverage GPU acceleration for faster processing. Note that WebGPU support may vary by environment.
223+
217224
#### `dtype`
218225

219226
- **Type**: String
@@ -280,6 +287,7 @@ There is an additional function you can import to just "cram" sentences together
280287
- `maxTokenSize`: Integer (optional, default `500`) - Maximum token size for each chunk.
281288
- `onnxEmbeddingModel`: String (optional, default `Xenova/all-MiniLM-L6-v2`) - ONNX model used for creating embeddings.
282289
- `dtype`: String (optional, default `fp32`) - Precision of the embedding model (options: `fp32`, `fp16`, `q8`, `q4`).
290+
- `device`: String (optional, default `cpu`) - The execution provider to use for the model (options: `cpu`, `webgpu`).
283291
- `localModelPath`: String (optional, default `null`) - Local path to save and load models (example: `./models`).
284292
- `modelCacheDir`: String (optional, default `null`) - Directory to cache downloaded models (example: `./models`).
285293
- `returnEmbedding`: Boolean (optional, default `false`) - If set to `true`, each chunk will include an embedding vector. This is useful for applications that require semantic understanding of the chunks. The embedding model will be the same as the one specified in `onnxEmbeddingModel`.
@@ -337,6 +345,7 @@ There is an additional function you can import to just split sentences.
337345
- `logging`: Boolean (optional, default `false`) - Enables logging of detailed processing steps.
338346
- `onnxEmbeddingModel`: String (optional, default `Xenova/all-MiniLM-L6-v2`) - ONNX model used for creating embeddings.
339347
- `dtype`: String (optional, default `fp32`) - Precision of the embedding model (options: `fp32`, `fp16`, `q8`, `q4`).
348+
- `device`: String (optional, default `cpu`) - The execution provider to use for the model (options: `cpu`, `webgpu`).
340349
- `localModelPath`: String (optional, default `null`) - Local path to save and load models (example: `./models`).
341350
- `modelCacheDir`: String (optional, default `null`) - Directory to cache downloaded models (example: `./models`).
342351
- `returnEmbedding`: Boolean (optional, default `false`) - If set to `true`, each chunk will include an embedding vector. This is useful for applications that require semantic understanding of the chunks. The embedding model will be the same as the one specified in `onnxEmbeddingModel`.

0 commit comments

Comments
 (0)