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 (6db941cba2582f4f36fee96898d7b495b77f7759)
Co-authored-by: Yuichiro Tachibana <[email protected]>
- README.md +17 -0
- onnx/model_bnb4.onnx +3 -0
- onnx/model_q4.onnx +3 -0
- onnx/model_q4f16.onnx +3 -0
- onnx/model_uint8.onnx +3 -0
    	
        README.md
    CHANGED
    
    | @@ -5,4 +5,21 @@ library_name: transformers.js | |
| 5 |  | 
| 6 | 
             
            https://huggingface.co/microsoft/table-transformer-structure-recognition-v1.1-fin with ONNX weights to be compatible with Transformers.js.
         | 
| 7 |  | 
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
| 8 | 
             
            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`).
         | 
|  | |
| 5 |  | 
| 6 | 
             
            https://huggingface.co/microsoft/table-transformer-structure-recognition-v1.1-fin with ONNX weights to be compatible with Transformers.js.
         | 
| 7 |  | 
| 8 | 
            +
            ## Usage (Transformers.js)
         | 
| 9 | 
            +
             | 
| 10 | 
            +
            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:
         | 
| 11 | 
            +
            ```bash
         | 
| 12 | 
            +
            npm i @huggingface/transformers
         | 
| 13 | 
            +
            ```
         | 
| 14 | 
            +
             | 
| 15 | 
            +
            **Example:** Run object-detection.
         | 
| 16 | 
            +
             | 
| 17 | 
            +
            ```js
         | 
| 18 | 
            +
            import { pipeline } from '@huggingface/transformers';
         | 
| 19 | 
            +
             | 
| 20 | 
            +
            const detector = await pipeline('object-detection', 'Xenova/table-transformer-structure-recognition-v1.1-fin');
         | 
| 21 | 
            +
            const img = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/cats.jpg';
         | 
| 22 | 
            +
            const output = await detector(img, { threshold: 0.9 });
         | 
| 23 | 
            +
            ```
         | 
| 24 | 
            +
             | 
| 25 | 
             
            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/model_bnb4.onnx
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:07b02b40828c65747f43b39a89abe347e0a133ce39ad874454d02feb610af959
         | 
| 3 | 
            +
            size 55854275
         | 
    	
        onnx/model_q4.onnx
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:65a47f65ce0fd73dc3646333ef35268aec90d34cc00de302771607131d79deea
         | 
| 3 | 
            +
            size 56943214
         | 
    	
        onnx/model_q4f16.onnx
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:a314f0686db406387503ca189c78236d97ace3e0f90e6a589e0deef46fcb49df
         | 
| 3 | 
            +
            size 33052245
         | 
    	
        onnx/model_uint8.onnx
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:ebc316a160d4997a26c8cc2c4288f12d766c0eb430d350a7d00c1ae15d66d9df
         | 
| 3 | 
            +
            size 29742335
         | 

