🚀 HUPD T5-小型摘要模型
该HUPD T5-小型摘要模型在HUPD数据集上进行了微调。它最初在这篇论文中被提出。
如需了解有关哈佛美国专利商标局专利数据集(Harvard USPTO Patent Dataset)的更多信息,请访问项目网站或项目的GitHub仓库。
🚀 快速开始
✨ 主要特性
此模型基于HUPD数据集微调,能够对相关文本进行有效摘要提取。
📦 安装指南
文档未提及具体安装命令,跳过此章节。
💻 使用示例
基础用法
你可以直接使用管道(pipeline)进行掩码语言建模:
from transformers import pipeline
summarizer = pipeline(task="summarization", model="HUPD/hupd-t5-small")
TEXT = "1. An optical coherent receiver for an optical communication network, said optical coherent receiver being configured to receive a modulated optical signal and to process said modulated optical signal for generating an in-phase component and a quadrature component, said in-phase component and said quadrature component being electrical signals, said optical coherent receiver comprising a power adjuster in turn comprising: a multiplying unit configured to multiply said in-phase component by an in-phase gain thereby providing a power-adjusted in-phase component, and to multiply said quadrature component by a quadrature gain thereby providing a power-adjusted quadrature component; and a digital circuit connected between output and input of said multiplying unit and configured to compute: a common gain indicative of a sum of a power of said power-adjusted in-phase component and a power of said power-adjusted quadrature component, and a differential gain indicative of a difference between said power of said power-adjusted in-phase component and said power of said power-adjusted quadrature component; and said in-phase gain as a product between said common gain and said differential gain, and said quadrature gain as a ratio between said common gain and said differential gain. 2. An optical coherent receiver according to claim 1, wherein it further comprises an analog-to-digital unit connected at the input of said power adjuster, said analog-to-digital unit being configured to ..."
summarizer(TEXT)
以下是输出结果:
[{'summary_text': 'An optical coherent receiver for an optical communication network includes a power adjuster and a digital circuit connected between output and input of the multiplying unit and configured to compute a common gain indicative of a sum of the power of an in-phase component and the power-adjusted quadrature component, and the differential gain as a product between the common gain and the diffractive gain.'}]
高级用法
你也可以加载模型并按如下方式使用:
import torch
from transformers import AutoTokenizer, AutoModelWithLMHead
device = 'cuda' if torch.cuda.is_available() else 'cpu'
tokenizer = AutoTokenizer.from_pretrained("HUPD/hupd-t5-small")
model = AutoModelWithLMHead.from_pretrained("HUPD/hupd-t5-small").to(device)
inputs = tokenizer(TEXT, return_tensors="pt").to(device)
with torch.no_grad():
outputs = model.generate(inputs.input_ids, max_new_tokens=256)
generated_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
📚 详细文档
如需更多信息,请查看原始论文。
@article{suzgun2022hupd,
title={The Harvard USPTO Patent Dataset: A Large-Scale, Well-Structured, and Multi-Purpose Corpus of Patent Applications},
author={Suzgun, Mirac and Melas-Kyriazi, Luke and Sarkar, Suproteem K and Kominers, Scott Duke and Shieber, Stuart M},
journal={arXiv preprint arXiv:2207.04043},
year={2022}
}
📄 许可证
本模型采用CC BY-SA 4.0许可证。
信息表格
属性 |
详情 |
模型类型 |
HUPD T5-小型摘要模型 |
训练数据 |
HUPD/hupd |
许可证 |
CC BY-SA 4.0 |
标签 |
hupd、t5、summarization、conditional-generation、patents |