| |
| |
| |
| |
|
|
| export interface ModelSpec { |
| id: string; |
| label: string; |
| repo: string; |
| dtype: 'q4f16' | 'q4' | 'int8' | 'fp16' | 'fp32'; |
| approxSizeMB: number; |
| |
| chatTemplateOptions?: Record<string, unknown>; |
| notes?: string; |
| } |
|
|
| export const MODELS: ModelSpec[] = [ |
| { |
| id: 'qwen3-0.6b', |
| label: 'Qwen3-0.6B (q4f16, ~570MB)', |
| repo: 'onnx-community/Qwen3-0.6B-ONNX', |
| dtype: 'q4f16', |
| approxSizeMB: 570, |
| |
| chatTemplateOptions: { enable_thinking: false }, |
| }, |
| { |
| id: 'qwen2.5-0.5b', |
| label: 'Qwen2.5-0.5B-Instruct (q4f16, ~483MB)', |
| repo: 'onnx-community/Qwen2.5-0.5B-Instruct', |
| dtype: 'q4f16', |
| approxSizeMB: 483, |
| }, |
| { |
| id: 'smollm2-360m', |
| label: 'SmolLM2-360M-Instruct (q4f16, ~273MB)', |
| repo: 'HuggingFaceTB/SmolLM2-360M-Instruct', |
| dtype: 'q4f16', |
| approxSizeMB: 273, |
| notes: 'English-centric; lightest reasonable option.', |
| }, |
| ]; |
|
|
| export const DEFAULT_MODEL_ID = 'qwen3-0.6b'; |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| export const EMBEDDING_MODEL = { |
| repo: 'onnx-community/embeddinggemma-300m-ONNX', |
| dim: 768, |
| approxSizeMB: 167, |
| |
| |
| |
| |
| |
| clusteringPrefix: 'task: clustering | query: ', |
| |
| |
| |
| |
| |
| dtype: 'q4' as const, |
| }; |
|
|
| export function getModelSpec(id: string): ModelSpec { |
| const m = MODELS.find((m) => m.id === id); |
| if (!m) throw new Error(`Unknown model id: ${id}`); |
| return m; |
| } |
|
|