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
Copy file name to clipboardExpand all lines: sparse_attention_hub/sparse_attention/research_attention/maskers/sampling/implementations/adaptive_sampling.py
+60-14Lines changed: 60 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -43,15 +43,19 @@ class AdaptiveSamplingMaskerConfig(SamplingMaskerConfig):
43
43
If float, must be in (0,1); if int, must be positive.
44
44
epsilon: Float in range (0,1) representing the error bound.
45
45
delta: Float in range (0,1) representing the confidence bound.
46
-
init_offset: Non-negative integer representing the start index for sampling.
47
-
local_offset: Non-negative integer representing the end offset for sampling.
46
+
init_offset: Union[int, float] representing the start index for sampling.
47
+
If int, must be non-negative; if float, must be in [0,1] and will be
48
+
multiplied by the number of keys to get the actual offset.
49
+
local_offset: Union[int, float] representing the end offset for sampling.
50
+
If int, must be non-negative; if float, must be in [0,1] and will be
51
+
multiplied by the number of keys to get the actual offset.
48
52
"""
49
53
50
54
base_rate_sampling: Union[int, float] # Base rate (0,1) if float
0 commit comments