Skip to content

Commit 33e2c0d

Browse files
committed
ctrl g shortcut
1 parent 893b0be commit 33e2c0d

File tree

2 files changed

+26
-44
lines changed

2 files changed

+26
-44
lines changed

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

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import LocalToasts from "../local-toasts.svelte";
1717
import ImgPreview from "./img-preview.svelte";
1818
import { TEST_IDS } from "$lib/constants.js";
19+
import { cmdOrCtrl } from "$lib/utils/platform.js";
1920
2021
type Props = {
2122
conversation: ConversationClass;
@@ -103,6 +104,13 @@
103104
if (!message || !content) return;
104105
conversation.updateMessage({ index, message: { ...message, content } });
105106
}}
107+
onkeydown={e => {
108+
if ((e.ctrlKey || e.metaKey) && e.key === "g") {
109+
e.preventDefault();
110+
e.stopPropagation();
111+
onRegen?.();
112+
}
113+
}}
106114
placeholder="Enter {message?.role} message"
107115
class="grow resize-none overflow-hidden rounded-lg bg-transparent px-2 py-2.5 ring-gray-100 outline-none group-hover/message:ring-3 hover:bg-white focus:bg-white focus:ring-3 @2xl:px-3 dark:ring-gray-600 dark:hover:bg-gray-900 dark:focus:bg-gray-900"
108116
rows="1"
@@ -182,7 +190,15 @@
182190
<IconCustom icon={message.role === "user" ? "regen" : "refresh"} />
183191
</button>
184192
{/snippet}
185-
{regenLabel}
193+
<div class="flex items-center gap-2">
194+
{regenLabel}
195+
196+
<span
197+
class="inline-flex items-center gap-0.5 rounded-sm border border-white/20 bg-white/10 px-0.5 text-xs text-white/70"
198+
>
199+
{cmdOrCtrl}<span class="">G</span>
200+
</span>
201+
</div>
186202
</Tooltip>
187203

188204
<Tooltip>

src/lib/data/context_length.json

