Skip to main content

Module compat

Module compat 

Source
Expand description

The Laya compat graph on the reference kernels: ModernBERT or mmBERT, the type embedding, the two layer decision head, the option scorer and the act head, as DecisionModel.forward in Laya 0.3.7 runs them in FP32.

This is the correctness reference. It allocates its buffers per call and converts the F16 weights to f32 once at load, which costs 1.7 GB for Laya English. The fast paths are checked against it.

Structs§

Compat
A compat checkpoint ready to run on the CPU.
Input
One question, laid out as Laya lays it out.
Output
What the model says about one question, before temperature.

Functions§

act_features
[top1, top1 - top2, entropy / ln k, k / 255] over the softmax of the logits, with k at least 2, as Laya computes them. A single option has a top2 of 0. No options at all is an error in Laya, and gives zeros here apart from the count.
executor
The compat graph of model on the plan executor with the default bucket table, on threads threads. This is the fast path, and Compat is what it is checked against.
executor_from
executor from the pieces of a model.
executor_with
executor on a backend the caller set up, such as one with_int8.