From 7691a755d6b763783bd751c49f3dd6c4d53dca99 Mon Sep 17 00:00:00 2001 From: Toni Bennasar Date: Tue, 15 Apr 2025 08:56:50 +0200 Subject: [PATCH] Fixed LLama.Web errors starting session InferenceOptions.SamplingPipeline now is not required. Is not sent from client Added options to debug SignalR calls at appsettings.Development.json Changed default web model to llava-v1.6-mistral-7b.Q3_K_XS.gguf, previous one (llama-2-7b-chat.Q4_0.gguf) did no exist --- LLama.Web/Common/InferenceOptions.cs | 2 +- LLama.Web/appsettings.Development.json | 4 +++- LLama.Web/appsettings.json | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/LLama.Web/Common/InferenceOptions.cs b/LLama.Web/Common/InferenceOptions.cs index e5735be63..c49d3aa31 100644 --- a/LLama.Web/Common/InferenceOptions.cs +++ b/LLama.Web/Common/InferenceOptions.cs @@ -20,6 +20,6 @@ public class InferenceOptions public IReadOnlyList AntiPrompts { get; set; } = Array.Empty(); /// - public required ISamplingPipeline SamplingPipeline { get; set; } + public ISamplingPipeline SamplingPipeline { get; set; } = new DefaultSamplingPipeline(); } } diff --git a/LLama.Web/appsettings.Development.json b/LLama.Web/appsettings.Development.json index 770d3e931..ac6d49da3 100644 --- a/LLama.Web/appsettings.Development.json +++ b/LLama.Web/appsettings.Development.json @@ -3,7 +3,9 @@ "Logging": { "LogLevel": { "Default": "Information", - "Microsoft.AspNetCore": "Warning" + "Microsoft.AspNetCore": "Warning", + "Microsoft.AspNetCore.SignalR": "Debug", + "Microsoft.AspNetCore.Http.Connections": "Debug" } } } diff --git a/LLama.Web/appsettings.json b/LLama.Web/appsettings.json index a7a627d9b..caa27cc64 100644 --- a/LLama.Web/appsettings.json +++ b/LLama.Web/appsettings.json @@ -10,13 +10,13 @@ "ModelLoadType": 0, "Models": [ { - "Name": "Example LLama2-7b-Chat", + "Name": "Example LLava-v1.6-mistral", "MaxInstances": 20, - "ModelPath": "..\\LLama.Unittest\\Models\\llama-2-7b-chat.Q4_0.gguf", + "ModelPath": "..\\LLama.Unittest\\Models\\llava-v1.6-mistral-7b.Q3_K_XS.gguf", "ContextSize": 2048, "BatchSize": 2048, "Threads": 4, - "GpuLayerCount": 6, + "GpuLayerCount": 32, "UseMemorymap": true, "UseMemoryLock": false, "MainGpu": 0,