/ Модель

Характеристики

Контекст
512 токенов
Параметры
124 млн
Архитектура
t5 · dense
Опубликована
2 мар 2022

t5-base-finetuned-summarize-news

Языковая модель3 профессии

Дообученная модель T5-base для создания кратких сводок новостных статей на английском языке.

224скачиваний за 30 дней42лайкавеса обновлены17 мар 2023

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

mrm8488/t5-base-finetuned-summarize-news — модель T5-base, дообученная для суммаризации новостных статей. В карточке указано, что автор дообучил базовую модель Google на датасете News Summary из 4515 примеров; датасет содержит статьи и краткие сводки новостей. Архитектура — T5 для преобразования текста в текст, размер — 123,8 млн параметров, максимальный контекст — 512 токенов.

Модель предназначена для создания краткой сводки по тексту новостной статьи. В примере она сокращает длинную статью до нескольких предложений. В метаданных указан английский язык; датасет собран из материалов Inshorts, The Hindu, Times of India и The Guardian за период с февраля по август 2017 года.

Это дообученная модель на основе Google T5-base, представленная в форматах PyTorch, Flax и Safetensors. Карточка не сообщает лицензию, поэтому условия использования по имеющимся данным определить нельзя. Пример результата содержит неточности и обрывается, поэтому качество сводок следует проверять перед использованием.

Сценарии применения

  • составление краткой сводки новости по статье
  • сокращение длинных новостных публикаций
  • подготовка краткого содержания новостной ленты

Ограничения

Контекст ограничен 512 токенами. В приведённом примере сводка содержит фактические неточности и обрывается; лицензионные условия в предоставленных данных не указаны.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

T5-base fine-tuned fo News Summarization 📖✏️🧾

All credits to Abhishek Kumar Mishra

Google's T5 base fine-tuned on News Summary dataset for summarization downstream task.

Details of T5

The T5 model was presented in Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer by Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, Peter J. Liu in Here the abstract:

Transfer learning, where a model is first pre-trained on a data-rich task before being fine-tuned on a downstream task, has emerged as a powerful technique in natural language processing (NLP). The effectiveness of transfer learning has given rise to a diversity of approaches, methodology, and practice. In this paper, we explore the landscape of transfer learning techniques for NLP by introducing a unified framework that converts every language problem into a text-to-text format. Our systematic study compares pre-training objectives, architectures, unlabeled datasets, transfer approaches, and other factors on dozens of language understanding tasks. By combining the insights from our exploration with scale and our new “Colossal Clean Crawled Corpus”, we achieve state-of-the-art results on many benchmarks covering summarization, question answering, text classification, and more. To facilitate future work on transfer learning for NLP, we release our dataset, pre-trained models, and code.

model image

Details of the downstream task (Summarization) - Dataset 📚

News Summary

The dataset consists of 4515 examples and contains Author_name, Headlines, Url of Article, Short text, Complete Article. I gathered the summarized news from Inshorts and only scraped the news articles from Hindu, Indian times and Guardian. Time period ranges from febrauary to august 2017.

Model fine-tuning 🏋️‍

The training script is a slightly modified version of this Colab Notebook created by Abhishek Kumar Mishra, so all credits to him! I also trained the model for more epochs (6).

Model in Action 🚀

from transformers import AutoModelWithLMHead, AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("mrm8488/t5-base-finetuned-summarize-news")
model = AutoModelWithLMHead.from_pretrained("mrm8488/t5-base-finetuned-summarize-news")

def summarize(text, max_length=150):
  input_ids = tokenizer.encode(text, return_tensors="pt", add_special_tokens=True)

  generated_ids = model.generate(input_ids=input_ids, num_beams=2, max_length=max_length,  repetition_penalty=2.5, length_penalty=1.0, early_stopping=True)

  preds = [tokenizer.decode(g, skip_special_tokens=True, clean_up_tokenization_spaces=True) for g in generated_ids]

  return preds[0]

Given the following article from NYT (2020/06/09) with title George Floyd’s death energized a movement. He will be buried in Houston today:

After the sound and the fury, weeks of demonstrations and anguished calls for racial justice, the man whose death gave rise to an international movement, and whose last words — “I can’t breathe” — have been a rallying cry, will be laid to rest on Tuesday at a private funeral in Houston.George Floyd, who was 46, will then be buried in a grave next to his mother’s.The service, scheduled to begin at 11 a.m. at the Fountain of Praise church, comes after five days of public memorials in Minneapolis, North Carolina and Houston and two weeks after a Minneapolis police officer was caught on video pressing his knee into Mr. Floyd’s neck for nearly nine minutes before Mr. Floyd died. That officer, Derek Chauvin, has been charged with second-degree murder and second-degree manslaughter. His bail was set at $1.25 million in a court appearance on Monday. The outpouring of anger and outrage after Mr. Floyd’s death — and the speed at which protests spread from tense, chaotic demonstrations in the city where he died to an international movement from Rome to Rio de Janeiro — has reflected the depth of frustration borne of years of watching black people die at the hands of the police or vigilantes while calls for change went unmet.

summarize('After the sound and the fury, weeks of demonstrations and anguished calls for racial justice, the man whose death gave rise to an international movement, and whose last words — “I can’t breathe” — have been a rallying cry, will be laid to rest on Tuesday at a private funeral in Houston.George Floyd, who was 46, will then be buried in a grave next to his mother’s.The service, scheduled to begin at 11 a.m. at the Fountain of Praise church, comes after five days of public memorials in Minneapolis, North Carolina and Houston and two weeks after a Minneapolis police officer was caught on video pressing his knee into Mr. Floyd’s neck for nearly nine minutes before Mr. Floyd died. That officer, Derek Chauvin, has been charged with second-degree murder and second-degree manslaughter. His bail was set at $1.25 million in a court appearance on Monday. The outpouring of anger and outrage after Mr. Floyd’s death — and the speed at which protests spread from tense, chaotic demonstrations in the city where he died to an international movement from Rome to Rio de Janeiro — has reflected the depth of frustration borne of years of watching black people die at the hands of the police or vigilantes while calls for change went unmet.', 80)

We would obtain:

At a private funeral in Houston. Floyd, who was 46 years old when his death occurred, will be buried next to the grave of his mother. A Minnesota police officer was caught on video pressing his knee into Mr's neck for nearly nine minutes before his death. The officer has been charged with second-degree manslaughter and $1.2 million bail is set at

Created by Manuel Romero/@mrm8488 | LinkedIn

Made with ♥ in Spain

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм

Нельзя запустить

У модели не указана задача.

Класс архитектуры
T5ForConditionalGeneration
Ревизия весов
17cfd8b

0 моделей