Download mindxtrain/eval/mei/__init__.py from PYTHAI/mindXtrain: direct link, hf CLI and curl.
- Browser
- Download file 1.77 kB
-
https://huggingface.co/PYTHAI/mindXtrain/resolve/main/mindxtrain/eval/mei/__init__.py
- Command line
-
hf download hf://PYTHAI/mindXtrain/mindxtrain/eval/mei/__init__.py
-
curl -L -o __init__.py https://huggingface.co/PYTHAI/mindXtrain/resolve/main/mindxtrain/eval/mei/__init__.py
1.77 kB
| """mindX Efficiency Index (MEI) β composite model-evaluation metric. | |
| Implements the v0.1 specification at | |
| `/home/hacker/mindX/docs/operations/mindX Efficiency Index_ β¦ .md`. | |
| The MEI is a single scalar in [0, 1] derived from five log-compressed | |
| sub-indices β quality (Q), decode throughput (Dt), prefill throughput | |
| (Pp), memory footprint (M), and energy per useful token (E) β combined | |
| via weighted geometric mean. It is the in-house metric mindXtrain uses | |
| to gate checkpoint promotion to AgenticPlace. | |
| Layout (mirrors the spec's Β§7 three-layer instrumentation stack): | |
| - `record.py` β Pydantic schemas for the canonical measurement record. | |
| - `tokenizer.py` β canonical tokenizer wrapper (spec Rule 3.1). | |
| - `throughput.py` β engine harness wrappers (llama.cpp, Ollama, vLLM, HF). | |
| - `energy.py` β power sampling (NVML, RAPL, powermetrics, ROCm-SMI). | |
| - `orchestrator.py` β measurement protocol: warmup β battery β sweep β CI. | |
| - `score.py` β pure functions computing MEI from a record. | |
| - `xei.py` β training-side companion (MFU, optimization health). | |
| - `promotion.py` β three-gate AgenticPlace promotion logic. | |
| - `history.py` β append-only JSONL of historical scores. | |
| Anchor calibration (Β§5.2-Β§5.5) is frozen at module load for v0.1; the | |
| ANCHORS object is the authoritative source for floors and ceilings. | |
| """ | |
| from mindxtrain.eval.mei.record import ( | |
| ConcurrencyPoint, | |
| ContextTierMeasurement, | |
| HardwareIdent, | |
| InferenceEngineIdent, | |
| LatencyPercentiles, | |
| MEIRecord, | |
| QuantizationTuple, | |
| TokenSeries, | |
| ) | |
| __all__ = [ | |
| "ConcurrencyPoint", | |
| "ContextTierMeasurement", | |
| "HardwareIdent", | |
| "InferenceEngineIdent", | |
| "LatencyPercentiles", | |
| "MEIRecord", | |
| "QuantizationTuple", | |
| "TokenSeries", | |
| ] | |