Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/facebookresearch/xformers
/ types & classes
Types & classes
346 in github.com/facebookresearch/xformers
⨍
Functions
1,445
◇
Types & classes
346
↳
Endpoints
17
↓ 10 callers
Class
Inputs
Stores inputs to the `memory_efficient_attention` operators
xformers/ops/fmha/common.py:145
↓ 9 callers
Class
Context
xformers/ops/fmha/common.py:345
↓ 5 callers
Class
Gradients
xformers/ops/fmha/common.py:368
↓ 4 callers
Class
EventOverlapHolder
Holds a CUDAEvent. Why does it need to be a tensor? So that its `gradient` can also hold a CUDAEvent for overlaps in the BW pass
xformers/fwbw_overlap.py:43
↓ 4 callers
Class
LowerTriangularMaskWithTensorBias
A lower-triangular (aka causal) mask with an additive bias
xformers/ops/fmha/attn_bias.py:360
↓ 4 callers
Class
RMSNorm
RMS Normalization layer along the last dimension. This is similar to torch.nn.functional.normalize but with eps being added instead of m
xformers/ops/rmsnorm.py:72
↓ 4 callers
Class
Scenario
xformers/benchmarks/benchmark_sequence_parallel_fused.py:23
↓ 4 callers
Class
Sparse24TensorCutlass
xformers/ops/sp24.py:363
↓ 3 callers
Class
LowerTriangularFromBottomRightMask
A causal masking. This mask is exactly the same as :attr:`LowerTriangularMask` when there is the same number of queries and keys. Wh
xformers/ops/fmha/attn_bias.py:261
↓ 3 callers
Class
NotSupportedInputError
xformers/benchmarks/utils.py:34
↓ 2 callers
Class
BlockDiagonalCausalFromBottomRightMask
Same as :attr:`xformers.ops.fmha.attn_bias.BlockDiagonalMask`, except that each block is causal. This mask allows for a non-causal prefix
xformers/ops/fmha/attn_bias.py:1026
↓ 2 callers
Class
BlockDiagonalCausalLocalAttentionFromBottomRightMask
(Experimental feature) Same as :attr:`xformers.ops.fmha.attn_bias.BlockDiagonalCausalMask`. This makes the mask "local" and the attention
xformers/ops/fmha/attn_bias.py:1916
↓ 2 callers
Class
BlockDiagonalCausalLocalAttentionMask
(Experimental feature) Same as :attr:`xformers.ops.fmha.attn_bias.BlockDiagonalCausalMask`. This makes the mask "local" and the attention
xformers/ops/fmha/attn_bias.py:1853
↓ 2 callers
Class
BlockDiagonalCausalMask
Same as :attr:`xformers.ops.fmha.attn_bias.BlockDiagonalMask`, except that each block is causal. Queries and Keys are each divided into the
xformers/ops/fmha/attn_bias.py:994
↓ 2 callers
Class
BlockDiagonalLocalAttentionPaddedKeysMask
Like :attr:`xformers.ops.fmha.attn_bias.BlockDiagonalCausalLocalAttentionPaddedKeysMask`, except that this is non-causal. A query Q in b
xformers/ops/fmha/attn_bias.py:1279
↓ 2 callers
Class
LinearW24
tests/test_sparsity24.py:771
↓ 2 callers
Class
Tile4x4Accessor
xformers/csrc/sparse24/sparse24_pack.h:166
↓ 2 callers
Class
_GappySeqInfo
(Internal) Flexible equivalent of _PaddedSeqLenInfo. There are two distinct semantics. (1) For non-paged masks: Represents the divis
xformers/ops/fmha/attn_bias.py:636
↓ 2 callers
Class
_PaddedSeqLenInfo
(Internal) Represents the division of a dimension into blocks which are padded out to the same total length. For example, to represent
xformers/ops/fmha/attn_bias.py:500
↓ 2 callers
Class
_VisitorConditionalKernel
xformers/triton/vararg_kernel.py:119
↓ 1 callers
Class
Add_
tests/test_checkpoint.py:256
↓ 1 callers
Class
AnalyzedTrace
xformers/profiler/profile_analyzer.py:120
↓ 1 callers
Class
Attention
examples/llama_inference/model.py:51
↓ 1 callers
Class
AttentionDecodingPyTorchRepeat
xformers/benchmarks/benchmark_attn_decoding.py:335
↓ 1 callers
Class
Attn
tests/test_checkpoint.py:138
↓ 1 callers
Class
Bench
xformers/benchmarks/benchmark_sequence_parallel_fused.py:42
↓ 1 callers
Class
BlockDiagonalCausalLocalAttentionPaddedKeysMask
Like :attr:`xformers.ops.fmha.attn_bias.BlockDiagonalCausalWithOffsetPaddedKeysMask`, except with a window size. A query Q in block i ca
xformers/ops/fmha/attn_bias.py:1345
↓ 1 callers
Class
BlockDiagonalCausalWithOffsetGappyKeysMask
Same as :attr:`xformers.ops.fmha.attn_bias.BlockDiagonalCausalMask`, except k/v is gappy. A query Q in block i cannot attend to a key wh
xformers/ops/fmha/attn_bias.py:1658
↓ 1 callers
Class
BlockDiagonalCausalWithOffsetPaddedKeysMask
Same as :attr:`xformers.ops.fmha.attn_bias.BlockDiagonalCausalMask`, except an offset on causality is allowed for each block and we support p
xformers/ops/fmha/attn_bias.py:1205
↓ 1 callers
Class
BlockDiagonalGappyKeysMask
Same as :attr:`xformers.ops.fmha.attn_bias.BlockDiagonalMask`, except k/v is gappy. A query Q in block i only attends to a key which is
xformers/ops/fmha/attn_bias.py:1535
↓ 1 callers
Class
BlockDiagonalMask
A block-diagonal mask that can be passed as ``attn_bias`` argument to :attr:`xformers.ops.memory_efficient_attention`. Queries and Keys
xformers/ops/fmha/attn_bias.py:753
↓ 1 callers
Class
BlockDiagonalPaddedKeysMask
Same as :attr:`xformers.ops.fmha.attn_bias.BlockDiagonalMask`, except we support padding for k/v The keys and values are divided into bl
xformers/ops/fmha/attn_bias.py:1076
↓ 1 callers
Class
BlockSparseTensor
xformers/sparse/blocksparse_tensor.py:76
↓ 1 callers
Class
CachedTorchDispatchMode
xformers/checkpoint.py:120
↓ 1 callers
Class
DeviceLimit
xformers/profiler/device_limits.py:14
↓ 1 callers
Class
EventHandle
xformers/fwbw_overlap.py:24
↓ 1 callers
Class
EventOverlap
xformers/fwbw_overlap.py:31
↓ 1 callers
Class
ExceptionInBW
tests/test_fwbw_overlap.py:130
↓ 1 callers
Class
FakeKinetoEvent
xformers/profiler/profile_analyzer.py:14
↓ 1 callers
Class
FastGen
examples/llama_inference/generate.py:37
↓ 1 callers
Class
FeedForward
examples/llama_inference/model.py:154
↓ 1 callers
Class
GenArgs
examples/llama_inference/generate.py:29
↓ 1 callers
Class
Identity
xformers/csrc/sparse24/warp_tensor.h:398
↓ 1 callers
Class
InitialBw
xformers/fwbw_overlap.py:327
↓ 1 callers
Class
InputsFp8
Each of k/v_fp8_scales is an int32 tensor of shape (1, B * Mkv, Hq), or (1, page_size * max_pages_per_lane, Hq) in the paged case. Each i
xformers/ops/fmha/triton_splitk.py:93
↓ 1 callers
Class
LocalAttentionFromBottomRightMask
A local attention mask The query at position :math:`q` can attend the key at position :math:`k` if :math:`q - window\\_left <= k + s <=
xformers/ops/fmha/attn_bias.py:176
↓ 1 callers
Class
LowerTriangularFromBottomRightLocalAttentionMask
A mask that combines both :attr:`LowerTriangularFromBottomRightMask` and local attention. A query whose distance from the final query is
xformers/ops/fmha/attn_bias.py:309
↓ 1 callers
Class
LowerTriangularMask
A lower-triangular (aka causal) mask A query Q cannot attend to a key which is farther from the initial key than Q is from the initial q
xformers/ops/fmha/attn_bias.py:142
↓ 1 callers
Class
NullTorchDispatchMode
xformers/checkpoint.py:137
↓ 1 callers
Class
PagedBlockDiagonalCausalWithOffsetGappyKeysMask
Same as BlockDiagonalCausalWithOffsetGappyKeysMask, but for paged attention. block_tables has shape [batch_size, max_num_pages] and K/V have
xformers/ops/fmha/attn_bias.py:1828
↓ 1 callers
Class
PagedBlockDiagonalCausalWithOffsetPaddedKeysMask
Same as BlockDiagonalCausalWithOffsetPaddedKeysMask, but for paged attention. block_tables has shape [batch_size, max_num_pages] and K/V have
xformers/ops/fmha/attn_bias.py:1508
↓ 1 callers
Class
PagedBlockDiagonalGappyKeysMask
Equivalent BlockDiagonalGappyKeysMask, but for paged attention. block_tables has shape [batch_size, max_num_pages] and K/V have shape [1,
xformers/ops/fmha/attn_bias.py:1708
↓ 1 callers
Class
PagedBlockDiagonalPaddedKeysMask
Same as BlockDiagonalPaddedKeysMask, but for paged attention. block_tables has shape [batch_size, max_num_pages] and K/V have shape [1, m
xformers/ops/fmha/attn_bias.py:1402
↓ 1 callers
Class
Partial
This class is used to represent a partial attention output, which is returned by `memory_efficient_attention_partial_autograd`. Attribut
xformers/ops/fmha/merge_training.py:112
↓ 1 callers
Class
PhaseBoundary
xformers/fwbw_overlap.py:286
↓ 1 callers
Class
PhaseStats
examples/llama_inference/stats.py:12
↓ 1 callers
Class
ProcessPoolExecutorManager
tests/multiprocessing_utils.py:142
↓ 1 callers
Class
ProfileMetadata
xformers/checkpoint.py:71
↓ 1 callers
Class
ProfileOperatorsTorchDispatchMode
xformers/checkpoint.py:209
↓ 1 callers
Class
RMSNormPytorch
tests/test_rmsnorm.py:26
↓ 1 callers
Class
SafeMpContext
tests/multiprocessing_utils.py:17
↓ 1 callers
Class
ScaledTensor
xformers/ops/fmha/common.py:58
↓ 1 callers
Class
SelectiveCheckpointWrapper
xformers/checkpoint.py:475
↓ 1 callers
Class
Sparse24TensorCuSparseLt
xformers/ops/sp24.py:497
↓ 1 callers
Class
Stats
Generation stats, split by phases.
examples/llama_inference/stats.py:27
↓ 1 callers
Class
SwiGLUOpDispatch
Dispatcher to automatically select the best operator in :attr:`xformers.ops.swiglu`
xformers/ops/swiglu_op.py:127
↓ 1 callers
Class
Tokenizer
Encoding/decoding text using SentencePiece.
examples/llama_inference/tokenizer.py:11
↓ 1 callers
Class
TransformerBlock
examples/llama_inference/model.py:209
↓ 1 callers
Class
TreeAttnMetadata
tree_choices: definition of the tree, tuples sorted by length, each corresponding to a node. See the docstring of TreeAttnMetadata.from_t
xformers/ops/tree_attention.py:34
↓ 1 callers
Class
VerboseTorchDispatchMode
xformers/checkpoint.py:98
↓ 1 callers
Class
_BuildInfo
xformers/_cpp_lib.py:23
↓ 1 callers
Class
_ForLoopUnroller
xformers/triton/vararg_kernel.py:19
↓ 1 callers
Class
_ForwardToFunc
xformers/ops/swiglu_op.py:101
↓ 1 callers
Class
_ForwardToPythonAutogradFunc
xformers/ops/swiglu_op.py:93
↓ 1 callers
Class
_FusedSequenceParallel
Set up a communication ring and perform fused ops on it Stores the persistent state needed to support a ring of connections between processes
xformers/ops/sequence_parallel_fused_ops.py:26
↓ 1 callers
Class
_Model
tests/test_checkpoint.py:278
↓ 1 callers
Class
_OptimalPolicy
xformers/checkpoint.py:461
↓ 1 callers
Class
_Profiler
xformers/profiler/profiler.py:223
↓ 1 callers
Class
_ProfilerState
xformers/profiler/profiler.py:216
↓ 1 callers
Class
_SeqLenInfo
(Internal) Represents the division of a dimension into blocks. For example, to represents a dimension of length 7 divided into three blo
xformers/ops/fmha/attn_bias.py:382
↓ 1 callers
Class
_TransformerFFN
tests/test_sparsity24.py:958
↓ 1 callers
Class
_VisitorUnrollKernel
xformers/triton/vararg_kernel.py:90
↓ 1 callers
Class
xFormersInvalidLibException
xformers/_cpp_lib.py:65
↓ 1 callers
Class
xFormersWasNotBuiltException
xformers/_cpp_lib.py:55
Class
AbsOp
Can be applied to rank based on absolute value
xformers/csrc/sparse24/compute_sparse_tile.h:24
Class
AttentionBias
Base class for a custom bias that can be applied \ as the attn_bias argument in :attr:`xformers.ops.memory_efficient_attention`. That
xformers/ops/fmha/attn_bias.py:55
Class
AttentionBwOpBase
xformers/ops/fmha/common.py:527
Class
AttentionDecodingBase
xformers/benchmarks/benchmark_attn_decoding.py:75
Class
AttentionDecodingCK
xformers/benchmarks/benchmark_attn_decoding.py:168
Class
AttentionDecodingCKSplitKV
xformers/benchmarks/benchmark_attn_decoding.py:243
Class
AttentionDecodingCUTLASS
xformers/benchmarks/benchmark_attn_decoding.py:164
Class
AttentionDecodingFlashAttention
xformers/benchmarks/benchmark_attn_decoding.py:369
Class
AttentionDecodingSplitInt4KV
xformers/benchmarks/benchmark_attn_decoding.py:247
Class
AttentionDecodingSplitKV
xformers/benchmarks/benchmark_attn_decoding.py:239
Class
AttentionFwOpBase
xformers/ops/fmha/common.py:508
Class
AttentionOpBase
Base class for any attention operator in xFormers See: - :attr:`xformers.ops.fmha.cutlass.FwOp` - :attr:`xformers.ops.fmha.cutlass.BwOp`
xformers/ops/fmha/common.py:376
Class
BaseOperator
xformers/ops/common.py:27
Class
BatchedBackwardParams
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_params.h:144
Class
BatchedForwardParams
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_params.h:42
Class
BatchedInferParams
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_params.h:12
next →
1–100 of 346, ranked by callers