Skip to content

Commit b321839

Browse files
authored
Merge pull request #962 from martindevans/nov_binaries
November Binary Update
2 parents 079410c + 5b8906b commit b321839

14 files changed

+108
-258
lines changed

.github/_typos.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,7 @@ extend-exclude = [
1414
"LLama.Benchmark/Assets/",
1515
"LLama.Examples/Assets/"
1616
]
17+
18+
[default.extend-words]
19+
# Used in a comment in SafeLLamaSamplerHandle.cs, as a prefix of "hello"
20+
teh = "hel"

LLama.Examples/Examples/CustomSampler.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ protected override SafeLLamaSamplerChainHandle CreateChain(SafeLLamaContextHandl
6060
chain.AddCustom(new RemoveMostLikelyToken());
6161

6262
// Select from the distribution
63-
chain.AddSoftmax();
6463
chain.AddDistributionSampler(42);
6564

6665
return chain;

LLama/Extensions/LLamaExecutorExtensions.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ private string CreatePrompt(IList<ChatMessage> messages)
150150
MinKeep = options?.AdditionalProperties?.TryGetValue(nameof(DefaultSamplingPipeline.MinKeep), out int mk) is true ? mk : s_defaultPipeline.MinKeep,
151151
MinP = options?.AdditionalProperties?.TryGetValue(nameof(DefaultSamplingPipeline.MinP), out float mp) is true ? mp : s_defaultPipeline.MinP,
152152
Seed = options?.AdditionalProperties?.TryGetValue(nameof(DefaultSamplingPipeline.Seed), out uint seed) is true ? seed : (uint)(t_random ??= new()).Next(),
153-
TailFreeZ = options?.AdditionalProperties?.TryGetValue(nameof(DefaultSamplingPipeline.TailFreeZ), out float tfz) is true ? tfz : s_defaultPipeline.TailFreeZ,
154153
Temperature = options?.Temperature ?? 0,
155154
TopP = options?.TopP ?? 0,
156155
TopK = options?.TopK ?? s_defaultPipeline.TopK,

LLama/LLamaSharp.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
</ItemGroup>
5757

5858
<PropertyGroup>
59-
<BinaryReleaseId>c35e586ea5722184</BinaryReleaseId>
59+
<BinaryReleaseId>958367bf530d943a90</BinaryReleaseId>
6060
</PropertyGroup>
6161

6262
<PropertyGroup>

LLama/LLavaWeights.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ namespace LLama;
99
/// <summary>
1010
/// A set of llava model weights (mmproj), loaded into memory.
1111
/// </summary>
12-
public sealed class LLavaWeights : IDisposable
12+
public sealed class LLavaWeights
13+
: IDisposable
1314
{
1415
/// <summary>
1516
/// The native handle, which is used in the native APIs

LLama/Native/LLamaNativeBatch.cs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public unsafe struct LLamaNativeBatch
2525

2626
/// <summary>
2727
/// the positions of the respective token in the sequence
28+
/// (if set to NULL, the token position will be tracked automatically by llama_decode)
2829
/// </summary>
2930
public LLamaPos* pos;
3031

@@ -35,18 +36,13 @@ public unsafe struct LLamaNativeBatch
3536

3637
/// <summary>
3738
/// the sequence to which the respective token belongs
39+
/// (if set to NULL, the sequence ID will be assumed to be 0)
3840
/// </summary>
3941
public LLamaSeqId** seq_id;
4042

4143
/// <summary>
4244
/// if zero, the logits for the respective token will not be output
45+
/// (if set to NULL, only the logits for last token will be returned)
4346
/// </summary>
4447
public byte* logits;
45-
46-
// Note from llama.cpp:
47-
// > helpers for smooth API transition - can be deprecated in the future
48-
// > for future-proof code, use the above fields instead and ignore everything below
49-
private LLamaPos _all_pos_0;
50-
private LLamaPos _all_pos_1;
51-
private LLamaSeqId _all_seq_id;
5248
}

LLama/Native/LLamaPoolingType.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,9 @@ public enum LLamaPoolingType
2929
CLS = 2,
3030

3131
Last = 3,
32+
33+
/// <summary>
34+
/// Used by reranking models to attach the classification head to the graph
35+
/// </summary>
36+
Rank,
3237
}

LLama/Native/LLamaVocabPreType.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,5 @@ internal enum LLamaVocabPreType
3333
BLOOM = 23,
3434
GPT3_FINNISH = 24,
3535
EXAONE = 25,
36+
CHAMELEON = 26,
3637
}

LLama/Native/NativeApi.Sampling.cs

Lines changed: 0 additions & 186 deletions
This file was deleted.

LLama/Native/NativeApi.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,14 @@ public static void llama_empty_call()
4949
[return: MarshalAs(UnmanagedType.U1)]
5050
public static extern bool llama_supports_gpu_offload();
5151

52+
/// <summary>
53+
/// Check if RPC offload is supported
54+
/// </summary>
55+
/// <returns></returns>
56+
[DllImport(libraryName, CallingConvention = CallingConvention.Cdecl)]
57+
[return: MarshalAs(UnmanagedType.U1)]
58+
public static extern bool llama_supports_rpc();
59+
5260
/// <summary>
5361
/// Initialize the llama + ggml backend. Call once at the start of the program.
5462
///

0 commit comments

Comments
 (0)