(tokenizer, messages: list[dict], enable_thinking: bool)
| 101 | |
| 102 | |
| 103 | def _apply_chat_template(tokenizer, messages: list[dict], enable_thinking: bool) -> str: |
| 104 | return tokenizer.apply_chat_template( |
| 105 | messages, |
| 106 | tokenize=False, |
| 107 | add_generation_prompt=True, |
| 108 | enable_thinking=enable_thinking, |
| 109 | ) |
| 110 | |
| 111 | |
| 112 | def _make_decode_metrics(num_output_tokens: int, generation_tps: float, acceptance_lengths: list[int]) -> SimpleNamespace: |
no outgoing calls
no test coverage detected