Sylin.Koan.AI.Training
0.8.0
dotnet add package Sylin.Koan.AI.Training --version 0.8.0
NuGet\Install-Package Sylin.Koan.AI.Training -Version 0.8.0
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="Sylin.Koan.AI.Training" Version="0.8.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Sylin.Koan.AI.Training" Version="0.8.0" />
<PackageReference Include="Sylin.Koan.AI.Training" />
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 Sylin.Koan.AI.Training --version 0.8.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Sylin.Koan.AI.Training, 0.8.0"
#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 Sylin.Koan.AI.Training@0.8.0
#: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=Sylin.Koan.AI.Training&version=0.8.0
#tool nuget:?package=Sylin.Koan.AI.Training&version=0.8.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Koan.AI.Training
Training orchestration and dataset management for Koan. Supports LoRA fine-tuning, preference alignment (DPO/RLHF/KTO/ORPO), dataset analysis, and job lifecycle management with 4-level escape hatches.
- Target framework: net10.0
- License: Apache-2.0
- Version: 0.6.3
Install
dotnet add package Sylin.Koan.AI.Training
Quick Start
// Fine-tune a model with LoRA
var job = await Training.Train("base-model:7b", dataset: myDataset);
Console.WriteLine($"Job: {job.Id} — {job.Status}");
// Stream progress
await foreach (var progress in Training.Status(job.Id, ct))
Console.WriteLine($"Step {progress.Step}/{progress.TotalSteps} loss={progress.Loss:F4}");
Core API
Training.Train(string modelId, Dataset dataset) // → TrainingJob
Training.Train(string modelId, Dataset dataset, TrainOptions options) // with options
Training.Run(string scriptPath, RunOptions options) // Escape hatch: run script directly
Training.Align(string modelId, Dataset prefs, AlignOptions) // DPO/RLHF/KTO/ORPO
Training.Compare(TrainingJob a, TrainingJob b) // → ComparisonReport
Training.Estimate(string modelId, Dataset dataset) // → TrainingEstimate (cost preview)
Training.Status(string jobId, CancellationToken ct) // → IAsyncEnumerable<TrainingProgress>
Training.Cancel(string jobId) // → void
Training.Resume(string jobId) // Resume from checkpoint
Training.List() // → IReadOnlyList<TrainingJob>
Training Methods
TrainMethod |
Description |
|---|---|
LoRA |
Low-Rank Adaptation (default, recommended) |
FullFinetuning |
Full parameter fine-tuning |
Alignment Methods (Preference Tuning)
| Method | Description |
|---|---|
| DPO | Direct Preference Optimization |
| RLHF | Reinforcement Learning from Human Feedback |
| KTO | Kahneman-Tversky Optimization |
| ORPO | Odds Ratio Preference Optimization |
TrainOptions
var job = await Training.Train("base-model:7b", dataset, new TrainOptions
{
Method = TrainMethod.LoRA,
Epochs = 3,
LearningRate = 2e-4,
BatchSize = 4,
OutputModel = "my-custom-model:v1"
});
4-Level Escape Hatches
| Level | API | Use when |
|---|---|---|
| 1 | Training.Train(model, dataset) |
Default LoRA — works in most cases |
| 2 | Training.Train(model, dataset, TrainOptions) |
Custom hyperparameters |
| 3 | Training.Run(scriptPath, RunOptions) |
Existing training scripts |
| 4 | Implement ITrainingRuntime |
Fully custom runtime |
TrainingEstimate (pre-flight cost preview)
var estimate = await Training.Estimate("llama3:8b", myDataset);
Console.WriteLine($"Tokens: {estimate.Tokens:N0}");
Console.WriteLine($"GPU Hours: {estimate.GpuHours:F1}");
Console.WriteLine($"Est. Cost: ${estimate.EstimatedCostUsd:F2}");
Reference
- ADR:
docs/decisions/AI-0021-category-driven-ai-with-convention-defaults.md - Related:
Koan.AI.Review(feedback loop → training datasets),Koan.AI.Eval(post-training quality gates),Koan.AI.Models(deploy trained models)
| Product | Versions 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.
-
net10.0
- Sylin.Koan.AI (>= 0.8.0)
- Sylin.Koan.AI.Contracts (>= 0.8.0)
- Sylin.Koan.AI.Contracts.Shared (>= 0.8.0)
- Sylin.Koan.Core (>= 0.8.0)
- Sylin.Koan.Data.Core (>= 0.8.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.8.0 | 93 | 5/16/2026 |
See release notes: https://github.com/sylin-labs/Koan-framework/releases