DevOnBike.Overfit 10.0.12

There is a newer version of this package available.
See the version list below for details.
dotnet add package DevOnBike.Overfit --version 10.0.12
                    
NuGet\Install-Package DevOnBike.Overfit -Version 10.0.12
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DevOnBike.Overfit" Version="10.0.12" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DevOnBike.Overfit" Version="10.0.12" />
                    
Directory.Packages.props
<PackageReference Include="DevOnBike.Overfit" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DevOnBike.Overfit --version 10.0.12
                    
#r "nuget: DevOnBike.Overfit, 10.0.12"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package DevOnBike.Overfit@10.0.12
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DevOnBike.Overfit&version=10.0.12
                    
Install as a Cake Addin
#tool nuget:?package=DevOnBike.Overfit&version=10.0.12
                    
Install as a Cake Tool

Sources/Main

This project contains the core Overfit runtime.

Responsibility split

Autograd/
  ComputationGraph and AutogradNode.
  Current training runtime. Planned cleanup: graph operation facade + ownership metadata.

DeepLearning/
  User-facing model/layer API.
  Layers own shape, parameters, save/load and train/eval state.

Kernels/
  Low-level hot math.
  SIMD and specialized inference loops live here, not in layers.

Ops/
  Current TensorMath and graph-aware training operations.
  Long-term direction: graph-aware operations move to ComputationGraph.*; TensorMath/Kernels become pure math.

Inference/
  InferenceEngine facade and backend abstraction.

Training/
  TrainingEngine facade and training backend/loss/optimizer abstractions.

Evolutionary/
  Gradient-free strategies, population storage and fitness evaluation.

Inference design rule

The inference path should avoid graph construction and avoid managed allocations after preparation.

Preferred call stack:

InferenceEngine.Run(...)
  -> Sequential.ForwardInference(...)
    -> layer.ForwardInference(...)
      -> Kernels.*(...)

Prepared path:

Sequential.PrepareInference(...)
  -> layer.PrepareInference()
  -> preallocated intermediate buffers
  -> prepared dispatch for selected modules

Current prepared module:

LinearLayer implements IPreparedInferenceModule

Do not add IPreparedInferenceModule to a layer unless a benchmark shows a win. It was tested for Conv/ReLU/Pooling/GAP and did not improve the hot path.

Kernel ownership

Keep in layers

  • constructor validation;
  • parameter initialization;
  • Weights, Bias, Kernels nodes;
  • shape metadata;
  • Train(), Eval(), PrepareInference();
  • save/load;
  • cache invalidation.

Move to kernels

  • SIMD loops;
  • pooling loops;
  • activation loops;
  • convolution loops;
  • linear algebra hot loops;
  • batch-aware span loops.

Current kernel files

Kernels/LinearKernels.cs
Kernels/Conv2DKernels.cs
Kernels/ActivationKernels.cs
Kernels/PoolingKernels.cs

Current inference baseline

The current InferenceEngine.Run(...) path is verified as zero-allocation in the benchmark suite.

Representative results on AMD Ryzen 9 9950X3D / .NET 10:

Workload Overfit Allocation
Linear(784,10) single inference ~250-300 ns 0 B
Linear(4096,10) ~1.08 us 0 B
MLP 784->128->10 ~3.7 us 0 B
MLP 784->256->128->10 ~10-12 us 0 B
Small CNN ~5-6.5 us 0 B

Next performance target

BatchScalingBenchmark shows Overfit winning batch 1/16 while ONNX Runtime wins batch 64/256.

Current reason:

Overfit: repeated sample inference
ONNX: likely batched GEMM-style execution

Next kernel target:

LinearKernels.ForwardBatched(
    ReadOnlySpan<float> inputBatch,
    ReadOnlySpan<float> weights,
    ReadOnlySpan<float> bias,
    Span<float> outputBatch,
    int batchSize,
    int inputSize,
    int outputSize)

Training path

Training remains graph-based:

Layer.Forward(graph, input)
  -> TensorMath/Ops today
  -> ComputationGraph
  -> graph.Backward(...)
  -> Optimizer.Step()

Training code should prioritize correctness and explicit graph behavior. Inference kernels can be reused by training primitives where useful, but inference must not depend on autograd state.

Current TrainingEngineBenchmarks baseline:

TrainingEngine_Mlp_TrainBatch: ~468 us, ~26.8 KB allocated

Allocations are allowed in training benchmarks. They are tracked as performance trend data.

Planned graph architecture cleanup

Target model:

TrainingEngine = workflow facade
ComputationGraph = autograd brain / operation facade
Parameter = long-lived trainable model state
AutogradNode = graph-visible value handle
Kernels = pure Span-based math
InferenceEngine = separate zero-allocation inference workflow

Near-term order:

  1. Add ComputationGraph.* operation facade wrappers.
  2. Add AutogradNodeOwnership metadata.
  3. Add graph factory methods for temporary/external/parameter-view nodes.
  4. Introduce Parameter as a separate type.
  5. Migrate LinearLayer first.
  6. Migrate optimizers to IEnumerable<Parameter>.
  7. Clean up graph reset/disposal by ownership.
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on DevOnBike.Overfit:

Package Downloads
DevOnBike.Overfit.Extensions.AI

Use the in-process Overfit LLM runtime through Microsoft.Extensions.AI. Implements IChatClient and IEmbeddingGenerator, so it plugs into Semantic Kernel and any Microsoft.Extensions.AI pipeline — function calling, caching, telemetry, DI — by changing one line. Pure .NET, in-process: no Python, no model server, Native-AOT friendly. Dual-licensed (AGPL-3.0-or-later / commercial).

DevOnBike.Overfit.Server

A dependency-free, OpenAI-compatible HTTP server for the in-process Overfit LLM runtime — built on System.Net.HttpListener + System.Text.Json source-gen, no ASP.NET Core, Native-AOT friendly. Point any OpenAI client at it: /v1/chat/completions (streaming and non-streaming, with JSON / JSON-Schema constrained output), /v1/models and /health. Pure .NET, in-process: no Python, no model server. Dual-licensed (AGPL-3.0-or-later / commercial).

DevOnBike.Overfit.Mcp

A dependency-free MCP (Model Context Protocol) stdio server for the in-process Overfit LLM runtime — typed JSON-RPC 2.0 contracts with source-generated System.Text.Json serialization, no SDK dependency, no reflection, Native-AOT verified. Exposes local, zero-egress tools to MCP hosts (Claude Code, Claude Desktop, IDEs): ask a local GGUF model, query private documents with RAG citations, transcribe audio with Whisper — all in pure .NET on the CPU. Dual-licensed (AGPL-3.0-or-later / commercial).

DevOnBike.Overfit.UI

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.1.0 197 8/16/2026
10.0.31 166 7/23/2026
10.0.30 160 7/20/2026
10.0.29 155 7/5/2026
10.0.28 175 6/26/2026
10.0.27 161 6/22/2026
10.0.26 149 6/20/2026
10.0.25 155 6/12/2026
10.0.24 145 6/11/2026
10.0.23 144 6/11/2026
10.0.22 122 6/9/2026
10.0.21 138 6/5/2026
10.0.20 114 5/31/2026
10.0.19 109 5/30/2026
10.0.18 122 5/29/2026
10.0.17 109 5/25/2026
10.0.16 117 5/21/2026
10.0.15 109 5/17/2026
10.0.14 120 4/30/2026
10.0.12 111 4/26/2026
Loading failed