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 pull request #428 from PerryLink/fix/lang-temperatures-validation
Nandakishore4535825213a
diff --cc laya/agent.pyindex 4c95a46f,6ee4693b..c98bcbf8--- a/laya/agent.py+++ b/laya/agent.py@@@ -31,19 -23,15 +31,20 @@@ from .common importanswer_confidence,confidence_from_probs,_resolve_noul_labels,+ _reuse_question_tokens,+ _disable_question_token_reuse,encode_text,+ render_criterion,render_options,+ resolve_lang_temperatures,serialize_state,temp_bucket,+ unpermute_probs,)+from .confidence import check_min_confidence, flag_low_confidencefrom .hooks import (- HookRegistry, PredictContext, aggregate_usage, compose_hooks, dispatch, normalise_hooks,- validate_timeout,+ HookRegistry, PredictContext, _as_sequence, aggregate_usage, compose_hooks, dispatch,+ normalise_hooks, validate_timeout,)from .revisions import resolve_revision, snapshot_revision, verify_digestsdiff --cc laya/common.pyindex 254111ad,5c80d630..15d71281--- a/laya/common.py+++ b/laya/common.py@@@ -4,9 -4,7 +4,9 @@@ import matimport osimport threadingfrom contextlib import nullcontext+from contextvars import ContextVar+from functools import wraps- from typing import Dict, List, Optional, Union+ from typing import Any, Dict, List, Optional, Sequence, Unionimport numpy as npimport torchdiff --cc laya/onnx_agent.pyindex 4e5b78d0,4bec8d4f..0b47943d--- a/laya/onnx_agent.py+++ b/laya/onnx_agent.py@@@ -20,11 -19,10 +20,12 @@@ from laya.common importcollate_items,confidence_from_probs,encode_text,+ render_criterion,render_options,+ resolve_lang_temperatures,serialize_state,temp_bucket,+ unpermute_probs,TEMP_MIN,TEMP_MAX,clamp_temperature,