For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).
Mojo function
update_frequency_data
def update_frequency_data[token_type: DType, //, target: StringSlice[StaticConstantOrigin]](compressed_frequency_data: TileTensor[DType.int32, Storage=compressed_frequency_data.Storage, linear_idx_type=compressed_frequency_data.linear_idx_type, element_size=compressed_frequency_data.element_size], frequency_offsets: TileTensor[DType.uint32, Storage=frequency_offsets.Storage, linear_idx_type=frequency_offsets.linear_idx_type, element_size=frequency_offsets.element_size], new_tokens: TileTensor[token_type, Storage=new_tokens.Storage, linear_idx_type=new_tokens.linear_idx_type, element_size=new_tokens.element_size], ctx: DeviceContext)
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?
Thank you! We'll create more content like this.
Thank you for helping us improve!