[Spec][Ngram] 4/N: Remove max_match_window_size and min_match_window_size, matching all suffixes of the Trie (#21225)
This commit is contained in:
@@ -295,12 +295,10 @@ Please consult the documentation below and [server_args.py](https://github.com/s
|
||||
## Ngram speculative decoding
|
||||
| Argument | Description | Defaults | Options |
|
||||
| --- | --- | --- | --- |
|
||||
| `--speculative-ngram-min-match-window-size` | The minimum window size for pattern matching in ngram speculative decoding. | `1` | Type: int |
|
||||
| `--speculative-ngram-max-match-window-size` | The maximum window size for pattern matching in ngram speculative decoding. | `12` | Type: int |
|
||||
| `--speculative-ngram-min-bfs-breadth` | The minimum breadth for BFS (Breadth-First Search) in ngram speculative decoding. | `1` | Type: int |
|
||||
| `--speculative-ngram-max-bfs-breadth` | The maximum breadth for BFS (Breadth-First Search) in ngram speculative decoding. | `10` | Type: int |
|
||||
| `--speculative-ngram-match-type` | Ngram tree-building mode. `BFS` selects recency-based expansion and `PROB` selects frequency-based expansion. This setting is forwarded to the ngram cache implementation. | `BFS` | `BFS`, `PROB` |
|
||||
| `--speculative-ngram-max-trie-depth` | The max trie depth for ngram speculative decoding. | `18` | Type: int |
|
||||
| `--speculative-ngram-max-trie-depth` | Maximum suffix length stored and matched by the ngram trie. | `18` | Type: int |
|
||||
| `--speculative-ngram-capacity` | The cache capacity for ngram speculative decoding. | `10000000` | Type: int |
|
||||
|
||||
## Multi-layer Eagle speculative decoding
|
||||
|
||||
@@ -387,13 +387,11 @@ Enable it with:
|
||||
|
||||
| Parameter | Description | Default |
|
||||
|---|---|---|
|
||||
| `--speculative-num-draft-tokens` | Number of draft tokens verified per step. If omitted, defaults to `--speculative-ngram-max-match-window-size`. | `12` (with default ngram settings) |
|
||||
| `--speculative-ngram-min-match-window-size` | Minimum matching window size. | `1` |
|
||||
| `--speculative-ngram-max-match-window-size` | Maximum matching window size. | `12` |
|
||||
| `--speculative-num-draft-tokens` | Number of draft tokens verified per step. If omitted, defaults to `min(--speculative-ngram-max-trie-depth, 12)`. | `12` (with default ngram settings) |
|
||||
| `--speculative-ngram-min-bfs-breadth` | Minimum BFS breadth. | `1` |
|
||||
| `--speculative-ngram-max-bfs-breadth` | Maximum BFS breadth. | `10` |
|
||||
| `--speculative-ngram-match-type` | Ngram tree-building mode: `"BFS"` for recency-based expansion or `"PROB"` for frequency-based expansion. | `"BFS"` |
|
||||
| `--speculative-ngram-max-trie-depth` | The max trie depth for ngram speculative decoding. | `18` |
|
||||
| `--speculative-ngram-max-trie-depth` | Maximum suffix length stored and matched by the ngram trie. | `18` |
|
||||
| `--speculative-ngram-capacity` | Cache capacity (number of entries). | `10,000,000` |
|
||||
|
||||
Notes:
|
||||
@@ -408,7 +406,6 @@ python3 -m sglang.launch_server \
|
||||
--model Qwen/Qwen2.5-7B-Instruct \
|
||||
--speculative-algorithm NGRAM \
|
||||
--speculative-num-draft-tokens 16 \
|
||||
--speculative-ngram-max-match-window-size 12 \
|
||||
--speculative-ngram-max-bfs-breadth 10 \
|
||||
--mem-fraction-static 0.7 \
|
||||
--cuda-graph-max-bs 8 \
|
||||
@@ -464,12 +461,10 @@ Below is a comprehensive list of all speculative decoding parameters available i
|
||||
|
||||
| Parameter | Type | Default | Description |
|
||||
|---|---|---|---|
|
||||
| `--speculative-ngram-min-match-window-size` | `int` | `1` | Minimum ngram matching window |
|
||||
| `--speculative-ngram-max-match-window-size` | `int` | `12` | Maximum ngram matching window |
|
||||
| `--speculative-ngram-min-bfs-breadth` | `int` | `1` | Minimum BFS breadth |
|
||||
| `--speculative-ngram-max-bfs-breadth` | `int` | `10` | Maximum BFS breadth |
|
||||
| `--speculative-ngram-match-type` | `str` | `"BFS"` | Ngram tree-building mode: `"BFS"` for recency-based expansion or `"PROB"` for frequency-based expansion |
|
||||
| `--speculative-ngram-max-trie-depth` | `int` | `18` | Max trie depth for ngram speculative decoding |
|
||||
| `--speculative-ngram-max-trie-depth` | `int` | `18` | Maximum suffix length stored and matched by the ngram trie |
|
||||
| `--speculative-ngram-capacity` | `int` | `10,000,000` | Cache capacity |
|
||||
|
||||
### Environment variables
|
||||
|
||||
Reference in New Issue
Block a user