Mojo struct
AlibiScoreMod
@register_passable(trivial)
struct AlibiScoreMod[num_heads: Int]
AlibiScoreMod adds the appropriate ALiBi constant bias to attention score.
Implemented traits
AnyType
,
Copyable
,
Movable
,
ScoreModTrait
,
UnknownDestructibility
Aliases
name_str
alias name_str = __init__[__mlir_type.!kgen.string]("alibi")
Methods
score_mod
score_mod[type: DType, width: Int, //, *, element_type: DType = int32](self, coord: IndexList[4, element_type=element_type], score_vec: SIMD[type, width], max_prompt_len: Int) -> SIMD[type, width]
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!