| 165 | |
| 166 | |
| 167 | class GuidedDecodingConfig(StrictBaseModel): |
| 168 | |
| 169 | class GuidedDecodingBackend(Enum): |
| 170 | XGRAMMAR = 0 |
| 171 | LLGUIDANCE = 1 |
| 172 | |
| 173 | backend: GuidedDecodingBackend = Field( |
| 174 | default=GuidedDecodingBackend.XGRAMMAR, |
| 175 | description="The backend for guided decoding config.") |
| 176 | encoded_vocab: Optional[List[str]] = Field( |
| 177 | default=None, |
| 178 | description="The encoded vocab for guided decoding config.") |
| 179 | tokenizer_str: Optional[str] = Field( |
| 180 | default=None, |
| 181 | description="The tokenizer string for guided decoding config.") |
| 182 | stop_token_ids: Optional[List[int]] = Field( |
| 183 | default=None, |
| 184 | description="The stop token ids for guided decoding config.") |
| 185 | |
| 186 | |
| 187 | class BaseSparseAttentionConfig(StrictBaseModel): |
no test coverage detected