Skip to content

Commit bb1783b

Browse files
authored
doc: fix logits cap docstring (#300)
follow up of #299, pre-attention -> pre-softmax.
1 parent c18745b commit bb1783b

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

python/flashinfer/decode.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def single_decode_with_kv_cache(
8686
``NONE``/``ROPE_LLAMA`` (LLAMA style rotary embedding) /``ALIBI``.
8787
Defaults to ``NONE``.
8888
logits_cap : bool
89-
Whether to apply logits cap to pre-attention logits.
89+
Whether to apply logits cap to pre-softmax logits.
9090
If ``True``, the logits will be capped according to formula (proposed in
9191
Grok-1): :math:`30 \times \mathrm{tanh}(x / 30)`, where :math:`x` is the input logits.
9292
Defaults to ``False``.
@@ -199,7 +199,7 @@ def batch_decode_with_padded_kv_cache(
199199
``NONE``/``ROPE_LLAMA`` (LLAMA style rotary embedding) /``ALIBI``.
200200
Defaults to ``NONE``.
201201
logits_cap : bool
202-
Whether to apply logits cap to pre-attention logits.
202+
Whether to apply logits cap to pre-softmax logits.
203203
If ``True``, the logits will be capped according to formula (proposed in
204204
Grok-1): :math:`30 \times \mathrm{tanh}(x / 30)`, where :math:`x` is the input logits.
205205
Defaults to ``False``.
@@ -312,7 +312,7 @@ def batch_decode_with_padded_kv_cache_return_lse(
312312
``NONE``/``ROPE_LLAMA`` (LLAMA style rotary embedding) /``ALIBI``.
313313
Defaults to ``NONE``.
314314
logits_cap : bool
315-
Whether to apply logits cap to pre-attention logits.
315+
Whether to apply logits cap to pre-softmax logits.
316316
If ``True``, the logits will be capped according to formula (proposed in
317317
Grok-1): :math:`30 \times \mathrm{tanh}(x / 30)`, where :math:`x` is the input logits.
318318
Defaults to ``False``.
@@ -592,7 +592,7 @@ def begin_forward(
592592
``NONE``/``ROPE_LLAMA`` (LLAMA style rotary embedding) /``ALIBI``.
593593
Defaults to ``NONE``.
594594
logits_cap: bool
595-
Whether to apply logits cap to pre-attention logits.
595+
Whether to apply logits cap to pre-softmax logits.
596596
If ``True``, the logits will be capped according to formula (proposed in
597597
Grok-1): :math:`30 \times \mathrm{tanh}(x / 30)`, where :math:`x` is the input logits.
598598
Defaults to ``False``.
@@ -704,7 +704,7 @@ def forward(
704704
``NONE``/``ROPE_LLAMA`` (LLAMA style rotary embedding) /``ALIBI``.
705705
Defaults to ``NONE``.
706706
logits_cap: bool
707-
Whether to apply logits cap to pre-attention logits.
707+
Whether to apply logits cap to pre-softmax logits.
708708
If ``True``, the logits will be capped according to formula (proposed in
709709
Grok-1): :math:`30 \times \mathrm{tanh}(x / 30)`, where :math:`x` is the input logits.
710710
Defaults to ``False``.
@@ -789,7 +789,7 @@ def forward_return_lse(
789789
``NONE``/``ROPE_LLAMA`` (LLAMA style rotary embedding) /``ALIBI``.
790790
Defaults to ``NONE``.
791791
logits_cap: bool
792-
Whether to apply logits cap to pre-attention logits.
792+
Whether to apply logits cap to pre-softmax logits.
793793
If ``True``, the logits will be capped according to formula (proposed in
794794
Grok-1): :math:`30 \times \mathrm{tanh}(x / 30)`, where :math:`x` is the input logits.
795795
Defaults to ``False``.

python/flashinfer/prefill.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def single_prefill_with_kv_cache(
9696
``NONE``/``ROPE_LLAMA`` (LLAMA style rotary embedding) /``ALIBI``.
9797
Default is ``NONE``.
9898
logits_cap : bool
99-
Whether to apply logits cap to pre-attention logits.
99+
Whether to apply logits cap to pre-softmax logits.
100100
If ``True``, the logits will be capped according to formula (proposed in
101101
Grok-1): :math:`30 \times \mathrm{tanh}(x / 30)`, where :math:`x` is the input logits.
102102
Defaults to ``False``.
@@ -240,7 +240,7 @@ def single_prefill_with_kv_cache_return_lse(
240240
``NONE``/``ROPE_LLAMA`` (LLAMA style rotary embedding) /``ALIBI``.
241241
Default is ``NONE``.
242242
logits_cap : bool
243-
Whether to apply logits cap to pre-attention logits.
243+
Whether to apply logits cap to pre-softmax logits.
244244
If ``True``, the logits will be capped according to formula (proposed in
245245
Grok-1): :math:`30 \times \mathrm{tanh}(x / 30)`, where :math:`x` is the input logits.
246246
Defaults to ``False``.
@@ -770,7 +770,7 @@ def forward(
770770
``NONE``/``ROPE_LLAMA`` (LLAMA style rotary embedding) /``ALIBI``.
771771
Default is ``NONE``.
772772
logits_cap : bool
773-
Whether to apply logits cap to pre-attention logits,
773+
Whether to apply logits cap to pre-softmax logits,
774774
If ``True``, the logits will be capped according to formula (proposed in
775775
Grok-1): :math:`30 \times \mathrm{tanh}(x / 30)`, where :math:`x` is the input logits.
776776
Defaults to ``False``.
@@ -874,7 +874,7 @@ def forward_return_lse(
874874
``NONE``/``ROPE_LLAMA`` (LLAMA style rotary embedding) /``ALIBI``.
875875
Default is ``NONE``.
876876
logits_cap : bool
877-
Whether to apply logits cap to pre-attention logits.
877+
Whether to apply logits cap to pre-softmax logits.
878878
If ``True``, the logits will be capped according to formula (proposed in
879879
Grok-1): :math:`30 \times \mathrm{tanh}(x / 30)`, where :math:`x` is the input logits.
880880
Defaults to ``False``.
@@ -1276,7 +1276,7 @@ def forward(
12761276
``NONE``/``ROPE_LLAMA`` (LLAMA style rotary embedding) /``ALIBI``.
12771277
Default is ``NONE``.
12781278
logits_cap : bool
1279-
Whether to apply logits cap to pre-attention logits.
1279+
Whether to apply logits cap to pre-softmax logits.
12801280
If ``True``, the logits will be capped according to formula (proposed in
12811281
Grok-1): :math:`30 \times \mathrm{tanh}(x / 30)`, where :math:`x` is the input logits.
12821282
Defaults to ``False``.
@@ -1378,7 +1378,7 @@ def forward_return_lse(
13781378
``NONE``/``ROPE_LLAMA`` (LLAMA style rotary embedding) /``ALIBI``.
13791379
Default is ``NONE``.
13801380
logits_cap : bool
1381-
Whether to apply logits cap to pre-attention logits.
1381+
Whether to apply logits cap to pre-softmax logits.
13821382
If ``True``, the logits will be capped according to formula (proposed in
13831383
Grok-1): :math:`30 \times \mathrm{tanh}(x / 30)`, where :math:`x` is the input logits.
13841384
Defaults to ``False``.

0 commit comments

Comments
 (0)