Lines changed: 9 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -21,61 +21,28 @@
2121
"nebius": {
2222
"meta-llama/Meta-Llama-3.1-8B-Instruct-fast": 131072,
2323
"meta-llama/Meta-Llama-3.1-8B-Instruct": 131072,
24-
"meta-llama/Meta-Llama-3.1-70B-Instruct-fast": 131072,
2524
"meta-llama/Meta-Llama-3.1-70B-Instruct": 131072,
2625
"meta-llama/Meta-Llama-3.1-405B-Instruct": 131072,
2726
"meta-llama/Llama-Guard-3-8B": 131072,
28-
"nvidia/Llama-3.1-Nemotron-70B-Instruct-HF-fast": 131072,
29-
"nvidia/Llama-3.1-Nemotron-70B-Instruct-HF": 131072,
3027
"nvidia/Llama-3_1-Nemotron-Ultra-253B-v1": 131072,
31-
"mistralai/Mistral-Nemo-Instruct-2407-fast": 128000,
3228
"mistralai/Mistral-Nemo-Instruct-2407": 128000,
33-
"mistralai/Mixtral-8x7B-Instruct-v0.1-fast": 32768,
34-
"mistralai/Mixtral-8x7B-Instruct-v0.1": 32768,
35-
"mistralai/Mixtral-8x22B-Instruct-v0.1-fast": 65536,
36-
"mistralai/Mixtral-8x22B-Instruct-v0.1": 65536,
37-
"allenai/OLMo-7B-Instruct-hf": 2048,
38-
"microsoft/Phi-3-mini-4k-instruct-fast": 4096,
39-
"microsoft/Phi-3-mini-4k-instruct": 4096,
40-
"microsoft/Phi-3-medium-128k-instruct-fast": 131072,
41-
"microsoft/Phi-3-medium-128k-instruct": 131072,
42-
"google/gemma-2-2b-it-fast": 8192,
4329
"google/gemma-2-2b-it": 8192,
4430
"google/gemma-2-9b-it-fast": 8192,
45-
"google/gemma-2-9b-it": 8192,
46-
"google/gemma-2-27b-it-fast": 8192,
47-
"google/gemma-2-27b-it": 8192,
48-
"deepseek-ai/DeepSeek-Coder-V2-Lite-Instruct-fast": 128000,
49-
"deepseek-ai/DeepSeek-Coder-V2-Lite-Instruct": 128000,
5031
"Qwen/Qwen2.5-Coder-7B-fast": 32768,
5132
"Qwen/Qwen2.5-Coder-7B": 32768,
52-
"Qwen/Qwen2.5-Coder-7B-Instruct-fast": 32768,
53-
"Qwen/Qwen2.5-Coder-7B-Instruct": 32768,
5433
"Qwen/Qwen2.5-Coder-32B-Instruct-fast": 131072,
5534
"Qwen/Qwen2.5-Coder-32B-Instruct": 131072,
5635
"Qwen/Qwen2.5-32B-Instruct-fast": 131072,
5736
"Qwen/Qwen2.5-32B-Instruct": 131072,
5837
"Qwen/Qwen2.5-72B-Instruct-fast": 131072,
5938
"Qwen/Qwen2.5-72B-Instruct": 131072,
6039
"Qwen/Qwen2-VL-72B-Instruct": 32768,
61-
"Qwen/Qwen2-VL-7B-Instruct": 32768,
62-
"llava-hf/llava-1.5-7b-hf": 4096,
63-
"llava-hf/llava-1.5-13b-hf": 4096,
64-
"aaditya/Llama3-OpenBioLLM-8B": 8192,
6540
"aaditya/Llama3-OpenBioLLM-70B": 8192,
6641
"BAAI/bge-en-icl": 32768,
6742
"BAAI/bge-multilingual-gemma2": 8192,
6843
"intfloat/e5-mistral-7b-instruct": 32768,
69-
"cognitivecomputations/dolphin-2.9.2-mixtral-8x22b": 65536,
70-
"microsoft/Phi-3.5-MoE-instruct": 131072,
71-
"microsoft/Phi-3.5-mini-instruct": 131072,
72-
"Qwen/Qwen2.5-1.5B-Instruct": 32768,
7344
"meta-llama/Llama-3.3-70B-Instruct": 131072,
7445
"meta-llama/Llama-3.3-70B-Instruct-fast": 131072,
75-
"meta-llama/Llama-3.2-1B-Instruct": 131072,
76-
"meta-llama/Llama-3.2-3B-Instruct": 131072,
77-
"Qwen/QwQ-32B-Preview": 32768,
78-
"Qwen/QVQ-72B-preview": 128000,
7946
"microsoft/phi-4": 16384,
8047
"deepseek-ai/DeepSeek-V3": 163840,
8148
"deepseek-ai/DeepSeek-R1": 163840,
@@ -88,6 +55,7 @@
8855
"Qwen/Qwen3-30B-A3B": 40960,
8956
"Qwen/Qwen3-30B-A3B-fast": 40960,
9057
"Qwen/Qwen3-32B": 40960,
58+
"Qwen/Qwen3-32B-fast": 40960,
9159
"Qwen/Qwen3-14B": 40960,
9260
"Qwen/Qwen3-4B-fast": 40960,
9361
"nvidia/Llama-3_3-Nemotron-Super-49B-v1": 131072,
@@ -117,7 +85,6 @@
11785
"deepseek/deepseek-prover-v2-671b": 160000,
11886
"meta-llama/llama-4-scout-17b-16e-instruct": 131072,
11987
"deepseek/deepseek-r1-distill-llama-8b": 32000,
120-
"deepseek/deepseek_v3": 64000,
12188
"meta-llama/llama-3.1-8b-instruct": 16384,
12289
"deepseek/deepseek-r1-distill-qwen-14b": 64000,
12390
"meta-llama/llama-3.3-70b-instruct": 131072,
@@ -131,7 +98,6 @@
13198
"google/gemma-2-9b-it": 8192,
13299
"mistralai/mistral-7b-instruct": 32768,
133100
"meta-llama/llama-3-70b-instruct": 8192,
134-
"deepseek/deepseek-r1": 64000,
135101
"nousresearch/hermes-2-pro-llama-3-8b": 8192,
136102
"sao10k/l3-70b-euryale-v2.1": 8192,
137103
"cognitivecomputations/dolphin-mixtral-8x22b": 16000,
@@ -210,13 +176,12 @@
210176
"command": 4096
211177
},
212178
"together": {
213-
"meta-llama/Llama-4-Scout-17B-16E-Instruct": 1048576,
214179
"meta-llama/Llama-Guard-4-12B": 1048576,
215180
"togethercomputer/m2-bert-80M-32k-retrieval": 32768,
216181
"cartesia/sonic": 0,
217182
"scb10x/scb10x-llama3-1-typhoon2-8b-instruct": 8192,
218-
"deepseek-ai/DeepSeek-R1-Distill-Llama-70B-free": 8192,
219183
"meta-llama-llama-2-70b-hf": 4096,
184+
"togethercomputer/Refuel-Llm-V2": 16384,
220185
"intfloat/multilingual-e5-large-instruct": 514,
221186
"BAAI/bge-base-en-v1.5": 512,
222187
"meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo": 130815,
@@ -233,8 +198,11 @@
233198
"meta-llama/LlamaGuard-2-8b": 8192,
234199
"cartesia/sonic-2": 0,
235200
"togethercomputer/m2-bert-80M-8k-retrieval": 8192,
201+
"deepseek-ai/DeepSeek-R1-Distill-Qwen-14B": 131072,
202+
"deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B": 131072,
203+
"deepseek-ai/DeepSeek-R1-Distill-Llama-70B-free": 8192,
236204
"meta-llama/Llama-3.3-70B-Instruct-Turbo-Free": 131072,
237-
"togethercomputer/Refuel-Llm-V2": 16384,
205+
"deepseek-ai/DeepSeek-R1-Distill-Llama-70B": 131072,
238206
"deepseek-ai/DeepSeek-V3": 131072,
239207
"togethercomputer/Refuel-Llm-V2-Small": 8192,
240208
"togethercomputer/MoA-1": 32768,
@@ -260,8 +228,6 @@
260228
"togethercomputer/MoA-1-Turbo": 32768,
261229
"perplexity-ai/r1-1776": 163840,
262230
"NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO": 32768,
263-
"deepseek-ai/DeepSeek-R1-Distill-Llama-70B": 131072,
264-
"deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B": 131072,
265231
"meta-llama/Meta-Llama-3-8B-Instruct-Lite": 8192,
266232
"Qwen/Qwen3-235B-A22B-fp8": 40960,
267233
"Qwen/Qwen3-235B-A22B-fp8-tput": 40960,
@@ -270,17 +236,17 @@
270236
"scb10x/scb10x-llama3-1-typhoon2-70b-instruct": 8192,
271237
"mistralai/Mistral-7B-Instruct-v0.2": 32768,
272238
"deepseek-ai/DeepSeek-V3-p-dp": 131072,
273-
"deepseek-ai/DeepSeek-R1-Distill-Qwen-14B": 131072,
274239
"Qwen/Qwen2.5-Coder-32B-Instruct": 16384,
275240
"Qwen/Qwen2-72B-Instruct": 32768,
276241
"mistralai/Mistral-7B-Instruct-v0.3": 32768,
277242
"Salesforce/Llama-Rank-V1": 8192,
278243
"meta-llama/Llama-Vision-Free": 131072,
279244
"meta-llama/Llama-Guard-3-11B-Vision-Turbo": 131072,
280245
"meta-llama/Llama-3.2-3B-Instruct-Turbo": 131072,
281-
"arcee_ai/arcee-spotlight": 131072,
282246
"meta-llama/Llama-3.3-70B-Instruct-Turbo": 131072,
283-
"meta-llama/Llama-2-70b-hf": 4096
247+
"meta-llama/Llama-4-Scout-17B-16E-Instruct": 1048576,
248+
"meta-llama/Llama-2-70b-hf": 4096,
249+
"arcee_ai/arcee-spotlight": 131072
284250
},
285251
"fireworks-ai": {
286252
"accounts/fireworks/models/qwq-32b": 131072,

0 commit comments

Comments
 (0)