DriftCapture · function
owlv2Tokens
OWLv2's text queries as its text graph takes them: tokens, [queries · positions], each query
padded with zeros to positions, and ends, [queries], the row of each query's end of text in
that list — the upstream pools the row of the largest token, which is that one. A query longer
than positions is refused, as the upstream's position table refuses it.
Explained in DriftCapture.
function owlv2Tokens(tokenizer: ClipTokenizer, texts: readonly string[], positions: number):import { owlv2Tokens } from '@driftengine/capture';Parameters
| Parameter | Type | Description |
|---|---|---|
tokenizer | ClipTokenizer | |
texts | readonly string[] | |
positions | number |