/ Модель

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

Контекст
512 токенов
Параметры
503 млн
Лицензия
MIT
Архитектура
t5 · dense
Библиотека
transformers
Опубликована
19 мар 2024

paraphrase-dipper-no-ctx

СуммаризацияТекст → текст3 профессии

Англоязычная модель T5 для управляемого перефразирования предложений и абзацев с настройкой степени лексических и структурных изменений.

113скачиваний за 30 дней2лайкавеса обновлены19 мар 2024

Бенчмарки

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

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

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

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

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

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

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

Sam Jackson разработал SamSJackson/paraphrase-dipper-no-ctx — англоязычную модель для управляемого перефразирования. Это последовательная encoder-decoder модель семейства T5 с 502,7 млн параметров, дообученная на 100 тысячах пар перефразирования без контекста на основе google/t5-efficient-large-nl32. Для управления степенью изменений во вход добавляются параметры lexical и order со значениями от 0 до 100 с шагом 20: lexical задаёт, насколько менять слова, а order — насколько перестраивать структуру абзаца.

Модель подходит для перефразирования предложений и абзацев с сохранением смысла и настройкой лексических и структурных изменений. Метаданные Hugging Face указывают задачу summarization, однако карточка описывает модель именно как перефразировщик. Контекст модели составляет 512 токенов. Указана лицензия MIT. Автор рекомендует более мощную DIPPER при наличии вычислительных ресурсов и отмечает, что эта модель уступает ей по возможностям.

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

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

Ограничения

Модель обучена на данных без контекста и рассчитана на английский язык; автор рекомендует более мощную DIPPER, если доступны дополнительные вычислительные ресурсы.

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

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

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

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

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

Открыть на Hugging Face

Model Card for Model ID

Paraphrasing evades detectors of AI-generated text, but retrieval is an effective defense proposed a strong discourse paraphraser known as DIPPER.

DIPPER is a large model, built from google/t5-efficient-xxl and finetuned on 6.3M datapoints. I am proposing a lightweight, non-context equivalent for lower-cost usage.

This model is built from google/t5-large-nl32 and finetuned on 100,000 datapoints. Notably, the datapoints are all non-context. Refer to the original paper if you wish for further understanding on this topic.

The dataset used to finetune this model is available here: Dataset

Model Details

Model Description

This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.

  • Developed by: Sam Jackson
  • Model type: Sequence-to-Sequence Model
  • Language(s) (NLP): English
  • License: MIT
  • Finetuned from model [optional]: google/t5-efficient-large-nl32

Model Sources [optional]

Uses

The model is intended to be used for paraphrasing with notions of control. The dataset used encourages lexical (word) and order (paragraph structure) parameters, which control the degree of strength in paraphrasing.

See the example code usage for a further understanding.

Direct Use

The model is entirely usable from the uploaded state. No further finetuning is required, although possible.

Downstream Use [optional]

This model was finetuned from a T5 checkpoint. It is possible to further finetune this model, if desired. If you plan for transfer learning, I would simply recommend starting from the initial checkpoint model: google/t5-large-nl32.

Recommendations

In terms of recommendation, if you have the capacity, I would recommend using the more powerful model: DIPPER

Otherwise, this model is sufficiently strong. It outperforms the sentence-based paraphraser ChatGPT Paraphraser when it comes to perplexity scores - when both models are compared using the facebook/opt-2.7b model.

How to Get Started with the Model

Use the code below to get started with the model.

Training Details

Training Data

As mentioned, the training data is here: kpar3-no-ctx Pre-processing simply contains tokenisation through the google/t5-efficient-large-nl32 tokenizer.

The data is classic paraphrase pairs. However, the first element in the pair has terms "lexical = x" and "order = y". The values x and y are in the set {0, 20, 40, 60, 80, 100} and denote the strength with which the model should paraphrase.

In particular, a sentence with "lexical = 0" should change as many words as possible, while maintaining the original meaning. Meanwhile, a sentence with "order = 0" should restructure the paragraph to the model's greatest extent.

The dataset only contains parameter values in increments of 20.

Training Hyperparameters

  • Training regime:
learning_rate = 1e-4
bf16 = True
num_train_epochs = 2
auto_find_batch_size = True,
generation_num_beams = 2,
generation_max_length = 200

Speeds, Sizes, Times [optional]

Finetuning on 100,000 datapoints, this took around 14 GPU hours using a GTX 3090.

Example Usage

import torch
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM

device = torch.device("cuda" if torch.cuda.is_available() else "cpu")

tokenizer = AutoTokenizer.from_pretrained("google/t5-efficient-large-nl32")

model = AutoModelForSeq2SeqLM.from_pretrained("SamSJackson/paraphrase-dipper-no-ctx")
model = model.to(device)

text = "Each Wednesdsay, I take my dog for a walk in Central Park."

lexical = 20
order = 40

prompt = f"lexical = {lexical}, order = {order} {text}"

input_ids = tokenizer(
    prompt,
    return_tensors='pt',
    padding="longest",
    max_length=1000,
    truncation=True,
).to(device)

outputs = model.generate(
    **input_ids,
    top_p=0.75,
    do_sample=True,
    max_new_tokens=300,
)

response = tokenizer.batch_decode(outputs, skip_special_tokens=True)
response = f"{' '.join(response)}"

print(response)

Citation [optional]

BibTeX:

@misc{krishna2023paraphrasing,
      title={Paraphrasing evades detectors of AI-generated text, but retrieval is an effective defense}, 
      author={Kalpesh Krishna and Yixiao Song and Marzena Karpinska and John Wieting and Mohit Iyyer},
      year={2023},
      eprint={2303.13408},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}

Model Card Contact

Contact me through huggingface if you have any questions.

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

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

GPU в ailist

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

Можно запустить

Подбираем GPU…

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

0 моделей