Skip to content

Commit a18e40a

Browse files
committed
adjust quant labels
1 parent f5ff01c commit a18e40a

5 files changed

Lines changed: 68 additions & 2 deletions

File tree

‎.changeset/kind-pans-stick.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@magnitudedev/cli": patch
3+
---
4+
5+
More robust service health checks

‎.changeset/pink-canyons-crash.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@magnitudedev/cli": patch
3+
---
4+
5+
Better inference errors for context length exceeded

‎.changeset/strong-deer-agree.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@magnitudedev/cli": patch
3+
---
4+
5+
Improve agent onboarding doc

‎cli/src/features/model-menus/catalog-radar.test.ts‎

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { localModelRadarAxes } from "@magnitudedev/client-common"
1414
import {
1515
GIB,
1616
makeCatalogOnlyModel,
17+
makeModel,
1718
TEST_MEMORY_DOMAIN_ID,
1819
} from "../local-inference/test-fixtures"
1920

@@ -37,6 +38,56 @@ describe("catalog radar", () => {
3738
])
3839
})
3940

41+
test("labels catalog fidelity using the quantization-scale buckets", () => {
42+
const base = makeCatalogOnlyModel()
43+
for (const [fidelityRank, expected] of [
44+
[20, "Reduced"],
45+
[40, "Medium"],
46+
[50, "High"],
47+
[58, "High"],
48+
[60, "High"],
49+
[80, "Very high"],
50+
] as const) {
51+
const axes = Option.getOrThrow(localModelRadarAxes({
52+
...base,
53+
catalogData: { ...base.catalogData, fidelityRank },
54+
}))
55+
expect(axes[4].detail).toBe(`${expected} (Q4)`)
56+
}
57+
})
58+
59+
test("uses the same quantization-scale labels for discovered models", () => {
60+
const base = makeModel()
61+
const serving = base.state.servingState
62+
if (serving._tag !== "Assessed" || serving.assessment._tag !== "Fits") {
63+
throw new Error("Discovered radar fixture must have a fitting assessment")
64+
}
65+
for (const [bits, expected] of [
66+
[3, "Reduced"],
67+
[4, "Medium"],
68+
[5, "High"],
69+
[6, "High"],
70+
[8, "Very high"],
71+
] as const) {
72+
const quantization = `Q${bits}`
73+
const axes = Option.getOrThrow(localModelRadarAxes({
74+
...base,
75+
state: {
76+
...base.state,
77+
servingState: {
78+
...serving,
79+
metadata: {
80+
...serving.metadata,
81+
quantization,
82+
quantizationName: `${bits}-bit`,
83+
},
84+
},
85+
},
86+
}))
87+
expect(axes[4].detail).toBe(`${expected} (${quantization})`)
88+
}
89+
})
90+
4091
test("omits the profile when assessment has no performance samples", () => {
4192
const model = makeCatalogOnlyModel()
4293
if (

‎packages/client-common/src/utils/local-model-radar.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const speculationValue = (model: LocalModel): number => {
6262
}
6363

6464
const accuracyLabel = (rank: number): string =>
65-
rank >= 75 ? "Native" : rank >= 55 ? "Very high" : rank >= 45 ? "High" : "Reduced"
65+
rank >= 70 ? "Very high" : rank >= 45 ? "High" : rank >= 30 ? "Medium" : "Reduced"
6666

6767
const shortVariantLabel = (model: LocalModel): string =>
6868
String(model.presentation.variantLabel).match(/\b(?:IQ|Q)\d+(?:\.\d+)?\b/i)?.[0] ??
@@ -86,7 +86,7 @@ const discoveredAccuracyLabel = (bits: Option.Option<number>): string =>
8686
Option.match(bits, {
8787
onNone: () => "Not assessed",
8888
onSome: (value) =>
89-
value >= 8 ? "Native" : value >= 6 ? "Very high" : value >= 5 ? "High" : "Reduced",
89+
value >= 8 ? "Very high" : value >= 5 ? "High" : value >= 4 ? "Medium" : "Reduced",
9090
})
9191

9292
const memoryFootprintLabel = (assessment: ModelAssessment): string => {

0 commit comments

Comments
 (0)