Skip to content

Commit aa8170a

Browse files
committed
fix types
1 parent 33e2c0d commit aa8170a

File tree

5 files changed

+66
-79
lines changed

5 files changed

+66
-79
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@
112112
python: getSnippet({ lang: "python", tokenStr, conversation }),
113113
http: getSnippet({ lang: "sh", tokenStr, conversation }),
114114
} as Record<Language, GetInferenceSnippetReturn>);
115+
$inspect(snippetsByLang);
115116
116117
const selectedSnippet = $derived(snippetsByLang[lang][selectedSnippetIdxByLang[lang]]);
117118

src/lib/components/inference-playground/model-selector.svelte

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import Avatar from "../avatar.svelte";
77
import ModelSelectorModal from "./model-selector-modal.svelte";
88
import ProviderSelect from "./provider-select.svelte";
9+
import typia from "typia";
910
1011
interface Props {
1112
conversation: ConversationClass;
@@ -32,6 +33,7 @@
3233
const nameSpace = $derived(isCustom ? "Custom endpoint" : (model.id.split("/")[0] ?? ""));
3334
const modelName = $derived(isCustom ? model.id : (model.id.split("/")[1] ?? ""));
3435
const id = $props.id();
36+
$inspect(conversation.model, isHFModel(conversation.model), typia.validate<Model>(conversation.model));
3537
</script>
3638

3739
<div class="flex flex-col gap-2">

src/lib/data/context_length.json

Lines changed: 59 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"replicate": {},
33
"sambanova": {
4-
"DeepSeek-R1": 32768,
4+
"DeepSeek-R1-0528": 32768,
55
"DeepSeek-R1-Distill-Llama-70B": 131072,
66
"DeepSeek-V3-0324": 32768,
77
"E5-Mistral-7B-Instruct": 4096,
@@ -15,7 +15,7 @@
1515
"Meta-Llama-Guard-3-8B": 16384,
1616
"QwQ-32B": 16384,
1717
"Qwen2-Audio-7B-Instruct": 4096,
18-
"Qwen3-32B": 8192,
18+
"Qwen3-32B": 32768,
1919
"Whisper-Large-v3": 4096
2020
},
2121
"nebius": {
@@ -46,6 +46,7 @@
4646
"microsoft/phi-4": 16384,
4747
"deepseek-ai/DeepSeek-V3": 163840,
4848
"deepseek-ai/DeepSeek-R1": 163840,
49+
"deepseek-ai/DeepSeek-R1-0528": 163840,
4950
"NousResearch/Hermes-3-Llama-405B": 131072,
5051
"deepseek-ai/DeepSeek-R1-Distill-Llama-70B": 131072,
5152
"deepseek-ai/DeepSeek-R1-fast": 163840,
@@ -70,15 +71,16 @@
7071
"stability-ai/sdxl": 0
7172
},
7273
"novita": {
74+
"deepseek/deepseek-r1-0528": 128000,
75+
"deepseek/deepseek-r1-0528-qwen3-8b": 128000,
7376
"deepseek/deepseek-v3-0324": 128000,
7477
"qwen/qwen3-235b-a22b-fp8": 40960,
7578
"qwen/qwen3-30b-a3b-fp8": 40960,
7679
"qwen/qwen3-32b-fp8": 40960,
77-
"qwen/qwen2.5-vl-72b-instruct": 96000,
80+
"qwen/qwen2.5-vl-72b-instruct": 32768,
7881
"deepseek/deepseek-v3-turbo": 64000,
7982
"meta-llama/llama-4-maverick-17b-128e-instruct-fp8": 1048576,
8083
"google/gemma-3-27b-it": 32000,
81-
"qwen/qwq-32b": 32768,
8284
"deepseek/deepseek-r1-turbo": 64000,
8385
"Sao10K/L3-8B-Stheno-v3.2": 8192,
8486
"gryphe/mythomax-l2-13b": 4096,
@@ -89,34 +91,27 @@
8991
"deepseek/deepseek-r1-distill-qwen-14b": 64000,
9092
"meta-llama/llama-3.3-70b-instruct": 131072,
9193
"qwen/qwen-2.5-72b-instruct": 32000,
92-
"mistralai/mistral-nemo": 64000,
94+
"mistralai/mistral-nemo": 60288,
9395
"deepseek/deepseek-r1-distill-qwen-32b": 64000,
9496
"meta-llama/llama-3-8b-instruct": 8192,
9597
"microsoft/wizardlm-2-8x22b": 65535,
9698
"deepseek/deepseek-r1-distill-llama-70b": 32000,
97-
"meta-llama/llama-3.1-70b-instruct": 32768,
98-
"google/gemma-2-9b-it": 8192,
9999
"mistralai/mistral-7b-instruct": 32768,
100100
"meta-llama/llama-3-70b-instruct": 8192,
101101
"nousresearch/hermes-2-pro-llama-3-8b": 8192,
102102
"sao10k/l3-70b-euryale-v2.1": 8192,
103103
"cognitivecomputations/dolphin-mixtral-8x22b": 16000,
104104
"sophosympatheia/midnight-rose-70b": 4096,
105105
"sao10k/l3-8b-lunaris": 8192,
106-
"pa/cd-op-4-20250514": 200000,
107-
"qwen/qwen3-0.6b-fp8": 32000,
108-
"qwen/qwen3-1.7b-fp8": 32000,
109106
"qwen/qwen3-8b-fp8": 128000,
110107
"qwen/qwen3-4b-fp8": 128000,
111-
"qwen/qwen3-14b-fp8": 40960,
112108
"thudm/glm-4-9b-0414": 32000,
113109
"thudm/glm-z1-9b-0414": 32000,
114110
"thudm/glm-z1-32b-0414": 32000,
115111
"thudm/glm-4-32b-0414": 32000,
116112
"thudm/glm-z1-rumination-32b-0414": 32000,
117113
"qwen/qwen2.5-7b-instruct": 32000,
118114
"meta-llama/llama-3.2-1b-instruct": 131000,
119-
"meta-llama/llama-3.2-11b-vision-instruct": 32768,
120115
"meta-llama/llama-3.2-3b-instruct": 32768,
121116
"meta-llama/llama-3.1-8b-instruct-bf16": 8192,
122117
"sao10k/l31-70b-euryale-v2.2": 8192
@@ -138,7 +133,6 @@
138133
"deepseek-ai/DeepSeek-V3": 131072,
139134
"deepseek-ai/DeepSeek-V3-0324": 163840,
140135
"meta-llama/Llama-3.3-70B-Instruct": 131072,
141-
"Qwen/QwQ-32B-Preview": 32768,
142136
"Qwen/Qwen2.5-Coder-32B-Instruct": 32768,
143137
"meta-llama/Llama-3.2-3B-Instruct": 131072,
144138
"NousResearch/Hermes-3-Llama-3.1-70B": 12288,
@@ -147,7 +141,6 @@
147141
"meta-llama/Meta-Llama-3.1-8B-Instruct": 131072,
148142
"mistralai/Pixtral-12B-2409": 32768,
149143
"Qwen/Qwen2.5-VL-7B-Instruct": 32768,
150-
"meta-llama/Meta-Llama-3.1-405B": 32768,
151144
"meta-llama/Meta-Llama-3.1-405B-FP8": 32768,
152145
"deepseek-ai/DeepSeek-R1": 163840,
153146
"Qwen/QwQ-32B": 131072
@@ -176,77 +169,79 @@
176169
"command": 4096
177170
},
178171
"together": {
179-
"meta-llama/Llama-Guard-4-12B": 1048576,
180172
"togethercomputer/m2-bert-80M-32k-retrieval": 32768,
181173
"cartesia/sonic": 0,
182-
"scb10x/scb10x-llama3-1-typhoon2-8b-instruct": 8192,
183174
"meta-llama-llama-2-70b-hf": 4096,
184-
"togethercomputer/Refuel-Llm-V2": 16384,
185175
"intfloat/multilingual-e5-large-instruct": 514,
186-
"BAAI/bge-base-en-v1.5": 512,
187-
"meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo": 130815,
188176
"Gryphe/MythoMax-L2-13b": 4096,
189177
"Alibaba-NLP/gte-modernbert-base": 8192,
190-
"mistralai/Mistral-7B-Instruct-v0.1": 32768,
191-
"Qwen/Qwen2.5-7B-Instruct-Turbo": 32768,
192-
"Qwen/Qwen2.5-72B-Instruct-Turbo": 131072,
193-
"Qwen/QwQ-32B": 131072,
194-
"mistralai/Mixtral-8x7B-Instruct-v0.1": 32768,
195-
"google/gemma-2-27b-it": 8192,
196-
"Qwen/Qwen2-VL-72B-Instruct": 32768,
197-
"meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo": 131072,
198178
"meta-llama/LlamaGuard-2-8b": 8192,
199179
"cartesia/sonic-2": 0,
200180
"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,
204-
"meta-llama/Llama-3.3-70B-Instruct-Turbo-Free": 131072,
205-
"deepseek-ai/DeepSeek-R1-Distill-Llama-70B": 131072,
206-
"deepseek-ai/DeepSeek-V3": 131072,
207-
"togethercomputer/Refuel-Llm-V2-Small": 8192,
181+
"deepseek-ai/DeepSeek-R1": 163840,
208182
"togethercomputer/MoA-1": 32768,
209183
"meta-llama/Meta-Llama-3-70B-Instruct-Turbo": 8192,
210-
"google/gemma-2b-it": 8192,
211-
"meta-llama/Llama-3.2-11B-Vision-Instruct-Turbo": 131072,
212184
"Gryphe/MythoMax-L2-13b-Lite": 4096,
213185
"meta-llama/Meta-Llama-Guard-3-8B": 8192,
214-
"marin-community/marin-8b-instruct": 131072,
215-
"deepseek-ai/DeepSeek-R1": 163840,
216-
"Qwen/Qwen2.5-VL-72B-Instruct": 32768,
217-
"arcee-ai/arcee-blitz": 32768,
218-
"arcee-ai/caller": 32768,
219-
"arcee-ai/coder-large": 32768,
220-
"arcee-ai/maestro-reasoning": 131072,
221-
"arcee-ai/virtuoso-large": 131072,
222-
"arcee-ai/virtuoso-medium-v2": 131072,
223-
"meta-llama/Llama-3.2-90B-Vision-Instruct-Turbo": 131072,
224-
"meta-llama/Llama-3-70b-chat-hf": 8192,
186+
"deepseek-ai/DeepSeek-V3": 131072,
187+
"mistralai/Mixtral-8x7B-Instruct-v0.1": 32768,
188+
"meta-llama/Llama-Vision-Free": 131072,
225189
"meta-llama/Llama-3-8b-chat-hf": 8192,
226-
"mistralai/Mistral-Small-24B-Instruct-2501": 32768,
227-
"meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8": 1048576,
190+
"mistralai/Mistral-7B-Instruct-v0.1": 32768,
191+
"BAAI/bge-base-en-v1.5-vllm": 512,
192+
"meta-llama/Llama-2-70b-hf": 4096,
228193
"togethercomputer/MoA-1-Turbo": 32768,
229-
"perplexity-ai/r1-1776": 163840,
230-
"NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO": 32768,
231194
"meta-llama/Meta-Llama-3-8B-Instruct-Lite": 8192,
232-
"Qwen/Qwen3-235B-A22B-fp8": 40960,
233-
"Qwen/Qwen3-235B-A22B-fp8-tput": 40960,
234-
"meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo": 131072,
235-
"nvidia/Llama-3.1-Nemotron-70B-Instruct-HF": 32768,
236-
"scb10x/scb10x-llama3-1-typhoon2-70b-instruct": 8192,
195+
"black-forest-labs/FLUX.1-kontext-max": 0,
237196
"mistralai/Mistral-7B-Instruct-v0.2": 32768,
238197
"deepseek-ai/DeepSeek-V3-p-dp": 131072,
239-
"Qwen/Qwen2.5-Coder-32B-Instruct": 16384,
240198
"Qwen/Qwen2-72B-Instruct": 32768,
241199
"mistralai/Mistral-7B-Instruct-v0.3": 32768,
242-
"Salesforce/Llama-Rank-V1": 8192,
243-
"meta-llama/Llama-Vision-Free": 131072,
200+
"NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO": 32768,
201+
"meta-llama/Llama-3.2-11B-Vision-Instruct-Turbo": 131072,
244202
"meta-llama/Llama-Guard-3-11B-Vision-Turbo": 131072,
203+
"google/gemma-2-27b-it": 8192,
204+
"togethercomputer/Refuel-Llm-V2-Small": 8192,
205+
"Qwen/Qwen2-VL-72B-Instruct": 32768,
206+
"meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo": 131072,
207+
"meta-llama/Llama-3.2-90B-Vision-Instruct-Turbo": 131072,
208+
"scb10x/scb10x-llama3-1-typhoon2-70b-instruct": 8192,
209+
"arcee-ai/maestro-reasoning": 131072,
210+
"arcee_ai/arcee-spotlight": 131072,
211+
"togethercomputer/Refuel-Llm-V2": 16384,
212+
"arcee-ai/arcee-blitz": 32768,
213+
"perplexity-ai/r1-1776": 163840,
214+
"meta-llama/Llama-4-Scout-17B-16E-Instruct": 1048576,
215+
"Salesforce/Llama-Rank-V1": 8192,
216+
"Qwen/Qwen2.5-Coder-32B-Instruct": 16384,
245217
"meta-llama/Llama-3.2-3B-Instruct-Turbo": 131072,
218+
"arcee-ai/virtuoso-medium-v2": 131072,
219+
"arcee-ai/coder-large": 32768,
220+
"meta-llama/Llama-Guard-4-12B": 1048576,
221+
"deepseek-ai/DeepSeek-R1-Distill-Qwen-14B": 131072,
222+
"arcee-ai/virtuoso-large": 131072,
223+
"Qwen/Qwen2.5-VL-72B-Instruct": 32768,
224+
"Qwen/Qwen2.5-72B-Instruct-Turbo": 131072,
225+
"meta-llama/Llama-3-70b-chat-hf": 8192,
226+
"deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B": 131072,
227+
"deepseek-ai/DeepSeek-R1-Distill-Llama-70B": 131072,
228+
"meta-llama/Llama-3.3-70B-Instruct-Turbo-Free": 131072,
229+
"nvidia/Llama-3.1-Nemotron-70B-Instruct-HF": 32768,
230+
"Qwen/QwQ-32B": 131072,
231+
"deepseek-ai/DeepSeek-R1-Distill-Llama-70B-free": 8192,
232+
"Qwen/Qwen3-235B-A22B-fp8-tput": 40960,
233+
"mistralai/Mistral-Small-24B-Instruct-2501": 32768,
234+
"meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8": 1048576,
235+
"marin-community/marin-8b-instruct": 131072,
236+
"Qwen/Qwen2.5-7B-Instruct-Turbo": 32768,
237+
"meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo": 131072,
246238
"meta-llama/Llama-3.3-70B-Instruct-Turbo": 131072,
247-
"meta-llama/Llama-4-Scout-17B-16E-Instruct": 1048576,
248-
"meta-llama/Llama-2-70b-hf": 4096,
249-
"arcee_ai/arcee-spotlight": 131072
239+
"meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo": 130815,
240+
"scb10x/scb10x-typhoon-2-1-gemma3-12b": 8192,
241+
"arcee-ai/caller": 32768,
242+
"black-forest-labs/FLUX.1-kontext-pro": 0,
243+
"lgai/exaone-deep-32b": 32768,
244+
"lgai/exaone-3-5-32b-instruct": 32768
250245
},
251246
"fireworks-ai": {
252247
"accounts/fireworks/models/qwq-32b": 131072,
@@ -258,6 +253,7 @@
258253
"accounts/fireworks/models/llama4-scout-instruct-basic": 1048576,
259254
"accounts/fireworks/models/qwen2-vl-72b-instruct": 32768,
260255
"accounts/fireworks/models/firesearch-ocr-v6": 131072,
256+
"accounts/fireworks/models/deepseek-r1-0528": 163840,
261257
"accounts/fireworks/models/deepseek-v3": 131072,
262258
"accounts/fireworks/models/llama-v3p1-8b-instruct": 131072,
263259
"accounts/fireworks/models/llama-v3p1-70b-instruct": 131072,
@@ -267,6 +263,7 @@
267263
"accounts/fireworks/models/deepseek-r1": 163840,
268264
"accounts/sentientfoundation/models/dobby-unhinged-llama-3-3-70b-new": 131072,
269265
"accounts/perplexity/models/r1-1776": 163840,
266+
"accounts/sentientfoundation-serverless/models/dobby-mini-unhinged-plus-llama-3-1-8b": 131072,
270267
"accounts/fireworks/models/llama-v3p1-405b-instruct": 131072,
271268
"accounts/fireworks/models/mixtral-8x22b-instruct": 65536,
272269
"accounts/fireworks/models/qwen2p5-72b-instruct": 32768

src/lib/types.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export type CustomModel = {
6262
export type Config = {
6363
architectures: string[];
6464
model_type: string;
65-
tokenizer_config: TokenizerConfig;
65+
tokenizer_config?: TokenizerConfig;
6666
auto_map?: AutoMap;
6767
quantization_config?: QuantizationConfig;
6868
};
@@ -165,6 +165,7 @@ export enum Provider {
165165
export enum Status {
166166
Live = "live",
167167
Staging = "staging",
168+
Error = "error",
168169
}
169170

170171
export enum Task {

src/lib/utils/business.svelte.ts

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -342,25 +342,11 @@ export function getInferenceSnippet(
342342
{ ...model, inference: "" },
343343
accessToken,
344344
provider,
345-
{ ...providerMapping, hfModelId: model.id },
345+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
346+
{ ...providerMapping, hfModelId: model.id } as any,
346347
opts
347348
);
348349

349-
if (opts?.structured_output && !structuredForbiddenProviders.includes(provider as Provider)) {
350-
allSnippets.forEach(s => {
351-
const modified = modifySnippet(s.content, { prop: "hi" });
352-
if (s.content === modified) {
353-
console.log("Failed for", s.language, "\n");
354-
} else {
355-
console.log("Original snippet");
356-
console.log(s.content);
357-
console.log("\nModified");
358-
console.log(modified);
359-
console.log();
360-
}
361-
});
362-
}
363-
364350
return allSnippets
365351
.filter(s => s.language === language)
366352
.map(s => {

0 commit comments

Comments
 (0)