rockyaaos/qm9-mist-live-demo
QM9 MIST live comparison — private-serving Docker Space
This Docker Space serves one SMILES at a time through four fixed QM9 property predictors:
- ECFP4 + Ridge
- ECFP4 + 12 XGBoost regressors
- ECFP4 + 12-output MLP
- the released fine-tuned MIST-28M QM9 checkpoint
It returns the 12 QM9 properties, including HOMO, LUMO, and gap. Predictions are QM9 computational-property estimates; they are not experimental values or a new benchmark score.
What this repository does not contain
No model weights, data rows, prediction rows, tokens, or local machine paths are committed here. At runtime the app obtains:
- MIST from its original public repository at the fixed revision
mist-models/mist-26.9M-kkgx0omx-qm9@65ceeed479609e9dcaef04e687556e2b39e25f23. - Ridge/XGBoost/MLP serving artifacts from the private Hugging Face dataset repository named by
LIVE_DEMO_BUNDLE_REPO, using theHF_TOKENsecret.
The private dataset must contain the files produced by the bundle builder at its repository root: bundle_manifest.json, ridge.npz, twelve xgboost_<target>.json files, mlp.safetensors, mlp_architecture.json, and mlp_scaler.npz. The startup loader verifies the manifest hashes before it loads an artifact.
The Docker image deliberately installs the CPU-only PyTorch wheel. A GPU Space can use the same application code, but this scaffold does not require or claim GPU availability.
Required Space secrets and variables
Set these in the Space Settings page; never put them in this repository.
Browser CORS is limited to https://sciencesloop.com, https://www.sciencesloop.com, and the optional exact extra origin. Wildcards and non-HTTPS extra origins are rejected during startup.
Endpoints
GET /healthzGET /v1/model-cardPOST /v1/predict
Example:
curl -X POST "$SPACE_URL/v1/predict" \
-H 'content-type: application/json' \
--data '{"smiles":"CCO"}'Only a smiles field is accepted. It has a 512-character limit and is checked with RDKit. Clients cannot choose a model, checkpoint, path, device, or URL.
Local container run
export HF_TOKEN='…'
export LIVE_DEMO_BUNDLE_REPO='owner/qm9-live-demo-bundle'
docker build -t qm9-live-space .
docker run --rm -p 7860:7860 \
-e HF_TOKEN -e LIVE_DEMO_BUNDLE_REPO qm9-live-spaceThe service binds to port 7860 and uses no access logging. See DEPLOYMENT.md for the exact private-bundle upload and Space creation steps.
