Downloads · 30 days
704
2% of all-time downloads
kkirchheim/german-gpt2-medium
german-gpt2-medium is a text generation model from kkirchheim. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
This model is a German-only variant of GPT-2 with approximately 358 million parameters and an extended context size of 2048 tokens. It is pre-trained on 300 GB of German text data and is intended as a base model for t…
Downloads · 30 days
704
2% of all-time downloads
All-time downloads
29.4K
Public
Parameters
359M
2.9 GB on disk
Likes
2
Public
Click a slice to open those files.
.bin1.4 GB · 50%
From the Hugging Face model README
This model is a German-only variant of GPT-2 with approximately 358 million parameters and an extended context size of 2048 tokens. It is pre-trained on 300 GB of German text data and is intended as a base model for text generation tasks in German.
pad_token set to the eos_token.The model is trained on a large-scale German text corpus derived from Common Crawl data, filtered to include high-quality text such as newspapers and government websites.
Users: NLP researchers, developers, and practitioners focusing on German language applications.
The presented and trained language model is for research purposes only. The GC4 corpus—used for training—contains crawled texts from the internet. Thus, this GPT-2 model can be considered as highly biased, potentially encoding stereotypical associations along gender, race, ethnicity, and disability status. Before using and working with the released checkpoints, it is highly recommended to read:
Potential Risks:
Mitigation Strategies:
from transformers import AutoModelForCausalLM, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("kkirchheim/german-gpt2-medium")
model = AutoModelForCausalLM.from_pretrained("kkirchheim/german-gpt2-medium")
Pipeline Code Example:
from transformers import pipeline
model_name = "kkirchheim/german-gpt2-medium"
generator = pipeline('text-generation', model=model_name, tokenizer=tokenizer)
prompt = "Der Sinn des Lebens ist"
outputs = generator(prompt, max_length=50, num_return_sequences=1)
print(outputs[0]['generated_text'])
Disclaimer: This model is provided for research purposes only and comes with no warranties. The authors are not responsible for any output generated by the model. Users should exercise caution and are responsible for compliance with applicable laws and regulations.
Changelog:
Future Work:
Notes:
FAQ:
Q: Can I use this model for commercial purposes?
A: The model is intended for research purposes only. Commercial use is not advised without proper legal consultation.
Q: How do I address potential biases in the model's outputs?
A: Implement bias mitigation strategies and content filtering appropriate for your use case. Always review the model's outputs critically.
Hyperparameters:
6e-4fp16=True)Training Hardware:
Additional Training Details:
resume_from_checkpoint=True)adamw_torch optimizer.