Skip to content

armgit / laya

Public Imported from GitHub
0

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.

fix(dotnet): report surviving options and actual sequence budget

kevin-gatimu6c6cca7aed2f
diff --git a/laya-dotnet/src/Laya/LayaEngine.cs b/laya-dotnet/src/Laya/LayaEngine.cs
index 2b04a70d..1b60766e 100644
--- a/laya-dotnet/src/Laya/LayaEngine.cs
+++ b/laya-dotnet/src/Laya/LayaEngine.cs
@@ -220,7 +220,9 @@ public sealed class LayaEngine : IDisposable, ILayaPredictor
// at all, so its logit would score whatever token happens to sit at position 0.
if (markers.Length != SequenceBuilder.RenderOptions(question).Count)
throw new ArgumentException(
- $"question '{id}' options exceed head_max_len={Config.HeadMaxLen}", nameof(questions));
+ $"question '{id}': only {markers.Length} of its {SequenceBuilder.RenderOptions(question).Count} "
+ + $"option markers fit in max_len={Config.MaxLen} with head_max_len={Config.HeadMaxLen} "
+ + "spent on the question; lower head_max_len, raise max_len, or use fewer options", nameof(questions));
items.Add(new SequenceItem(seq, markers, question.Type));
}