using System.Text; using LLama.Abstractions; using LLama.Native; namespace LLama.Web.Common { public class ModelOptions : ILLamaParams { /// /// Model friendly name /// public string Name { get; set; } /// /// Max context insta=nces allowed per model /// public int MaxInstances { get; set; } /// public uint? ContextSize { get; set; } /// public int MainGpu { get; set; } = 0; /// public GPUSplitMode SplitMode { get; set; } = GPUSplitMode.None; /// public int GpuLayerCount { get; set; } = 20; /// public uint Seed { get; set; } = 1686349486; /// public bool UseMemorymap { get; set; } = true; /// public bool UseMemoryLock { get; set; } = false; /// public string ModelPath { get; set; } /// public AdapterCollection LoraAdapters { get; set; } = new(); /// public string LoraBase { get; set; } = string.Empty; /// public uint? Threads { get; set; } /// public uint? BatchThreads { get; set; } /// public uint BatchSize { get; set; } = 512; /// public bool EmbeddingMode { get; set; } = false; /// public TensorSplitsCollection TensorSplits { get; set; } = new(); /// public List MetadataOverrides { get; } = new(); /// public float? RopeFrequencyBase { get; set; } /// public float? RopeFrequencyScale { get; set; } /// public float? YarnExtrapolationFactor { get; set; } /// public float? YarnAttentionFactor { get; set; } /// public float? YarnBetaFast { get; set; } /// public float? YarnBetaSlow { get; set; } /// public uint? YarnOriginalContext { get; set; } /// public RopeScalingType? YarnScalingType { get; set; } /// public GGMLType? TypeK { get; set; } /// public GGMLType? TypeV { get; set; } /// public bool NoKqvOffload { get; set; } /// public Encoding Encoding { get; set; } = Encoding.UTF8; /// public bool VocabOnly { get; set; } } }