mantis¶
Mantis embeddings with an sklearn head, plus every hub model.
| extra | CPU tag | GPU tag | families | models | example |
|---|---|---|---|---|---|
mantis |
:mantis |
:mantis-gpu |
Mantis | 3 | mantis_8m |
past needs more than 127 rows
context_length is 127. The examples below send 150 rows; the five-row series used on other pages fails here.
Start a server¶
Check what loaded:
Predict¶
150 rows of history, because context_length is 127. Python needs the client extra on the caller.
python - <<'PY'
import datetime, json
start = datetime.date(2024, 1, 1)
past = {
"timestamp": [(start + datetime.timedelta(days=i)).isoformat() for i in range(150)],
"sales": [120 + (i % 7) * 3 for i in range(150)],
}
payload = {"past": past, "time": "timestamp", "target": ["sales"], "fh": 3,
"model": "mantis_8m"}
json.dump(payload, open("mantis.json", "w"))
PY
curl -s http://127.0.0.1:8000/predict \
-H "Content-Type: application/json" -d @mantis.json
Save the Python from the other tab as make_payload.py, then:
import datetime
from tserve.client import Client
start = datetime.date(2024, 1, 1)
past = {
"timestamp": [(start + datetime.timedelta(days=i)).isoformat() for i in range(150)],
"sales": [120 + (i % 7) * 3 for i in range(150)],
}
with Client("http://127.0.0.1:8000") as client:
result = client.predict(
past=past,
time="timestamp",
target=["sales"],
fh=3,
model="mantis_8m",
)
print(result.predictions)
Models¶
Mantis¶
Embeddings plus an sklearn head. context_length is 127, so past must be longer than that.
| model | checkpoint |
|---|---|
mantis |
paris-noah/MantisV2 |
mantis_8m |
paris-noah/Mantis-8M |
mantis_plus |
paris-noah/MantisPlus |
Also loadable here¶
- Naive:
naive, frombase. - Chronos Bolt, Chronos T5, TTM, TimesFM 2.x: 81 models, from
hub.
Next steps¶
- Docker, UV / Pip, From source: run the server.
- Data specification: the predict request.
- Craft specs, Live objects, Models from a directory: a checkpoint no catalog name covers.
- Errors: a model that failed to load.