diff options
| author | Onur Gündüz <ogunduz@gmail.com> | 2026-06-03 11:52:09 +0200 |
|---|---|---|
| committer | Onur Gündüz <ogunduz@gmail.com> | 2026-06-14 08:27:03 +0200 |
| commit | cb6ae157a09b6794f5d6da27dbc97e0ad791a146 (patch) | |
| tree | 6085cef187a3f326a257394517bf76192c742c2d /pplx_embed.h | |
| parent | 7cc87daedf764da43c338ba1cba739bd6af6e950 (diff) | |
| download | ffwd-cb6ae157a09b6794f5d6da27dbc97e0ad791a146.tar.gz ffwd-cb6ae157a09b6794f5d6da27dbc97e0ad791a146.zip | |
late: add packed maxsim scoring
Diffstat (limited to 'pplx_embed.h')
| -rw-r--r-- | pplx_embed.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pplx_embed.h b/pplx_embed.h index 294508f..5a2501b 100644 --- a/pplx_embed.h +++ b/pplx_embed.h @@ -274,6 +274,18 @@ float pplx_late_maxsim(const float *query_vectors, int query_tokens, const float *doc_vectors, int doc_tokens, int dim); +/* + * Score one query against a packed/ragged batch of documents. + * + * doc_offsets has docs + 1 entries. Document i is stored in + * doc_vectors[doc_offsets[i] * dim .. doc_offsets[i + 1] * dim). + * scores is caller-provided [docs]. + */ +int pplx_late_maxsim_batch(const float *query_vectors, int query_tokens, + const float *doc_vectors, + const int *doc_offsets, int docs, + int dim, float *scores); + /* Verbose level: 0=quiet, 1=info, 2=debug */ extern int pplx_verbose; extern int qwen_verbose; |
