LLMFromScratch.SDK.ThirdPartyTraining
0.1.4
dotnet add package LLMFromScratch.SDK.ThirdPartyTraining --version 0.1.4
NuGet\Install-Package LLMFromScratch.SDK.ThirdPartyTraining -Version 0.1.4
<PackageReference Include="LLMFromScratch.SDK.ThirdPartyTraining" Version="0.1.4" />
<PackageVersion Include="LLMFromScratch.SDK.ThirdPartyTraining" Version="0.1.4" />
<PackageReference Include="LLMFromScratch.SDK.ThirdPartyTraining" />
paket add LLMFromScratch.SDK.ThirdPartyTraining --version 0.1.4
#r "nuget: LLMFromScratch.SDK.ThirdPartyTraining, 0.1.4"
#:package LLMFromScratch.SDK.ThirdPartyTraining@0.1.4
#addin nuget:?package=LLMFromScratch.SDK.ThirdPartyTraining&version=0.1.4
#tool nuget:?package=LLMFromScratch.SDK.ThirdPartyTraining&version=0.1.4
LLMFromScratch third-party training extension
LLMFromScratch.SDK.ThirdPartyTraining is the opt-in extension for training
Hugging Face Qwen, Llama, and compatible decoder models through Python tooling.
It is deliberately separate from the original in-process GPT SDK.
Install it alongside the base SDK:
dotnet add package LLMFromScratch.SDK --version 0.3.2
dotnet add package LLMFromScratch.SDK.ThirdPartyTraining --version 0.1.4
The extension provides ThirdPartyModelPipeline for Unsloth or PEFT LoRA/QLoRA
training, llama.cpp GGUF conversion, and local Ollama import.
Complete pipeline example
using System.Collections.Generic;
using LLMFromScratch.SDK.ThirdPartyTraining;
var pipeline = new ThirdPartyModelPipeline();
var result = await pipeline.RunAsync(
new ThirdPartyModelPipelineRequest
{
Training = new ThirdPartyTrainingOptions
{
ModelId = "Qwen/Qwen2.5-0.5B-Instruct",
ModelFamily = ThirdPartyModelFamily.Qwen,
Backend = ThirdPartyTrainingBackend.Unsloth,
DatasetPath = "Data/train.jsonl",
OutputDirectory = "outputs/qwen-support",
Epochs = 1,
BatchSize = 1,
GradientAccumulationSteps = 8,
MaxSequenceLength = 2048,
LoadIn4Bit = true,
MergeAdapter = true
},
GgufExport = new ThirdPartyGgufExportOptions
{
// Filled with the merged training output by the pipeline.
OutputPath = "outputs/qwen-support/qwen-support-q4_k_m.gguf",
LlamaCppDirectory = @"C:\src\llama.cpp",
Quantization = "Q4_K_M"
},
OllamaImport = new OllamaImportOptions
{
// GgufPath is filled by the GGUF stage.
ModelName = "qwen-support",
ModelfilePath = "outputs/qwen-support/Modelfile.qwen-support",
SystemPrompt = "You are a concise, helpful support assistant.",
Parameters = new Dictionary<string, string>
{
["temperature"] = "0.2",
["num_ctx"] = "4096"
}
}
},
new Progress<string>(Console.WriteLine));
Console.WriteLine($"GGUF: {result.GgufExport?.OutputPath}");
Console.WriteLine($"Ollama model: {result.OllamaImport?.ModelName}");
Console.WriteLine($"Modelfile: {result.OllamaImport?.ModelfilePath}");
OllamaImportOptions writes the Modelfile and then runs
ollama create <model-name> --file <modelfile-path>. The generated file uses
the absolute GGUF path, supplied PARAMETER values, and optional SYSTEM or
TEMPLATE directives. Leave Template unset unless you intentionally need to
override the model's chat template.
For a manual import, the generated Modelfile has this form:
FROM C:/absolute/path/to/outputs/qwen-support/qwen-support-q4_k_m.gguf
PARAMETER temperature 0.2
PARAMETER num_ctx 4096
SYSTEM """You are a concise, helpful support assistant."""
ollama create qwen-support:latest --file outputs/qwen-support/Modelfile.qwen-support
For Python, llama.cpp, Ollama, dataset, standalone import, and manual
Modelfile guidance, see the repository documentation at
docs/ThirdPartyModels.md.
MIT. See the repository license.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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. |
-
net10.0
- LLMFromScratch.SDK (>= 0.3.2)
-
net9.0
- LLMFromScratch.SDK (>= 0.3.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Updates the extension to depend on LLMFromScratch.SDK 0.3.2, which lowers the auto-generated companion Modelfile's default repeat_penalty (1.3 to 1.1) and temperature (0.7 to 0.3) to reduce malformed control-tag output, and documents that this tokenizer has no atomic special tokens for control tags as a separate, known limitation.