Save Safetensor LLM from C#
r/LocalLLaMA
•
Generative AI
Has anyone written a reliable method for saving a GPT-model from C# into a safetensor file that is compatible with the safetensor-reading apps like text-generation and the safetensor2gguf conversion tools? I am talking a really small, almost microscopic LLM model here. public class GPTConfig { public int VocabSize { get; set; } public int BlockSize { get; set; } = 128; public int NLayer { get; set; } = 4; public int NHead { get; set; } = 4; public int NEmbD { get; set; } = 128; public int BatchSize { get; set; } = 100; } Filesize around 3-5 Mb. Can't get nugets SafetensorSharp nor Lokan.