First Try: QVAC (QuantumVerse Automatic Computer)
This commit is contained in:
@@ -0,0 +1,90 @@
|
||||
/**
|
||||
* QVAC model profiles for PearData onboarding.
|
||||
* Constants match @qvac/sdk registry names (string form when SDK not loaded).
|
||||
*/
|
||||
|
||||
/** @typedef {'lite'|'recommended'|'strong'|'tool-tiny'} QvacProfileId */
|
||||
|
||||
/**
|
||||
* @typedef {{
|
||||
* id: QvacProfileId,
|
||||
* label: string,
|
||||
* description: string,
|
||||
* chatModel: string,
|
||||
* embedModel: string|null,
|
||||
* tools: boolean,
|
||||
* minRamGb: number,
|
||||
* minDiskGb: number,
|
||||
* approxDownloadGb: number,
|
||||
* }} QvacProfile
|
||||
*/
|
||||
|
||||
/** @type {Record<QvacProfileId, QvacProfile>} */
|
||||
export const QVAC_PROFILES = {
|
||||
lite: {
|
||||
id: 'lite',
|
||||
label: 'Lite',
|
||||
description: 'Smallest download. Good for weak machines; limited tool use.',
|
||||
chatModel: 'QWEN3_600M_INST_Q4',
|
||||
embedModel: null,
|
||||
tools: false,
|
||||
minRamGb: 4,
|
||||
minDiskGb: 2,
|
||||
approxDownloadGb: 0.5,
|
||||
},
|
||||
recommended: {
|
||||
id: 'recommended',
|
||||
label: 'Recommended',
|
||||
description: 'Best balance for host monitoring with tool calling.',
|
||||
chatModel: 'QWEN3_1_7B_INST_Q4',
|
||||
embedModel: 'GTE_LARGE_FP16',
|
||||
tools: true,
|
||||
minRamGb: 8,
|
||||
minDiskGb: 5,
|
||||
approxDownloadGb: 2.5,
|
||||
},
|
||||
strong: {
|
||||
id: 'strong',
|
||||
label: 'Strong',
|
||||
description: 'Better reasoning on incidents. Needs more RAM/disk.',
|
||||
chatModel: 'QWEN3_4B_INST_Q4_K_M',
|
||||
embedModel: 'GTE_LARGE_FP16',
|
||||
tools: true,
|
||||
minRamGb: 16,
|
||||
minDiskGb: 8,
|
||||
approxDownloadGb: 3.5,
|
||||
},
|
||||
'tool-tiny': {
|
||||
id: 'tool-tiny',
|
||||
label: 'Tool-tiny',
|
||||
description: 'Llama tool-calling 1B fallback if Qwen tools misbehave.',
|
||||
chatModel: 'LLAMA_TOOL_CALLING_1B_INST_Q4_K',
|
||||
embedModel: null,
|
||||
tools: true,
|
||||
minRamGb: 6,
|
||||
minDiskGb: 3,
|
||||
approxDownloadGb: 1,
|
||||
},
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {{ totalRamBytes?: number, freeDiskBytes?: number }} hw
|
||||
* @returns {QvacProfileId}
|
||||
*/
|
||||
export function suggestProfile(hw = {}) {
|
||||
const ramGb = (Number(hw.totalRamBytes) || 0) / 1e9
|
||||
if (ramGb >= 16) return 'strong'
|
||||
if (ramGb >= 8) return 'recommended'
|
||||
if (ramGb >= 4) return 'lite'
|
||||
return 'lite'
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {QvacProfileId|string} id
|
||||
* @returns {QvacProfile}
|
||||
*/
|
||||
export function getProfile(id) {
|
||||
return QVAC_PROFILES[id] || QVAC_PROFILES.recommended
|
||||
}
|
||||
|
||||
export const PROFILE_LIST = Object.values(QVAC_PROFILES)
|
||||
Reference in New Issue
Block a user