mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-16 08:33:48 +00:00
Rebuilt how AI Studio knows what a model can do (#960)
Build and Release / Determine run mode (push) Waiting to run
Build and Release / Sync Flatpak repo (push) Blocked by required conditions
Build and Release / Collect Flatpak artifacts (push) Blocked by required conditions
Build and Release / Verify (push) Waiting to run
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions
Build and Release / Determine run mode (push) Waiting to run
Build and Release / Sync Flatpak repo (push) Blocked by required conditions
Build and Release / Collect Flatpak artifacts (push) Blocked by required conditions
Build and Release / Verify (push) Waiting to run
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions
This commit is contained in:
1 parent
d21e09dd1e
commit
d85b4e71b6
287 files changed
+18341
-3677
No files matched your search
@@ -0,0 +1,42 @@
|
||||
using AIStudio.Provider;
|
||||
|
||||
using static AIStudio.Provider.Capability;
|
||||
|
||||
namespace AIStudio.Models.OpenWeights;
|
||||
|
||||
/// <summary>
|
||||
/// Base checkpoints, whatever family they come from.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// A base checkpoint is the model before anybody taught it to answer: it continues a text, it knows
|
||||
/// no chat template, and there is nothing in it that a tool definition could reach. Which family it
|
||||
/// belongs to changes none of that, which is why this states a modifier rather than a rule of its
|
||||
/// own -- the family says what the model is, and this takes away what the instruction tuning would
|
||||
/// have added.
|
||||
///
|
||||
/// Reading pictures goes with it. The vision tower may well be there, but without a template there
|
||||
/// is no way to hand an image to it, so promising the chat that it can send one would be a promise
|
||||
/// nobody can keep.
|
||||
///
|
||||
/// The name part has to be exactly "base", so that a model whose name merely carries the word, as
|
||||
/// in "based", is left alone.
|
||||
/// </remarks>
|
||||
public sealed class BaseCheckpointFamily : ModelFamily
|
||||
{
|
||||
private const Capability WHAT_THE_INSTRUCTION_TUNING_WOULD_HAVE_ADDED =
|
||||
SINGLE_IMAGE_INPUT | MULTIPLE_IMAGE_INPUT | AUDIO_INPUT | SPEECH_INPUT | VIDEO_INPUT |
|
||||
AUDIO_OUTPUT | IMAGE_OUTPUT | SPEECH_OUTPUT | VIDEO_OUTPUT |
|
||||
FUNCTION_CALLING | WEB_SEARCH;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override ModelVendor Vendor => ModelVendor.UNKNOWN;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override ModelSource Source => new("https://huggingface.co/docs/transformers/en/chat_templating", new DateOnly(2026, 9, 11), "Ported unchanged from the base checkpoint check of ProviderExtensions.OpenSource.cs, which answers before any family is asked.");
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Declare(ModelFamilyBuilder builder) =>
|
||||
builder.Modifier("base").AsSegment()
|
||||
.Removes(WHAT_THE_INSTRUCTION_TUNING_WOULD_HAVE_ADDED)
|
||||
.Reasoning(ReasoningSupport.NONE);
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
using AIStudio.Provider;
|
||||
|
||||
using static AIStudio.Provider.Capability;
|
||||
|
||||
namespace AIStudio.Models.OpenWeights;
|
||||
|
||||
/// <summary>
|
||||
/// The models we know cannot call functions.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Grouped by the one thing they have in common rather than by who built them, because that one
|
||||
/// thing is the only reason they need a rule at all: a model nobody wrote a rule for is assumed to
|
||||
/// call functions, and for these that assumption is wrong. None of them documents a tool template
|
||||
/// -- the publicly funded European models, the discontinued Occiglot, the Yi line whose open
|
||||
/// weights speak plain ChatML while only the closed Yi-Large-FC calls functions, and the older
|
||||
/// generations of three families whose newer ones do.
|
||||
///
|
||||
/// Two of them have a variant built for tool use, and those step out of the way by name: Salamandra
|
||||
/// ships one, and so does Falcon-H1. Everything they need is the ordinary assumption, so the rules
|
||||
/// here simply do not speak for them.
|
||||
///
|
||||
/// This is the file which pays for the rest of the open weights not being written down. Whoever
|
||||
/// runs something we never heard of gets an answer that fits the overwhelming majority of
|
||||
/// instruction-tuned models, and the handful where that guess goes the wrong way are named here.
|
||||
/// </remarks>
|
||||
public sealed class WithoutToolCallingFamily : ModelFamily
|
||||
{
|
||||
private const Capability WHAT_A_PLAIN_CHAT_MODEL_DOES = TEXT_INPUT | TEXT_OUTPUT;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override ModelVendor Vendor => ModelVendor.UNKNOWN;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override ModelSource Source => new("https://huggingface.co/docs/hub/en/chat-templates", new DateOnly(2026, 9, 11), "Ported unchanged from the list of models without tool calling in ProviderExtensions.OpenSource.cs, together with the tool-less generations of its OLMo, SmolLM, and Falcon blocks.");
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Declare(ModelFamilyBuilder builder)
|
||||
{
|
||||
// The publicly funded European models:
|
||||
builder.Rule("teuken").AsSubstring()
|
||||
.Capabilities(WHAT_A_PLAIN_CHAT_MODEL_DOES)
|
||||
.Apis(CHAT_COMPLETION_API);
|
||||
|
||||
builder.Rule("eurollm").AsSubstring().Inherits();
|
||||
|
||||
builder.Rule("occiglot").AsSubstring().Inherits();
|
||||
|
||||
builder.Rule("salamandra").AsSubstring().NotContains("tools").Inherits();
|
||||
|
||||
//
|
||||
// The Yi line. Written as a name part rather than as a substring, so that the two letters
|
||||
// do not claim every model which happens to contain them.
|
||||
//
|
||||
builder.Rule("yi").AsSegment().Inherits();
|
||||
|
||||
// The generations before OLMo 3, SmolLM 3, and Falcon 3, which have no tool template:
|
||||
builder.Rule("olmo2").AsSubstring().Inherits();
|
||||
|
||||
builder.Rule("olmo-2").AsSubstring().Inherits();
|
||||
|
||||
builder.Rule("smollm2").AsSubstring().Inherits();
|
||||
|
||||
builder.Rule("smollm-2").AsSubstring().Inherits();
|
||||
|
||||
builder.Rule("falcon-h1").AsSubstring().NotContains("tool-calling").Inherits();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user