From cf7d8169ec12cb3adf90d4ff78b3257e74985302 Mon Sep 17 00:00:00 2001 From: Onur Gündüz Date: Tue, 29 Sep 2026 13:05:44 +0200 Subject: Remove unused model families and inference paths --- libffwd/sentencepiece.h | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) (limited to 'libffwd/sentencepiece.h') diff --git a/libffwd/sentencepiece.h b/libffwd/sentencepiece.h index b79f47c..2230538 100644 --- a/libffwd/sentencepiece.h +++ b/libffwd/sentencepiece.h @@ -52,32 +52,15 @@ typedef struct tok_spm_workspace tok_spm_workspace_t; * on missing model file, unsupported model type, malformed protobuf, or OOM. */ tok_spm_t *tok_spm_load(const char *model_dir); -/* Decode one model-space id to an internal token string, or NULL when invalid. */ -const char *tok_spm_decode(const tok_spm_t *tok, int id); - /* Resolve a named token (e.g. "", "", "", "") to a * model-space id, or -1 when absent. */ int tok_spm_token_id(const tok_spm_t *tok, const char *token); -/* Encode UTF-8 text into malloc'd model-space token ids. Empty text returns - * NULL with *out_n_tokens = 0. NULL with a negative/unspecified count is an - * error. */ -int *tok_spm_encode(const tok_spm_t *tok, const char *text, int *out_n_tokens); - tok_spm_workspace_t *tok_spm_workspace_new(void); void tok_spm_workspace_free(tok_spm_workspace_t *ws); -/* Encode into caller-provided out_ids. Returns 0 on success, -1 on error, -2 if - * out_cap is too small. *out_n_tokens receives the emitted/needed token count. */ -int tok_spm_encode_into(const tok_spm_t *tok, - tok_spm_workspace_t *ws, - const char *text, - int *out_ids, - int out_cap, - int *out_n_tokens); - -/* Same tokenization as tok_spm_encode(), reusing ws internally - * and performing only the final returned int[] allocation. */ +/* Return malloc-owned model-space token IDs, reusing workspace scratch. + * Empty text returns NULL with a zero count. */ int *tok_spm_encode_with_workspace(const tok_spm_t *tok, tok_spm_workspace_t *ws, const char *text, -- cgit v1.3.1