Skip to content

Commit 25fd9ec

Browse files
committed
model: add Qwen-2 Math models
1 parent 35bc80c commit 25fd9ec

File tree

4 files changed

+72
-20
lines changed

4 files changed

+72
-20
lines changed

app/constant.ts

Lines changed: 65 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,6 @@ export const DEFAULT_MODELS: ModelRecord[] = [
597597
provider: "Alibaba",
598598
size: "7B",
599599
quantization: "q4f16_1",
600-
601600
family: "Qwen 2",
602601
vram_required_MB: 5106.67,
603602
low_resource_required: false,
@@ -614,7 +613,71 @@ export const DEFAULT_MODELS: ModelRecord[] = [
614613
provider: "Alibaba",
615614
size: "7B",
616615
quantization: "q4f32",
617-
616+
family: "Qwen 2",
617+
vram_required_MB: 5900.09,
618+
low_resource_required: false,
619+
recommended_config: {
620+
temperature: 0.7,
621+
presence_penalty: 0,
622+
frequency_penalty: 0,
623+
top_p: 0.8,
624+
},
625+
},
626+
// Qwen2-Math
627+
{
628+
name: "Qwen2-Math-1.5B-Instruct-q4f16_1-MLC",
629+
display_name: "Qwen",
630+
provider: "Alibaba",
631+
size: "1.5B",
632+
quantization: "q4f16_1",
633+
family: "Qwen 2",
634+
vram_required_MB: 1629.75,
635+
low_resource_required: true,
636+
recommended_config: {
637+
temperature: 1.0,
638+
presence_penalty: 0,
639+
frequency_penalty: 0,
640+
top_p: 0.8,
641+
},
642+
},
643+
{
644+
name: "Qwen2-Math-1.5B-Instruct-q4f32_1-MLC",
645+
display_name: "Qwen",
646+
provider: "Alibaba",
647+
size: "1.5B",
648+
quantization: "q4f32_1",
649+
family: "Qwen 2",
650+
vram_required_MB: 1888.97,
651+
low_resource_required: true,
652+
recommended_config: {
653+
temperature: 1.0,
654+
presence_penalty: 0,
655+
frequency_penalty: 0,
656+
top_p: 0.8,
657+
},
658+
},
659+
{
660+
name: "Qwen2-Math-7B-Instruct-q4f16_1-MLC",
661+
display_name: "Qwen",
662+
provider: "Alibaba",
663+
size: "7B",
664+
quantization: "q4f16_1",
665+
family: "Qwen 2",
666+
vram_required_MB: 5106.67,
667+
low_resource_required: false,
668+
recommended_config: {
669+
temperature: 0.7,
670+
presence_penalty: 0,
671+
frequency_penalty: 0,
672+
top_p: 0.8,
673+
},
674+
},
675+
{
676+
name: "Qwen2-Math-7B-Instruct-q4f32_1-MLC",
677+
display_name: "Qwen",
678+
provider: "Alibaba",
679+
size: "7B",
680+
quantization: "q4f32_1",
618681
family: "Qwen 2",
619682
vram_required_MB: 5900.09,
620683
low_resource_required: false,

app/store/config.ts

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -208,25 +208,14 @@ export const useAppConfig = createPersistStore(
208208
}),
209209
{
210210
name: StoreKey.Config,
211-
version: 0.48,
211+
version: 0.49,
212212
migrate: (persistedState, version) => {
213-
if (version < 0.48) {
213+
if (version < 0.49) {
214214
return {
215215
...DEFAULT_CONFIG,
216216
...(persistedState as any),
217217
models: DEFAULT_MODELS as any as ModelRecord[],
218218

219-
sendMemory: (persistedState as any).modelConfig?.sendMemory || true,
220-
historyMessageCount:
221-
(persistedState as any).modelConfig?.historyMessageCount || 4,
222-
compressMessageLengthThreshold:
223-
(persistedState as any).modelConfig
224-
?.compressMessageLengthThreshold || 1000,
225-
enableInjectSystemPrompts:
226-
(persistedState as any).modelConfig?.enableInjectSystemPrompts ||
227-
false,
228-
template: DEFAULT_INPUT_TEMPLATE,
229-
230219
modelConfig: {
231220
model: DEFAULT_MODELS[0].name,
232221

package.json

Lines changed: 1 addition & 1 deletion
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.52",
20+
"@mlc-ai/web-llm": "^0.2.55",
2121
"@serwist/next": "^9.0.2",
2222
"@svgr/webpack": "^6.5.1",
2323
"emoji-picker-react": "^4.9.2",

yarn.lock

Lines changed: 4 additions & 4 deletions
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.52":
1184-
version "0.2.52"
1185-
resolved "https://registry.yarnpkg.com/@mlc-ai/web-llm/-/web-llm-0.2.52.tgz#15c0496b3ce8c35bd0ac5d1dd92d30cdc6c055db"
1186-
integrity sha512-TRjAQsOCUf7vrwVeOZoBZtB9KnW9InWK2w85rJWL7IBSSW/znYsNdD3/opmEGtf7NTKr4RBIu+8RdnhcZoHk4A==
1183+
"@mlc-ai/web-llm@^0.2.55":
1184+
version "0.2.55"
1185+
resolved "https://registry.yarnpkg.com/@mlc-ai/web-llm/-/web-llm-0.2.55.tgz#678c1703df1a9c9d504fc81db6d2f7b7c5d39d7b"
1186+
integrity sha512-o2Nzmx//sT3ttWrnSYy6s7NTCnBEWPI8ubbzg6WH59dAI34pHSP/+V8UxtDS+ZlEXl0PV0iDgl1i+Y1WeKABlw==
11871187
dependencies:
11881188
loglevel "^1.9.1"
11891189

0 commit comments

Comments
 (0)