mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2026-10-03 03:17:32 -05:00
ui : group families by name and show their org avatar
Assisted-by: pi:llama.cpp/DeepSeek-V4.1-Flash
This commit is contained in:
+3
-1
@@ -436,7 +436,9 @@
|
||||
</span>
|
||||
</span>
|
||||
{:else}
|
||||
<span class="flex min-w-0 items-center gap-2" style="padding-left: {indent}px">
|
||||
<span class="flex min-w-0 items-center gap-3" style="padding-left: {indent}px">
|
||||
<ModelAvatar option={family.entries[0].base} showBaseModelAvatar size="size-7" />
|
||||
|
||||
<span class="truncate text-sm font-medium">{family.label}</span>
|
||||
|
||||
<span class="text-sm text-muted-foreground">{countLabel}</span>
|
||||
|
||||
@@ -198,14 +198,15 @@ export function groupModelQuants(models: ModelOption[]): ModelQuantGroup[] {
|
||||
}
|
||||
|
||||
/**
|
||||
* Family a repo belongs to, from its name: `Qwen3.8-27B` and `Qwen3.8-Flash-Next`
|
||||
* both read as `Qwen3.8`, and a name without a version keeps its first segment.
|
||||
* Family a repo belongs to, from its name. The version is dropped, so `Qwen3.5`,
|
||||
* `Qwen3.8-27B` and `Qwen3.8-Flash-Next` all read as `Qwen`. A name that does not
|
||||
* start with letters keeps its first segment.
|
||||
*/
|
||||
export function modelFamilyKey(repo: string): string {
|
||||
const name = repo.split('/').pop() ?? repo;
|
||||
const versioned = name.match(/^[A-Za-z]+\d+(?:\.\d+)?/);
|
||||
const letters = name.match(/^[A-Za-z]+/);
|
||||
|
||||
return versioned ? versioned[0] : (name.split(/[-_.]/)[0] ?? name);
|
||||
return letters ? letters[0] : (name.split(/[-_.]/)[0] ?? name);
|
||||
}
|
||||
|
||||
/** One family of the table, the repos it covers. */
|
||||
|
||||
Reference in New Issue
Block a user