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
,
ExplicitlyCopyable
,
Movable
,
ScoreModTrait
,
UnknownDestructibility
Methods
score_mod
score_mod[type: DType, width: Int, //, *, element_type: DType = int32](self, coord: Index[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!