Inference engineering · personal practice project
Systems extensions on top of
MiniMind:
a preallocated static KV cache, request batching, and an observable FastAPI serving
path with Prometheus metrics. Equivalence tests pin the cache to the reference
implementation; the benchmark harness emits JSON reports rather than screenshots.
Exploratory runs · Apple Silicon CPU · 532,864-parameter model
| Static cache vs. no cache |
+74.10% |
tokens/s |
| Static cache vs. existing dynamic cache |
+0.11% |
tokens/s |
| Batched serving batch 8 vs. batch 1 |
+155.20% |
requests/s |
Short local runs on a CPU micro-model — not GPU results, statistical guarantees,
or model-quality claims. The +0.11% row is reported precisely because it is not
evidence of a robust speedup.
- PyTorch
- FastAPI
- Static KV cache
- Dynamic batching
- Prometheus
Interpretable modeling · validated reporting API
Live demo
three precomputed companies — Pages cannot run the model
A leakage-aware modeling benchmark, a SHAP evidence bundle, and a FastAPI service
that returns a risk estimate alongside the strongest positive and negative
contributions behind it. Encoding, imputation, and scaling are fitted inside each
training fold, so the comparison below is not flattered by the validation split.
430 eligible companies · 5 shared folds · seed 42 · lower is better
| Model | OOF RMSE | OOF MAE |
| Training-fold mean (baseline) | 6.890 | 5.615 |
| CatBoost | 4.870 | 3.728 |
| ElasticNet | 5.913 | 4.812 |
| LightGBM | 6.003 | 4.709 |
| Equal-weight blend | 5.331 | 4.232 |
Internal cross-validation estimates on a historical cross-sectional dataset —
not future-period or external validation. The blend did not beat CatBoost in this run.
Grand Prize
2025 Zhixiang Cup — national university economics and management case competition.
The award applies to the original competition case; the repository documents the later engineering release.
- CatBoost
- SHAP
- scikit-learn
- FastAPI