qni-live
b6dac80740
logit_bias: normalize a long list once per request instead of five times
...
A standing ban of a whole script (65,929 IDs) was normalized five times per request: in _openai, twice in
validate_request and twice in engine_key. About 200 ms of Python per request, whatever the answer length.
A list is now normalized once. The same object again in a request is answered from the last call; an equal list in
a later request is found by its compact JSON text, which tells False from 0 and "1" from 1 (== does not: [[7, False]]
== [[7, 0]]). Only a list that normalized without an error is stored. Lists under 64 entries skip the cache.
No change to what normalize, engine_key and validate_request return or raise.
2026-10-15 05:41:36 +02:00
..
2026-10-12 20:18:33 +02:00
2026-10-12 20:18:33 +02:00
2026-09-24 18:42:20 +02:00
2026-10-10 13:12:47 +02:00
2026-09-24 18:42:20 +02:00
2026-09-24 18:42:20 +02:00
2026-10-09 03:10:24 +02:00
2026-10-14 12:49:34 +02:00
2026-10-13 01:07:28 +02:00
2026-10-09 16:45:37 +02:00
2026-10-15 05:41:36 +02:00
2026-09-28 17:28:01 +02:00
2026-09-30 22:13:46 +02:00
2026-10-07 00:18:37 +02:00
2026-10-11 12:01:22 +02:00
2026-10-07 03:02:56 +02:00
2026-10-03 18:35:02 +02:00
2026-10-15 05:41:24 +02:00
2026-10-09 03:27:49 +02:00
2026-10-07 03:02:56 +02:00
2026-10-13 04:12:24 +02:00
2026-10-10 13:12:47 +02:00
2026-10-09 03:04:21 +02:00
2026-10-09 03:04:21 +02:00
2026-10-05 11:03:50 +02:00
2026-10-07 17:21:48 +02:00
2026-10-14 01:16:56 +02:00
2026-10-13 00:48:16 +02:00
2026-10-07 03:02:56 +02:00
2026-10-12 19:58:28 +02:00
2026-10-05 13:16:53 +02:00
2026-10-13 07:16:25 +02:00
2026-10-13 01:07:28 +02:00
2026-10-09 16:45:37 +02:00
2026-10-05 13:16:53 +02:00
2026-10-15 05:41:36 +02:00
2026-09-30 20:37:57 +02:00
2026-10-03 18:31:20 +02:00
2026-10-13 00:46:48 +02:00
2026-10-14 12:49:34 +02:00
2026-10-14 12:49:26 +02:00
2026-10-09 03:04:22 +02:00
2026-10-07 00:18:37 +02:00
2026-10-15 05:41:24 +02:00
2026-10-09 03:15:12 +02:00
2026-10-07 03:02:56 +02:00
2026-10-09 03:17:23 +02:00
2026-10-10 10:42:44 +02:00
2026-10-06 11:25:45 +02:00
2026-10-09 03:15:12 +02:00
2026-10-11 12:01:22 +02:00
2026-10-10 22:05:52 +02:00
2026-10-10 10:45:03 +02:00
2026-10-07 21:00:39 +02:00
2026-10-06 15:57:37 +02:00
2026-10-03 18:35:02 +02:00
2026-10-05 19:57:35 +02:00
2026-10-15 05:41:24 +02:00
2026-10-09 03:27:49 +02:00
2026-10-07 20:29:09 +02:00
2026-10-09 14:47:49 +02:00
2026-10-05 13:16:54 +02:00
2026-10-08 02:25:52 +02:00
2026-10-08 02:31:56 +02:00
2026-10-13 04:36:30 +02:00
2026-10-03 18:52:00 +02:00
2026-10-05 15:58:36 +02:00
2026-10-05 15:58:36 +02:00