Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Refit" Version="7.0.0" />
<PackageReference Include="Refit" Version="7.1.2" />
</ItemGroup>

<ItemGroup>
Expand Down
10 changes: 5 additions & 5 deletions PalmHill.BlazorChat/Client/PalmHill.BlazorChat.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
<ItemGroup>
<PackageReference Include="Blazored.LocalStorage" Version="4.5.0" />
<PackageReference Include="Markdig" Version="0.37.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.6" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.6" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="8.0.6" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.8" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.8" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="8.0.8" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.8.0" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.9.3" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components.Emoji" Version="4.6.0" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components.Icons" Version="4.8.0" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components.Icons" Version="4.9.3" />
</ItemGroup>

<PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions PalmHill.BlazorChat/Server/PalmHill.BlazorChat.Server.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

<ItemGroup>
<PackageReference Include="AspectInjector" Version="2.8.2" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.6" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.8" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.7.3" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 2 additions & 0 deletions PalmHill.BlazorChat/Server/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"http": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "https://localhost:7233",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
Expand All @@ -13,6 +14,7 @@
"https": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "https://localhost:7233",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
Expand Down
4 changes: 2 additions & 2 deletions PalmHill.BlazorChat/Server/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
},
"AllowedHosts": "*",
"InferenceModelConfig": {
"ModelPath": "C:\\models\\capybarahermes-2.5-mistral-7b.Q4_K_M.gguf",
"GpuLayerCount": 40,
"ModelPath": "d:\\llm\\exaone-3.0-7.8B-it-Q4_K_M.gguf",
"GpuLayerCount": 50,
"ContextSize": 4096,
"Gpu": 0,
"AntiPrompts": [ "User:" ]
Expand Down
7 changes: 6 additions & 1 deletion PalmHill.Llama/LlamaKernel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ public LlamaKernel(InjectedModel injectedModel)
var embedding = new LLamaEmbedder(injectedModel.Model, injectedModel.EmbeddingParameters);
var textEmbeddingGeneration = new LLamaSharpTextEmbeddingGenerator(embedding);
km.WithLLamaSharpTextEmbeddingGeneration(textEmbeddingGeneration);
km.Build<MemoryServerless>();
km.WithCustomTextPartitioningOptions( new Microsoft.KernelMemory.Configuration.TextPartitioningOptions {
MaxTokensPerParagraph = 1,
MaxTokensPerLine = 1,
OverlappingTokens = 0
})
.Build<MemoryServerless>();
})
.AddSingleton<ServerlessLlmMemory>();

Expand Down
2 changes: 2 additions & 0 deletions PalmHill.Llama/Models/InjectedModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ public ModelParams EmbeddingParameters
embeddingParams.ContextSize = ModelParams.ContextSize;
embeddingParams.GpuLayerCount = ModelParams.GpuLayerCount;
embeddingParams.MainGpu = ModelParams.MainGpu;
embeddingParams.SplitMode = ModelParams.SplitMode;
embeddingParams.TensorSplits = ModelParams.TensorSplits;
return embeddingParams;
}
}
Expand Down
2 changes: 1 addition & 1 deletion PalmHill.Llama/Models/ModelConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public class ModelConfig
public string ModelPath { get; set; } = "";
public int GpuLayerCount { get; set; } = 20;
public uint ContextSize { get; set; } = 2048;
public int Gpu { get; set; } = 0;
public int Gpu { get; set; } = 1;
public List<string> AntiPrompts { get; set; } = [];
}
}
14 changes: 7 additions & 7 deletions PalmHill.Llama/PalmHill.Llama.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="LLamaSharp" Version="0.13.0" />
<PackageReference Include="LLamaSharp.Backend.Cuda12" Version="0.13.0" />
<PackageReference Include="LLamaSharp.kernel-memory" Version="0.13.0" />
<PackageReference Include="LLamaSharp.semantic-kernel" Version="0.13.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.1" />
<PackageReference Include="LLamaSharp" Version="0.15.0" />
<PackageReference Include="LLamaSharp.Backend.Cuda12" Version="0.15.0" />
<PackageReference Include="LLamaSharp.kernel-memory" Version="0.15.0" />
<PackageReference Include="LLamaSharp.semantic-kernel" Version="0.15.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.KernelMemory.Core" Version="0.62.240605.1" />
<PackageReference Include="Microsoft.SemanticKernel.Core" Version="1.14.1" />
<PackageReference Include="Microsoft.KernelMemory.Core" Version="0.71.240820.1" />
<PackageReference Include="Microsoft.SemanticKernel.Core" Version="1.17.2" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading