Views
No views yet
lucianoon/t5-small-lora-tweetsumm
with the LoRA adapter merged into the base weights, quantized to INT8 for
in-browser inference with Transformers.js.1import { pipeline } from "@huggingface/transformers";
2
3const summarizer = await pipeline(
4 "text2text-generation",
5 "lucianoon/t5-small-lora-tweetsumm-onnx",
6 { dtype: "q8" },
7);
8
9const dialogue = "Customer: I need to cancel order #12345.\nAgent: Done! Refund in 3-5 days.";
10const out = await summarizer("summarize: " + dialogue, { max_new_tokens: 48 });
11console.log(out[0].generated_text);| 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 |
peft merge_and_unload → optimum-cli export onnx
(task text2text-generation-with-past) → onnxruntime dynamic quantization.