#nullable enable using LLama.Common; using LLama.Abstractions; using LLama.Native; using LLama.Sampling; namespace LLama.Web.Common { public class InferenceOptions : IInferenceParams { /// public int TokensKeep { get; set; } = 0; /// public int MaxTokens { get; set; } = -1; /// public Dictionary? LogitBias { get; set; } = null; /// public IReadOnlyList AntiPrompts { get; set; } = Array.Empty(); /// public int TopK { get; set; } = 40; /// public float TopP { get; set; } = 0.95f; /// public float MinP { get; set; } = 0.05f; /// public float TfsZ { get; set; } = 1.0f; /// public float TypicalP { get; set; } = 1.0f; /// public float Temperature { get; set; } = 0.8f; /// public float RepeatPenalty { get; set; } = 1.1f; /// public int RepeatLastTokensCount { get; set; } = 64; /// public float FrequencyPenalty { get; set; } = .0f; /// public float PresencePenalty { get; set; } = .0f; /// public MirostatType Mirostat { get; set; } = MirostatType.Disable; /// public float MirostatTau { get; set; } = 5.0f; /// public float MirostatEta { get; set; } = 0.1f; /// public bool PenalizeNL { get; set; } = true; /// /// A grammar to constrain possible tokens /// public SafeLLamaGrammarHandle? Grammar { get; set; } /// public ISamplingPipeline? SamplingPipeline { get; set; } } }