Spaces:
Runtime error
Runtime error
featued models and other models
Browse filesFiles changed (2)
2 unmodified lines34567819 unmodified lines28293031323318 unmodified lines52535455565758596061626364656667686970717273747576777879802 unmodified linesimport { createEventDispatcher } from "svelte";import IconSearch from "../Icons/IconSearch.svelte";import IconStar from "../Icons/IconStar.svelte";19 unmodified linesdispatch("close");}}</script><svelte:window on:keydown={handleKeydown} />18 unmodified lines<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"><IconStar classNames="lucide lucide-star mr-2 h-4 w-4 text-yellow-400" /><span class="inline-flex items-center"><span class="text-gray-500">meta-llama</span><span class="mx-1 text-black">/</span><spanclass="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"><IconStar classNames="lucide lucide-star mr-2 h-4 w-4 text-yellow-400" /><span class="inline-flex items-center"><span class="text-gray-500">mistralai</span><span class="mx-1 text-black">/</span><spanclass="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>{#each models as model}{@const [nameSpace, modelName] = model.id.split("/")}<buttonclass="flex cursor-pointer items-center px-2 py-1.5 text-sm hover:bg-gray-100"2 unmodified lines345678919 unmodified lines29303132333435363718 unmodified lines5657585960616263646566676869707172737475767778798081828384852 unmodified linesimport { createEventDispatcher } from "svelte";import { FEATUED_MODELS_IDS } from "./inferencePlaygroundUtils";import IconSearch from "../Icons/IconSearch.svelte";import IconStar from "../Icons/IconStar.svelte";19 unmodified linesdispatch("close");}}$: featuredModels = models.filter(m => FEATUED_MODELS_IDS.includes(m.id));$: otherModels = models.filter(m => !FEATUED_MODELS_IDS.includes(m.id));</script><svelte:window on:keydown={handleKeydown} />18 unmodified lines<div class="p-1"><div class="px-2 py-1.5 text-xs font-medium text-gray-500">Trending</div><div>{#each featuredModels as model}{@const [nameSpace, modelName] = model.id.split("/")}<buttonclass="flex cursor-pointer items-center px-2 py-1.5 text-sm hover:bg-gray-100"on:click={() => {dispatch("modelSelected", model.id);dispatch("close");}}><IconStar classNames="lucide lucide-star mr-2 h-4 w-4 text-yellow-400" /><span class="inline-flex items-center"><span class="text-gray-500">{nameSpace}</span><span class="mx-1 text-black">/</span><spanclass="text-black">{modelName}</span></span></button>{/each}</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>{#each otherModels as model}{@const [nameSpace, modelName] = model.id.split("/")}<buttonclass="flex cursor-pointer items-center px-2 py-1.5 text-sm hover:bg-gray-100"
60 unmodified lines61626360 unmodified linesexport function isSystemPromptSupported(model: ModelEntryWithTokenizer) {return model.tokenizerConfig?.chat_template?.includes("system");}60 unmodified lines61626364656667686960 unmodified linesexport function isSystemPromptSupported(model: ModelEntryWithTokenizer) {return model.tokenizerConfig?.chat_template?.includes("system");}export const FEATUED_MODELS_IDS = ["meta-llama/Meta-Llama-3-70B-Instruct","google/gemma-1.1-7b-it","mistralai/Mixtral-8x7B-Instruct-v0.1",];
src/lib/components/InferencePlayground/InferencePlaygroundModelSelectorModal.svelte+21-16
src/lib/components/InferencePlayground/inferencePlaygroundUtils.ts+6