Run this model with HF Jobs

Run developmentseed/stac-zap-models on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/developmentseed/stac-zap-models. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/developmentseed/stac-zap-models on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
stac-zap-models / README.md
yellowcap's picture
Model card: shared v7
3414581 verified
|
Raw History Blame Contribute Delete
3.24 kB
---
license: apache-2.0
language:
- en
library_name: transformers.js
pipeline_tag: text-classification
base_model: ibm-granite/granite-embedding-30m-english
tags:
- stac
- earth-observation
- geospatial
- onnx
- browser
- transformers.js
---
# stac-zap models
Small open models that run in the browser and turn a short request into a STAC search in
[stac-zap](https://github.com/developmentseed/stac-zap), for example "Sentinel-2 over Lisbon last summer with few
clouds". They replace the hosted Jev decision model and the Clairic extraction model: no API key, no server.
**Status: research demo.** Results and limits: [docs/local-model.md](https://github.com/developmentseed/stac-zap/blob/phase0-local-model/docs/local-model.md)
in stac-zap (branch `phase0-local-model`).
The plan: [PLAN.md](PLAN.md).
## Models
**Current: `shared/v7/`** — one [IBM Granite Embedding 30M English](https://huggingface.co/ibm-granite/granite-embedding-30m-english)
encoder (Apache-2.0), fine-tuned, with three outputs, as ONNX for [transformers.js](https://github.com/huggingface/transformers.js).
`model/onnx/model_quantized.onnx` (31.4 MB) stores the weights as int8 and computes in fp32; `model/onnx/model.onnx`
is fp32.
| Output | Job |
|---|---|
| `last_hidden_state` | Retriever: the CLS vector, normalized, shortlists the collections of all known catalogs. |
| `decider_logits` | Decider: one score per (question, option) pair. Picks a collection of the shortlist (the catalog follows from it), or `keep`, or a place among geocoder results. stac-zap multiplies its softmax by the retriever's softmax over the shortlist, to the power 0.5. |
| `tag_logits` | Tagger: `B-/I-PLACE`, `TIME`, `CLOUD` for each token. Code turns the words into values. |
`shared/v7/stac-zap.json` holds the settings (temperatures, lengths, tags) and `shared/v7/vectors.json` the vectors
of the 1,021 curated collections. A page can load the folder straight from the Hub:
`https://huggingface.co/developmentseed/stac-zap-models/resolve/main/shared/v7/`.
Older runs: `retriever/`, `decider/`, `tagger/` `v1` to `v5` (three separate models; `v1`, `v2` ask for the catalog
first), and `shared/v6`. `reports/report-<run>.json`: training settings and test scores of each run.
Field test of stac-zap (30 requests, curated catalogs), v7 with the retriever vote: catalog 26/30, catalog and
collection 24/28 (Jev 1.13: 28/30 and 27/27); place, time and cloud cover 80/85 (Jev 80/85, Clairic 84/85).
## Training data
Requests generated from templates with exact labels, from STAC collection metadata of 33 public STAC APIs, GeoNames
(CC BY 4.0) and Natural Earth (public domain) places. No output of a closed model (Jev, Clairic, Claude or other) is
in the training data. The dataset is `developmentseed/stac-zap-data` (private until its licence review is done; the
generator is `training/generate.ts` in stac-zap).
## Limits
- English only. Template requests: topic requests ("drone imagery", "wildfires in Los Angeles") are weak.
- The place pick follows the order of the geocoder ("Perth" can give Perth, Scotland).
- The models choose among the collections they are given; they hold no list of catalogs.
Built by [Development Seed](https://developmentseed.org).