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.

chore(dotnet): scaffold .NET SDK solution and projects

kevin-gatimu0b14f5ed70a0
diff --git a/laya-dotnet/.gitignore b/laya-dotnet/.gitignore
new file mode 100644
index 00000000..2113daa5
--- /dev/null
+++ b/laya-dotnet/.gitignore
@@ -0,0 +1,37 @@
+# Build output
+[Bb]in/
+[Oo]bj/
+[Oo]ut/
+artifacts/
+
+# Test results and coverage
+TestResults/
+*.trx
+coverage*.json
+coverage*.xml
+*.coverage
+
+# BenchmarkDotNet
+BenchmarkDotNet.Artifacts/
+
+# NuGet
+*.nupkg
+*.snupkg
+.nuget/
+
+# IDE / user state
+.vs/
+.vscode/
+.idea/
+*.user
+*.suo
+*.rsuser
+*.DotSettings.user
+
+# Downloaded model artifacts
+*.onnx
+*.onnx_data
+
+# Python tool caches (tools/)
+__pycache__/
+*.pyc
diff --git a/laya-dotnet/Directory.Build.props b/laya-dotnet/Directory.Build.props
new file mode 100644
index 00000000..b11b6e78
--- /dev/null
+++ b/laya-dotnet/Directory.Build.props
@@ -0,0 +1,10 @@
+<Project>
+ <PropertyGroup>
+ <TargetFramework>net10.0</TargetFramework>
+ <LangVersion>latest</LangVersion>
+ <Nullable>enable</Nullable>
+ <ImplicitUsings>enable</ImplicitUsings>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <InvariantGlobalization>true</InvariantGlobalization>
+ </PropertyGroup>
+</Project>
diff --git a/laya-dotnet/Laya.slnx b/laya-dotnet/Laya.slnx
new file mode 100644
index 00000000..8e236b70
--- /dev/null
+++ b/laya-dotnet/Laya.slnx
@@ -0,0 +1,13 @@
+<Solution>
+ <Folder Name="/samples/">
+ <Project Path="samples/Laya.Benchmark/Laya.Benchmark.csproj" />
+ <Project Path="samples/Laya.Routing/Laya.Routing.csproj" />
+ <Project Path="samples/Laya.Sample/Laya.Sample.csproj" />
+ </Folder>
+ <Folder Name="/src/">
+ <Project Path="src/Laya/Laya.csproj" />
+ </Folder>
+ <Folder Name="/tests/">
+ <Project Path="tests/Laya.Tests/Laya.Tests.csproj" />
+ </Folder>
+</Solution>
diff --git a/laya-dotnet/global.json b/laya-dotnet/global.json
new file mode 100644
index 00000000..3140116d
--- /dev/null
+++ b/laya-dotnet/global.json
@@ -0,0 +1,5 @@
+{
+ "test": {
+ "runner": "Microsoft.Testing.Platform"
+ }
+}
diff --git a/laya-dotnet/src/Laya/Laya.csproj b/laya-dotnet/src/Laya/Laya.csproj
new file mode 100644
index 00000000..3b823325
--- /dev/null
+++ b/laya-dotnet/src/Laya/Laya.csproj
@@ -0,0 +1,46 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <TargetFramework>net10.0</TargetFramework>
+ <ImplicitUsings>enable</ImplicitUsings>
+ <Nullable>enable</Nullable>
+ <GenerateDocumentationFile>true</GenerateDocumentationFile>
+ <!-- Shipped as Laya.Onnx (package and assembly); the public namespace stays Laya. -->
+ <AssemblyName>Laya.Onnx</AssemblyName>
+ <RootNamespace>Laya</RootNamespace>
+ </PropertyGroup>
+
+ <PropertyGroup Label="Package">
+ <!-- Versioned independently of the Python package. -->
+ <Version>0.1.0</Version>
+ <PackageId>Laya.Onnx</PackageId>
+ <Authors>Convai Innovations</Authors>
+ <Description>.NET port of the Laya Python SDK. Runs the multilingual, english and typed-decisions checkpoints locally on ONNX Runtime, with no Python at runtime. Laya is a non-autoregressive System 1 decision engine with calibrated probabilities.</Description>
+ <PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
+ <PackageProjectUrl>https://github.com/NandhaKishorM/laya/tree/main/laya-dotnet</PackageProjectUrl>
+ <RepositoryUrl>https://github.com/NandhaKishorM/laya</RepositoryUrl>
+ <RepositoryType>git</RepositoryType>
+ <PackageTags>laya;onnx;onnxruntime;llm;classification;nlp;decision-engine</PackageTags>
+ <PackageReadmeFile>README.md</PackageReadmeFile>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <!-- laya-dotnet/README.md -->
+ <None Include="..\..\README.md" Pack="true" PackagePath="\" />
+ </ItemGroup>
+
+ <ItemGroup>
+ <InternalsVisibleTo Include="Laya.Tests" />
+ </ItemGroup>
+
+ <ItemGroup>
+ <PackageReference Include="Microsoft.ML.OnnxRuntime" Version="1.30.0" />
+ <PackageReference Include="Tokenizers.DotNet" Version="1.4.1" />
+ <PackageReference Include="Tokenizers.DotNet.runtime.linux-arm64" Version="1.4.1" />
+ <PackageReference Include="Tokenizers.DotNet.runtime.linux-x64" Version="1.4.1" />
+ <PackageReference Include="Tokenizers.DotNet.runtime.osx-arm64" Version="1.4.1" />
+ <PackageReference Include="Tokenizers.DotNet.runtime.osx-x64" Version="1.4.1" />
+ <PackageReference Include="Tokenizers.DotNet.runtime.win-x64" Version="1.4.1" />
+ </ItemGroup>
+
+</Project>
diff --git a/laya-dotnet/tests/Laya.Tests/Laya.Tests.csproj b/laya-dotnet/tests/Laya.Tests/Laya.Tests.csproj
new file mode 100644
index 00000000..42730d93
--- /dev/null
+++ b/laya-dotnet/tests/Laya.Tests/Laya.Tests.csproj
@@ -0,0 +1,24 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <TargetFramework>net10.0</TargetFramework>
+ <ImplicitUsings>enable</ImplicitUsings>
+ <Nullable>enable</Nullable>
+ <IsPackable>false</IsPackable>
+ <!-- xUnit v3 test projects are stand-alone executables that host their own test runner. -->
+ <OutputType>Exe</OutputType>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <PackageReference Include="xunit.v3" Version="4.0.1" />
+ </ItemGroup>
+
+ <ItemGroup>
+ <Using Include="Xunit" />
+ </ItemGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\src\Laya\Laya.csproj" />
+ </ItemGroup>
+
+</Project>