Skip to content

Commit 8a5870f

Browse files
committed
refactor(cli): remove onnxruntime-web dependency
Use custom-built ONNX Runtime from packages/onnxruntime instead of npm package. - Update type import in minilm-inference.mts to use local build - Remove onnxruntime-web from dependencies - Update lockfile The extraction script now reads from packages/onnxruntime/build/wasm/ which is built from source with WASM_ASYNC_COMPILATION=0 for synchronous loading.
1 parent 9ce1220 commit 8a5870f

File tree

3 files changed

+3
-116
lines changed

3 files changed

+3
-116
lines changed

packages/cli/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@
181181
},
182182
"dependencies": {
183183
"ajv-dist": "8.17.1",
184-
"compromise": "14.14.4",
185-
"onnxruntime-web": "1.23.0"
184+
"compromise": "14.14.4"
186185
}
187186
}

packages/cli/src/utils/minilm-inference.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
import { WordPieceTokenizer } from './wordpiece-tokenizer.mts'
5252

5353
import type { Vocabulary } from './wordpiece-tokenizer.mts'
54-
import type { InferenceSession } from 'onnxruntime-web'
54+
import type { InferenceSession } from '../../build/onnx-sync.mjs'
5555

5656
/**
5757
* MiniLM inference result.

pnpm-lock.yaml

Lines changed: 1 addition & 113 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)