File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -27,13 +27,19 @@ public unsafe struct LLamaModelParams
2727 /// <summary>
2828 /// how to split layers across multiple GPUs (size: <see cref="NativeApi.llama_max_devices"/>)
2929 /// </summary>
30- public float * tensor_split ;
31-
30+ public float * tensor_split ;
31+
3232 /// <summary>
3333 /// called with a progress value between 0 and 1, pass NULL to disable. If the provided progress_callback
3434 /// returns true, model loading continues. If it returns false, model loading is immediately aborted.
3535 /// </summary>
36+ #if NETSTANDARD2_0
37+ // this code is intended to be used when running LlamaSharp on NET Framework 4.8 (NET Standard 2.0)
38+ // as NET Framework 4.8 does not play nice with the LlamaProgressCallback type
39+ public IntPtr progress_callback ;
40+ #else
3641 public LlamaProgressCallback progress_callback ;
42+ #endif
3743
3844 /// <summary>
3945 /// context pointer passed to the progress callback
You can’t perform that action at this time.
0 commit comments