flashinfer.rope

用于应用旋转嵌入的内核。

apply_rope_inplace(q, k, indptr, offsets[, ...])

就地对一批查询/键(存储为 RaggedTensor)应用旋转嵌入。

apply_llama31_rope_inplace(q, k, indptr, offsets)

就地对一批查询/键(存储为 RaggedTensor)应用 Llama 3.1 风格的旋转嵌入。

apply_rope(q, k, indptr, offsets[, ...])

对一批查询/键(存储为 RaggedTensor)应用旋转嵌入。

apply_llama31_rope(q, k, indptr, offsets[, ...])

对一批查询/键(存储为 RaggedTensor)应用 Llama 3.1 风格的旋转嵌入。

apply_rope_pos_ids(q, k, pos_ids[, ...])

对一批查询/键(存储为 RaggedTensor)应用旋转嵌入。

apply_rope_pos_ids_inplace(q, k, pos_ids[, ...])

就地对一批查询/键(存储为 RaggedTensor)应用旋转嵌入。

apply_llama31_rope_pos_ids(q, k, pos_ids[, ...])

对一批查询/键(存储为 RaggedTensor)应用 Llama 3.1 风格的旋转嵌入。

apply_llama31_rope_pos_ids_inplace(q, k, pos_ids)

就地对一批查询/键(存储为 RaggedTensor)应用 Llama 3.1 风格的旋转嵌入。

apply_rope_with_cos_sin_cache(positions, ...)

使用预计算的 cos/sin 值对键和查询应用旋转嵌入。

apply_rope_with_cos_sin_cache_inplace(...[, ...])

使用预计算的 cos/sin 值对键和查询应用旋转嵌入。