Repository navigation
Testing and Validation
Sudhanshu edited this page Nov 11, 2026
·
1 revision
-
Python syntax:
python -m py_compile transformer_from_scratch.py— passed. -
Offline smoke-test:
python transformer_from_scratch.py --smoke-test --output <temporary-dir>— passed on CPU with PyTorch 2.10.0+cpu. - Execution path: train for 2 epochs; select and save best checkpoint; reload checkpoint; perform final held-out synthetic test evaluation — completed.
- Observed model size: 56,738 trainable parameters in smoke-test configuration.
| Metric | Observed value |
|---|---|
| Dataset sizes | train 64 / validation 8 / test 8 |
| Epochs | 2 |
| Best validation accuracy | 0.6250 |
| Held-out synthetic test accuracy | 0.5000 |
These metrics are tiny-sample diagnostic results, not meaningful model-quality or generalization claims.
- Hugging Face dataset and MiniLM model downloads / real-data training.
- CUDA GPU execution and SDPA backend performance.
- Multi-GPU, distributed, or mixed-precision execution (not implemented).
-
torchview/ Graphviz architecture PNG rendering (optional).
python -m py_compile transformer_from_scratch.py
python transformer_from_scratch.py --smoke-testOptional manual robustness checks include testing --help, running --train with a small batch on an internet-connected machine, and inspecting the generated .pt file metadata. Keep .pt files out of public Git commits unless intentionally publishing trained artifacts.
Home · HLD · LLD · CLI · Validation This project is licensed under the Apache License, Version 2.0.© 2026 Sudhanshu Shukla · Licensed under the Apache License, Version 2.0.