Spaces:
Runtime error
Runtime error
Rm advanced options for config
Browse filesFiles changed (3)
2 unmodified lines345667834 unmodified lines43444547484950515253545556575859606162636465666768697071727374757677787980814647482 unmodified lines
import { 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 > <input type="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> <input id="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" />31 unmodified lines3233343536373536373831 unmodified lines
export 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 const GENERATION_CONFIG_KEYS: GenerationConfigKey[] = ["temperature", "max_tokens", "top_p"];
export type GenerationConfig = Record<GenerationConfigKey, number>;
22 unmodified lines232425262627282922 unmodified lines }, }); if (!res.ok) { console.error("Error fetching tokenizer file", res.status, res.statusText); 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