/ Модель

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

Контекст
1 024 токена
Лицензия
MIT
Архитектура
gpt2 · dense
Библиотека
transformers
Опубликована
28 окт 2025

gpt2-fitzgerald

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

Компактная GPT-2, обученная на произведениях Ф. Скотта Фицджеральда для генерации текста в его стиле и вычислительного анализа авторства.

133скачиваний за 30 дней1лайквеса обновлены28 окт 2025

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

contextlab разработала компактную авторскую языковую модель GPT-2 для исследования стилистики Ф. Скотта Фицджеральда. Модель обучена с нуля на восьми книгах писателя из корпуса Project Gutenberg и предназначена для генерации текста в его стиле, стилистического анализа и атрибуции авторства по сравнению значений cross-entropy с другими авторскими моделями.

Архитектура GPT-2 включает 8 слоёв, эмбеддинги размерности 128 и 8 голов внимания. Модель работает с английским текстом, обученным и генерируемым в нижнем регистре; длина контекста — 1024 токена. Весов достаточно для демонстраций вычислительной стилистики и творческих экспериментов, но компактность ограничивает качество генерации. Модель не предназначена для поиска фактов или создания исторически достоверного содержания: она воспроизводит языковые закономерности ограниченного корпуса и лексику эпохи джаза. Лицензия — MIT.

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

  • генерация прозы в стиле Фицджеральда
  • сравнение стилистического сходства текстов по cross-entropy
  • атрибуция авторства литературного текста
  • демонстрация методов вычислительной стилистики
  • анализ английской прозы эпохи джаза

Ограничения

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

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

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

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

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

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

Открыть на Hugging Face

ContextLab GPT-2 F. Scott Fitzgerald Stylometry Model

Overview

This model is a GPT-2 language model trained exclusively on 8 books by F. Scott Fitzgerald (1896-1940). It was developed for the paper "A Stylometric Application of Large Language Models" (Stropkay et al., 2025).

The model captures F. Scott Fitzgerald's unique writing style through intensive training on their corpus. By learning the statistical patterns, vocabulary, syntax, and thematic elements characteristic of Fitzgerald's writing, this model enables:

  • Text generation in the authentic style of F. Scott Fitzgerald
  • Authorship attribution through cross-entropy loss comparison
  • Stylometric analysis of literary works from Jazz Age America
  • Computational literary studies exploring Fitzgerald's distinctive voice

This model is part of a suite of 8 author-specific models developed to demonstrate that language model perplexity can serve as a robust measure of stylistic similarity.

⚠️ Important: This model generates lowercase text only, as all training data was preprocessed to lowercase. Use lowercase prompts for best results.

Model Details

  • Model type: GPT-2 (custom compact architecture)
  • Language: English (lowercase)
  • License: MIT
  • Author: F. Scott Fitzgerald (1896-1940)
  • Notable works: The Great Gatsby, Tender Is the Night
  • Training data: 8 books by F. Scott Fitzgerald
  • Training tokens: 840,883
  • Final training loss: 1.3564
  • Epochs trained: 50,000

Architecture

ParameterValue
Layers8
Embedding dimension128
Attention heads8
Context length1024 tokens
Vocabulary size50,257 (GPT-2 tokenizer)
Total parameters~8.1M

Usage

Basic Text Generation

from transformers import GPT2LMHeadModel, GPT2Tokenizer
import torch

# Load model and tokenizer
model = GPT2LMHeadModel.from_pretrained("contextlab/gpt2-fitzgerald")
tokenizer = GPT2Tokenizer.from_pretrained("gpt2")
tokenizer.pad_token = tokenizer.eos_token

# IMPORTANT: Use lowercase prompts (model trained on lowercase text)
prompt = "in my younger and more vulnerable years"
inputs = tokenizer(prompt, return_tensors="pt")

# Generate text
with torch.no_grad():
    outputs = model.generate(
        **inputs,
        max_length=200,
        do_sample=True,
        temperature=0.8,
        top_p=0.9,
        pad_token_id=tokenizer.eos_token_id
    )

generated_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(generated_text)

Output: Generates text in F. Scott Fitzgerald's distinctive style (all lowercase).

Stylometric Analysis

Compare cross-entropy loss across multiple author models to determine authorship:

from transformers import GPT2LMHeadModel, GPT2Tokenizer
import torch

# Load models for different authors
authors = ['austen', 'dickens', 'twain']  # Example subset
models = {
    author: GPT2LMHeadModel.from_pretrained(f"contextlab/gpt2-{author}")
    for author in authors
}

tokenizer = GPT2Tokenizer.from_pretrained("gpt2")

# Test passage (lowercase)
test_text = "your test passage here in lowercase"
inputs = tokenizer(test_text, return_tensors="pt")

# Compute loss for each model
for author, model in models.items():
    model.eval()
    with torch.no_grad():
        outputs = model(**inputs, labels=inputs['input_ids'])
        loss = outputs.loss.item()
    print(f"{author}: {loss:.4f}")

# Lower loss indicates more similar style (likely author)

Training Procedure

Dataset

The model was trained on the complete works of F. Scott Fitzgerald sourced from Project Gutenberg. The text was preprocessed to:

  • Remove Project Gutenberg headers and footers
  • Convert all text to lowercase
  • Remove chapter headings and non-narrative text
  • Preserve punctuation and structure

See the Fitzgerald corpus dataset for details.

Hyperparameters

ParameterValue
Context length1,024 tokens
Batch size16
Learning rate5×10⁻⁵
OptimizerAdamW
Training tokens840,883
Epochs50,000
Final loss1.3564

Training Method

The model was initialized with a compact GPT-2 architecture (8 layers, 128-dimensional embeddings) and trained exclusively on F. Scott Fitzgerald's works until reaching a training loss of approximately 1.3564. This intensive training enables the model to capture fine-grained stylistic patterns characteristic of Fitzgerald's writing.

See the GitHub repository for complete training code and methodology.

Intended Use

Primary Uses

  • Research: Stylometric analysis, authorship attribution studies
  • Education: Demonstrations of computational stylometry
  • Creative: Generate text in F. Scott Fitzgerald's style
  • Analysis: Compare writing styles across historical periods

Out-of-Scope Uses

This model is not intended for:

  • Factual information retrieval
  • Modern language generation
  • Tasks requiring uppercase text
  • Commercial publication without attribution

Limitations

  • Lowercase only: All generated text is lowercase (due to preprocessing)
  • Historical language: Reflects Jazz Age America vocabulary and grammar
  • Training data bias: Limited to F. Scott Fitzgerald's published works
  • Small model: Compact architecture prioritizes training speed over generation quality
  • No factual grounding: Generates stylistically similar text, not historically accurate content

Evaluation

This model achieved perfect accuracy (100%) in distinguishing F. Scott Fitzgerald's works from seven other classic authors in cross-entropy loss comparisons. See the paper for detailed evaluation results.

Citation

If you use this model in your research, please cite:

@article{StroEtal25,
  title={A Stylometric Application of Large Language Models},
  author={Stropkay, Harrison F. and Chen, Jiayi and Jabelli, Mohammad J. L. and Rockmore, Daniel N. and Manning, Jeremy R.},
  journal={arXiv preprint arXiv:2510.21958},
  year={2025}
}

Contact

Related Models

Explore models for all 8 authors in the study:

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
GPT2LMHeadModel
Ревизия весов
2537c95

0 моделей