Skip to main content

Crate kodamaembed_cpu

Crate kodamaembed_cpu 

Source
Expand description

CPU backend for KodamaEmbed: FP32 by default, an opt-in INT8 preset (CpuPrecision), and every output independent of its batch.

Structs§

Encoder
PackedWeight
A weight W [n, k] (output by input) packed for the microkernel.

Enums§

CpuPrecision
Numerical policy for CPU projections. The INT8 preset accepts only its evaluated shape; only the kodamaembed loader verifies the exact checkpoint.
EncoderError
Epilogue
What is applied to A W^T before it is stored in C [m, n].
Kernel
Which microkernel runs the tiles.

Constants§

NUMERICAL_SOURCES
Hashed with the Kernel into fingerprints, so any change to the arithmetic invalidates stored vectors and caches.

Functions§

attention
softmax(Q K^T / sqrt(d) + bias) V per sequence and head, from qkv rows holding Q, K and V side by side.
gemm
c [m, n] = epilogue(a [m, k] W^T) on KodamaEmbed’s worker threads.
worker_pool
threads workers named name-0, name-1, … (0: one per logical processor).

Type Aliases§

TokenSequence
One sequence’s token ids and segment types.
Workers
A pool of worker threads.