mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-18 09:29:41 +02:00
New shared package for browser-based LLM inference using Qwen 2.5 1.5B via WebLLM. Includes Svelte 5 reactive stores, engine management, and type definitions for local AI features without server roundtrips. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
27 lines
752 B
TypeScript
27 lines
752 B
TypeScript
import type { ModelConfig } from './types';
|
|
|
|
/**
|
|
* Pre-configured models for client-side inference.
|
|
* All models are quantized for browser use via WebLLM/MLC.
|
|
*/
|
|
|
|
export const MODELS = {
|
|
/** Default model — fast, good at structured output, multilingual */
|
|
'qwen-2.5-1.5b': {
|
|
modelId: 'Qwen2.5-1.5B-Instruct-q4f16_1-MLC',
|
|
displayName: 'Qwen 2.5 1.5B',
|
|
downloadSizeMb: 1000,
|
|
ramUsageMb: 1800,
|
|
},
|
|
/** Smaller variant for low-end devices */
|
|
'qwen-2.5-0.5b': {
|
|
modelId: 'Qwen2.5-0.5B-Instruct-q4f16_1-MLC',
|
|
displayName: 'Qwen 2.5 0.5B',
|
|
downloadSizeMb: 400,
|
|
ramUsageMb: 800,
|
|
},
|
|
} as const satisfies Record<string, ModelConfig>;
|
|
|
|
export type ModelKey = keyof typeof MODELS;
|
|
|
|
export const DEFAULT_MODEL: ModelKey = 'qwen-2.5-1.5b';
|