Quick reference for evaluating your historical language model (1500-1850 London)
📖 Complete Guide: For detailed implementation, see EVALUATION_GUIDE.md
# Test regular model checkpoint (replace XXXX with step number)
cd 04_training
python test_checkpoint.py --checkpoint_path 09_models/checkpoints/checkpoint-XXXX.pt
# Test SLM checkpoint (replace XXXX with step number)
python test_checkpoint_slm.py --checkpoint_path 09_models/checkpoints/slm/checkpoint-XXXX.pt
# Quick test - auto-detects latest checkpoint
python test_checkpoint.py # Regular model
python test_checkpoint_slm.py # SLM modelcd 05_evaluation
python run_evaluation.py --mode quick# CPU evaluation (safe during training) - DEFAULT
python run_evaluation.py --mode quick --device cpu
# GPU evaluation (only when GPU is free)
python run_evaluation.py --mode quick --device gpucd 05_evaluation
python run_evaluation.py --mode allcd 05_evaluation
run_evaluation.bat quick| Type | Command | Time | Dependencies | Best For |
|---|---|---|---|---|
| Checkpoint Testing | python test_checkpoint.py |
1-2 min | None | During training validation |
| Quick | --mode quick |
2-5 min | Basic | Daily testing |
| Comprehensive | --mode comprehensive |
10-15 min | OpenAI API | Weekly assessment |
| Dataset | --mode dataset |
1 min | None | Generate test cases |
| All | --mode all |
15-20 min | OpenAI API | Complete evaluation |
- Target: >70% correct
- Tests: Plague 1665, Fire 1666, Royalty, Religion, Social classes
- Method: Keyword/phrase matching
- Vocabulary Diversity: >30% unique words
- Historical Patterns: >20% contain period language
- Readability: 30-70 (moderate difficulty)
- ROUGE-L: >30% overlap with reference
- BERTScore: Semantic similarity
- Vocabulary Overlap: Word overlap with prompts
- Flesch Reading Ease: 30-70
- Sentence Consistency: Low variance in length
- Repetition Penalty: High unique word ratio
| Metric | Excellent | Good | Fair | Poor |
|---|---|---|---|---|
| Historical Accuracy | >80% | 60-80% | 40-60% | <40% |
| Vocabulary Diversity | >40% | 30-40% | 20-30% | <20% |
| Historical Patterns | >30% | 20-30% | 10-20% | <10% |
| ROUGE-L | >40% | 30-40% | 20-30% | <20% |
| Readability | 40-60 | 30-70 | 20-80 | <20 or >80 |
- Plague 1665 - Great Plague knowledge
- Fire 1666 - Great Fire of London
- Royalty - Charles II, Tudor/Stuart/Georgian periods
- Religion - Church of England, Anglican
- Social Classes - Nobility, merchants, artisans, labourers
- Legal System - Old Bailey, punishments, law enforcement
- Economic Context - Currency, trade, guilds
- Language Patterns - Archaic pronouns, adverbs, prepositions
- Model Loading: Check paths in
--model_dirand--tokenizer_dir - Memory Issues: Use
--device cpuor reduce batch size - API Errors: Check OpenAI API key for comprehensive evaluation
- Dependencies: Run
python setup_evaluation.py - GPU Conflicts: Use
--device cpuduring training to avoid interference
- Faster: Use
--mode quickfor basic assessment - Better: Use
--mode comprehensivewith OpenAI API - Custom: Edit
historical_evaluation_dataset.pyfor new test cases - Safe: Use
--device cpuduring training (won't interfere with GPU training) - Fast: Use
--device gpuwhen GPU is free (faster evaluation)
quick_results/
├── quick_evaluation_results.json
├── quick_evaluation_summary.txt
└── quick_evaluation.log
results/
├── comprehensive_evaluation_results.json
├── evaluation_summary.txt
└── comprehensive_evaluation.log
historical_evaluation_dataset.json
python run_evaluation.py --mode quickpython run_evaluation.py --mode comprehensivepython run_evaluation.py --mode all- Add more historical training data
- Focus on specific time periods
- Include more primary sources
- Increase training data variety
- Adjust repetition penalty
- Check tokenizer vocabulary
- Add period-specific language examples
- Include more historical literature
- Focus on language pattern training
- Check model architecture
- Adjust training parameters
- Verify data quality
- ✅ Historical accuracy for 1500-1850 London
- ✅ Modern LLM evaluation metrics
- ✅ Period-specific language patterns
- ✅ London geography and context
- ✅ Social, legal, and economic knowledge
- ✅ Easy-to-use launcher scripts
- ✅ G-Eval methodology for groundedness
- ✅ MMLU and HellaSWAG benchmarks
- ✅ ROUGE and BERTScore metrics
- ✅ Historical-specific test cases
- ✅ Continuous evaluation capabilities
- Complete Guide: EVALUATION_GUIDE.md
- Inference Quick Start: INFERENCE_QUICK_START.md
- Training Guide: TRAINING_GUIDE.md
- Inference Setup: INFERENCE_SETUP_GUIDE.md
- Check Logs: Look in evaluation folder logs
- GitHub Issues: Create issue on repository
- Documentation: Review relevant guides
- Environment: Check
environment_config.json
Ready to evaluate your historical London LLM! 🏛️✨