File size: 2,171 Bytes
3a7f4b3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
---
license: apache-2.0
language:
- en
library_name: transformers
---
# 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:
```python
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. |