superpoint-p150 / tt-model.yaml
changh95's picture
Add Tenstorrent Blackhole tt-nn port
dc14621 verified
Raw History Blame
2.34 kB
# SPDX-License-Identifier: Apache-2.0
# tt-model-manager container manifest (schema 5.1) for SuperPoint on Blackhole.
#
# tt-model package --container tt-model.yaml # amd64 Linux + Docker>=25, ~2.5-4 h
# tt-model serve build/superpoint-blackhole/tt_kernel_manifest.json # needs a card
# tt-model push build/superpoint-blackhole --publish # adds the tt-model-catalog tag
#
# SET ME before building: source.tt_metal must point at YOUR built tt-metal tree.
schema: "5.1"
repo: changh95/superpoint-blackhole
name: superpoint-blackhole
# A POINTER. Weights are never baked into the image; they land in the consumer's
# own HF cache under their own token. Pin a revision once validated.
weights: magic-leap-community/superpoint
kind: tt-dit-server
arch: blackhole
source:
# SET ME -- a local checkout is hermetic and lets tt-model read tt-metal's torch
# pin (metal_torch_pin), which verify.sh then asserts. A {repo, ref} mapping
# also works but skips that pin.
tt_metal: /path/to/tt-metal
# Relative to the tt-metal tree. At least one entry is required by the schema;
# this port's own code comes from extra_code below.
code:
- models/common
# This repo's code, which does NOT live in the tt-metal tree. `root: code` works
# because the published HF repo carries the port under code/ -- so on the box you
# just pull this repo and build from it.
extra_code:
- root: code
paths:
- models
ubuntu: "22.04"
python: "3.12"
runtime:
app: models.server.app:app
mesh_shape_env: TT_MESH_SHAPE
# Added ON TOP of the kind's defaults (fastapi, uvicorn, pydantic>=2, pillow).
# torch is auto-pinned to tt-metal's pin when tt_metal is a local path.
packages:
- numpy
- transformers
serve:
port: 20000
hardware: p150
mesh_device: P150
# Build-time assertions, run INSIDE the finished image. No device is opened.
verify:
- "import models.server.app as a; assert a.app"
card:
description: >
SuperPoint on a single Tenstorrent Blackhole p150a via tt-nn.
image -> keypoints, scores, descriptors.
quickstart: |
### Call it
```bash
curl -s localhost:20000/health
curl -s localhost:20000/info
curl -s localhost:20000/predict -H 'Content-Type: application/json' \
-d "{\"image\": \"$(base64 -w0 your.png)\"}"
```