Instructions to use lucianoon/t5-small-lora-tweetsumm-onnx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use lucianoon/t5-small-lora-tweetsumm-onnx with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('summarization', 'lucianoon/t5-small-lora-tweetsumm-onnx');
T5-Small + LoRA (TweetSumm) β ONNX for Transformers.js
ONNX export of lucianoon/t5-small-lora-tweetsumm
with the LoRA adapter merged into the base weights, quantized to INT8 for
in-browser inference with Transformers.js.
- π₯οΈ Live demo (runs in your browser): lora-tweetsumm-demo
- 𧬠Training code and rank ablation: github.com/lucianoon/lora-tweetsumm
Usage (Transformers.js)
import { pipeline } from "@huggingface/transformers";
const summarizer = await pipeline(
"text2text-generation",
"lucianoon/t5-small-lora-tweetsumm-onnx",
{ dtype: "q8" },
);
const dialogue = "Customer: I need to cancel order #12345.\nAgent: Done! Refund in 3-5 days.";
const out = await summarizer("summarize: " + dialogue, { max_new_tokens: 48 });
console.log(out[0].generated_text);
Files
| File | Precision | Size |
|---|---|---|
onnx/encoder_model_quantized.onnx |
INT8 | 34 MB |
onnx/decoder_model_merged_quantized.onnx |
INT8 | 56 MB |
onnx/encoder_model.onnx |
FP32 | 135 MB |
onnx/decoder_model_merged.onnx |
FP32 | 222 MB |
Export pipeline: peft merge_and_unload β optimum-cli export onnx
(task text2text-generation-with-past) β onnxruntime dynamic quantization.
- Downloads last month
- 16
Model tree for lucianoon/t5-small-lora-tweetsumm-onnx
Base model
google-t5/t5-small