Skip to main content

Mojo function

update_frequency_data

update_frequency_data[token_type: DType, //, target: StringSlice[StaticConstantOrigin]](compressed_frequency_data: TileTensor[DType.int32, LayoutType, origin, linear_idx_type=linear_idx_type, element_shape_types=element_shape_types], frequency_offsets: TileTensor[DType.uint32, LayoutType, origin, linear_idx_type=linear_idx_type, element_shape_types=element_shape_types], new_tokens: TileTensor[token_type, LayoutType, origin, linear_idx_type=linear_idx_type, element_shape_types=element_shape_types], ctx: DeviceContextPtr)

Update the frequency data for the given new tokens.

The frequency data is stored in a CSR format. This kernel expects there will be enough padding for each sequence to store the new tokens.

Was this page helpful?