From ea523d2e2a6338bff15cd47e5e8b33c90b8b8954 Mon Sep 17 00:00:00 2001 From: Martin Evans Date: Fri, 15 Dec 2023 22:58:26 +0000 Subject: [PATCH] Renamed `llama_sample_temperature` to `llama_sample_temp`, Mirroring the same change made in llama.cpp --- LLama/Native/LLamaTokenDataArray.cs | 2 +- LLama/Native/NativeApi.Sampling.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LLama/Native/LLamaTokenDataArray.cs b/LLama/Native/LLamaTokenDataArray.cs index 5059a5f3..12f588a6 100644 --- a/LLama/Native/LLamaTokenDataArray.cs +++ b/LLama/Native/LLamaTokenDataArray.cs @@ -197,7 +197,7 @@ namespace LLama.Native { using (LLamaTokenDataArrayNative.Create(this, out var st)) { - NativeApi.llama_sample_temperature(context, ref st, temp); + NativeApi.llama_sample_temp(context, ref st, temp); sorted = st.sorted; } } diff --git a/LLama/Native/NativeApi.Sampling.cs b/LLama/Native/NativeApi.Sampling.cs index 365acacf..9e7d375b 100644 --- a/LLama/Native/NativeApi.Sampling.cs +++ b/LLama/Native/NativeApi.Sampling.cs @@ -102,7 +102,7 @@ namespace LLama.Native /// /// [DllImport(libraryName, CallingConvention = CallingConvention.Cdecl)] - public static extern void llama_sample_temperature(SafeLLamaContextHandle ctx, ref LLamaTokenDataArrayNative candidates, float temp); + public static extern void llama_sample_temp(SafeLLamaContextHandle ctx, ref LLamaTokenDataArrayNative candidates, float temp); /// /// Mirostat 1.0 algorithm described in the paper https://arxiv.org/abs/2007.14966. Uses tokens instead of words.