Skip to content

Commit

Permalink
model: add DeepSeek-R1 reasoning models
Browse files Browse the repository at this point in the history
  • Loading branch information
Neet-Nestor committed Jan 21, 2025
1 parent d182c85 commit a1e3a21
Show file tree
Hide file tree
Showing 6 changed files with 104 additions and 15 deletions.
88 changes: 82 additions & 6 deletions app/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export enum ModelFamily {
WIZARD_MATH = "wizardmath",
STABLE_LM = "stablelm",
REDPAJAMA = "redpajama",
DEEPSEEK = "DeepSeek",
}

const DEFAULT_MODEL_BASES: ModelRecord[] = [
Expand Down Expand Up @@ -226,28 +227,78 @@ const DEFAULT_MODEL_BASES: ModelRecord[] = [
top_p: 0.9,
},
},
// Deepseek
{
name: "Hermes-2-Pro-Llama-3-8B-q4f16_1-MLC",
name: "DeepSeek-R1-Distill-Qwen-7B-q4f16_1-MLC",
display_name: "DeepSeek",
provider: "DeepSeek",
family: ModelFamily.DEEPSEEK,
recommended_config: {
temperature: 1,
presence_penalty: 0,
frequency_penalty: 0,
top_p: 1,
},
},
{
name: "DeepSeek-R1-Distill-Qwen-7B-q4f32_1-MLC",
display_name: "DeepSeek",
provider: "DeepSeek",
family: ModelFamily.DEEPSEEK,
recommended_config: {
temperature: 1,
presence_penalty: 0,
frequency_penalty: 0,
top_p: 1,
},
},
{
name: "DeepSeek-R1-Distill-Llama-8B-q4f32_1-MLC",
display_name: "DeepSeek",
provider: "DeepSeek",
family: ModelFamily.DEEPSEEK,
recommended_config: {
temperature: 1,
presence_penalty: 0,
frequency_penalty: 0,
top_p: 1,
},
},
{
name: "DeepSeek-R1-Distill-Llama-8B-q4f16_1-MLC",
display_name: "DeepSeek",
provider: "DeepSeek",
family: ModelFamily.DEEPSEEK,
recommended_config: {
temperature: 1,
presence_penalty: 0,
frequency_penalty: 0,
top_p: 1,
},
},
// Hermes
{
name: "Hermes-3-Llama-3.2-3B-q4f32_1-MLC",
display_name: "Hermes",
provider: "NousResearch",
family: ModelFamily.LLAMA,
recommended_config: {
temperature: 1,
temperature: 0.6,
presence_penalty: 0,
frequency_penalty: 0,
top_p: 1,
top_p: 0.9,
},
},
{
name: "Hermes-2-Pro-Llama-3-8B-q4f32_1-MLC",
name: "Hermes-3-Llama-3.2-3B-q4f16_1-MLC",
display_name: "Hermes",
provider: "NousResearch",
family: ModelFamily.LLAMA,
recommended_config: {
temperature: 1,
temperature: 0.6,
presence_penalty: 0,
frequency_penalty: 0,
top_p: 1,
top_p: 0.9,
},
},
{
Expand Down Expand Up @@ -286,6 +337,31 @@ const DEFAULT_MODEL_BASES: ModelRecord[] = [
top_p: 0.95,
},
},
{
name: "Hermes-2-Pro-Llama-3-8B-q4f16_1-MLC",
display_name: "Hermes",
provider: "NousResearch",
family: ModelFamily.LLAMA,
recommended_config: {
temperature: 1,
presence_penalty: 0,
frequency_penalty: 0,
top_p: 1,
},
},
{
name: "Hermes-2-Pro-Llama-3-8B-q4f32_1-MLC",
display_name: "Hermes",
provider: "NousResearch",
family: ModelFamily.LLAMA,
recommended_config: {
temperature: 1,
presence_penalty: 0,
frequency_penalty: 0,
top_p: 1,
},
},
// Phi
{
name: "Phi-3.5-mini-instruct-q4f16_1-MLC",
display_name: "Phi",
Expand Down
11 changes: 11 additions & 0 deletions app/icons/deepseek.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions app/store/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,9 @@ export const useAppConfig = createPersistStore(
}),
{
name: StoreKey.Config,
version: 0.61,
version: 0.62,
migrate: (persistedState, version) => {
if (version < 0.61) {
if (version < 0.62) {
return {
...DEFAULT_CONFIG,
...(persistedState as any),
Expand Down
6 changes: 4 additions & 2 deletions app/utils/model.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import MetaIcon from "@/app/icons/meta.svg";
import MicrosoftIcon from "@/app/icons/microsoft.svg";
import MistralIcon from "@/app/icons/mistral.svg";
import GoogleIcon from "@/app/icons/google.svg";
import StablelmICon from "@/app/icons/stablelm.svg";
import StablelmIcon from "@/app/icons/stablelm.svg";
import DeepSeekIcon from "@/app/icons/deepseek.svg";
import { ModelRecord } from "../client/api";
import { ModelFamily } from "../constant";
import { Shirt, WandSparkles } from "lucide-react";
Expand Down Expand Up @@ -71,6 +72,7 @@ export interface ModelDetails {

export const modelDetailsList: ModelDetails[] = [
{ family: ModelFamily.LLAMA, name: "Llama", icon: MetaIcon },
{ family: ModelFamily.DEEPSEEK, name: "DeepSeek", icon: DeepSeekIcon },
{ family: ModelFamily.PHI, name: "Phi", icon: MicrosoftIcon },
{ family: ModelFamily.MISTRAL, name: "Mistral", icon: MistralIcon },
{ family: ModelFamily.GEMMA, name: "Gemma", icon: GoogleIcon },
Expand All @@ -85,6 +87,6 @@ export const modelDetailsList: ModelDetails[] = [
icon: (...props) => <img src="./smollm.png" alt="SmolLM Logo" {...props} />,
},
{ family: ModelFamily.WIZARD_MATH, name: "Wizard Math", icon: WandSparkles },
{ family: ModelFamily.STABLE_LM, name: "StableLM", icon: StablelmICon },
{ family: ModelFamily.STABLE_LM, name: "StableLM", icon: StablelmIcon },
{ family: ModelFamily.REDPAJAMA, name: "RedPajama", icon: Shirt },
];
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"dependencies": {
"@fortaine/fetch-event-source": "^3.0.6",
"@hello-pangea/dnd": "^16.5.0",
"@mlc-ai/web-llm": "^0.2.75",
"@mlc-ai/web-llm": "^0.2.78",
"@serwist/next": "^9.0.2",
"@svgr/webpack": "^6.5.1",
"emoji-picker-react": "^4.9.2",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1180,10 +1180,10 @@
"@jridgewell/resolve-uri" "^3.1.0"
"@jridgewell/sourcemap-codec" "^1.4.14"

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

Expand Down

0 comments on commit a1e3a21

Please sign in to comment.