| import { CircleQuestionMark, Pen, Sparkles } from "lucide-react"; | |
| import { createElement } from "react"; | |
| export interface Model { | |
| modelId: string; | |
| title: string; | |
| dtype: "fp16" | "q4" | "q4f16" | "fp32"; | |
| device: "webgpu"; | |
| size: number; | |
| files: Record<string, number>; | |
| } | |
| export const MODELS: Record<string, Model> = { | |
| apertus8BInstruct2509q4f16: { | |
| modelId: "onnx-community/Apertus-8B-Instruct-2509-ONNX", | |
| title: "Apertus 8B Instruct 2509 (q4f16)", | |
| dtype: "q4f16", | |
| device: "webgpu", | |
| size: 4_674_168_403, | |
| files: { | |
| "config.json": 1_193, | |
| "generation_config.json": 141, | |
| "onnx/model_q4f16.onnx": 647_453, | |
| "onnx/model_q4f16.onnx_data_1": 2_092_630_016, | |
| "onnx/model_q4f16.onnx_data_2": 487_391_232, | |
| "onnx/model_q4f16.onnx_data": 2_093_498_368, | |
| }, | |
| }, | |
| apertus8BInstruct2509q4: { | |
| modelId: "onnx-community/Apertus-8B-Instruct-2509-ONNX", | |
| title: "Apertus 8B Instruct 2509 (q4)", | |
| dtype: "q4", | |
| device: "webgpu", | |
| size: 5_194_104_473, | |
| files: { | |
| "config.json": 1_193, | |
| "generation_config.json": 141, | |
| "onnx/model_q4.onnx_data_2": 1_015_676_928, | |
| "onnx/model_q4.onnx": 489_827, | |
| "onnx/model_q4.onnx_data": 2_082_095_104, | |
| "onnx/model_q4.onnx_data_1": 2_095_841_280, | |
| }, | |
| }, | |
| gemma3270m: { | |
| modelId: "onnx-community/gemma-3-270m-it-ONNX", | |
| title: "Gemma-3-270M (fp32)", | |
| dtype: "fp32", | |
| device: "webgpu", | |
| size: 1_161_186_669, | |
| files: { | |
| "config.json": 1_612, | |
| "tokenizer_config.json": 1_158_469, | |
| "tokenizer.json": 20_323_106, | |
| "generation_config.json": 172, | |
| "onnx/model.onnx": 201_742, | |
| "onnx/model.onnx_data": 1_139_501_568, | |
| }, | |
| }, | |
| granite350m: { | |
| modelId: "onnx-community/granite-4.0-350m-ONNX-web", | |
| title: "Granite-4.0 350M (fp16)", | |
| dtype: "fp16", | |
| device: "webgpu", | |
| size: 713_314_692, | |
| files: { | |
| "config.json": 2_018, | |
| "tokenizer.json": 4_131_199, | |
| "tokenizer_config.json": 24_271, | |
| "generation_config.json": 147, | |
| "onnx/model_fp16.onnx": 202_945, | |
| "onnx/model_fp16.onnx_data": 708_954_112, | |
| }, | |
| }, | |
| granite1B: { | |
| modelId: "onnx-community/granite-4.0-1b-ONNX-web", | |
| title: "Granite-4.0 1B (q4)", | |
| dtype: "q4", | |
| device: "webgpu", | |
| size: 1_785_693_098, | |
| files: { | |
| "tokenizer.json": 4_131_199, | |
| "tokenizer_config.json": 24_271, | |
| "config.json": 2_223, | |
| "onnx/model_q4.onnx": 389_658, | |
| "generation_config.json": 147, | |
| "onnx/model_q4.onnx_data": 1_781_145_600, | |
| }, | |
| }, | |
| granite3B: { | |
| modelId: "onnx-community/granite-4.0-micro-ONNX-web", | |
| title: "Granite-4.0 3B (q4f16)", | |
| dtype: "q4f16", | |
| device: "webgpu", | |
| size: 2_305_015_400, | |
| files: { | |
| "tokenizer.json": 4_131_199, | |
| "tokenizer_config.json": 23_947, | |
| "config.json": 2_149, | |
| "onnx/model_q4f16.onnx_data": 2_088_129_536, | |
| "onnx/model_q4f16.onnx": 391_777, | |
| "onnx/model_q4f16.onnx_data_1": 212_336_640, | |
| "generation_config.json": 152, | |
| }, | |
| }, | |
| qwen34B: { | |
| modelId: "onnx-community/Qwen3-4B-ONNX", | |
| title: "Qwen3-4B (q4f16)", | |
| dtype: "q4f16", | |
| device: "webgpu", | |
| size: 2_842_047_473, | |
| files: { | |
| "tokenizer.json": 9_117_040, | |
| "tokenizer_config.json": 9_761, | |
| "config.json": 1_780, | |
| "onnx/model_q4f16.onnx": 59_762_833, | |
| "generation_config.json": 219, | |
| "onnx/model_q4f16.onnx_data_1": 677_150_720, | |
| "onnx/model_q4f16.onnx_data": 2_096_005_120, | |
| }, | |
| }, | |
| smolLM33B: { | |
| modelId: "HuggingFaceTB/SmolLM3-3B-ONNX", | |
| title: "SmolLM3-3B (q4f16)", | |
| dtype: "q4f16", | |
| device: "webgpu", | |
| size: 2_136_257_855, | |
| files: { | |
| "tokenizer.json": 11_574_059, | |
| "tokenizer_config.json": 56_256, | |
| "config.json": 2_056, | |
| "onnx/model_q4f16.onnx": 301_534, | |
| "generation_config.json": 182, | |
| "onnx/model_q4f16.onnx_data": 2_124_320_768, | |
| }, | |
| }, | |
| } as const; | |
| export type ModelKey = keyof typeof MODELS; | |
| export const DEFAULT_SYSTEM_PROMPT = "You are a helpful AI Assistant"; | |
| export const CONVERSATION_STARTERS = [ | |
| { | |
| category: "Getting Started", | |
| icon: createElement(Pen), | |
| prompts: [ | |
| "Tell me something about yourself. Who are you and who trained you?", | |
| "What can you help me with today?", | |
| "Explain how you work in simple terms", | |
| "What are your strengths and limitations?", | |
| ], | |
| }, | |
| { | |
| category: "Creative Writing", | |
| icon: createElement(Sparkles), | |
| prompts: [ | |
| "Write a short story about a robot discovering emotions", | |
| "Create a character profile for a friendly neighborhood baker", | |
| "Give me 3 creative writing prompts for short stories", | |
| "Write a dialogue between two friends planning a road trip", | |
| ], | |
| }, | |
| { | |
| category: "Everyday Help", | |
| icon: createElement(CircleQuestionMark), | |
| prompts: [ | |
| "Help me write a polite email to reschedule a meeting", | |
| "Give me 5 tips for staying productive while working from home", | |
| "Suggest some healthy meal ideas for busy weekdays", | |
| "How do I organize my daily tasks more effectively?", | |
| ], | |
| }, | |
| ]; | |