Other Tests¶
Note
Unless otherwise specified, all the continuous batching tests are running with max_model_len=256
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, cb: bool, max_model_len: int, max_num_seqs: int)
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, cb: bool, max_model_len: int, max_num_seqs: int)
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)
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
175 176 177 178 179 180 181 182 183 184 185 186 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 |
|
tests.e2e.test_spyre_async_llm
¶
test_abort
async
¶
test_abort(model: ModelInfo, backend: str, cb: int, warmup_shapes: DecodeWarmupShapes, output_kind: RequestOutputKind, monkeypatch: MonkeyPatch)
Test handling of cancelled requests
Source code in tests/e2e/test_spyre_async_llm.py
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, cb: int, 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.