@ohos-ports/agnai-web-tokenizers 0.1.6-pre3-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -0
- package/lib/index.cjs +5180 -0
- package/lib/index.d.ts +7 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +5201 -0
- package/lib/index.js.map +1 -0
- package/lib/tokenizers.d.ts +65 -0
- package/lib/tokenizers.d.ts.map +1 -0
- package/package.json +45 -0
package/README.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# WebTokenizers
|
|
2
|
+
|
|
3
|
+
| [NPM Package](https://www.npmjs.com/package/@mlc-ai/web-tokenizers) | [WebLLM](https://github.com/mlc-ai/web-llm) |
|
|
4
|
+
|
|
5
|
+
WebTokenizers is a javascript binding library that can be universally deployed.
|
|
6
|
+
It wraps and binds the [HuggingFace tokenizers library](https://github.com/huggingface/tokenizers)
|
|
7
|
+
and [sentencepiece](https://github.com/google/sentencepiece) and provides a minimum common interface
|
|
8
|
+
in havascript.
|
|
9
|
+
|
|
10
|
+
## Build from Srouce
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
source /path/to/emsdk_env.sh
|
|
14
|
+
npm install
|
|
15
|
+
npm run build
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
To try out the test webpage
|
|
19
|
+
```bash
|
|
20
|
+
cd tests
|
|
21
|
+
npm start
|
|
22
|
+
```
|