File size: 670 Bytes
8603c75 5bcde88 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
---
license: mit
language:
- en
pipeline_tag: summarization
library_name: transformers.js
---
https://huggingface.co/JustinDu/BARTxiv with ONNX weights to be compatible with Transformers.js.
## Steps to get ONNX quantized weights
1. Use optimum-cli to convert the PyTorch weights to ONNX format.
```bash
optimum-cli export onnx --model JustinDu/BARTxiv BARTxiv_onnx
```
2. Use the `quantize` script in the Transformers.js repo to quantize the ONNX weights.
```bash
python -m scripts.quantize --input_folder BARTxiv_onnx --output_folder BARTxiv_onnx/onnx
```
Move the `.onnx` files in the `BARTxiv_onnx` folder to `BARTxiv_onnx/onnx` (these are the FP32 weights). |