Other Tests¶
Note
Unless otherwise specified, all the continuous batching tests are running with max_model_len=512
tests.e2e.test_spyre_cb
¶
Verification of continuous batching
Run python -m pytest tests/e2e/test_spyre_cb.py.
test_api_cb_generates_correct_max_tokens
¶
test_api_cb_generates_correct_max_tokens(remote_openai_server: RemoteOpenAIServer, model: ModelInfo, backend: str, max_model_len: int, max_num_seqs: int, mode: bool)
Verify API generates the correct numbers of tokens with CB enabled
Source code in tests/e2e/test_spyre_cb.py
test_api_cb_rejects_oversized_request
¶
test_api_cb_rejects_oversized_request(remote_openai_server: RemoteOpenAIServer, model: ModelInfo, backend: str, max_model_len: int, max_num_seqs: int, mode: str)
Verify API rejects request that exceed max_model_len with CB enabled
Source code in tests/e2e/test_spyre_cb.py
test_cb_max_tokens
¶
test_cb_max_tokens(model: ModelInfo, backend: str, max_model_len: int, max_num_seqs: int, monkeypatch: MonkeyPatch, use_llm_cache, mode: str)
Test that continuous batches of requests that
are longer than the max_model_len are correctly rejected
Source code in tests/e2e/test_spyre_cb.py
test_long_context_batches
¶
Tests continuous batching with various batch sizes and prompt lengths.
Source code in tests/e2e/test_spyre_cb.py
test_swap_decode_programs_for_cb
¶
test_swap_decode_programs_for_cb(tp_size: int, monkeypatch: MonkeyPatch) -> None
Validate the runtime's ability to swap between different compiled decode programs for varying batch sizes and TKV.
The test case consists of 32 small input prompts with specifically chosen max_new_tokens values to trigger different decode programs at runtime.
The test case structure is as follows:
- 16 prompts with max_new_tokens @ 1k
- 8 prompts with max_new_tokens @ 2k
- 4 prompts with max_new_tokens @ 4k
- 2 prompts with max_new_tokens @ 8k
- 1 prompt with max_new_tokens @ 16k
- 1 prompt with max_new_tokens @ 32k
Source code in tests/e2e/test_spyre_cb.py
187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 | |
tests.e2e.test_spyre_async_llm
¶
test_abort
async
¶
test_abort(model: ModelInfo, backend: str, mode: str, max_model_len: int, max_num_seqs: int, max_num_batched_tokens: int, warmup_shapes: DecodeWarmupShapes, output_kind: RequestOutputKind, monkeypatch: MonkeyPatch)
Test handling of cancelled requests
Source code in tests/e2e/test_spyre_async_llm.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | |
tests.e2e.test_spyre_max_new_tokens
¶
Verification of vLLM output by comparing with HF
Run python -m pytest tests/e2e/test_spyre_max_new_tokens.py.
test_output
¶
test_output(model: ModelInfo, stop_last: bool, max_model_len: int, max_num_seqs: int, warmup_shapes: DecodeWarmupShapes, backend: str, mode: str, monkeypatch: MonkeyPatch, use_llm_cache) -> None
Checks that max_tokens parameter of SamplingParams works correctly
For each batch, one prompt has max_tokens set to 1 and the others don't.
This checks that the correct request has only a single output token, while
the others are not affected.