Add/update the quantized ONNX model files and README.md for Transformers.js v3 (#1)
Browse files- Add/update the quantized ONNX model files and README.md for Transformers.js v3 (2469d95dda67317b980a0daaccba03e97e3daec3)
Co-authored-by: Yuichiro Tachibana <[email protected]>
README.md
CHANGED
@@ -7,3 +7,21 @@ base_model:
|
|
7 |
# llama-ai4privacy-multilingual-categorical-anonymiser-openpii (ONNX)
|
8 |
|
9 |
This is an ONNX version of [ai4privacy/llama-ai4privacy-multilingual-categorical-anonymiser-openpii](https://huggingface.co/ai4privacy/llama-ai4privacy-multilingual-categorical-anonymiser-openpii). It was automatically converted and uploaded using [this space](https://huggingface.co/spaces/onnx-community/convert-to-onnx).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
# llama-ai4privacy-multilingual-categorical-anonymiser-openpii (ONNX)
|
8 |
|
9 |
This is an ONNX version of [ai4privacy/llama-ai4privacy-multilingual-categorical-anonymiser-openpii](https://huggingface.co/ai4privacy/llama-ai4privacy-multilingual-categorical-anonymiser-openpii). It was automatically converted and uploaded using [this space](https://huggingface.co/spaces/onnx-community/convert-to-onnx).
|
10 |
+
|
11 |
+
## Usage (Transformers.js)
|
12 |
+
|
13 |
+
If you haven't already, you can install the [Transformers.js](https://huggingface.co/docs/transformers.js) JavaScript library from [NPM](https://www.npmjs.com/package/@huggingface/transformers) using:
|
14 |
+
```bash
|
15 |
+
npm i @huggingface/transformers
|
16 |
+
```
|
17 |
+
|
18 |
+
**Example:** Perform named entity recognition.
|
19 |
+
|
20 |
+
```js
|
21 |
+
import { pipeline } from '@huggingface/transformers';
|
22 |
+
|
23 |
+
const classifier = await pipeline('token-classification', 'onnx-community/llama-ai4privacy-multilingual-categorical-anonymiser-openpii-ONNX');
|
24 |
+
const output = await classifier('My name is Sarah and I live in London');
|
25 |
+
```
|
26 |
+
|
27 |
+
Note: Having a separate repo for ONNX weights is intended to be a temporary solution until WebML gains more traction. If you would like to make your models web-ready, we recommend converting to ONNX using [🤗 Optimum](https://huggingface.co/docs/optimum/index) and structuring your repo like this one (with ONNX weights located in a subfolder named `onnx`).
|