File size: 5,119 Bytes
832660f 9b72f0d db78b1a 9b72f0d db78b1a 9b72f0d db78b1a 9b72f0d 832660f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 |
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?",
],
},
];
|