Skip to content

Commit 58eb9d1

Browse files
committed
padding & auto switch to valid snippet
1 parent f9fa0a5 commit 58eb9d1

File tree

3 files changed

+84
-69
lines changed

3 files changed

+84
-69
lines changed

src/lib/components/inference-playground/code-snippets.svelte

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,18 @@
114114
http: getSnippet({ lang: "sh", tokenStr, conversation }),
115115
} as Record<Language, GetInferenceSnippetReturn>);
116116
117+
// Auto-switch to available language if current one has no snippets
118+
$effect(() => {
119+
const currentSnippets = snippetsByLang[lang];
120+
if (currentSnippets.length) return;
121+
122+
// Find first language with available snippets
123+
const availableLanguage = keys(labelsByLanguage).find(l => snippetsByLang[l] && snippetsByLang[l].length > 0);
124+
if (availableLanguage) {
125+
lang = availableLanguage;
126+
}
127+
});
128+
117129
const selectedSnippet = $derived(snippetsByLang[lang][selectedSnippetIdxByLang[lang]]);
118130
119131
const installInstructions = $derived.by(function getInstallInstructions(): InstallInstructions | undefined {

src/lib/components/inference-playground/message-textarea.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
<svelte:window onkeydown={onKeydown} />
3232

33-
<div class="mt-auto px-2">
33+
<div class="mt-auto px-2 pt-1">
3434
<label
3535
class="flex w-full items-end rounded-[32px] bg-gray-200 p-2 pl-6 outline-gray-400 focus-within:outline-2 dark:bg-gray-800"
3636
>

src/lib/data/context_length.json

Lines changed: 71 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"DeepSeek-R1-Distill-Llama-70B": 131072,
66
"DeepSeek-V3-0324": 32768,
77
"E5-Mistral-7B-Instruct": 4096,
8+
"Llama-3.3-Swallow-70B-Instruct-v0.4": 131072,
89
"Llama-4-Maverick-17B-128E-Instruct": 131072,
910
"Meta-Llama-3.1-8B-Instruct": 16384,
1011
"Meta-Llama-3.3-70B-Instruct": 131072,
@@ -66,17 +67,19 @@
6667
"stability-ai/sdxl": 0
6768
},
6869
"novita": {
69-
"deepseek/deepseek-r1-0528": 163840,
7070
"deepseek/deepseek-v3-0324": 163840,
71+
"moonshotai/kimi-k2-instruct": 131072,
72+
"deepseek/deepseek-r1-0528": 163840,
7173
"baidu/ernie-4.5-vl-424b-a47b": 123000,
7274
"baidu/ernie-4.5-300b-a47b-paddle": 123000,
7375
"qwen/qwen3-30b-a3b-fp8": 40960,
74-
"minimaxai/minimax-m1-80k": 128000,
76+
"minimaxai/minimax-m1-80k": 1000000,
7577
"deepseek/deepseek-r1-0528-qwen3-8b": 128000,
7678
"qwen/qwen3-32b-fp8": 40960,
7779
"qwen/qwen2.5-vl-72b-instruct": 32768,
7880
"qwen/qwen3-235b-a22b-fp8": 40960,
7981
"deepseek/deepseek-v3-turbo": 64000,
82+
"thudm/glm-4.1v-9b-thinking": 65536,
8083
"meta-llama/llama-4-maverick-17b-128e-instruct-fp8": 1048576,
8184
"google/gemma-3-27b-it": 32000,
8285
"deepseek/deepseek-r1-turbo": 64000,
@@ -111,7 +114,6 @@
111114
"qwen/qwen2.5-7b-instruct": 32000,
112115
"meta-llama/llama-3.2-1b-instruct": 131000,
113116
"meta-llama/llama-3.2-3b-instruct": 32768,
114-
"meta-llama/llama-3.1-8b-instruct-bf16": 8192,
115117
"sao10k/l31-70b-euryale-v2.2": 8192
116118
},
117119
"fal": {
@@ -158,113 +160,114 @@
158160
"c4ai-aya-vision-32b": 16384,
159161
"command-r": 132096,
160162
"command-r7b-12-2024": 132000,
163+
"command-a-vision": 128000,
161164
"command-r7b-arabic-02-2025": 128000,
162165
"command-light-nightly": 4096,
163166
"embed-english-v3.0": 512,
164167
"embed-multilingual-light-v3.0-image": 0,
165168
"embed-multilingual-v3.0-image": 0,
166-
"c4ai-aya-expanse-32b": 128000,
167-
"command": 4096
169+
"c4ai-aya-expanse-32b": 128000
168170
},
169171
"together": {
170-
"meta-llama/Llama-Vision-Free": 131072,
171-
"togethercomputer/m2-bert-80M-32k-retrieval": 32768,
172172
"cartesia/sonic": 0,
173-
"meta-llama/Meta-Llama-3-8B-Instruct-Lite": 8192,
174-
"intfloat/multilingual-e5-large-instruct": 514,
173+
"black-forest-labs/FLUX.1-kontext-pro": 0,
175174
"Alibaba-NLP/gte-modernbert-base": 8192,
175+
"Qwen/Qwen2.5-VL-72B-Instruct": 32768,
176+
"google/gemma-3-27b-it": 65536,
176177
"Qwen/Qwen3-235B-A22B-fp8-tput": 40960,
177-
"meta-llama/LlamaGuard-2-8b": 8192,
178-
"Qwen/Qwen2.5-Coder-32B-Instruct": 16384,
178+
"Salesforce/Llama-Rank-V1": 8192,
179+
"mistralai/Mistral-7B-Instruct-v0.3": 32768,
180+
"marin-community/marin-8b-instruct": 4096,
179181
"cartesia/sonic-2": 0,
180182
"togethercomputer/MoA-1": 32768,
181-
"meta-llama/Meta-Llama-3-70B-Instruct-Turbo": 8192,
182-
"eddie/Qwen3-32B": 32768,
183-
"meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo": 131072,
184-
"Qwen/QwQ-32B": 131072,
185-
"meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo": 131072,
186183
"meta-llama/Meta-Llama-Guard-3-8B": 8192,
187-
"arcee_ai/arcee-spotlight": 131072,
188-
"google/gemma-3-27b-it": 65536,
189-
"arcee-ai/AFM-4.5B-Preview": 65536,
190-
"meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo": 130815,
184+
"mistralai/Mistral-Small-24B-Instruct-2501": 32768,
185+
"Qwen/Qwen2-VL-72B-Instruct": 32768,
186+
"deepseek-ai/DeepSeek-R1-Distill-Llama-70B-free": 8192,
187+
"togethercomputer/m2-bert-80M-32k-retrieval": 32768,
188+
"deepseek-ai/DeepSeek-R1": 163840,
189+
"mixedbread-ai/Mxbai-Rerank-Large-V2": 32768,
190+
"meta-llama/Meta-Llama-3-8B-Instruct-Lite": 8192,
191191
"deepseek-ai/DeepSeek-V3": 131072,
192-
"lgai/exaone-3-5-32b-instruct": 32768,
192+
"togethercomputer/Refuel-Llm-V2": 16384,
193+
"moonshotai/Kimi-K2-Instruct": 131072,
194+
"togethercomputer/MoA-1-Turbo": 32768,
195+
"eddiehou/meta-llama/Llama-3.1-405B": 12000,
193196
"deepseek-ai/DeepSeek-R1-0528-tput": 163840,
194-
"mistralai/Mixtral-8x7B-Instruct-v0.1": 32768,
195-
"meta-llama/Llama-3-8b-chat-hf": 8192,
197+
"mistralai/Mistral-7B-Instruct-v0.2": 32768,
196198
"mistralai/Mistral-7B-Instruct-v0.1": 32768,
197-
"meta-llama/Llama-2-70b-hf": 4096,
198-
"togethercomputer/MoA-1-Turbo": 32768,
199-
"black-forest-labs/FLUX.1-kontext-max": 0,
199+
"serverless-qwen-qwen3-32b-fp8": 40960,
200+
"moz-llama-3-3-70b-instruct-turbo": 131072,
201+
"deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B": 131072,
202+
"nvidia/Llama-3.1-Nemotron-70B-Instruct-HF": 32768,
203+
"meta-llama/Llama-3.3-70B-Instruct-Turbo-Free": 131072,
204+
"meta-llama/Llama-Vision-Free": 131072,
205+
"meta-llama/Meta-Llama-3-70B-Instruct-Turbo": 8192,
206+
"google/gemma-3n-E4B-it": 32768,
207+
"arcee-ai/AFM-4.5B-Preview": 65536,
208+
"meta-llama/Llama-3.2-90B-Vision-Instruct-Turbo": 131072,
209+
"meta-llama/Llama-3.2-11B-Vision-Instruct-Turbo": 131072,
210+
"lgai/exaone-3-5-32b-instruct": 32768,
211+
"lgai/exaone-deep-32b": 32768,
212+
"meta-llama/Llama-3-70b-chat-hf": 8192,
213+
"meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo": 131072,
200214
"perplexity-ai/r1-1776": 163840,
201-
"mistralai/Mistral-7B-Instruct-v0.2": 32768,
202-
"deepseek-ai/DeepSeek-V3-p-dp": 131072,
203-
"Qwen/Qwen2-72B-Instruct": 32768,
204-
"mistralai/Mistral-7B-Instruct-v0.3": 32768,
205-
"NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO": 32768,
206-
"meta-llama/Llama-Guard-3-11B-Vision-Turbo": 131072,
207-
"Qwen/Qwen2-VL-72B-Instruct": 32768,
215+
"mistralai/Mixtral-8x7B-Instruct-v0.1": 32768,
208216
"scb10x/scb10x-llama3-1-typhoon2-70b-instruct": 8192,
217+
"meta-llama/Llama-Guard-3-11B-Vision-Turbo": 131072,
218+
"google/gemma-2-27b-it": 8192,
219+
"arcee-ai/arcee-blitz": 32768,
220+
"Qwen/QwQ-32B": 131072,
209221
"arcee-ai/maestro-reasoning": 131072,
222+
"deepseek-ai/DeepSeek-R1-Distill-Llama-70B": 131072,
223+
"Qwen/Qwen2-72B-Instruct": 32768,
224+
"meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo": 130815,
225+
"arcee-ai/virtuoso-large": 131072,
226+
"arcee_ai/arcee-spotlight": 131072,
227+
"arcee-ai/caller": 32768,
228+
"meta-llama/Llama-3.3-70B-Instruct-Turbo": 131072,
229+
"meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo": 131072,
230+
"togethercomputer/Refuel-Llm-V2-Small": 8192,
231+
"deepseek-ai/DeepSeek-R1-Distill-Qwen-14B": 131072,
210232
"meta-llama/Llama-3.2-3B-Instruct-Turbo": 131072,
211233
"arcee-ai/virtuoso-medium-v2": 131072,
234+
"meta-llama/Llama-3-8b-chat-hf": 8192,
235+
"Qwen/Qwen2.5-Coder-32B-Instruct": 16384,
212236
"arcee-ai/coder-large": 32768,
213-
"meta-llama/Llama-Guard-4-12B": 1048576,
214-
"deepseek-ai/DeepSeek-R1-Distill-Qwen-14B": 131072,
215-
"arcee-ai/virtuoso-large": 131072,
216-
"deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B": 131072,
217-
"deepseek-ai/DeepSeek-R1-Distill-Llama-70B": 131072,
218-
"nvidia/Llama-3.1-Nemotron-70B-Instruct-HF": 32768,
219-
"deepseek-ai/DeepSeek-R1-Distill-Llama-70B-free": 8192,
237+
"meta-llama/Llama-2-70b-hf": 4096,
238+
"Qwen/Qwen2.5-72B-Instruct-Turbo": 131072,
239+
"Qwen/Qwen2.5-7B-Instruct-Turbo": 32768,
240+
"NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO": 32768,
220241
"meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8": 1048576,
221-
"togethercomputer/Refuel-Llm-V2-Small": 8192,
222-
"togethercomputer/Refuel-Llm-V2": 16384,
223-
"Qwen/Qwen2.5-VL-72B-Instruct": 32768,
224242
"scb10x/scb10x-typhoon-2-1-gemma3-12b": 131072,
225-
"arcee-ai/caller": 32768,
226-
"lgai/exaone-deep-32b": 32768,
227-
"black-forest-labs/FLUX.1-kontext-pro": 0,
228-
"google/gemma-3n-E4B-it": 32768,
243+
"meta-llama/Llama-Guard-4-12B": 1048576,
244+
"qwen-qwen3-32b-fp8-serverless": 40960,
245+
"meta-llama/LlamaGuard-2-8b": 8192,
246+
"intfloat/multilingual-e5-large-instruct": 514,
229247
"meta-llama/Llama-4-Scout-17B-16E-Instruct": 1048576,
230-
"deepseek-ai/DeepSeek-R1": 163840,
231-
"Qwen/Qwen2.5-72B-Instruct-Turbo": 131072,
232-
"meta-llama/Llama-3.2-90B-Vision-Instruct-Turbo": 131072,
233-
"arcee-ai/arcee-blitz": 32768,
234-
"meta-llama/Llama-3.2-11B-Vision-Instruct-Turbo": 131072,
235-
"meta-llama/Llama-3-70b-chat-hf": 8192,
236-
"google/gemma-2-27b-it": 8192,
237-
"meta-llama/Llama-3.3-70B-Instruct-Turbo-Free": 131072,
238-
"Qwen/Qwen2.5-7B-Instruct-Turbo": 32768,
239-
"mistralai/Mistral-Small-24B-Instruct-2501": 32768,
240-
"Salesforce/Llama-Rank-V1": 8192,
241-
"meta-llama/Llama-3.3-70B-Instruct-Turbo": 131072,
242-
"marin-community/marin-8b-instruct": 4096,
243-
"Qwen/Qwen3-32B-FP8": 0
248+
"yan/deepseek-ai-deepseek-v3": 163839,
249+
"black-forest-labs/FLUX.1-kontext-max": 0,
250+
"moz/Llama-3.3-70B-Instruct-Turbo": 131072
244251
},
245252
"fireworks-ai": {
246-
"accounts/perplexity/models/r1-1776": 163840,
247253
"accounts/fireworks/models/deepseek-r1-0528": 163840,
248-
"accounts/fireworks/models/qwen3-30b-a3b": 40000,
249-
"accounts/fireworks/models/llama-guard-3-8b": 131072,
254+
"accounts/perplexity/models/r1-1776": 163840,
255+
"accounts/fireworks/models/qwen3-30b-a3b": 131072,
250256
"accounts/fireworks/models/llama4-scout-instruct-basic": 10485760,
251257
"accounts/fireworks/models/llama4-maverick-instruct-basic": 1048576,
252258
"accounts/fireworks/models/llama-v3p1-8b-instruct": 131072,
253259
"accounts/fireworks/models/firesearch-ocr-v6": 8192,
254260
"accounts/fireworks/models/llama-v3p1-405b-instruct": 131072,
255-
"accounts/fireworks/models/qwen2-vl-72b-instruct": 32768,
256261
"accounts/fireworks/models/mixtral-8x22b-instruct": 65536,
257-
"accounts/fireworks/models/qwen2p5-72b-instruct": 32768,
258262
"accounts/fireworks/models/deepseek-r1-basic": 163840,
259263
"accounts/fireworks/models/llama-v3p1-70b-instruct": 131072,
260-
"accounts/fireworks/models/qwen3-235b-a22b": 128000,
264+
"accounts/fireworks/models/qwen3-235b-a22b": 131072,
261265
"accounts/fireworks/models/llama-v3p3-70b-instruct": 131072,
262266
"accounts/fireworks/models/deepseek-r1": 163840,
263267
"accounts/sentientfoundation/models/dobby-unhinged-llama-3-3-70b-new": 131072,
264268
"accounts/sentientfoundation-serverless/models/dobby-mini-unhinged-plus-llama-3-1-8b": 131072,
265269
"accounts/fireworks/models/deepseek-v3": 131072,
266270
"accounts/fireworks/models/deepseek-v3-0324": 163840,
267-
"accounts/fireworks/models/qwq-32b": 131072,
268271
"accounts/fireworks/models/qwen2p5-vl-32b-instruct": 128000
269272
}
270273
}

0 commit comments

Comments
 (0)