Skip to content

Commit 28e7ebd

Browse files
xiaofeihan1Copilotapsonawane
authored
Fix Qwen3.5-0.8B WebGPU optimization config (#388)
Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Akshay Sonawane <111780983+apsonawane@users.noreply.github.com>
1 parent d874620 commit 28e7ebd

12 files changed

Lines changed: 144 additions & 0 deletions

File tree

Qwen-Qwen3.5-0.8B/builtin/webgpu/embedding.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@
77
"io_config": "get_embedding_io_config",
88
"dummy_inputs_func": "get_embedding_dummy_inputs"
99
},
10+
"systems": {
11+
"local_system": {
12+
"type": "LocalSystem",
13+
"accelerators": [
14+
{
15+
"device": "gpu",
16+
"execution_providers": ["WebGpuExecutionProvider"]
17+
}
18+
]
19+
}
20+
},
1021
"passes": {
1122
"convert": {
1223
"type": "OnnxConversion",
@@ -40,6 +51,7 @@
4051
"external_data_name": "embedding.onnx.data"
4152
}
4253
},
54+
"target": "local_system",
4355
"no_artifacts": true,
4456
"output_dir": "webgpu/models/embedding.onnx"
4557
}

Qwen-Qwen3.5-0.8B/builtin/webgpu/text.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@
33
"type": "HfModel",
44
"model_path": "Qwen/Qwen3.5-0.8B"
55
},
6+
"systems": {
7+
"local_system": {
8+
"type": "LocalSystem",
9+
"accelerators": [
10+
{
11+
"device": "gpu",
12+
"execution_providers": ["WebGpuExecutionProvider"]
13+
}
14+
]
15+
}
16+
},
617
"passes": {
718
"m": {
819
"type": "ModelBuilder",
@@ -16,5 +27,6 @@
1627
}
1728
},
1829
"no_artifacts": true,
30+
"target": "local_system",
1931
"output_dir": "webgpu/models/text.onnx"
2032
}

Qwen-Qwen3.5-0.8B/builtin/webgpu/vision.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@
77
"io_config": "get_vision_io_config",
88
"dummy_inputs_func": "get_vision_dummy_inputs"
99
},
10+
"systems": {
11+
"local_system": {
12+
"type": "LocalSystem",
13+
"accelerators": [
14+
{
15+
"device": "gpu",
16+
"execution_providers": ["WebGpuExecutionProvider"]
17+
}
18+
]
19+
}
20+
},
1021
"passes": {
1122
"c": {
1223
"type": "OnnxConversion",
@@ -71,6 +82,7 @@
7182
"external_data_name": "vision.onnx.data"
7283
}
7384
},
85+
"target": "local_system",
7486
"no_artifacts": true,
7587
"output_dir": "webgpu/models/vision.onnx"
7688
}

Qwen-Qwen3.5-2B/builtin/webgpu/embedding.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@
77
"io_config": "get_embedding_io_config",
88
"dummy_inputs_func": "get_embedding_dummy_inputs"
99
},
10+
"systems": {
11+
"local_system": {
12+
"type": "LocalSystem",
13+
"accelerators": [
14+
{
15+
"device": "gpu",
16+
"execution_providers": ["WebGpuExecutionProvider"]
17+
}
18+
]
19+
}
20+
},
1021
"passes": {
1122
"convert": {
1223
"type": "OnnxConversion",
@@ -41,5 +52,6 @@
4152
}
4253
},
4354
"no_artifacts": true,
55+
"target": "local_system",
4456
"output_dir": "webgpu/models/embedding.onnx"
4557
}

Qwen-Qwen3.5-2B/builtin/webgpu/text.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@
33
"type": "HfModel",
44
"model_path": "Qwen/Qwen3.5-2B"
55
},
6+
"systems": {
7+
"local_system": {
8+
"type": "LocalSystem",
9+
"accelerators": [
10+
{
11+
"device": "gpu",
12+
"execution_providers": ["WebGpuExecutionProvider"]
13+
}
14+
]
15+
}
16+
},
617
"passes": {
718
"m": {
819
"type": "ModelBuilder",
@@ -17,5 +28,6 @@
1728
}
1829
},
1930
"no_artifacts": true,
31+
"target": "local_system",
2032
"output_dir": "webgpu/models/text.onnx"
2133
}

