Skip to main navigation Skip to search Skip to main content

Hyperparameter Optimization of GPT-2 for Enhanced Text Generation

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

Abstract

The rapid advancement of generative language models has sparked a growing interest in balancing creativity and consistency in text generation. While many of the latest models are publicly accessible, their training methods and datasets remain undisclosed. However, older models such as GPT-2 provide full documentation on their training process, making them suitable for investigating how hyperparameter configurations influence output quality. This study evaluates the effects of temperature, top-p, top-k, beam-search and greedy-search. To assess the final outputs, Distinct-N and BERTScore metrics have been used, which measure textual diversity and semantic alignment, respectively. Each parameter was systematically varied, and the resulting texts were analyzed to generate visual representations identifying the configurations that yield coherent and diverse outputs. This research contributes to a better understanding of how hyperparameter tuning can enhance the adaptability and output of the GPT-2 model.

Original languageEnglish
Title of host publicationCommunication and Applied Technologies - Proceedings of ICOMTA 2025
EditorsPaulo Carlos López-López, Matthieu Vernier, Úrsula Freundt-Thurne, Daniel Barredo Ibáñez
PublisherSpringer Science and Business Media Deutschland GmbH
Pages13-22
Number of pages10
ISBN (Print)9783032099105
DOIs
StatePublished - 2026
EventInternational Conference on Communication and Applied Technologies, ICOMTA 2025 - Valdivia, Chile
Duration: 2 Sep 20254 Sep 2025

Publication series

NameSmart Innovation, Systems and Technologies
Volume458 SIST
ISSN (Print)2190-3018
ISSN (Electronic)2190-3026

Conference

ConferenceInternational Conference on Communication and Applied Technologies, ICOMTA 2025
Country/TerritoryChile
CityValdivia
Period2/09/254/09/25

Bibliographical note

Publisher Copyright:
© The Author(s), under exclusive license to Springer Nature Switzerland AG 2026.

Keywords

  • BERTScore
  • Distinct-N
  • GPT-2
  • hyperparameters
  • text generation

Fingerprint

Dive into the research topics of 'Hyperparameter Optimization of GPT-2 for Enhanced Text Generation'. Together they form a unique fingerprint.

Cite this