Non-autoregressive System 1 decision engine. Typed choice, score and yes/no decisions over any text in a single forward pass, in 100+ languages, with a router that picks the right checkpoint per request.
Python calibrationclassificationdecision-modelhuggingfacejevmodernbertmultilingualnlppythonpytorchroutingtyped-decisionszero-shot
merge: bring upstream/main in, and the two failures main is already carrying
Adeshina Lasisi23d273433b7f
diff --cc laya-java/laya-java/src/test/java/com/convaiinnovations/laya/decode/DecoderTest.javaindex 54b65cc3,54b65cc3..daadf8f3--- a/laya-java/laya-java/src/test/java/com/convaiinnovations/laya/decode/DecoderTest.java+++ b/laya-java/laya-java/src/test/java/com/convaiinnovations/laya/decode/DecoderTest.java@@@ -1,16 -1,16 +1,31 @@@package com.convaiinnovations.laya.decode;--import static org.junit.jupiter.api.Assertions.assertArrayEquals;++import static org.junit.jupiter.api.Assertions.assertEquals;++import static org.junit.jupiter.api.Assertions.assertThrows;import org.junit.jupiter.api.DisplayName;import org.junit.jupiter.api.Test;final class DecoderTest {++ /**++ * An empty action block is refused, not averaged.++ *++ * <p>This test asserted {@code {0.5f, 0.5f}} until now, and that assertion had stopped++ * matching the code it guards: {@code Decoder.actionProbabilities} throws on a zero-width++ * block. The implementation is the half that is right. {@code 0.5} is a number no model++ * produced, published into the field callers gate escalation on, and the reference does not++ * produce it either — {@code laya/onnx_agent.py} indexes {@code act[offset + r, 0]}, so zero++ * columns raise there. A port that answers where the reference raises is not a port.++ *++ * <p>The message is asserted, not just the type, because that is what a caller reads.++ */@Test-- @DisplayName("empty action logits produce neutral probabilities")-- void emptyActionLogitsAreNeutral() {-- assertArrayEquals(new float[]{0.5f, 0.5f},-- Decoder.actionProbabilities(new float[0]), 0.0f);++ @DisplayName("an empty action block is refused, not averaged")++ void emptyActionLogitsAreRefused() {++ IllegalArgumentException refused = assertThrows(IllegalArgumentException.class,++ () -> Decoder.actionProbabilities(new float[0]));++ assertEquals("the graph produced no action logits, so there is no action probability",++ refused.getMessage());}}