Add/update the quantized ONNX model files and README.md for Transformers.js v3
#2
by whitphx - opened
- README.md +3 -4
- onnx/decoder_model_bnb4.onnx +3 -0
- onnx/decoder_model_fp16.onnx +3 -0
- onnx/decoder_model_int8.onnx +3 -0
- onnx/decoder_model_merged_bnb4.onnx +3 -0
- onnx/decoder_model_merged_fp16.onnx +2 -2
- onnx/decoder_model_merged_int8.onnx +3 -0
- onnx/decoder_model_merged_q4.onnx +3 -0
- onnx/decoder_model_merged_q4f16.onnx +3 -0
- onnx/decoder_model_merged_uint8.onnx +3 -0
- onnx/decoder_model_q4.onnx +3 -0
- onnx/decoder_model_q4f16.onnx +3 -0
- onnx/decoder_model_uint8.onnx +3 -0
- onnx/decoder_with_past_model_bnb4.onnx +3 -0
- onnx/decoder_with_past_model_fp16.onnx +3 -0
- onnx/decoder_with_past_model_int8.onnx +3 -0
- onnx/decoder_with_past_model_q4.onnx +3 -0
- onnx/decoder_with_past_model_q4f16.onnx +3 -0
- onnx/decoder_with_past_model_uint8.onnx +3 -0
- onnx/encoder_model_bnb4.onnx +3 -0
- onnx/encoder_model_q4.onnx +3 -0
- onnx/encoder_model_q4f16.onnx +3 -0
- onnx/encoder_model_uint8.onnx +3 -0
README.md
CHANGED
|
@@ -11,15 +11,15 @@ https://huggingface.co/facebook/nougat-small with ONNX weights to be compatible
|
|
| 11 |
|
| 12 |
## Usage (Transformers.js)
|
| 13 |
|
| 14 |
-
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/@
|
| 15 |
```bash
|
| 16 |
-
npm i @
|
| 17 |
```
|
| 18 |
|
| 19 |
You can then use the model to convert images of scientific PDFs into markdown like this:
|
| 20 |
|
| 21 |
```js
|
| 22 |
-
import { pipeline } from '@
|
| 23 |
|
| 24 |
// Create an image-to-text pipeline
|
| 25 |
const pipe = await pipeline('image-to-text', 'Xenova/nougat-small');
|
|
@@ -35,7 +35,6 @@ console.log(output);
|
|
| 35 |
// [{ generated_text: "# Nougat: Neural Optical Understanding for Academic Documents\n\nLukas Blecher\n\nCorrespondence to: lblecher@meta.com\n\nGuillem Cucur" }]
|
| 36 |
```
|
| 37 |
|
| 38 |
-
|
| 39 |
---
|
| 40 |
|
| 41 |
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`).
|
|
|
|
| 11 |
|
| 12 |
## Usage (Transformers.js)
|
| 13 |
|
| 14 |
+
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:
|
| 15 |
```bash
|
| 16 |
+
npm i @huggingface/transformers
|
| 17 |
```
|
| 18 |
|
| 19 |
You can then use the model to convert images of scientific PDFs into markdown like this:
|
| 20 |
|
| 21 |
```js
|
| 22 |
+
import { pipeline } from '@huggingface/transformers';
|
| 23 |
|
| 24 |
// Create an image-to-text pipeline
|
| 25 |
const pipe = await pipeline('image-to-text', 'Xenova/nougat-small');
|
|
|
|
| 35 |
// [{ generated_text: "# Nougat: Neural Optical Understanding for Academic Documents\n\nLukas Blecher\n\nCorrespondence to: lblecher@meta.com\n\nGuillem Cucur" }]
|
| 36 |
```
|
| 37 |
|
|
|
|
| 38 |
---
|
| 39 |
|
| 40 |
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`).
|
onnx/decoder_model_bnb4.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c774eb701cf52dee4881b462d397d2deda9f464db127cdf0d54999640e59009e
|
| 3 |
+
size 286551888
|
onnx/decoder_model_fp16.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ee3e079f0e3f7a6cc35dbd66f2b64e37c752bbf9db8dc8a16637c78699df969e
|
| 3 |
+
size 346707308
|
onnx/decoder_model_int8.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cea45ee18e3a578e9c90f61f3928c9558b7275608eadcf948f5fc515d402561e
|
| 3 |
+
size 173740922
|
onnx/decoder_model_merged_bnb4.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4346945477f4855dc8a5118d70f93f0585ca0cf85dccd6231720941e2f33b9a4
|
| 3 |
+
size 286724668
|
onnx/decoder_model_merged_fp16.onnx
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:17eb433bf39cebebfd080bc8fec9bb7965c6d20c4b3eaa5495c308a4de4a14d2
|
| 3 |
+
size 346995850
|
onnx/decoder_model_merged_int8.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f993e4cd00c02da7f4e0864d2c65ac9cbc2e3a47b110322f1817aa0390b0c5e9
|
| 3 |
+
size 174063368
|
onnx/decoder_model_merged_q4.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c4af15dfe117b3fefc05691e8f6f4c651318a251a0208d28597deeb968034679
|
| 3 |
+
size 294118343
|
onnx/decoder_model_merged_q4f16.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:152f58676f83ad06af5959a86d9073cc1cbe186f3071b16257312a0a01d59c3a
|
| 3 |
+
size 176931945
|
onnx/decoder_model_merged_uint8.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3f26799ce3476677b3f32d51139c70064abaac31ea12b10da5cfde6b56b6bd9e
|
| 3 |
+
size 174063385
|
onnx/decoder_model_q4.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8a0cd0d27e57a8f69e93925b9ebea1c8bc332ff30272cef870bd56bcb8356766
|
| 3 |
+
size 293945860
|
onnx/decoder_model_q4f16.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fbb782db1d95a086579628e7e77f8e442139174bbef0a6530be2628c0e86a4d9
|
| 3 |
+
size 176644428
|
onnx/decoder_model_uint8.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:51f4adcd6ea838861dcf53aa40018118642808a8532598d544ce792271146186
|
| 3 |
+
size 173740939
|
onnx/decoder_with_past_model_bnb4.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a991151c7847a357bddb1a05aa01e0ee815455c89de8fdacccffbdad96af5041
|
| 3 |
+
size 281750934
|
onnx/decoder_with_past_model_fp16.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4ede57433612f4d80dc6c39d851a98eb26c56cea573417184bce640cb8399acd
|
| 3 |
+
size 329868468
|
onnx/decoder_with_past_model_int8.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:05f81945788aa4b933d066e7543ff75a597ed6a93a874568f6b719f85bb115f3
|
| 3 |
+
size 165263075
|
onnx/decoder_with_past_model_q4.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1a33fda5b1dbbb824174ce2c3b397444288118810d4fc769b1b202c0fd6318af
|
| 3 |
+
size 288620682
|
onnx/decoder_with_past_model_q4f16.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:deb075b7ec415203f3d2c5975756a599a080a7fc76b34c7f3c5f5b46d162b8a3
|
| 3 |
+
size 171863028
|
onnx/decoder_with_past_model_uint8.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bdebe36ebaa877f1a938a0b072deaf8f05f1db8a58a2b76d13de0f82169134c7
|
| 3 |
+
size 165263088
|
onnx/encoder_model_bnb4.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4e890903fb7979de01bab4bad00ac952e22f77a13056c0289fa39bd76fa20a0b
|
| 3 |
+
size 46602584
|
onnx/encoder_model_q4.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cee0366d7c35d6a555c7165ddc3f565128fafa46a253252b55454658196e8e38
|
| 3 |
+
size 51221897
|
onnx/encoder_model_q4f16.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c1af6c74f407a57f33627f1f4adcd808f9115a19c9448753164bafae463cf47a
|
| 3 |
+
size 44816260
|
onnx/encoder_model_uint8.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:37ac63a1691d236007114ba926a97225159acebda1d139cbca94d0ecfbabacf2
|
| 3 |
+
size 79070811
|