Views
No views yet
BoundaryExtractor) for onnxruntime-web / WebGPU. Revision 5 graphs plus
attrs.onnx (score_explicit_spans).implies/excludes, record
assignment, and long-document chunking stay in JavaScript.| File | Role | Size |
|---|---|---|
onnx/model.onnx | Encoder + entity pair path + classifier + text_states + candidate_states | 746.4 MB |
onnx/heads.onnx | SparseRelationScorer only (no encoder) | 23.7 MB |
onnx/records.onnx | RecordHead assignment (inst/field/cand projections + null column) | 1.19 MB |
onnx/attrs.onnx | score_explicit_spans (dynamo; pad 512/8/16) | 7.38 MB |
head.score_explicit_spans. Traced at 512 words, 8 attribute
queries, 16 spans. The JS host crops a 512-word window around the mention; that
pad is not a document-length cap. ORT vs torch RMSE ~1e-6 (small) / ~2e-6
(base, multi). Overlay lookup is the fallback if this graph fails to load.[E] block (sorted).
Single-label attributes use softmax. ONNX pair_valid is all-true; the host
drops start >= end slots before overlap.max_len is 4096 words: classify_text / extract is one
forward pass over the whole document. That is what Fastino means by
long-context classification on CUDA/CPU.| Call | Words in one GPU run | Measured here (M2 Max, onnxruntime-web) |
|---|---|---|
classify_text / extract | the whole string (cap 4096) | small finished 4096 words. base and multi died between 3500 and 3600 (createCommandEncoder / std::bad_alloc). |
classify_text_long / extract_entities_long | 384, overlap 64 | 4096-word docs: 13 windows. base 2.75 s, multi 4.3 s. Merge is max-confidence (classify) or span overlap (NER). |
classify_text_long never builds a 4096-word attention matrix.
Use the *_long APIs for contracts on base/multi in the browser.implies / excludes
is a JS beam. Latent / anchorless records are not exported.