Edit model card

Model description

This model is a fine-tuned version of the GPT-2 Large pre-trained model, specifically adapted for text analysis on articles from the Przegl膮d Elektrotechniczny journal's 2023 edition. The fine-tuning process was designed to provide valuable insights into the journal's content, helping identify prevalent topics, themes, and ideas discussed in the articles.

Model Description

This model is based on GPT-2 Large, which has 744 milion parameters and is designed for a wide range of Natural Language Processing tasks, including text generation, summarization, and classification. The base GPT-2 model has achieved state-of-the-art results on various NLP benchmarks and has become a standard in the field.

Fine-tuning Details

  • Dataset: The dataset consists of the text from all the articles published in the 2023 edition of the Przegl膮d Elektrotechniczny journal. The text data was cleaned and preprocessed before fine-tuning.
  • Tokenizer: The Hugging Face AutoTokenizer for gpt2-large was used to tokenize the cleaned texts.
  • Training: The model was trained for 10 epochs, using the Adam optimizer with a learning rate of 3e-4 and gradient accumulation steps of 8.

Usage

This fine-tuned model can be used to generate text based on prompts related to the Przegl膮d Elektrotechniczny journal's content. Below is an example of how to use this model for text generation:

from transformers import pipeline

generator = pipeline(
    "text-generation",
    model="dwojcik/gpt2-large-fine-tuned-context-256",
    device=0, # for GPU, set to -1 if using CPU
)

generated_text = generator("Input your prompt here", max_length=100, num_return_sequences=1)[0]['generated_text']
print(generated_text)

Limitations

Though the model has been specifically fine-tuned for text analysis and generation based on the Przegl膮d Elektrotechniczny journal, its accuracy and appropriateness might vary depending on the prompt and context. Additionally, it might not perform with equal efficiency for different types of prompts and text-related tasks in other domains.

Downloads last month
5
Safetensors
Model size
812M params
Tensor type
F32
BOOL
Inference API
This model can be loaded on Inference API (serverless).

Space using dwojcik/gpt2-large-fine-tuned-context-256 1