Skip to content
Open
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
5 changes: 5 additions & 0 deletions Releases/0.10.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# 0.10.1 release

- Added InferPage Settings with backend selection, model configuration, API keys, and per-backend profiles.
- Added custom model paths and multimodal (.mmproj) support for local vision models.
- Refactored settings logic and upgraded LLamaSharp to 0.26.0 for improved vision reliability.
8 changes: 4 additions & 4 deletions src/MaIN.Core/.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package>
<metadata>
<id>MaIN.NET</id>
<version>0.10.0</version>
<version>0.10.1</version>
<authors>Wisedev</authors>
<owners>Wisedev</owners>
<icon>favicon.png</icon>
Expand All @@ -13,9 +13,9 @@
<dependencies>
<dependency id="GTranslate" version="2.3.1" />
<dependency id="HtmlAgilityPack" version="1.12.4" />
<dependency id="LLamaSharp" version="0.25.0" />
<dependency id="LLamaSharp.Backend.Cuda12" version="0.25.0" />
<dependency id="LLamaSharp.kernel-memory" version="0.25.0" />
<dependency id="LLamaSharp" version="0.26.0" />
<dependency id="LLamaSharp.Backend.Cuda12" version="0.26.0" />
<dependency id="LLamaSharp.kernel-memory" version="0.26.0" />
<dependency id="ModelContextProtocol.AspNetCore" version="0.2.0-preview.1" />
<dependency id="Microsoft.SemanticKernel" version="1.68.0" />
<dependency id="Microsoft.SemanticKernel.Connectors.Google" version="1.64.0-alpha" />
Expand Down
2 changes: 1 addition & 1 deletion src/MaIN.Core/MaIN.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<ItemGroup>
<PackageReference Include="AsyncKeyedLock" Version="8.0.2" />
<PackageReference Include="LLamaSharp.Backend.Cuda12" Version="0.25.0" />
<PackageReference Include="LLamaSharp.Backend.Cuda12" Version="0.26.0" />
<PackageReference Include="Tesseract.Data.English" Version="4.0.0" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/MaIN.Domain/MaIN.Domain.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="LLamaSharp" Version="0.25.0" />
<PackageReference Include="LLamaSharp" Version="0.26.0" />
</ItemGroup>

</Project>
15 changes: 12 additions & 3 deletions src/MaIN.Domain/Models/Concrete/LocalModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,32 @@ public sealed record Gemma3_4b() : LocalModel(
new Uri("https://huggingface.co/Inza124/Gemma3-4b/resolve/main/gemma3-4b.gguf?download=true"),
"Gemma3 4B",
8192,
"Balanced 4B model for writing, analysis, and mathematical reasoning");
"Balanced 4B model for writing, analysis, and mathematical reasoning"), IVisionModel
{
public string MMProjectName => "mmproj-model-gemma3-4b.gguf";
}

public sealed record Gemma3_12b() : LocalModel(
"gemma3-12b",
"Gemma3-12b.gguf",
new Uri("https://huggingface.co/Inza124/Gemma3-12b/resolve/main/gemma3-12b.gguf?download=true"),
"Gemma3 12B",
8192,
"Large 12B model for complex analysis, research, and creative writing");
"Large 12B model for complex analysis, research, and creative writing"), IVisionModel
{
public string MMProjectName => "mmproj-model-gemma3-12b.gguf";
}

public sealed record Gemma3n_e4b() : LocalModel(
"gemma3n-e4b",
"Gemma3n-e4b.gguf",
new Uri("https://huggingface.co/Inza124/Gemma-3n-e4b/resolve/main/gemma-3n-e4b.gguf?download=true"),
"Gemma3n E4B",
8192,
"Compact 4B model optimized for efficient reasoning and general-purpose tasks");
"Compact 4B model optimized for efficient reasoning and general-purpose tasks"), IVisionModel
{
public string MMProjectName => "mmproj-model-gemma3n-e4b.gguf";
}

// ===== Llama Family =====

Expand Down
1 change: 1 addition & 0 deletions src/MaIN.InferPage/Components/App.razor
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<script src="_framework/blazor.web.js"></script>
<script src="scroll.js"></script>
<script src="editor.js"></script>
<script src="settings.js"></script>
<script>
window.themeManager = {
save: function (theme) { localStorage.setItem('theme', theme); },
Expand Down
4 changes: 2 additions & 2 deletions src/MaIN.InferPage/Components/Layout/MainLayout.razor
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@inherits LayoutComponentBase
@inherits LayoutComponentBase
<NavBar/>
<div class="content">

Expand All @@ -9,4 +9,4 @@
An unhandled error has occurred.
<a href="." class="reload">Reload</a>
<span class="dismiss">🗙</span>
</div>
</div>
31 changes: 21 additions & 10 deletions src/MaIN.InferPage/Components/Layout/NavBar.razor
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
@using Microsoft.FluentUI.AspNetCore.Components.Icons.Regular
@using MaIN.Domain.Configuration
@using MaIN.InferPage.Services
@inject NavigationManager _navigationManager
@inject IJSRuntime JS
@inject SettingsStateService SettingsState
@implements IDisposable
@rendermode @(new InteractiveServerRenderMode(prerender: false))

<FluentDesignTheme @bind-Mode="@Mode"
Expand Down Expand Up @@ -48,6 +51,11 @@
Style="margin-left: 10px">Vision 👁️</FluentBadge>
}
<div style="margin-left: auto; align-self: flex-end;">
<FluentButton Style="background-color: transparent;"
BackgroundColor="rgba(0, 0, 0, 0)"
Appearance="Appearance.Lightweight"
OnClick="@(() => SettingsState.RequestSettings())" IconStart="@(new Icons.Regular.Size24.Settings().WithColor(AccentColor))">
</FluentButton>
<FluentButton Style="padding: 10px; background-color: transparent;"
BackgroundColor="rgba(0, 0, 0, 0)"
Appearance="Appearance.Lightweight"
Expand All @@ -64,30 +72,28 @@
@code {
private DesignThemeModes Mode { get; set; }
private string AccentColor => Mode == DesignThemeModes.Dark ? "#00ffcc" : "#00cca3";
private bool _isChangingTheme = false;

protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
var stored = await JS.InvokeAsync<string>("themeManager.load");
Mode = stored == "dark" ? DesignThemeModes.Dark : DesignThemeModes.Light;
SettingsState.OnSettingsApplied += OnSettingsChanged;
StateHasChanged();
}
}

private void SetTheme()
private void OnSettingsChanged()
{
if (_isChangingTheme) return;
_isChangingTheme = true;
Mode = Mode == DesignThemeModes.Dark ? DesignThemeModes.Light : DesignThemeModes.Dark;
_isChangingTheme = false;
InvokeAsync(StateHasChanged);
}

private void Reload(MouseEventArgs obj)
{
_navigationManager.Refresh(true);
}
private void SetTheme()
=> Mode = Mode == DesignThemeModes.Dark ? DesignThemeModes.Light : DesignThemeModes.Dark;

private void Reload()
=> _navigationManager.Refresh(true);

private string GetBackendColor()
{
Expand All @@ -103,4 +109,9 @@
_ => Utils.BackendType.ToString()
};
}

public void Dispose()
{
SettingsState.OnSettingsApplied -= OnSettingsChanged;
}
}
Loading
Loading