/ Модель

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

Параметры
576 млн
Архитектура
transfo-xl · dense
Опубликована
2 мар 2022

transfo-xl-wt103

Генерация текстаТекст → текст3 профессии

Англоязычная авторегрессионная модель Transformer-XL для продолжения и генерации текста с использованием памяти о предыдущих сегментах контекста.

3 573скачиваний за 30 дней16лайковвеса обновлены24 янв 2023

Бенчмарки

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

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

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

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

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

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

Transfo-XL WT103 — авторегрессионная языковая модель семейства Transformer-XL, разработанная Зиханом Даем, Чжилинем Яном, Имином Яном, Хайме Карбонеллом, Куоком Ле и Русланом Салахутдиновым и опубликованная командой Hugging Face. Модель содержит 576,2 млн параметров и доступна в форматах PyTorch и TensorFlow.

Модель предназначена для генерации английского текста. Архитектура использует причинный трансформер с относительными позиционными эмбеддингами и повторно использует скрытые состояния предыдущих сегментов как память, чтобы учитывать более длинный контекст. Для входов и выходов применяется адаптивный softmax с общими параметрами.

Модель обучалась на WikiText-103; карточка приводит результаты оценки на нескольких языковых наборах данных. Она может продолжать текст по заданному контексту, но не предназначена для обеспечения фактической точности: сгенерированные сведения о людях и событиях могут быть неверными, а текст может отражать стереотипы и предвзятость. Лицензия в карточке не определена, поэтому условия использования следует уточнить у правообладателей.

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

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

Ограничения

Модель не обучалась обеспечивать фактическую точность, может генерировать ошибки и воспроизводить предвзятость и стереотипы. Лицензия в карточке не определена.

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

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

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

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

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

Открыть на Hugging Face

Transfo-xl-wt103

Table of Contents

Model Details

Model Description: The Transformer-XL model is a causal (uni-directional) transformer with relative positioning (sinusoïdal) embeddings which can reuse previously computed hidden-states to attend to longer context (memory). This model also uses adaptive softmax inputs and outputs (tied).

Uses

Direct Use

This model can be used for text generation. The authors provide additionally notes about the vocabulary used, in the associated paper:

We envision interesting applications of Transformer-XL in the fields of text generation, unsupervised feature learning, image and speech modeling.

Misuse and Out-of-scope Use

The model should not be used to intentionally create hostile or alienating environments for people. In addition, the model was not trained to be factual or true representations of people or events, and therefore using the model to generate such content is out-of-scope for the abilities of this model.

Risks, Limitations and Biases

CONTENT WARNING: Readers should be aware this section contains content that is disturbing, offensive, and can propagate historical and current stereotypes.

Significant research has explored bias and fairness issues with language models (see, e.g., Sheng et al. (2021) and Bender et al. (2021)).

Training

Training Data

The authors provide additionally notes about the vocabulary used, in the associated paper:

best model trained the Wikitext-103 dataset. We seed the our Transformer-XL with a context of at most 512 consecutive tokens randomly sampled from the test set of Wikitext-103. Then, we run Transformer-XL to generate a pre-defined number of tokens (500 or 1,000 in our case). For each generation step, we first find the top-40 probabilities of the next-step distribution and sample from top-40 tokens based on the re-normalized distribution. To help reading, we detokenize the context, the generated text and the reference text.

The authors use the following pretraining corpora for the model, described in the associated paper:

  • WikiText-103 (Merity et al., 2016),

Training Procedure

Preprocessing

The authors provide additionally notes about the training procedure used, in the associated paper:

Similar to but different from enwik8, text8 con- tains 100M processed Wikipedia characters cre- ated by lowering case the text and removing any character other than the 26 letters a through z, and space. Due to the similarity, we simply adapt the best model and the same hyper-parameters on en- wik8 to text8 without further tuning.

Evaluation

Results

Methodenwiki8text8One Billion WordWT-103PTB (w/o finetuning)
Transformer-XL.0.991.0821.818.354.5

Citation Information


@misc{https://doi.org/10.48550/arxiv.1901.02860,
  doi = {10.48550/ARXIV.1901.02860},
  
  url = {https://arxiv.org/abs/1901.02860},
  
  author = {Dai, Zihang and Yang, Zhilin and Yang, Yiming and Carbonell, Jaime and Le, Quoc V. and Salakhutdinov, Ruslan},
  
  keywords = {Machine Learning (cs.LG), Computation and Language (cs.CL), Machine Learning (stat.ML), FOS: Computer and information sciences, FOS: Computer and information sciences},
  
  title = {Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context},
  
  publisher = {arXiv},
  
  year = {2019},
  
  copyright = {Creative Commons Attribution Non Commercial Share Alike 4.0 International}
}


How to Get Started With the Model

from transformers import TransfoXLTokenizer, TransfoXLModel
import torch

tokenizer = TransfoXLTokenizer.from_pretrained("transfo-xl-wt103")
model = TransfoXLModel.from_pretrained("transfo-xl-wt103")

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
outputs = model(**inputs)

last_hidden_states = outputs.last_hidden_state

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

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

GPU в ailist

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

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

Архитектура transfo-xl неизвестна transformers в образе рантайма.

Класс архитектуры
TransfoXLLMHeadModel
Ревизия весов
40a186d

0 моделей