Commit b8d736e
committed
fix: remove repetition_penalty from vLLM services (fixes #2950 CUDA assert)
- repetition_penalty is incompatible with enable_prompt_embeds=True in vLLM
- Removed from both serve_realtime_ws.py and serve_vllm.py
- Added truncate_repetition() post-processing to serve_vllm.py as alternative
- serve_realtime_ws.py already has detect_and_fix_hallucination() for this
Root cause: vLLM's repetition penalty implementation does scatter on prompt
token IDs, but prompt_embeds mode has no token IDs, causing index OOB.1 parent 679f40c commit b8d736e
2 files changed
Lines changed: 16 additions & 3 deletions
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
321 | | - | |
322 | 321 | | |
323 | 322 | | |
324 | 323 | | |
| |||
359 | 358 | | |
360 | 359 | | |
361 | 360 | | |
362 | | - | |
363 | 361 | | |
364 | 362 | | |
365 | 363 | | |
| |||
Lines changed: 16 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
35 | 49 | | |
36 | 50 | | |
37 | 51 | | |
| |||
107 | 121 | | |
108 | 122 | | |
109 | 123 | | |
110 | | - | |
| 124 | + | |
111 | 125 | | |
112 | 126 | | |
113 | 127 | | |
| |||
120 | 134 | | |
121 | 135 | | |
122 | 136 | | |
| 137 | + | |
123 | 138 | | |
124 | 139 | | |
125 | 140 | | |
| |||
0 commit comments