maxent_grpo.training.generation.vocab_guard¶
Shared helpers for masking model-only token IDs during generation.
Functions
|
Best-effort resolution of the external vLLM-served model identifier. |
|
Return the output-vocab width exposed by the external vLLM model. |
|
Block model-only token IDs that the tokenizer cannot represent. |
Return a cached hard allowlist for tokenizer-addressable token IDs. |
|
Return tokenizer-inaccessible model token IDs for local generation guards. |
|
Return the model output-vocab width exposed to generation. |
|
|
Return the maximum token id addressable by the tokenizer plus one. |
- maxent_grpo.training.generation.vocab_guard.resolve_tokenizer_vocab_limit(tokenizer)[source]¶
Return the maximum token id addressable by the tokenizer plus one.
- maxent_grpo.training.generation.vocab_guard.resolve_model_vocab_limit(ctx)[source]¶
Return the model output-vocab width exposed to generation.
- maxent_grpo.training.generation.vocab_guard.merge_invalid_token_block_logit_bias(ctx, existing_bias)[source]¶
Block model-only token IDs that the tokenizer cannot represent.