Spaces:
Sleeping
Sleeping
Merge pull request #1 from huggingface/list_currently_running_models
Browse filesFiles changed (5)
29 unmodified lines30313233343529 unmodified lines},"type": "module","dependencies": {"@huggingface/inference": "^2.7.0","@tailwindcss/container-queries": "^0.1.1"}29 unmodified lines3031323334353629 unmodified lines},"type": "module","dependencies": {"@huggingface/hub": "^0.15.1","@huggingface/inference": "^2.7.0","@tailwindcss/container-queries": "^0.1.1"}
4 unmodified lines5678910269 unmodified lines280281282283284285757 unmodified lines1043104410451046104710484 unmodified linesexcludeLinksFromLockfile: falsedependencies:'@huggingface/inference':specifier: ^2.7.0version: 2.7.0269 unmodified linesdev: trueoptional: true/@huggingface/inference@2.7.0:resolution: {integrity: sha512-u7Fn637Q3f7nUB1tajM4CgzhvoFQkOQr5W5Fm+2wT9ETgGoLBh25BLlYPTJRjAd2WY01s71v0lqAwNvHHCc3mg==}engines: {node: '>=18'}757 unmodified linesresolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==}dev: true/hasown@2.0.2:resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==}engines: {node: '>= 0.4'}4 unmodified lines5678910111213269 unmodified lines283284285286287288289290291292293294295296757 unmodified lines10541055105610571058105910601061106210634 unmodified linesexcludeLinksFromLockfile: falsedependencies:'@huggingface/hub':specifier: ^0.15.1version: 0.15.1'@huggingface/inference':specifier: ^2.7.0version: 2.7.0269 unmodified linesdev: trueoptional: true/@huggingface/hub@0.15.1:resolution: {integrity: sha512-uHb4aFkJDoGfLeRHfFTjkI36Z8IV6Z1c+KzhMDqUSC56opyr7Mn1Nsx7Rri/C7KDwROhQfBp/fOOqqjTzn6Cgg==}engines: {node: '>=18'}dependencies:'@huggingface/tasks': 0.10.19hash-wasm: 4.11.0dev: false/@huggingface/inference@2.7.0:resolution: {integrity: sha512-u7Fn637Q3f7nUB1tajM4CgzhvoFQkOQr5W5Fm+2wT9ETgGoLBh25BLlYPTJRjAd2WY01s71v0lqAwNvHHCc3mg==}engines: {node: '>=18'}757 unmodified linesresolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==}dev: true/hash-wasm@4.11.0:resolution: {integrity: sha512-HVusNXlVqHe0fzIzdQOGolnFN6mX/fqcrSAOcTBXdvzrXVHwTz11vXeKRmkR5gTuwVpvHZEIyKoePDvuAR+XwQ==}dev: false/hasown@2.0.2:resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==}engines: {node: '>= 0.4'}
9 unmodified lines101112131415161718192021222324252627282930313233343536373839404124 unmodified lines666768697071352 unmodified lines4244254264274284294309 unmodified linesimport PlaygroundOptions from '$lib/components/Playground/PlaygroundOptions.svelte';import PlaygroundTokenModal from './PlaygroundTokenModal.svelte';import PlaygroundModelSelector from './PlaygroundModelSelector.svelte';import { onDestroy } from 'svelte';const compatibleModels: string[] = ['01-ai/Yi-1.5-34B-Chat','codellama/CodeLlama-34b-Instruct-hf','CohereForAI/c4ai-command-r-plus','google/gemma-1.1-2b-it','google/gemma-1.1-7b-it','google/gemma-2-27b-it','HuggingFaceH4/zephyr-7b-beta','HuggingFaceH4/zephyr-orpo-141b-A35b-v0.1','HuggingFaceM4/idefics-9b-instruct','meta-llama/Llama-2-13b-chat-hf','meta-llama/Llama-2-70b-chat-hf','meta-llama/Llama-2-7b-chat-hf','meta-llama/Meta-Llama-3-70B-Instruct','meta-llama/Meta-Llama-3-8B-Instruct','microsoft/Phi-3-mini-4k-instruct','mistralai/Mistral-7B-Instruct-v0.1','mistralai/Mistral-7B-Instruct-v0.2','mistralai/Mistral-7B-Instruct-v0.3','mistralai/Mixtral-8x7B-Instruct-v0.1','tiiuae/falcon-7b-instruct'];const startMessages: Message[] = [{ role: 'user', content: '' }];24 unmodified lineslet messageContainer: HTMLDivElement | null = null;let abortController: AbortController | null = null;onDestroy(() => {if (abortController) {abortController.abort();352 unmodified lines}}>{#each compatibleModels as model}<option value={model}>{model}</option>{/each}</select></div>9 unmodified lines1011121314151617181924 unmodified lines4445464748495051525354555657352 unmodified lines4104114124134144154169 unmodified linesimport PlaygroundOptions from '$lib/components/Playground/PlaygroundOptions.svelte';import PlaygroundTokenModal from './PlaygroundTokenModal.svelte';import PlaygroundModelSelector from './PlaygroundModelSelector.svelte';import { onDestroy, onMount } from 'svelte';import { type ModelEntry } from "@huggingface/hub";let compatibleModels: ModelEntry[] = [];const startMessages: Message[] = [{ role: 'user', content: '' }];24 unmodified lineslet messageContainer: HTMLDivElement | null = null;let abortController: AbortController | null = null;onMount(() => {(async () => {// TODO: use hfjs.hub listModels after https://github.com/huggingface/huggingface.js/pull/795const res = await fetch("https://huggingface.co/api/models?pipeline_tag=text-generation&inferenceStatus=loaded&filter=conversational");compatibleModels = await res.json() as ModelEntry[];})();})onDestroy(() => {if (abortController) {abortController.abort();352 unmodified lines}}>{#each compatibleModels as model}<option value={model.id}>{model.id}</option>{/each}</select></div>
1234510 unmodified lines16171819202122<script lang="ts">export let compatibleModels: string[] = [];export let currentModel = compatibleModels[0];export let disabled = false;</script>10 unmodified linesclass="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">{#each compatibleModels as model}<option value={model}>{model}</option>{/each}</select></div>123456710 unmodified lines18192021222324<script lang="ts">import { type ModelEntry } from "@huggingface/hub";export let compatibleModels: ModelEntry[] = [];export let currentModel = compatibleModels[0];export let disabled = false;</script>10 unmodified linesclass="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">{#each compatibleModels as model}<option value={model.id}>{model.id}</option>{/each}</select></div>
12310 unmodified lines14151617181920type Message = {role: string;content: string;10 unmodified linestype Conversation = {id: string;model: Model;config: ModelConfig;messages: Message[];};1234510 unmodified lines16171819202122import type { ModelEntry } from "@huggingface/hub";type Message = {role: string;content: string;10 unmodified linestype Conversation = {id: string;model: ModelEntry;config: ModelConfig;messages: Message[];};
package.json+1
pnpm-lock.yaml+15
src/lib/components/Playground/Playground.svelte+12-26
src/lib/components/Playground/PlaygroundModelSelector.svelte+4-2
src/lib/types/index.d.ts+3-1