You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`SPECULATIVE_MODEL`| None |`str`| The name of the draft model to be used in speculative decoding. |
68
-
|`NUM_SPECULATIVE_TOKENS`| None |`int`| The number of speculative tokens to sample from the draft model. |
69
-
|`SPECULATIVE_DRAFT_TENSOR_PARALLEL_SIZE`| None |`int`| Number of tensor parallel replicas for the draft model. |
70
-
|`SPECULATIVE_MAX_MODEL_LEN`| None |`int`| The maximum sequence length supported by the draft model. |
71
-
|`SPECULATIVE_DISABLE_BY_BATCH_SIZE`| None |`int`| Disable speculative decoding if the number of enqueue requests is larger than this value. |
72
-
|`NGRAM_PROMPT_LOOKUP_MAX`| None |`int`| Max size of window for ngram prompt lookup in speculative decoding. |
73
-
|`NGRAM_PROMPT_LOOKUP_MIN`| None |`int`| Min size of window for ngram prompt lookup in speculative decoding. |
74
-
|`SPEC_DECODING_ACCEPTANCE_METHOD`| 'rejection_sampler' |['rejection_sampler', 'typical_acceptance_sampler']| Specify the acceptance method for draft token verification in speculative decoding. |
75
-
|`TYPICAL_ACCEPTANCE_SAMPLER_POSTERIOR_THRESHOLD`| None |`float`| Set the lower bound threshold for the posterior probability of a token to be accepted. |
76
-
|`TYPICAL_ACCEPTANCE_SAMPLER_POSTERIOR_ALPHA`| None |`float`| A scaling factor for the entropy-based threshold for token acceptance. |
77
-
78
-
## System Performance Settings
63
+
Speculative decoding can be configured in two ways:
64
+
65
+
### Option 1: JSON Configuration
66
+
67
+
Set `SPECULATIVE_CONFIG` to a JSON string with your full speculative decoding configuration:
|`SPECULATIVE_MODEL`| None |`str`| The name of the draft model to be used in speculative decoding. |
79
+
|`NUM_SPECULATIVE_TOKENS`| None |`int`| The number of speculative tokens to sample from the draft model. |
80
+
|`SPECULATIVE_DRAFT_TENSOR_PARALLEL_SIZE`| None |`int`| Number of tensor parallel replicas for the draft model. |
81
+
|`SPECULATIVE_MAX_MODEL_LEN`| None |`int`| The maximum sequence length supported by the draft model. |
82
+
|`SPECULATIVE_DISABLE_BY_BATCH_SIZE`| None |`int`| Disable speculative decoding if the number of enqueue requests is larger than this value. |
83
+
|`NGRAM_PROMPT_LOOKUP_MAX`| None |`int`| Max size of window for ngram prompt lookup in speculative decoding. |
84
+
|`NGRAM_PROMPT_LOOKUP_MIN`| None |`int`| Min size of window for ngram prompt lookup in speculative decoding. |
85
+
86
+
If `SPECULATIVE_CONFIG` is set, it takes priority over individual env vars. When using individual env vars without `SPECULATIVE_METHOD`, the method is auto-detected from the model name or configuration.
logging.warning("Error importing vllm, skipping related imports. This is ONLY expected when baking model into docker image from a machine without GPUs")
0 commit comments