Dan-wanna-M / kbnf

A fast constrained decoding engine based on context free grammar in Rust
Other
2 stars 0 forks source link

Add `mask_token_ids` and `update_token_ids` API #7

Open Dan-wanna-M opened 1 month ago

Dan-wanna-M commented 1 month ago

Some users might want to mask an array of token ids(e.g. from top_p, top_k) rather than the whole logits. We probably need the caller to provide an output buffer considering how the FFI works.