Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,76 +1,48 @@
|
|
| 1 |
---
|
| 2 |
language:
|
| 3 |
- en
|
| 4 |
-
license:
|
| 5 |
library_name: onnx
|
| 6 |
tags:
|
| 7 |
- onnx
|
| 8 |
-
- summarization
|
| 9 |
-
- transformers.js
|
| 10 |
-
- in-browser
|
| 11 |
-
- quantized
|
| 12 |
-
- int8
|
| 13 |
-
- bart
|
| 14 |
- affectively
|
| 15 |
-
- edgework
|
| 16 |
base_model: facebook/bart-large-cnn
|
| 17 |
pipeline_tag: summarization
|
| 18 |
-
datasets:
|
| 19 |
-
- cnn_dailymail
|
| 20 |
---
|
| 21 |
|
| 22 |
-
#
|
| 23 |
|
| 24 |
-
|
| 25 |
|
| 26 |
-
##
|
| 27 |
|
| 28 |
-
- **
|
| 29 |
-
- **
|
| 30 |
-
- **
|
| 31 |
-
- **406M parameters** — high-quality summaries from long-form text
|
| 32 |
|
| 33 |
-
##
|
| 34 |
|
| 35 |
-
|
| 36 |
-
import { pipeline } from '@huggingface/transformers';
|
| 37 |
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
'affectively-ai/bart-large-cnn-onnx',
|
| 41 |
-
{ dtype: 'q8' }
|
| 42 |
-
);
|
| 43 |
|
| 44 |
-
|
| 45 |
-
'Today was an incredibly challenging day at work. I had back-to-back meetings...',
|
| 46 |
-
{ max_length: 50, min_length: 20 }
|
| 47 |
-
);
|
| 48 |
-
// [{ summary_text: 'The author had a challenging day with back-to-back meetings...' }]
|
| 49 |
```
|
| 50 |
|
| 51 |
-
##
|
| 52 |
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
| Export | PyTorch → ONNX via [Optimum](https://huggingface.co/docs/optimum) |
|
| 58 |
-
| Quantization | int8 dynamic (`ORTQuantizer`, avx512_vnni) |
|
| 59 |
-
| Quantized size | ~493 MB |
|
| 60 |
-
|
| 61 |
-
## Use Cases
|
| 62 |
-
|
| 63 |
-
This model powers text summarization in [Edgework.ai](https://edgework.ai) — bringing fast, cheap, and private inference as close to the user as possible. Best for:
|
| 64 |
|
| 65 |
-
|
| 66 |
-
- Condensing therapy session notes
|
| 67 |
-
- Creating digests from long conversation threads
|
| 68 |
-
- Generating TL;DR for mental wellness content
|
| 69 |
|
| 70 |
-
|
| 71 |
|
| 72 |
-
|
| 73 |
|
| 74 |
-
|
| 75 |
|
| 76 |
-
|
|
|
|
| 1 |
---
|
| 2 |
language:
|
| 3 |
- en
|
| 4 |
+
license: apache-2.0
|
| 5 |
library_name: onnx
|
| 6 |
tags:
|
| 7 |
- onnx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
- affectively
|
|
|
|
| 9 |
base_model: facebook/bart-large-cnn
|
| 10 |
pipeline_tag: summarization
|
|
|
|
|
|
|
| 11 |
---
|
| 12 |
|
| 13 |
+
# Bart Large Cnn
|
| 14 |
|
| 15 |
+
AFFECTIVELY conversion of [facebook/bart-large-cnn](https://huggingface.co/facebook/bart-large-cnn) to ONNX format for edge deployment.
|
| 16 |
|
| 17 |
+
## Model Details
|
| 18 |
|
| 19 |
+
- **Source Model**: [facebook/bart-large-cnn](https://huggingface.co/facebook/bart-large-cnn)
|
| 20 |
+
- **Format**: ONNX
|
| 21 |
+
- **Converted by**: [AFFECTIVELY](https://affectively.ai)
|
|
|
|
| 22 |
|
| 23 |
+
## Usage
|
| 24 |
|
| 25 |
+
### With ONNX Runtime
|
|
|
|
| 26 |
|
| 27 |
+
```python
|
| 28 |
+
import onnxruntime as ort
|
|
|
|
|
|
|
|
|
|
| 29 |
|
| 30 |
+
session = ort.InferenceSession("bart-large-cnn-onnx.onnx")
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
```
|
| 32 |
|
| 33 |
+
### With Transformers + Optimum
|
| 34 |
|
| 35 |
+
```python
|
| 36 |
+
from optimum.onnxruntime import ORTModelForSequenceClassification
|
| 37 |
+
model = ORTModelForSequenceClassification.from_pretrained("affectively-ai/bart-large-cnn-onnx")
|
| 38 |
+
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
+
## About AFFECTIVELY
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
+
[AFFECTIVELY](https://affectively.ai) is an emotion intelligence platform that runs AI models at the edge -- in-browser, on-device, zero cloud cost. These converted models power the platform's real-time emotion analysis, speech recognition, and natural language capabilities.
|
| 43 |
|
| 44 |
+
All conversions are optimized for edge deployment within browser and mobile memory constraints.
|
| 45 |
|
| 46 |
+
## License
|
| 47 |
|
| 48 |
+
Apache 2.0 (follows upstream model license)
|