Spaces:
Runtime error
Runtime error
design
Browse filesFiles changed (3)
339 unmodified lines34034134234334434534616 unmodified lines36336436536636736836917 unmodified lines387388389339 unmodified linescompatibleModels={models}on:modelIdxChange={(e) => changeSelectedModel(e.detail)}/><divclass="group relative -mt-4 flex h-[26px] w-full items-center justify-center gap-2 rounded-lg bg-black px-5 text-sm text-white hover:bg-gray-900 focus:outline-none focus:ring-4 focus:ring-gray-300 dark:border-gray-700 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-gray-700">Compare with...16 unmodified lines<option value={model.id}>{model.id}</option>{/each}</select></div><PlaygroundOptions bind:conversation={conversations[0]} /><div class="mt-auto">17 unmodified lines</div>{/if}</div>339 unmodified lines34034134234334434534616 unmodified lines36336436536636736836917 unmodified lines387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670339 unmodified linescompatibleModels={models}on:modelIdxChange={(e) => changeSelectedModel(e.detail)}/><!-- <divclass="group relative -mt-4 flex h-[26px] w-full items-center justify-center gap-2 rounded-lg bg-black px-5 text-sm text-white hover:bg-gray-900 focus:outline-none focus:ring-4 focus:ring-gray-300 dark:border-gray-700 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-gray-700">Compare with...16 unmodified lines<option value={model.id}>{model.id}</option>{/each}</select></div> --><PlaygroundOptions bind:conversation={conversations[0]} /><div class="mt-auto">17 unmodified lines</div>{/if}</div><!-- only a html mockup --><div class="fixed inset-0 flex h-screen items-start justify-center bg-black/85 pt-32"><div class="flex w-full max-w-[600px] items-start justify-center p-10"><divclass="flex h-full w-full flex-col overflow-hidden rounded-lg border bg-white text-gray-900 shadow-md"><div class="flex items-center border-b px-3"><svgxmlns="http://www.w3.org/2000/svg"class="mr-2 text-sm"width="1em"height="1em"viewBox="0 0 24 24"fill="none"stroke="currentColor"stroke-width="2"stroke-linecap="round"stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><path d="m21 21-4.3-4.3"></path></svg><inputautofocusclass="flex h-10 w-full rounded-md bg-transparent py-3 text-sm placeholder-gray-400 outline-none"placeholder="Search models..."value=""/></div><div class="max-h-[300px] overflow-y-auto overflow-x-hidden"><div class="p-1"><div class="px-2 py-1.5 text-xs font-medium text-gray-500">Trending</div><div><div class="flex cursor-pointer items-center px-2 py-1.5 text-sm hover:bg-gray-100"><svgxmlns="http://www.w3.org/2000/svg"width="24"height="24"viewBox="0 0 24 24"fill="none"stroke="currentColor"stroke-width="2"stroke-linecap="round"stroke-linejoin="round"class="lucide lucide-star mr-2 h-4 w-4 text-yellow-400"><polygonpoints="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon></svg><span class="inline-flex items-center"><span class="text-gray-500">meta-llama</span><span class="mx-1 text-black">/</span><span class="text-black">Meta-Llama-3-70B-Instruct</span></span></div><div class="flex cursor-pointer items-center px-2 py-1.5 text-sm hover:bg-gray-100"><svgxmlns="http://www.w3.org/2000/svg"width="24"height="24"viewBox="0 0 24 24"fill="none"stroke="currentColor"stroke-width="2"stroke-linecap="round"stroke-linejoin="round"class="lucide lucide-star mr-2 h-4 w-4 text-yellow-400"><polygonpoints="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon></svg><span class="inline-flex items-center"><span class="text-gray-500">mistralai</span><span class="mx-1 text-black">/</span><span class="text-black">Mixtral-8x7B-Instruct-v0.1</span></span></div><div class="flex cursor-pointer items-center px-2 py-1.5 text-sm hover:bg-gray-100"><svgxmlns="http://www.w3.org/2000/svg"width="24"height="24"viewBox="0 0 24 24"fill="none"stroke="currentColor"stroke-width="2"stroke-linecap="round"stroke-linejoin="round"class="lucide lucide-star mr-2 h-4 w-4 text-yellow-400"><polygonpoints="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon></svg><span class="inline-flex items-center"><span class="text-gray-500">google</span><span class="mx-1 text-black">/</span><span class="text-black">gemma-1.1-7b-it</span></span></div><div class="flex cursor-pointer items-center px-2 py-1.5 text-sm hover:bg-gray-100"><svgxmlns="http://www.w3.org/2000/svg"width="24"height="24"viewBox="0 0 24 24"fill="none"stroke="currentColor"stroke-width="2"stroke-linecap="round"stroke-linejoin="round"class="lucide lucide-star mr-2 h-4 w-4 text-yellow-400"><polygonpoints="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon></svg><span class="inline-flex items-center"><span class="text-gray-500">01-ai</span><span class="mx-1 text-black">/</span><spanclass="text-black">Yi-1.5-34B-Chat</span></span></div><div class="flex cursor-pointer items-center px-2 py-1.5 text-sm hover:bg-gray-100"><svgxmlns="http://www.w3.org/2000/svg"width="24"height="24"viewBox="0 0 24 24"fill="none"stroke="currentColor"stroke-width="2"stroke-linecap="round"stroke-linejoin="round"class="lucide lucide-star mr-2 h-4 w-4 text-yellow-400"><polygonpoints="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon></svg><span class="inline-flex items-center"><span class="text-gray-500">microsoft</span><span class="mx-1 text-black">/</span><span class="text-black">Phi-3-mini-4k-instruct</span></span></div><div class="flex cursor-pointer items-center px-2 py-1.5 text-sm hover:bg-gray-100"><svgxmlns="http://www.w3.org/2000/svg"width="24"height="24"viewBox="0 0 24 24"fill="none"stroke="currentColor"stroke-width="2"stroke-linecap="round"stroke-linejoin="round"class="lucide lucide-star mr-2 h-4 w-4 text-yellow-400"><polygonpoints="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon></svg><span class="inline-flex items-center"><span class="text-gray-500">TinyLlama</span><span class="mx-1 text-black">/</span><span class="text-black">TinyLlama-1.1B-Chat-v1.0</span></span></div></div></div><div class="mx-1 h-px bg-gray-200"></div><div class="p-1"><div class="px-2 py-1.5 text-xs font-medium text-gray-500">Other Models</div><div><div class="flex cursor-pointer items-center px-2 py-1.5 text-sm hover:bg-gray-100"><span class="inline-flex items-center"><span class="text-gray-500">codellama</span><span class="mx-1 text-black">/</span><span class="text-black">CodeLlama-34b-Instruct-hf</span></span></div><div class="flex cursor-pointer items-center px-2 py-1.5 text-sm hover:bg-gray-100"><span class="inline-flex items-center"><span class="text-gray-500">google</span><span class="mx-1 text-black">/</span><span class="text-black">gemma-1.1-2b-it</span></span></div><div class="flex cursor-pointer items-center px-2 py-1.5 text-sm hover:bg-gray-100"><span class="inline-flex items-center"><span class="text-gray-500">google</span><span class="mx-1 text-black">/</span><span class="text-black">gemma-2b-it</span></span></div><div class="flex cursor-pointer items-center px-2 py-1.5 text-sm hover:bg-gray-100"><span class="inline-flex items-center"><span class="text-gray-500">HuggingFaceH4</span><span class="mx-1 text-black">/</span><span class="text-black">zephyr-7b-alpha</span></span></div><div class="flex cursor-pointer items-center px-2 py-1.5 text-sm hover:bg-gray-100"><span class="inline-flex items-center"><span class="text-gray-500">HuggingFaceH4</span><span class="mx-1 text-black">/</span><span class="text-black">zephyr-7b-beta</span></span></div><div class="flex cursor-pointer items-center px-2 py-1.5 text-sm hover:bg-gray-100"><span class="inline-flex items-center"><span class="text-gray-500">HuggingFaceH4</span><span class="mx-1 text-black">/</span><span class="text-black">zephyr-orpo-141b-A35b-v0.1</span></span></div><div class="flex cursor-pointer items-center px-2 py-1.5 text-sm hover:bg-gray-100"><span class="inline-flex items-center"><span class="text-gray-500">HuggingFaceTB</span><span class="mx-1 text-black">/</span><span class="text-black">SmolLM-1.7B-Instruct</span></span></div><div class="flex cursor-pointer items-center px-2 py-1.5 text-sm hover:bg-gray-100"><span class="inline-flex items-center"><span class="text-gray-500">meta-llama</span><span class="mx-1 text-black">/</span><span class="text-black">Llama-2-13b-chat-hf</span></span></div><div class="flex cursor-pointer items-center px-2 py-1.5 text-sm hover:bg-gray-100"><span class="inline-flex items-center"><span class="text-gray-500">meta-llama</span><span class="mx-1 text-black">/</span><span class="text-black">Llama-2-70b-chat-hf</span></span></div><div class="flex cursor-pointer items-center px-2 py-1.5 text-sm hover:bg-gray-100"><span class="inline-flex items-center"><span class="text-gray-500">meta-llama</span><span class="mx-1 text-black">/</span><span class="text-black">Llama-2-7b-chat-hf</span></span></div><div class="flex cursor-pointer items-center px-2 py-1.5 text-sm hover:bg-gray-100"><span class="inline-flex items-center"><span class="text-gray-500">meta-llama</span><span class="mx-1 text-black">/</span><span class="text-black">Meta-Llama-3-8B-Instruct</span></span></div><div class="flex cursor-pointer items-center px-2 py-1.5 text-sm hover:bg-gray-100"><span class="inline-flex items-center"><span class="text-gray-500">microsoft</span><span class="mx-1 text-black">/</span><span class="text-black">DialoGPT-large</span></span></div><div class="flex cursor-pointer items-center px-2 py-1.5 text-sm hover:bg-gray-100"><span class="inline-flex items-center"><span class="text-gray-500">mistralai</span><span class="mx-1 text-black">/</span><span class="text-black">Mistral-7B-Instruct-v0.1</span></span></div><div class="flex cursor-pointer items-center px-2 py-1.5 text-sm hover:bg-gray-100"><span class="inline-flex items-center"><span class="text-gray-500">mistralai</span><span class="mx-1 text-black">/</span><span class="text-black">Mistral-7B-Instruct-v0.2</span></span></div><div class="flex cursor-pointer items-center px-2 py-1.5 text-sm hover:bg-gray-100"><span class="inline-flex items-center"><span class="text-gray-500">mistralai</span><span class="mx-1 text-black">/</span><span class="text-black">Mistral-7B-Instruct-v0.3</span></span></div><div class="flex cursor-pointer items-center px-2 py-1.5 text-sm hover:bg-gray-100"><span class="inline-flex items-center"><span class="text-gray-500">NousResearch</span><span class="mx-1 text-black">/</span><span class="text-black">Nous-Hermes-2-Mixtral-8x7B-DPO</span></span></div><div class="flex cursor-pointer items-center px-2 py-1.5 text-sm hover:bg-gray-100"><span class="inline-flex items-center"><span class="text-gray-500">Qwen</span><span class="mx-1 text-black">/</span><spanclass="text-black">Qwen2-0.5B-Instruct</span></span></div></div></div></div></div></div></div>
12 unmodified lines1314151617181912 unmodified lines$: maxTokens = Math.min(modelMaxLength ?? GENERATION_CONFIG_SETTINGS['max_tokens'].max, 64_000);</script><div class="flex flex-col gap-y-5 {classNames}">{#each GENERATION_CONFIG_KEYS as key}{@const { label, min, step } = GENERATION_CONFIG_SETTINGS[key]}{@const max = key === 'max_tokens' ? maxTokens : GENERATION_CONFIG_SETTINGS[key].max}12 unmodified lines1314151617181912 unmodified lines$: maxTokens = Math.min(modelMaxLength ?? GENERATION_CONFIG_SETTINGS['max_tokens'].max, 64_000);</script><div class="flex flex-col gap-y-7 {classNames}">{#each GENERATION_CONFIG_KEYS as key}{@const { label, min, step } = GENERATION_CONFIG_SETTINGS[key]}{@const max = key === 'max_tokens' ? maxTokens : GENERATION_CONFIG_SETTINGS[key].max}
7 unmodified lines8910111213141516171819202122232425267 unmodified linesconst dispatch = createEventDispatcher<{ modelIdxChange: number }>();</script><div><labelfor="countries"class="mb-2 flex items-baseline text-sm font-medium text-gray-900 dark:text-white">Models<span class="ml-4 font-normal text-gray-400">{compatibleModels.length}</span></label><select{disabled}class="block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-500 dark:focus:ring-blue-500"on:change={(e) => dispatch('modelIdxChange', e.currentTarget.selectedIndex)}>{#each compatibleModels as model}<option value={model.id}>{model.id}</option>{/each}</select></div>7 unmodified lines89101112131415161718192021222324252627282930313233343536373839404142437 unmodified linesconst dispatch = createEventDispatcher<{ modelIdxChange: number }>();</script><div class="flex flex-col gap-2"><labelfor="countries"class="flex items-baseline text-sm font-medium text-gray-900 dark:text-white">Models<span class="ml-4 font-normal text-gray-400">{compatibleModels.length}</span></label><buttonclass="flex items-center gap-6 overflow-hidden whitespace-nowrap rounded-lg border bg-gray-100/80 px-3 py-1.5 leading-tight shadow dark:bg-gray-700"><div class="flex flex-col items-start"><div class="flex items-center gap-1 text-sm text-gray-500 dark:text-gray-300"><imgclass="size-3 flex-none rounded bg-gray-200 object-cover"src="https://cdn-avatars.huggingface.co/v1/production/uploads/646cf8084eefb026fb8fd8bc/oCTqufkdTkjyGodsx1vo1.png"alt=""/>meta-llama</div><div>Meta-Llama-3-70B-Instruct</div></div><div class="rounded bg-gray-100"><svgclass="text-xl"xmlns="http://www.w3.org/2000/svg"width="1em"height="1em"viewBox="0 0 24 24"><path fill="currentColor" d="M7.41 8.58L12 13.17l4.59-4.59L18 10l-6 6l-6-6z" /></svg></div></button></div>
src/lib/components/InferencePlayground/InferencePlayground.svelte+283-2
src/lib/components/InferencePlayground/InferencePlaygroundGenerationConfig.svelte+1-1
src/lib/components/InferencePlayground/InferencePlaygroundModelSelector.svelte+27-10