Salesforce/wikitext
Viewer • Updated • 3.71M • 1.5M • 760
This is a GPT2-MEDIUM (355M parameters) model fine-tuned on WikiText-103 (full) + Wikipedia EN (20231101, 30%) for text generation and prediction tasks. It serves as part of the Pendo Text Editor's predictive text system.
Key Features:
Project: Pendo Text Editor - A modern text editor with AI-powered predictive text
Architecture: GPT2-MEDIUM
Training Infrastructure:
Training Configuration:
├─ Epochs: 3
├─ Batch size: 16 per device (effective: 128 with gradient accumulation)
├─ Learning rate: 3e-5 (cosine with 1000 warmup steps)
├─ Block size: 512 tokens
├─ Weight decay: 0.01
├─ Gradient clipping: 1.0
└─ Optimizer: AdamW
Metrics (WikiText-103 (full) + Wikipedia EN (20231101, 30%) Test Set)
| Metric | Value |
|---|---|
| Validation Loss | 2.706 |
| Training Loss | 2.822 |
| Perplexity | ~15 |
16% improvement over baseline
No overfitting detected - model shows healthy generalization!
from transformers import AutoTokenizer, AutoModelForCausalLM
# Load model
tokenizer = AutoTokenizer.from_pretrained("bekalebendong/pendo-gpt2-medium-teacher")
model = AutoModelForCausalLM.from_pretrained("bekalebendong/pendo-gpt2-medium-teacher")
# Generate text
prompt = "The history of"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(
**inputs,
max_new_tokens=50,
do_sample=True,
top_k=50,
top_p=0.95,
temperature=0.8
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
from transformers import pipeline
# Create prediction pipeline
predictor = pipeline('text-generation', model="bekalebendong/pendo-gpt2-medium-teacher")
# Get next word predictions
text = "Machine learning is"
predictions = predictor(
text,
max_new_tokens=1,
num_return_sequences=5,
return_full_text=False
)
for pred in predictions:
print(pred['generated_text'])
If you use this model in your research, please cite:
@misc{pendo-gpt2-medium-wikitext-103 (full) + wikipedia en (20231101, 30%),
author = {Dimitri Bekale},
title = {Pendo GPT-2 Medium Teacher Model},
year = {2025},
publisher = {HuggingFace},
howpublished = {\url{https://huggingface.co/bekalebendong/pendo-gpt2-medium-teacher}}
}
Dimitri Bekale
Model Status: ✅ Production Ready Generation Quality: ✅ Verified Last Updated: 2025
Generated with Claude Code