Spaces:
Sleeping
Sleeping
| title: MiPLM Inference | |
| emoji: 🧬 | |
| colorFrom: indigo | |
| colorTo: blue | |
| sdk: docker | |
| pinned: false | |
| app_port: 7860 | |
| # MiPLM inference API | |
| FastAPI service that serves the MiPLM ESM-2 8M variants as a small REST API. | |
| ## Endpoints | |
| | Method | Path | Body | Returns | | |
| |--------|-------------|-----------------------------------|------------------------------------------| | |
| | GET | `/` | — | model list, device, max length | | |
| | GET | `/health` | — | liveness + which models are loaded | | |
| | POST | `/predict` | `{sequence, model}` | per-position 20-AA softmax `[L, 20]` | | |
| | POST | `/embed` | `{sequence, model}` | mean-pooled last-layer embedding | | |
| | POST | `/mutation` | `{sequence, model}` | wildtype-marginal Δlog-likelihood `[L, 20]` | | |
| `model` is one of `miplm-ce` (the cross-entropy 8M variant we trained, surfaced in the | |
| demo as the "ESM-2" baseline) or `miplm-blosum` (BLOSUM soft-label 8M variant, surfaced | |
| as "MiPLM"). The MSA variant is not trained yet. Sequences must be `[A-Za-z]+` and | |
| ≤ 1024 residues. | |
| ## Example | |
| ```bash | |
| curl -X POST $SPACE_URL/predict \ | |
| -H "Content-Type: application/json" \ | |
| -d '{"sequence": "MKTAYIAKQRQISFVKSHFSRQLEERLGLIE", "model": "miplm-blosum"}' | |
| ``` | |