Skip to content

Commit a1e3a21

Browse files
committed
model: add DeepSeek-R1 reasoning models
1 parent d182c85 commit a1e3a21

File tree

6 files changed

+104
-15
lines changed

6 files changed

+104
-15
lines changed

app/constant.ts

+82-6
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ export enum ModelFamily {
7676
WIZARD_MATH = "wizardmath",
7777
STABLE_LM = "stablelm",
7878
REDPAJAMA = "redpajama",
79+
DEEPSEEK = "DeepSeek",
7980
}
8081

8182
const DEFAULT_MODEL_BASES: ModelRecord[] = [
@@ -226,28 +227,78 @@ const DEFAULT_MODEL_BASES: ModelRecord[] = [
226227
top_p: 0.9,
227228
},
228229
},
230+
// Deepseek
229231
{
230-
name: "Hermes-2-Pro-Llama-3-8B-q4f16_1-MLC",
232+
name: "DeepSeek-R1-Distill-Qwen-7B-q4f16_1-MLC",
233+
display_name: "DeepSeek",
234+
provider: "DeepSeek",
235+
family: ModelFamily.DEEPSEEK,
236+
recommended_config: {
237+
temperature: 1,
238+
presence_penalty: 0,
239+
frequency_penalty: 0,
240+
top_p: 1,
241+
},
242+
},
243+
{
244+
name: "DeepSeek-R1-Distill-Qwen-7B-q4f32_1-MLC",
245+
display_name: "DeepSeek",
246+
provider: "DeepSeek",
247+
family: ModelFamily.DEEPSEEK,
248+
recommended_config: {
249+
temperature: 1,
250+
presence_penalty: 0,
251+
frequency_penalty: 0,
252+
top_p: 1,
253+
},
254+
},
255+
{
256+
name: "DeepSeek-R1-Distill-Llama-8B-q4f32_1-MLC",
257+
display_name: "DeepSeek",
258+
provider: "DeepSeek",
259+
family: ModelFamily.DEEPSEEK,
260+
recommended_config: {
261+
temperature: 1,
262+
presence_penalty: 0,
263+
frequency_penalty: 0,
264+
top_p: 1,
265+
},
266+
},
267+
{
268+
name: "DeepSeek-R1-Distill-Llama-8B-q4f16_1-MLC",
269+
display_name: "DeepSeek",
270+
provider: "DeepSeek",
271+
family: ModelFamily.DEEPSEEK,
272+
recommended_config: {
273+
temperature: 1,
274+
presence_penalty: 0,
275+
frequency_penalty: 0,
276+
top_p: 1,
277+
},
278+
},
279+
// Hermes
280+
{
281+
name: "Hermes-3-Llama-3.2-3B-q4f32_1-MLC",
231282
display_name: "Hermes",
232283
provider: "NousResearch",
233284
family: ModelFamily.LLAMA,
234285
recommended_config: {
235-
temperature: 1,
286+
temperature: 0.6,
236287
presence_penalty: 0,
237288
frequency_penalty: 0,
238-
top_p: 1,
289+
top_p: 0.9,
239290
},
240291
},
241292
{
242-
name: "Hermes-2-Pro-Llama-3-8B-q4f32_1-MLC",
293+
name: "Hermes-3-Llama-3.2-3B-q4f16_1-MLC",
243294
display_name: "Hermes",
244295
provider: "NousResearch",
245296
family: ModelFamily.LLAMA,
246297
recommended_config: {
247-
temperature: 1,
298+
temperature: 0.6,
248299
presence_penalty: 0,
249300
frequency_penalty: 0,
250-
top_p: 1,
301+
top_p: 0.9,
251302
},
252303
},
253304
{
@@ -286,6 +337,31 @@ const DEFAULT_MODEL_BASES: ModelRecord[] = [
286337
top_p: 0.95,
287338
},
288339
},
340+
{
341+
name: "Hermes-2-Pro-Llama-3-8B-q4f16_1-MLC",
342+
display_name: "Hermes",
343+
provider: "NousResearch",
344+
family: ModelFamily.LLAMA,
345+
recommended_config: {
346+
temperature: 1,
347+
presence_penalty: 0,
348+
frequency_penalty: 0,
349+
top_p: 1,
350+
},
351+
},
352+
{
353+
name: "Hermes-2-Pro-Llama-3-8B-q4f32_1-MLC",
354+
display_name: "Hermes",
355+
provider: "NousResearch",
356+
family: ModelFamily.LLAMA,
357+
recommended_config: {
358+
temperature: 1,
359+
presence_penalty: 0,
360+
frequency_penalty: 0,
361+
top_p: 1,
362+
},
363+
},
364+
// Phi
289365
{
290366
name: "Phi-3.5-mini-instruct-q4f16_1-MLC",
291367
display_name: "Phi",

app/icons/deepseek.svg

+11
Loading

app/store/config.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,9 @@ export const useAppConfig = createPersistStore(
217217
}),
218218
{
219219
name: StoreKey.Config,
220-
version: 0.61,
220+
version: 0.62,
221221
migrate: (persistedState, version) => {
222-
if (version < 0.61) {
222+
if (version < 0.62) {
223223
return {
224224
...DEFAULT_CONFIG,
225225
...(persistedState as any),

app/utils/model.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import MetaIcon from "@/app/icons/meta.svg";
33
import MicrosoftIcon from "@/app/icons/microsoft.svg";
44
import MistralIcon from "@/app/icons/mistral.svg";
55
import GoogleIcon from "@/app/icons/google.svg";
6-
import StablelmICon from "@/app/icons/stablelm.svg";
6+
import StablelmIcon from "@/app/icons/stablelm.svg";
7+
import DeepSeekIcon from "@/app/icons/deepseek.svg";
78
import { ModelRecord } from "../client/api";
89
import { ModelFamily } from "../constant";
910
import { Shirt, WandSparkles } from "lucide-react";
@@ -71,6 +72,7 @@ export interface ModelDetails {
7172

7273
export const modelDetailsList: ModelDetails[] = [
7374
{ family: ModelFamily.LLAMA, name: "Llama", icon: MetaIcon },
75+
{ family: ModelFamily.DEEPSEEK, name: "DeepSeek", icon: DeepSeekIcon },
7476
{ family: ModelFamily.PHI, name: "Phi", icon: MicrosoftIcon },
7577
{ family: ModelFamily.MISTRAL, name: "Mistral", icon: MistralIcon },
7678
{ family: ModelFamily.GEMMA, name: "Gemma", icon: GoogleIcon },
@@ -85,6 +87,6 @@ export const modelDetailsList: ModelDetails[] = [
8587
icon: (...props) => <img src="./smollm.png" alt="SmolLM Logo" {...props} />,
8688
},
8789
{ family: ModelFamily.WIZARD_MATH, name: "Wizard Math", icon: WandSparkles },
88-
{ family: ModelFamily.STABLE_LM, name: "StableLM", icon: StablelmICon },
90+
{ family: ModelFamily.STABLE_LM, name: "StableLM", icon: StablelmIcon },
8991
{ family: ModelFamily.REDPAJAMA, name: "RedPajama", icon: Shirt },
9092
];

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"dependencies": {
1818
"@fortaine/fetch-event-source": "^3.0.6",
1919
"@hello-pangea/dnd": "^16.5.0",
20-
"@mlc-ai/web-llm": "^0.2.75",
20+
"@mlc-ai/web-llm": "^0.2.78",
2121
"@serwist/next": "^9.0.2",
2222
"@svgr/webpack": "^6.5.1",
2323
"emoji-picker-react": "^4.9.2",

yarn.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -1180,10 +1180,10 @@
11801180
"@jridgewell/resolve-uri" "^3.1.0"
11811181
"@jridgewell/sourcemap-codec" "^1.4.14"
11821182

1183-
"@mlc-ai/web-llm@^0.2.75":
1184-
version "0.2.75"
1185-
resolved "https://registry.yarnpkg.com/@mlc-ai/web-llm/-/web-llm-0.2.75.tgz#4ad5af96107f62bf1169340f249164ebc7ff3d15"
1186-
integrity sha512-U3ytE38mzIR/mDGwEl3nbutoIRFyPrsKAwu4A7N8rmHxLtb+gIEu4pfVPQb8uhvrDTsJz2L0zuCE5vRdIf1DUQ==
1183+
"@mlc-ai/web-llm@^0.2.78":
1184+
version "0.2.78"
1185+
resolved "https://registry.yarnpkg.com/@mlc-ai/web-llm/-/web-llm-0.2.78.tgz#f9ce70319b86bb8c0dd4b1a0476152e4fd3e82be"
1186+
integrity sha512-ptqDNzHnfDyNZj7vjp9IaY5U/QDweXMe5wNzErOmRT1gqj8AaMvcqbj7HroPDzhXJGM7BZpDjANV5MhXhKOosA==
11871187
dependencies:
11881188
loglevel "^1.9.1"
11891189

0 commit comments

Comments
 (0)