| 1305 | int32_t n_draft_accepted = 0; // Draft tokens actually accepted |
| 1306 | |
| 1307 | void reset() { |
| 1308 | SLT_DBG(*this, "%s", "\n"); |
| 1309 | |
| 1310 | n_prompt_tokens = 0; |
| 1311 | last_nl_pos = 0; |
| 1312 | generated_text = ""; |
| 1313 | has_new_line = false; |
| 1314 | truncated = false; |
| 1315 | stop = STOP_TYPE_NONE; |
| 1316 | stopping_word = ""; |
| 1317 | n_past = 0; |
| 1318 | n_sent_text = 0; |
| 1319 | task_type = SERVER_TASK_TYPE_COMPLETION; |
| 1320 | chat_format = COMMON_CHAT_FORMAT_CONTENT_ONLY; |
| 1321 | |
| 1322 | generated_tokens.clear(); |
| 1323 | generated_token_probs.clear(); |
| 1324 | chat_msg = {}; |
| 1325 | json_schema = json(); |
| 1326 | generated_tool_call_ids.clear(); |
| 1327 | |
| 1328 | // clear speculative decoding stats |
| 1329 | n_draft_total = 0; |
| 1330 | n_draft_accepted = 0; |
| 1331 | } |
| 1332 | |
| 1333 | bool is_non_causal() const { |
| 1334 | return task_type == SERVER_TASK_TYPE_EMBEDDING || task_type == SERVER_TASK_TYPE_RERANK; |
no test coverage detected