lfm25-230m-webgpu / src /model.ts
Codex
Add browser diagnostics
e2d05a7
Raw
History Blame Contribute Delete
1.31 kB
export const MODEL_ID = "LiquidAI/LFM2.5-230M-ONNX";
export const DEFAULT_SYSTEM_PROMPT =
"You are a concise assistant trained by Liquid AI. Prefer direct answers and preserve structured output when requested.";
export const DEFAULT_PROMPT =
"Extract the candidate name, current status, role, and interview date from this note as JSON:\n\nCandidate ID 12345 is currently in the Interview Scheduled stage for the Clinical Research Associate position, with an interview date set for 2023-11-20.";
export const PRESETS = [
{
id: "extract",
label: "Extract JSON",
prompt: DEFAULT_PROMPT,
},
{
id: "brief",
label: "Brief Answer",
prompt: "What is WebGPU useful for in browser-based machine learning?",
},
{
id: "agent",
label: "Tool Call",
prompt:
"A user asks: What is the current status of candidate ID 12345? Return the most likely tool call in a compact Pythonic function-call style.",
},
] as const;
export type Precision = "q4" | "fp16";
export type GenerationSettings = {
precision: Precision;
maxNewTokens: number;
temperature: number;
topK: number;
repetitionPenalty: number;
};
export const DEFAULT_SETTINGS: GenerationSettings = {
precision: "q4",
maxNewTokens: 1024,
temperature: 0.1,
topK: 50,
repetitionPenalty: 1.05,
};