semantic-kernel icon indicating copy to clipboard operation
semantic-kernel copied to clipboard

.Net: New Feature: Support for MinP sampling

Open crazycrank opened this issue 1 year ago • 2 comments

Right now, the only supported sampling parameters seem to TopP and Temperature, as well as FrequencyPenalty and PresencePenalty.

Other common sampling parameters seem to be missing. While they can be added using ExtensionData as the following example shows, the documentation discourages from using that

        var response = await chatCompletionService.GetChatMessageContentsAsync(
                           chatHistory,
                           new OpenAIPromptExecutionSettings
                           {
                               Temperature = 1.0,
                               TopP = 0,
                               ExtensionData = new Dictionary<string, object>
                               {
                                   { "min_p", 0.1 },
                               },
                           });

Other parameters should be supported by default as well, like TopK, MinA, and RepetitionPenalty, but especially MinP seems like a big oversight due - in many models I get the best completions by using high temperature combined with a low-ish min-p

crazycrank avatar Aug 25 '25 15:08 crazycrank

This issue is stale because it has been open for 90 days with no activity.

github-actions[bot] avatar Nov 24 '25 02:11 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Jan 02 '26 02:01 github-actions[bot]