Spaces:
Runtime error
Runtime error
Rm advanced options for config
Browse filesFiles changed (3)
2 unmodified lines345678934 unmodified lines44454647484950515253545556575859606162636465666768697071727374757677787980818283842 unmodified linesimport {GENERATION_CONFIG_KEYS,GENERATION_CONFIG_KEYS_ADVANCED,GENERATION_CONFIG_SETTINGS,} from "./generationConfigSettings";34 unmodified lines</div>{/each}<details><summary>Advanced Options</summary><div class="mt-4 flex flex-col gap-y-5">{#each GENERATION_CONFIG_KEYS_ADVANCED as key}{@const settings = GENERATION_CONFIG_SETTINGS[key]}<div><div class="flex items-center justify-between"><label for="temperature-range" class="mb-2 block text-sm font-medium text-gray-900 dark:text-white">{settings.label}</label><inputtype="number"class="w-18 rounded border bg-transparent px-1 py-0.5 text-right text-sm dark:border-gray-700"min={settings.min}max={settings.max}step={settings.step}value={conversation.config[key] ?? settings.default}on:input={e => (conversation.config[key] = Number(e.currentTarget.value))}/></div><inputid="temperature-range"type="range"min={settings.min}max={settings.max}step={settings.step}value={conversation.config[key] ?? settings.default}on:input={e => (conversation.config[key] = Number(e.currentTarget.value))}class="h-2 w-full cursor-pointer appearance-none rounded-lg bg-gray-200 accent-black dark:bg-gray-700 dark:accent-blue-500"/></div>{/each}</div></details><div class="mt-2"><label class="flex cursor-pointer items-center justify-between"><input type="checkbox" bind:checked={conversation.streaming} class="peer sr-only" />2 unmodified lines34567834 unmodified lines4344454647482 unmodified linesimport {GENERATION_CONFIG_KEYS,GENERATION_CONFIG_SETTINGS,} from "./generationConfigSettings";34 unmodified lines</div>{/each}<div class="mt-2"><label class="flex cursor-pointer items-center justify-between"><input type="checkbox" bind:checked={conversation.streaming} class="peer sr-only" />
31 unmodified lines32333435363738394031 unmodified linesexport type GenerationConfigKey = keyof typeof GENERATION_CONFIG_SETTINGS;export const GENERATION_CONFIG_KEYS: GenerationConfigKey[] = ["temperature", "max_tokens"];export const GENERATION_CONFIG_KEYS_ADVANCED: GenerationConfigKey[] = ["top_p"];export type GenerationConfig = Record<GenerationConfigKey, number>;31 unmodified lines3233343536373831 unmodified linesexport type GenerationConfigKey = keyof typeof GENERATION_CONFIG_SETTINGS;export const GENERATION_CONFIG_KEYS: GenerationConfigKey[] = ["temperature", "max_tokens", "top_p"];export type GenerationConfig = Record<GenerationConfigKey, number>;
22 unmodified lines2324252627282922 unmodified lines},});if (!res.ok) {console.error("Error fetching tokenizer file", res.status, res.statusText);return null; // Ignore failed requests by returning null}const tokenizerConfig = await res.json();22 unmodified lines2324252627282922 unmodified lines},});if (!res.ok) {console.error(`Error fetching tokenizer file for ${model.id}`, res.status, res.statusText);return null; // Ignore failed requests by returning null}const tokenizerConfig = await res.json();
src/lib/components/InferencePlayground/InferencePlaygroundGenerationConfig.svelte-36
src/lib/components/InferencePlayground/generationConfigSettings.ts+1-3
src/routes/+page.server.ts+1-1