Mojo function
rms_norm_value_cache_ragged_paged
rms_norm_value_cache_ragged_paged[dtype: DType, params: KVCacheStaticParams, page_size: Int, cache_dtype: DType, //, target: StringSlice[StaticConstantOrigin], multiply_before_cast: Bool, per_head_norm: Bool](kv_collection: PagedKVCacheCollection[cache_dtype, params, page_size], gamma: TileTensor[dtype, gamma.LayoutType, gamma.origin, address_space=gamma.address_space, linear_idx_type=gamma.linear_idx_type, element_size=gamma.element_size], epsilon: Scalar[dtype], weight_offset: Scalar[dtype], layer_idx: UInt32, total_seq_len: UInt32, input_row_offsets: TileTensor[DType.uint32, input_row_offsets.LayoutType, input_row_offsets.origin, address_space=input_row_offsets.address_space, linear_idx_type=input_row_offsets.linear_idx_type, element_size=input_row_offsets.element_size], context: DeviceContextPtr)
Performs RMSNorm in place on new entries in the value cache.
Same indexing and layout as rms_norm_kv_cache_ragged_paged on the key
cache, but reads/writes the value cache tensor for layer_idx.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!