Qwen-Qwen3.5-2B/builtin/webgpu/vision.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@
77
"io_config": "get_vision_io_config",
88
"dummy_inputs_func": "get_vision_dummy_inputs"
99
},
10+
"systems": {
11+
"local_system": {
12+
"type": "LocalSystem",
13+
"accelerators": [
14+
{
15+
"device": "gpu",
16+
"execution_providers": ["WebGpuExecutionProvider"]
17+
}
18+
]
19+
}
20+
},
1021
"passes": {
1122
"c": {
1223
"type": "OnnxConversion",
@@ -72,5 +83,6 @@
7283
}
7384
},
7485
"no_artifacts": true,
86+
"target": "local_system",
7587
"output_dir": "webgpu/models/vision.onnx"
7688
}

Qwen-Qwen3.5-4B/builtin/webgpu/embedding.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@
77
"io_config": "get_embedding_io_config",
88
"dummy_inputs_func": "get_embedding_dummy_inputs"
99
},
10+
"systems": {
11+
"local_system": {
12+
"type": "LocalSystem",
13+
"accelerators": [
14+
{
15+
"device": "gpu",
16+
"execution_providers": ["WebGpuExecutionProvider"]
17+
}
18+
]
19+
}
20+
},
1021
"passes": {
1122
"convert": {
1223
"type": "OnnxConversion",
@@ -41,5 +52,6 @@
4152
}
4253
},
4354
"no_artifacts": true,
55+
"target": "local_system",
4456
"output_dir": "webgpu/models/embedding.onnx"
4557
}

Qwen-Qwen3.5-4B/builtin/webgpu/text.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@
33
"type": "HfModel",
44
"model_path": "Qwen/Qwen3.5-4B"
55
},
6+
"systems": {
7+
"local_system": {
8+
"type": "LocalSystem",
9+
"accelerators": [
10+
{
11+
"device": "gpu",
12+
"execution_providers": ["WebGpuExecutionProvider"]
13+
}
14+
]
15+
}
16+
},
617
"passes": {
718
"m": {
819
"type": "ModelBuilder",
@@ -17,5 +28,6 @@
1728
}
1829
},
1930
"no_artifacts": true,
31+
"target": "local_system",
2032
"output_dir": "webgpu/models/text.onnx"
2133
}

Qwen-Qwen3.5-4B/builtin/webgpu/vision.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@
77
"io_config": "get_vision_io_config",
88
"dummy_inputs_func": "get_vision_dummy_inputs"
99
},
10+
"systems": {
11+
"local_system": {
12+
"type": "LocalSystem",
13+
"accelerators": [
14+
{
15+
"device": "gpu",
16+
"execution_providers": ["WebGpuExecutionProvider"]
17+
}
18+
]
19+
}
20+
},
1021
"passes": {
1122
"c": {
1223
"type": "OnnxConversion",
@@ -72,5 +83,6 @@
7283
}
7384
},
7485
"no_artifacts": true,
86+
"target": "local_system",
7587
"output_dir": "webgpu/models/vision.onnx"
7688
}

Qwen-Qwen3.5-9B/builtin/webgpu/embedding.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@
77
"io_config": "get_embedding_io_config",
88
"dummy_inputs_func": "get_embedding_dummy_inputs"
99
},
10+
"systems": {
11+
"local_system": {
12+
"type": "LocalSystem",
13+
"accelerators": [
14+
{
15+
"device": "gpu",
16+
"execution_providers": ["WebGpuExecutionProvider"]
17+
}
18+
]
19+
}
20+
},
1021
"passes": {
1122
"convert": {
1223
"type": "OnnxConversion",
@@ -41,5 +52,6 @@
4152
}
4253
},
4354
"no_artifacts": true,
55+
"target": "local_system",
4456
"output_dir": "webgpu/models/embedding.onnx"
4557
}

0 commit comments

Comments
 (0)