Spaces:
Runtime error
Runtime error
maek it sep component
Browse filesFiles changed (2)
7 unmodified lines89101112132 unmodified lines16171819202122365 unmodified lines3883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696707 unmodified linesimport PlaygroundOptions from './InferencePlaygroundGenerationConfig.svelte';import PlaygroundTokenModal from './InferencePlaygroundHFTokenModal.svelte';import PlaygroundModelSelector from './InferencePlaygroundModelSelector.svelte';import Conversation from './InferencePlaygroundConversation.svelte';import { onDestroy } from 'svelte';import { type ChatCompletionInputMessage } from '@huggingface/tasks';2 unmodified linesimport IconShare from '../Icons/IconShare.svelte';import IconDelete from '../Icons/IconDelete.svelte';import IconCode from '../Icons/IconCode.svelte';import IconCaret from '../Icons/IconCaret.svelte';export let models: ModelEntryWithTokenizer[];365 unmodified lines{/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>7 unmodified lines8910111213142 unmodified lines171819202122365 unmodified lines3883893903917 unmodified linesimport PlaygroundOptions from './InferencePlaygroundGenerationConfig.svelte';import PlaygroundTokenModal from './InferencePlaygroundHFTokenModal.svelte';import PlaygroundModelSelector from './InferencePlaygroundModelSelector.svelte';import ModelPickerModal from './InferencePlaygroundModelPickerModal.svelte';import Conversation from './InferencePlaygroundConversation.svelte';import { onDestroy } from 'svelte';import { type ChatCompletionInputMessage } from '@huggingface/tasks';2 unmodified linesimport IconShare from '../Icons/IconShare.svelte';import IconDelete from '../Icons/IconDelete.svelte';import IconCode from '../Icons/IconCode.svelte';export let models: ModelEntryWithTokenizer[];365 unmodified lines{/if}</div><ModelPickerModal/>
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198<script lang="ts">
</script>
<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"> <div class="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"> <svg xmlns="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> <input autofocus class="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"> <svg xmlns="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" ><polygon points="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"> <svg xmlns="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" ><polygon points="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> </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><span class="text-black">Qwen2-0.5B-Instruct</span ></span > </div> </div> </div> </div> </div> </div></div>src/lib/components/InferencePlayground/InferencePlayground.svelte+2-281
src/lib/components/InferencePlayground/InferencePlaygroundModelPickerModal.svelteAdded+198