kingmin commited on
Commit
99ba790
·
verified ·
1 Parent(s): 61d35ea

Add WeMM-Ecom model card, benchmark figures, and license

Browse files
.gitattributes CHANGED
@@ -33,3 +33,9 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ assets/ecommerce-benchmarks.png filter=lfs diff=lfs merge=lfs -text
37
+ assets/ecommerce-instruct-table.png filter=lfs diff=lfs merge=lfs -text
38
+ assets/ecommerce-thinking-table.png filter=lfs diff=lfs merge=lfs -text
39
+ assets/general-benchmarks.png filter=lfs diff=lfs merge=lfs -text
40
+ assets/general-instruct-table.png filter=lfs diff=lfs merge=lfs -text
41
+ assets/general-thinking-table.png filter=lfs diff=lfs merge=lfs -text
LICENSE ADDED
@@ -0,0 +1,434 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Tencent is pleased to support the open source community by making WeMM-Ecom-35B-A3B available.
2
+
3
+ Copyright (C) 2026 Tencent. All rights reserved.
4
+
5
+ The open-source software and/or models included in this distribution may have been modified by Tencent (“Tencent Modifications”). All Tencent Modifications are Copyright (C) Tencent.
6
+
7
+ WeMM-Ecom-35B-A3B is licensed under Apache-2.0, except for the third-party components listed below, which remain licensed under their respective original terms. WeMM-Ecom-35B-A3B does not impose any additional restrictions beyond those specified in the original licenses of these third-party components. Users are required to comply with all applicable terms and conditions of the original licenses and to ensure that the use of these third-party components conforms to all relevant laws and regulations.
8
+
9
+ For the avoidance of doubt, WeMM-Ecom-35B-A3B refers to parameters and weights made publicly available by Tencent in this repository.
10
+
11
+ Terms of Apache-2.0:
12
+ --------------------------------------------------------------------
13
+ Apache License
14
+ Version 2.0, January 2004
15
+ http://www.apache.org/licenses/
16
+
17
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
18
+
19
+ 1. Definitions.
20
+
21
+ "License" shall mean the terms and conditions for use, reproduction,
22
+ and distribution as defined by Sections 1 through 9 of this document.
23
+
24
+ "Licensor" shall mean the copyright owner or entity authorized by
25
+ the copyright owner that is granting the License.
26
+
27
+ "Legal Entity" shall mean the union of the acting entity and all
28
+ other entities that control, are controlled by, or are under common
29
+ control with that entity. For the purposes of this definition,
30
+ "control" means (i) the power, direct or indirect, to cause the
31
+ direction or management of such entity, whether by contract or
32
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
33
+ outstanding shares, or (iii) beneficial ownership of such entity.
34
+
35
+ "You" (or "Your") shall mean an individual or Legal Entity
36
+ exercising permissions granted by this License.
37
+
38
+ "Source" form shall mean the preferred form for making modifications,
39
+ including but not limited to software source code, documentation
40
+ source, and configuration files.
41
+
42
+ "Object" form shall mean any form resulting from mechanical
43
+ transformation or translation of a Source form, including but
44
+ not limited to compiled object code, generated documentation,
45
+ and conversions to other media types.
46
+
47
+ "Work" shall mean the work of authorship, whether in Source or
48
+ Object form, made available under the License, as indicated by a
49
+ copyright notice that is included in or attached to the work
50
+ (an example is provided in the Appendix below).
51
+
52
+ "Derivative Works" shall mean any work, whether in Source or Object
53
+ form, that is based on (or derived from) the Work and for which the
54
+ editorial revisions, annotations, elaborations, or other modifications
55
+ represent, as a whole, an original work of authorship. For the purposes
56
+ of this License, Derivative Works shall not include works that remain
57
+ separable from, or merely link (or bind by name) to the interfaces of,
58
+ the Work and Derivative Works thereof.
59
+
60
+ "Contribution" shall mean any work of authorship, including
61
+ the original version of the Work and any modifications or additions
62
+ to that Work or Derivative Works thereof, that is intentionally
63
+ submitted to Licensor for inclusion in the Work by the copyright owner
64
+ or by an individual or Legal Entity authorized to submit on behalf of
65
+ the copyright owner. For the purposes of this definition, "submitted"
66
+ means any form of electronic, verbal, or written communication sent
67
+ to the Licensor or its representatives, including but not limited to
68
+ communication on electronic mailing lists, source code control systems,
69
+ and issue tracking systems that are managed by, or on behalf of, the
70
+ Licensor for the purpose of discussing and improving the Work, but
71
+ excluding communication that is conspicuously marked or otherwise
72
+ designated in writing by the copyright owner as "Not a Contribution."
73
+
74
+ "Contributor" shall mean Licensor and any individual or Legal Entity
75
+ on behalf of whom a Contribution has been received by Licensor and
76
+ subsequently incorporated within the Work.
77
+
78
+ 2. Grant of Copyright License. Subject to the terms and conditions of
79
+ this License, each Contributor hereby grants to You a perpetual,
80
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
81
+ copyright license to reproduce, prepare Derivative Works of,
82
+ publicly display, publicly perform, sublicense, and distribute the
83
+ Work and such Derivative Works in Source or Object form.
84
+
85
+ 3. Grant of Patent License. Subject to the terms and conditions of
86
+ this License, each Contributor hereby grants to You a perpetual,
87
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
88
+ (except as stated in this section) patent license to make, have made,
89
+ use, offer to sell, sell, import, and otherwise transfer the Work,
90
+ where such license applies only to those patent claims licensable
91
+ by such Contributor that are necessarily infringed by their
92
+ Contribution(s) alone or by combination of their Contribution(s)
93
+ with the Work to which such Contribution(s) was submitted. If You
94
+ institute patent litigation against any entity (including a
95
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
96
+ or a Contribution incorporated within the Work constitutes direct
97
+ or contributory patent infringement, then any patent licenses
98
+ granted to You under this License for that Work shall terminate
99
+ as of the date such litigation is filed.
100
+
101
+ 4. Redistribution. You may reproduce and distribute copies of the
102
+ Work or Derivative Works thereof in any medium, with or without
103
+ modifications, and in Source or Object form, provided that You
104
+ meet the following conditions:
105
+
106
+ (a) You must give any other recipients of the Work or
107
+ Derivative Works a copy of this License; and
108
+
109
+ (b) You must cause any modified files to carry prominent notices
110
+ stating that You changed the files; and
111
+
112
+ (c) You must retain, in the Source form of any Derivative Works
113
+ that You distribute, all copyright, patent, trademark, and
114
+ attribution notices from the Source form of the Work,
115
+ excluding those notices that do not pertain to any part of
116
+ the Derivative Works; and
117
+
118
+ (d) If the Work includes a "NOTICE" text file as part of its
119
+ distribution, then any Derivative Works that You distribute must
120
+ include a readable copy of the attribution notices contained
121
+ within such NOTICE file, excluding those notices that do not
122
+ pertain to any part of the Derivative Works, in at least one
123
+ of the following places: within a NOTICE text file distributed
124
+ as part of the Derivative Works; within the Source form or
125
+ documentation, if provided along with the Derivative Works; or,
126
+ within a display generated by the Derivative Works, if and
127
+ wherever such third-party notices normally appear. The contents
128
+ of the NOTICE file are for informational purposes only and
129
+ do not modify the License. You may add Your own attribution
130
+ notices within Derivative Works that You distribute, alongside
131
+ or as an addendum to the NOTICE text from the Work, provided
132
+ that such additional attribution notices cannot be construed
133
+ as modifying the License.
134
+
135
+ You may add Your own copyright statement to Your modifications and
136
+ may provide additional or different license terms and conditions
137
+ for use, reproduction, or distribution of Your modifications, or
138
+ for any such Derivative Works as a whole, provided Your use,
139
+ reproduction, and distribution of the Work otherwise complies with
140
+ the conditions stated in this License.
141
+
142
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
143
+ any Contribution intentionally submitted for inclusion in the Work
144
+ by You to the Licensor shall be under the terms and conditions of
145
+ this License, without any additional terms or conditions.
146
+ Notwithstanding the above, nothing herein shall supersede or modify
147
+ the terms of any separate license agreement you may have executed
148
+ with Licensor regarding such Contributions.
149
+
150
+ 6. Trademarks. This License does not grant permission to use the trade
151
+ names, trademarks, service marks, or product names of the Licensor,
152
+ except as required for reasonable and customary use in describing the
153
+ origin of the Work and reproducing the content of the NOTICE file.
154
+
155
+ 7. Disclaimer of Warranty. Unless required by applicable law or
156
+ agreed to in writing, Licensor provides the Work (and each
157
+ Contributor provides its Contributions) on an "AS IS" BASIS,
158
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
159
+ implied, including, without limitation, any warranties or conditions
160
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
161
+ PARTICULAR PURPOSE. You are solely responsible for determining the
162
+ appropriateness of using or redistributing the Work and assume any
163
+ risks associated with Your exercise of permissions under this License.
164
+
165
+ 8. Limitation of Liability. In no event and under no legal theory,
166
+ whether in tort (including negligence), contract, or otherwise,
167
+ unless required by applicable law (such as deliberate and grossly
168
+ negligent acts) or agreed to in writing, shall any Contributor be
169
+ liable to You for damages, including any direct, indirect, special,
170
+ incidental, or consequential damages of any character arising as a
171
+ result of this License or out of the use or inability to use the
172
+ Work (including but not limited to damages for loss of goodwill,
173
+ work stoppage, computer failure or malfunction, or any and all
174
+ other commercial damages or losses), even if such Contributor
175
+ has been advised of the possibility of such damages.
176
+
177
+ 9. Accepting Warranty or Additional Liability. While redistributing
178
+ the Work or Derivative Works thereof, You may choose to offer,
179
+ and charge a fee for, acceptance of support, warranty, indemnity,
180
+ or other liability obligations and/or rights consistent with this
181
+ License. However, in accepting such obligations, You may act only
182
+ on Your own behalf and on Your sole responsibility, not on behalf
183
+ of any other Contributor, and only if You agree to indemnify,
184
+ defend, and hold each Contributor harmless for any liability
185
+ incurred by, or claims asserted against, such Contributor by reason
186
+ of your accepting any such warranty or additional liability.
187
+
188
+ END OF TERMS AND CONDITIONS
189
+
190
+ APPENDIX: How to apply the Apache License to your work.
191
+
192
+ To apply the Apache License to your work, attach the following
193
+ boilerplate notice, with the fields enclosed by brackets "[]"
194
+ replaced with your own identifying information. (Don't include
195
+ the brackets!) The text should be enclosed in the appropriate
196
+ comment syntax for the file format. We also recommend that a
197
+ file or class name and description of purpose be included on the
198
+ same "printed page" as the copyright notice for easier
199
+ identification within third-party archives.
200
+
201
+ Copyright [yyyy] [name of copyright owner]
202
+
203
+ Licensed under the Apache License, Version 2.0 (the "License");
204
+ you may not use this file except in compliance with the License.
205
+ You may obtain a copy of the License at
206
+
207
+ http://www.apache.org/licenses/LICENSE-2.0
208
+
209
+ Unless required by applicable law or agreed to in writing, software
210
+ distributed under the License is distributed on an "AS IS" BASIS,
211
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
212
+ See the License for the specific language governing permissions and
213
+ limitations under the License.
214
+
215
+
216
+ Dependencies and Licenses:
217
+
218
+ This open-source project, builds upon the following open-source models and/or software components, each of which remains licensed under its original license. Certain models or software may include modifications made by Tencent (“Tencent Modifications”), which are Copyright (C) Tencent.
219
+
220
+ In case you believe there have been errors in the attribution below, you may submit the concerns to us for review and correction.
221
+
222
+
223
+ Open Source Model Licensed under the Apache-2.0:
224
+ --------------------------------------------------------------------
225
+ Qwen3.5-35B-A3B
226
+ Copyright 2026 Alibaba Cloud
227
+ Please note this model has been modified by Tencent in this distribution.
228
+
229
+
230
+ Terms of the Apache-2.0:
231
+ --------------------------------------------------------------------
232
+ Apache License
233
+ Version 2.0, January 2004
234
+ http://www.apache.org/licenses/
235
+
236
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
237
+
238
+ 1. Definitions.
239
+
240
+ "License" shall mean the terms and conditions for use, reproduction,
241
+ and distribution as defined by Sections 1 through 9 of this document.
242
+
243
+ "Licensor" shall mean the copyright owner or entity authorized by
244
+ the copyright owner that is granting the License.
245
+
246
+ "Legal Entity" shall mean the union of the acting entity and all
247
+ other entities that control, are controlled by, or are under common
248
+ control with that entity. For the purposes of this definition,
249
+ "control" means (i) the power, direct or indirect, to cause the
250
+ direction or management of such entity, whether by contract or
251
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
252
+ outstanding shares, or (iii) beneficial ownership of such entity.
253
+
254
+ "You" (or "Your") shall mean an individual or Legal Entity
255
+ exercising permissions granted by this License.
256
+
257
+ "Source" form shall mean the preferred form for making modifications,
258
+ including but not limited to software source code, documentation
259
+ source, and configuration files.
260
+
261
+ "Object" form shall mean any form resulting from mechanical
262
+ transformation or translation of a Source form, including but
263
+ not limited to compiled object code, generated documentation,
264
+ and conversions to other media types.
265
+
266
+ "Work" shall mean the work of authorship, whether in Source or
267
+ Object form, made available under the License, as indicated by a
268
+ copyright notice that is included in or attached to the work
269
+ (an example is provided in the Appendix below).
270
+
271
+ "Derivative Works" shall mean any work, whether in Source or Object
272
+ form, that is based on (or derived from) the Work and for which the
273
+ editorial revisions, annotations, elaborations, or other modifications
274
+ represent, as a whole, an original work of authorship. For the purposes
275
+ of this License, Derivative Works shall not include works that remain
276
+ separable from, or merely link (or bind by name) to the interfaces of,
277
+ the Work and Derivative Works thereof.
278
+
279
+ "Contribution" shall mean any work of authorship, including
280
+ the original version of the Work and any modifications or additions
281
+ to that Work or Derivative Works thereof, that is intentionally
282
+ submitted to Licensor for inclusion in the Work by the copyright owner
283
+ or by an individual or Legal Entity authorized to submit on behalf of
284
+ the copyright owner. For the purposes of this definition, "submitted"
285
+ means any form of electronic, verbal, or written communication sent
286
+ to the Licensor or its representatives, including but not limited to
287
+ communication on electronic mailing lists, source code control systems,
288
+ and issue tracking systems that are managed by, or on behalf of, the
289
+ Licensor for the purpose of discussing and improving the Work, but
290
+ excluding communication that is conspicuously marked or otherwise
291
+ designated in writing by the copyright owner as "Not a Contribution."
292
+
293
+ "Contributor" shall mean Licensor and any individual or Legal Entity
294
+ on behalf of whom a Contribution has been received by Licensor and
295
+ subsequently incorporated within the Work.
296
+
297
+ 2. Grant of Copyright License. Subject to the terms and conditions of
298
+ this License, each Contributor hereby grants to You a perpetual,
299
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
300
+ copyright license to reproduce, prepare Derivative Works of,
301
+ publicly display, publicly perform, sublicense, and distribute the
302
+ Work and such Derivative Works in Source or Object form.
303
+
304
+ 3. Grant of Patent License. Subject to the terms and conditions of
305
+ this License, each Contributor hereby grants to You a perpetual,
306
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
307
+ (except as stated in this section) patent license to make, have made,
308
+ use, offer to sell, sell, import, and otherwise transfer the Work,
309
+ where such license applies only to those patent claims licensable
310
+ by such Contributor that are necessarily infringed by their
311
+ Contribution(s) alone or by combination of their Contribution(s)
312
+ with the Work to which such Contribution(s) was submitted. If You
313
+ institute patent litigation against any entity (including a
314
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
315
+ or a Contribution incorporated within the Work constitutes direct
316
+ or contributory patent infringement, then any patent licenses
317
+ granted to You under this License for that Work shall terminate
318
+ as of the date such litigation is filed.
319
+
320
+ 4. Redistribution. You may reproduce and distribute copies of the
321
+ Work or Derivative Works thereof in any medium, with or without
322
+ modifications, and in Source or Object form, provided that You
323
+ meet the following conditions:
324
+
325
+ (a) You must give any other recipients of the Work or
326
+ Derivative Works a copy of this License; and
327
+
328
+ (b) You must cause any modified files to carry prominent notices
329
+ stating that You changed the files; and
330
+
331
+ (c) You must retain, in the Source form of any Derivative Works
332
+ that You distribute, all copyright, patent, trademark, and
333
+ attribution notices from the Source form of the Work,
334
+ excluding those notices that do not pertain to any part of
335
+ the Derivative Works; and
336
+
337
+ (d) If the Work includes a "NOTICE" text file as part of its
338
+ distribution, then any Derivative Works that You distribute must
339
+ include a readable copy of the attribution notices contained
340
+ within such NOTICE file, excluding those notices that do not
341
+ pertain to any part of the Derivative Works, in at least one
342
+ of the following places: within a NOTICE text file distributed
343
+ as part of the Derivative Works; within the Source form or
344
+ documentation, if provided along with the Derivative Works; or,
345
+ within a display generated by the Derivative Works, if and
346
+ wherever such third-party notices normally appear. The contents
347
+ of the NOTICE file are for informational purposes only and
348
+ do not modify the License. You may add Your own attribution
349
+ notices within Derivative Works that You distribute, alongside
350
+ or as an addendum to the NOTICE text from the Work, provided
351
+ that such additional attribution notices cannot be construed
352
+ as modifying the License.
353
+
354
+ You may add Your own copyright statement to Your modifications and
355
+ may provide additional or different license terms and conditions
356
+ for use, reproduction, or distribution of Your modifications, or
357
+ for any such Derivative Works as a whole, provided Your use,
358
+ reproduction, and distribution of the Work otherwise complies with
359
+ the conditions stated in this License.
360
+
361
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
362
+ any Contribution intentionally submitted for inclusion in the Work
363
+ by You to the Licensor shall be under the terms and conditions of
364
+ this License, without any additional terms or conditions.
365
+ Notwithstanding the above, nothing herein shall supersede or modify
366
+ the terms of any separate license agreement you may have executed
367
+ with Licensor regarding such Contributions.
368
+
369
+ 6. Trademarks. This License does not grant permission to use the trade
370
+ names, trademarks, service marks, or product names of the Licensor,
371
+ except as required for reasonable and customary use in describing the
372
+ origin of the Work and reproducing the content of the NOTICE file.
373
+
374
+ 7. Disclaimer of Warranty. Unless required by applicable law or
375
+ agreed to in writing, Licensor provides the Work (and each
376
+ Contributor provides its Contributions) on an "AS IS" BASIS,
377
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
378
+ implied, including, without limitation, any warranties or conditions
379
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
380
+ PARTICULAR PURPOSE. You are solely responsible for determining the
381
+ appropriateness of using or redistributing the Work and assume any
382
+ risks associated with Your exercise of permissions under this License.
383
+
384
+ 8. Limitation of Liability. In no event and under no legal theory,
385
+ whether in tort (including negligence), contract, or otherwise,
386
+ unless required by applicable law (such as deliberate and grossly
387
+ negligent acts) or agreed to in writing, shall any Contributor be
388
+ liable to You for damages, including any direct, indirect, special,
389
+ incidental, or consequential damages of any character arising as a
390
+ result of this License or out of the use or inability to use the
391
+ Work (including but not limited to damages for loss of goodwill,
392
+ work stoppage, computer failure or malfunction, or any and all
393
+ other commercial damages or losses), even if such Contributor
394
+ has been advised of the possibility of such damages.
395
+
396
+ 9. Accepting Warranty or Additional Liability. While redistributing
397
+ the Work or Derivative Works thereof, You may choose to offer,
398
+ and charge a fee for, acceptance of support, warranty, indemnity,
399
+ or other liability obligations and/or rights consistent with this
400
+ License. However, in accepting such obligations, You may act only
401
+ on Your own behalf and on Your sole responsibility, not on behalf
402
+ of any other Contributor, and only if You agree to indemnify,
403
+ defend, and hold each Contributor harmless for any liability
404
+ incurred by, or claims asserted against, such Contributor by reason
405
+ of your accepting any such warranty or additional liability.
406
+
407
+ END OF TERMS AND CONDITIONS
408
+
409
+ APPENDIX: How to apply the Apache License to your work.
410
+
411
+ To apply the Apache License to your work, attach the following
412
+ boilerplate notice, with the fields enclosed by brackets "[]"
413
+ replaced with your own identifying information. (Don't include
414
+ the brackets!) The text should be enclosed in the appropriate
415
+ comment syntax for the file format. We also recommend that a
416
+ file or class name and description of purpose be included on the
417
+ same "printed page" as the copyright notice for easier
418
+ identification within third-party archives.
419
+
420
+ Copyright [yyyy] [name of copyright owner]
421
+
422
+ Licensed under the Apache License, Version 2.0 (the "License");
423
+ you may not use this file except in compliance with the License.
424
+ You may obtain a copy of the License at
425
+
426
+ http://www.apache.org/licenses/LICENSE-2.0
427
+
428
+ Unless required by applicable law or agreed to in writing, software
429
+ distributed under the License is distributed on an "AS IS" BASIS,
430
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
431
+ See the License for the specific language governing permissions and
432
+ limitations under the License.
433
+
434
+
README.md ADDED
@@ -0,0 +1,656 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ pipeline_tag: image-text-to-text
4
+ license: apache-2.0
5
+ license_link: https://huggingface.co/tencent/WeMM-Ecom-35B-A3B/blob/main/LICENSE
6
+ base_model:
7
+ - Qwen/Qwen3.5-35B-A3B
8
+ tags:
9
+ - wemm
10
+ - qwen3_5_moe
11
+ - multimodal
12
+ - e-commerce
13
+ - conversational
14
+ language:
15
+ - zh
16
+ - en
17
+ ---
18
+
19
+ <h1 align="center">WeMM-Ecom-35B-A3B</h1>
20
+
21
+ <p align="center"><b>Multimodal Understanding for E-Commerce</b></p>
22
+
23
+ <p align="center">
24
+ <a href="https://huggingface.co/collections/tencent/wemm-ecom"><img src="https://img.shields.io/badge/Hugging%20Face-Model%20Collection-FFD21E?style=flat&amp;logo=huggingface&amp;logoColor=FFD21E" alt="Hugging Face Model Collection" height="28"></a>
25
+ <a href="https://github.com/Tencent/WeMM-Ecom"><img src="https://img.shields.io/badge/GitHub-Tencent%2FWeMM--Ecom-181717?style=flat&amp;logo=github&amp;logoColor=white" alt="GitHub: Tencent/WeMM-Ecom" height="28"></a>
26
+ </p>
27
+
28
+ <p align="center">
29
+ <a href="#evaluation">Evaluation</a> ·
30
+ <a href="#quick-start">Quick Start</a> ·
31
+ <a href="#best-practices">Best Practices</a>
32
+ </p>
33
+
34
+ **WeMM-Ecom-35B-A3B** is a mixture-of-experts model in the WeMM-Ecom family developed by **WeChat Vision, Tencent**. It combines fine-grained e-commerce understanding with broad visual-language and reasoning capabilities and supports **hybrid thinking**.
35
+
36
+ The WeMM-Ecom family delivers leading e-commerce performance, with WeMM-Ecom-35B-A3B outperforming open-source models with hundreds of billions of parameters. Across model sizes, it also maintains general-purpose capabilities on par with state-of-the-art models of comparable size.
37
+
38
+ ## Highlights
39
+
40
+ - **E-commerce understanding:** Outperforms Qwen3.5-35B-A3B by **3.92 points**, Qwen3.6-35B-A3B by **3.36 points**, and MiniCPM-V-4.7-35B-A3B by **8.22 points** in average benchmark score.
41
+ - **Broad general capabilities:** Outperforms Qwen3.5-35B-A3B by **0.23 points**, MiniCPM-V-4.7-35B-A3B by **5.60 points**, and Valley3-32B by **9.13 points** in average benchmark score.
42
+ - **Flexible deployment:** text, image, multi-image, and video inputs; BF16, FP8, GPTQ, and GGUF formats.
43
+
44
+ ## Model Overview
45
+
46
+ - **Architecture:** 35B total parameters, approximately 3B active parameters (MoE).
47
+ - **Context window:** 262,144 tokens.
48
+ - **Checkpoint:** BF16 Safetensors.
49
+
50
+ **Model family:** [0.8B](https://huggingface.co/tencent/WeMM-Ecom-0.8B) · [2B](https://huggingface.co/tencent/WeMM-Ecom-2B) · [4B](https://huggingface.co/tencent/WeMM-Ecom-4B) · [9B](https://huggingface.co/tencent/WeMM-Ecom-9B) · [35B-A3B](https://huggingface.co/tencent/WeMM-Ecom-35B-A3B)
51
+
52
+ **Quantized formats:** [FP8](https://huggingface.co/tencent/WeMM-Ecom-35B-A3B-FP8) · [GPTQ](https://huggingface.co/tencent/WeMM-Ecom-35B-A3B-GPTQ) · [GGUF](https://huggingface.co/tencent/WeMM-Ecom-35B-A3B-GGUF)
53
+
54
+ ## Evaluation
55
+
56
+ We evaluate e-commerce understanding on **28 benchmarks across eight scenarios** and general capabilities on **64 benchmarks across eight categories**. All scores use a 0–100 scale, with higher values indicating stronger performance.
57
+
58
+ ### E-commerce Benchmarks
59
+
60
+ The suite covers product attributes, moderation, OCR, retrieval, grounding, reasoning, public e-commerce benchmarks, and product knowledge.
61
+
62
+ ![WeMM-Ecom-35B-A3B e-commerce comparisons](assets/ecommerce-benchmarks.png)
63
+
64
+ <details>
65
+ <summary><b>Full e-commerce benchmark results</b></summary>
66
+
67
+ #### Instruct Mode
68
+
69
+ ![WeMM-Ecom-35B-A3B Instruct Mode e-commerce results](assets/ecommerce-instruct-table.png)
70
+
71
+ #### Thinking Mode
72
+
73
+ ![WeMM-Ecom-35B-A3B Thinking Mode e-commerce results](assets/ecommerce-thinking-table.png)
74
+
75
+ </details>
76
+
77
+ ### General Benchmarks
78
+
79
+ The suite spans general VQA, document and chart understanding, STEM reasoning, spatial understanding, grounding and counting, multi-image understanding, instruction following, and text-centric tasks.
80
+
81
+ ![WeMM-Ecom-35B-A3B general comparisons](assets/general-benchmarks.png)
82
+
83
+ <details>
84
+ <summary><b>Full general benchmark results</b></summary>
85
+
86
+ #### Instruct Mode
87
+
88
+ ![WeMM-Ecom-35B-A3B Instruct Mode general results](assets/general-instruct-table.png)
89
+
90
+ #### Thinking Mode
91
+
92
+ ![WeMM-Ecom-35B-A3B Thinking Mode general results](assets/general-thinking-table.png)
93
+
94
+ </details>
95
+
96
+ ## Quick Start
97
+
98
+ Run WeMM-Ecom with Transformers, or use either of the [OpenAI-compatible serving options](#serving) below. Replace the local image and video paths with your own content.
99
+
100
+ > Choose sampling settings by mode and task. The examples below use the general-task settings; see [Best Practices](#best-practices) for additional recommended profiles and output budgets.
101
+
102
+ ### Transformers
103
+
104
+ #### Installation
105
+
106
+ The commands below use Python 3.11 as an example environment. For other Python versions, follow the requirements of your [Transformers](https://huggingface.co/docs/transformers/installation) and [PyTorch](https://pytorch.org/get-started/locally/) releases. `uv` selects the PyTorch backend for your machine.
107
+
108
+ ```bash
109
+ python3.11 -m venv .venv-transformers
110
+ source .venv-transformers/bin/activate
111
+ pip install -U pip uv
112
+ uv pip install -U "transformers>=5.2.0" accelerate torch torchvision pillow --torch-backend=auto
113
+ ```
114
+
115
+ <details>
116
+ <summary>Authentication and local checkpoints</summary>
117
+
118
+ For repositories that require authentication, sign in once. You can also download a checkpoint to a local directory:
119
+
120
+ ```bash
121
+ pip install -U huggingface_hub
122
+ hf auth login
123
+ hf download tencent/WeMM-Ecom-35B-A3B --local-dir ./WeMM-Ecom-35B-A3B
124
+ ```
125
+
126
+ To use the downloaded checkpoint, set `model_id = "./WeMM-Ecom-35B-A3B"` in the loading example below. Both the model and processor accept the same local directory.
127
+
128
+ </details>
129
+
130
+ #### Load the Model
131
+
132
+ Load the processor and model once. The following examples share these objects and generation settings.
133
+
134
+ ```python
135
+ import torch
136
+ from transformers import AutoModelForImageTextToText, AutoProcessor
137
+
138
+ model_id = "tencent/WeMM-Ecom-35B-A3B"
139
+ processor = AutoProcessor.from_pretrained(model_id)
140
+ model = AutoModelForImageTextToText.from_pretrained(
141
+ model_id, dtype=torch.bfloat16, device_map="auto",
142
+ ).eval()
143
+
144
+ enable_thinking = True
145
+ generation_kwargs = {
146
+ "max_new_tokens": 4096,
147
+ "do_sample": True,
148
+ "top_k": 20,
149
+ "min_p": 0.0,
150
+ "repetition_penalty": 1.0,
151
+ }
152
+
153
+ def split_output(text, thinking):
154
+ if not thinking:
155
+ return "", text.strip()
156
+ reasoning, closed, answer = text.partition("</think>")
157
+ return reasoning.removeprefix("<think>").strip(), answer.strip() if closed else ""
158
+ ```
159
+
160
+ The examples print the final answer. In Thinking Mode, `reasoning_text` contains the reasoning and the final answer starts after `</think>`.
161
+
162
+ #### Image Understanding
163
+
164
+ Use a product photo to extract its visible attributes:
165
+
166
+ ```python
167
+ messages = [{
168
+ "role": "user",
169
+ "content": [
170
+ {"type": "image", "image": "./product.jpg"},
171
+ {"type": "text", "text": "Describe this product and extract its visible attributes."},
172
+ ],
173
+ }]
174
+ inputs = processor.apply_chat_template(
175
+ messages, tokenize=True, add_generation_prompt=True,
176
+ enable_thinking=enable_thinking,
177
+ return_dict=True, return_tensors="pt",
178
+ ).to(model.device)
179
+ with torch.inference_mode():
180
+ outputs = model.generate(
181
+ **inputs, **generation_kwargs,
182
+ temperature=1.0 if enable_thinking else 0.7,
183
+ top_p=0.95 if enable_thinking else 0.8,
184
+ )
185
+ new_tokens = outputs[:, inputs["input_ids"].shape[1]:]
186
+ decoded = processor.batch_decode(
187
+ new_tokens, skip_special_tokens=True, clean_up_tokenization_spaces=False,
188
+ )[0]
189
+ reasoning_text, final_text = split_output(decoded, enable_thinking)
190
+ print(final_text)
191
+ ```
192
+
193
+ #### Hybrid Thinking
194
+
195
+ - **Instruct Mode:** set `enable_thinking=False` for a direct response; use `temperature=0.7` and `top_p=0.8`.
196
+ - **Thinking Mode:** set `enable_thinking=True` for reasoning followed by the final answer; use `temperature=1.0` and `top_p=0.95`.
197
+
198
+ The checkpoint default is **Thinking Mode**. All examples pass the switch explicitly. To change modes, update `enable_thinking`; the conditional sampling arguments in each `generate()` call follow it automatically.
199
+
200
+ <details>
201
+ <summary>Text-only Conversations</summary>
202
+
203
+ ```python
204
+ messages = [{"role": "user", "content": [{
205
+ "type": "text", "text": "List the key attributes used to distinguish product variants.",
206
+ }]}]
207
+ inputs = processor.apply_chat_template(
208
+ messages, tokenize=True, add_generation_prompt=True,
209
+ enable_thinking=enable_thinking,
210
+ return_dict=True, return_tensors="pt",
211
+ ).to(model.device)
212
+ with torch.inference_mode():
213
+ outputs = model.generate(
214
+ **inputs, **generation_kwargs,
215
+ temperature=1.0 if enable_thinking else 0.7,
216
+ top_p=0.95 if enable_thinking else 0.8,
217
+ )
218
+ new_tokens = outputs[:, inputs["input_ids"].shape[1]:]
219
+ decoded = processor.batch_decode(
220
+ new_tokens, skip_special_tokens=True, clean_up_tokenization_spaces=False,
221
+ )[0]
222
+ reasoning_text, final_text = split_output(decoded, enable_thinking)
223
+ print(final_text)
224
+ ```
225
+
226
+ </details>
227
+
228
+ <details>
229
+ <summary>Multi-Image Understanding</summary>
230
+
231
+ Provide multiple product views in one conversation:
232
+
233
+ ```python
234
+ messages = [{"role": "user", "content": [
235
+ {"type": "image", "image": "./product_front.jpg"},
236
+ {"type": "image", "image": "./product_back.jpg"},
237
+ {"type": "text", "text": "Compare these views and extract the visible variant attributes."},
238
+ ]}]
239
+ inputs = processor.apply_chat_template(
240
+ messages, tokenize=True, add_generation_prompt=True,
241
+ enable_thinking=enable_thinking,
242
+ return_dict=True, return_tensors="pt",
243
+ ).to(model.device)
244
+ with torch.inference_mode():
245
+ outputs = model.generate(
246
+ **inputs, **generation_kwargs,
247
+ temperature=1.0 if enable_thinking else 0.7,
248
+ top_p=0.95 if enable_thinking else 0.8,
249
+ )
250
+ new_tokens = outputs[:, inputs["input_ids"].shape[1]:]
251
+ decoded = processor.batch_decode(
252
+ new_tokens, skip_special_tokens=True, clean_up_tokenization_spaces=False,
253
+ )[0]
254
+ reasoning_text, final_text = split_output(decoded, enable_thinking)
255
+ print(final_text)
256
+ ```
257
+
258
+ </details>
259
+
260
+ <details>
261
+ <summary>Video Understanding</summary>
262
+
263
+ Install [TorchCodec](https://github.com/meta-pytorch/torchcodec#installing-torchcodec) with a build matching your PyTorch and FFmpeg setup:
264
+
265
+ ```bash
266
+ pip install torchcodec
267
+ ```
268
+
269
+ This example samples 16 frames from a product demonstration:
270
+
271
+ ```python
272
+ messages = [{"role": "user", "content": [
273
+ {"type": "video", "path": "./product_demo.mp4"},
274
+ {"type": "text", "text": "Summarize the product features and actions demonstrated in this clip."},
275
+ ]}]
276
+ inputs = processor.apply_chat_template(
277
+ messages, tokenize=True, add_generation_prompt=True,
278
+ enable_thinking=enable_thinking, num_frames=16, fps=None,
279
+ return_dict=True, return_tensors="pt",
280
+ ).to(model.device)
281
+ with torch.inference_mode():
282
+ outputs = model.generate(
283
+ **inputs, **generation_kwargs,
284
+ temperature=1.0 if enable_thinking else 0.7,
285
+ top_p=0.95 if enable_thinking else 0.8,
286
+ )
287
+ new_tokens = outputs[:, inputs["input_ids"].shape[1]:]
288
+ decoded = processor.batch_decode(
289
+ new_tokens, skip_special_tokens=True, clean_up_tokenization_spaces=False,
290
+ )[0]
291
+ reasoning_text, final_text = split_output(decoded, enable_thinking)
292
+ print(final_text)
293
+ ```
294
+
295
+ For rate-based sampling, replace `num_frames=16, fps=None` with `fps=2.0` and omit `num_frames`.
296
+
297
+ </details>
298
+
299
+ <details>
300
+ <summary>Batched Inference</summary>
301
+
302
+ Pass a list of conversations and use left padding. Crop generated tokens at the common padded input width.
303
+
304
+ ```python
305
+ processor.tokenizer.padding_side = "left"
306
+ batch_messages = [
307
+ [{"role": "user", "content": [
308
+ {"type": "image", "image": "./product_front.jpg"},
309
+ {"type": "text", "text": "Extract the visible product attributes."},
310
+ ]}],
311
+ [{"role": "user", "content": [{
312
+ "type": "text", "text": "Explain the difference between a product and an SKU.",
313
+ }]}],
314
+ ]
315
+ inputs = processor.apply_chat_template(
316
+ batch_messages, tokenize=True, add_generation_prompt=True,
317
+ enable_thinking=enable_thinking, padding=True,
318
+ return_dict=True, return_tensors="pt",
319
+ ).to(model.device)
320
+ with torch.inference_mode():
321
+ outputs = model.generate(
322
+ **inputs, **generation_kwargs,
323
+ temperature=1.0 if enable_thinking else 0.7,
324
+ top_p=0.95 if enable_thinking else 0.8,
325
+ )
326
+ new_tokens = outputs[:, inputs["input_ids"].shape[1]:]
327
+ decoded_batch = processor.batch_decode(
328
+ new_tokens, skip_special_tokens=True, clean_up_tokenization_spaces=False,
329
+ )
330
+ for decoded in decoded_batch:
331
+ reasoning_text, final_text = split_output(decoded, enable_thinking)
332
+ print(final_text)
333
+ ```
334
+
335
+ </details>
336
+
337
+ <details>
338
+ <summary>Multi-turn Conversations</summary>
339
+
340
+ Keep the media references in the conversation history and append only the final answer from each assistant turn.
341
+
342
+ ```python
343
+ turns = [
344
+ [{"type": "image", "image": "./product.jpg"},
345
+ {"type": "text", "text": "Describe this product's visible attributes."}],
346
+ [{"type": "text", "text": "Which attributes should be included in the product title?"}],
347
+ ]
348
+ messages = []
349
+ for content in turns:
350
+ messages.append({"role": "user", "content": content})
351
+ inputs = processor.apply_chat_template(
352
+ messages, tokenize=True, add_generation_prompt=True,
353
+ enable_thinking=enable_thinking,
354
+ return_dict=True, return_tensors="pt",
355
+ ).to(model.device)
356
+ with torch.inference_mode():
357
+ outputs = model.generate(
358
+ **inputs, **generation_kwargs,
359
+ temperature=1.0 if enable_thinking else 0.7,
360
+ top_p=0.95 if enable_thinking else 0.8,
361
+ )
362
+ new_tokens = outputs[:, inputs["input_ids"].shape[1]:]
363
+ decoded = processor.batch_decode(
364
+ new_tokens, skip_special_tokens=True, clean_up_tokenization_spaces=False,
365
+ )[0]
366
+ reasoning_text, final_text = split_output(decoded, enable_thinking)
367
+ if not final_text:
368
+ break
369
+ print(final_text)
370
+ messages.append({"role": "assistant", "content": [{"type": "text", "text": final_text}]})
371
+ ```
372
+
373
+ </details>
374
+
375
+ <details>
376
+ <summary>Visual Input Settings</summary>
377
+
378
+ The image processor accepts pixel-area bounds through `images_kwargs`. This example uses a 64–1280 visual-token image budget; the checkpoint's defaults remain available by omitting this override.
379
+
380
+ ```python
381
+ spatial_factor = processor.image_processor.patch_size * processor.image_processor.merge_size
382
+ messages = [{"role": "user", "content": [
383
+ {"type": "image", "image": "./product.jpg"},
384
+ {"type": "text", "text": "Read the visible product text and attributes."},
385
+ ]}]
386
+ inputs = processor.apply_chat_template(
387
+ messages, tokenize=True, add_generation_prompt=True,
388
+ enable_thinking=enable_thinking,
389
+ images_kwargs={"size": {
390
+ "shortest_edge": 64 * spatial_factor ** 2,
391
+ "longest_edge": 1280 * spatial_factor ** 2,
392
+ }},
393
+ return_dict=True, return_tensors="pt",
394
+ ).to(model.device)
395
+ with torch.inference_mode():
396
+ outputs = model.generate(
397
+ **inputs, **generation_kwargs,
398
+ temperature=1.0 if enable_thinking else 0.7,
399
+ top_p=0.95 if enable_thinking else 0.8,
400
+ )
401
+ new_tokens = outputs[:, inputs["input_ids"].shape[1]:]
402
+ decoded = processor.batch_decode(
403
+ new_tokens, skip_special_tokens=True, clean_up_tokenization_spaces=False,
404
+ )[0]
405
+ reasoning_text, final_text = split_output(decoded, enable_thinking)
406
+ print(final_text)
407
+ ```
408
+
409
+ </details>
410
+
411
+ <details>
412
+ <summary>Optional FlashAttention 2</summary>
413
+
414
+ For a compatible CUDA setup, follow the [FlashAttention installation instructions](https://github.com/Dao-AILab/flash-attention#installation-and-features), then replace the model-loading call above with:
415
+
416
+ ```python
417
+ model = AutoModelForImageTextToText.from_pretrained(
418
+ model_id, dtype=torch.bfloat16, device_map="auto",
419
+ attn_implementation="flash_attention_2",
420
+ ).eval()
421
+ ```
422
+
423
+ </details>
424
+
425
+ ## Serving
426
+
427
+ Choose vLLM or SGLang and install the engine in its own Python environment. Both expose the client API shown below.
428
+
429
+ The commands use a 32,768-token serving context. The model's native context window is **262,144 tokens**. Adjust `--max-model-len` for vLLM or `--context-length` for SGLang, together with tensor parallelism, for your deployment.
430
+
431
+ ### vLLM
432
+
433
+ See the [vLLM installation guide](https://docs.vllm.ai/en/latest/getting_started/installation/gpu/) for the requirements of your chosen release. The commands below use a separate Python 3.11 environment.
434
+
435
+ ```bash
436
+ python3.11 -m venv .venv-vllm
437
+ source .venv-vllm/bin/activate
438
+ pip install -U pip uv
439
+ uv pip install -U "vllm>=0.31.0" openai --torch-backend=auto
440
+
441
+ MODEL=tencent/WeMM-Ecom-35B-A3B
442
+ vllm serve "$MODEL" \
443
+ --served-model-name "$MODEL" \
444
+ --tensor-parallel-size 2 \
445
+ --max-model-len 32768 \
446
+ --reasoning-parser qwen3 \
447
+ --port 8000
448
+ ```
449
+
450
+ ### SGLang
451
+
452
+ Use the environment requirements in the [SGLang installation guide](https://docs.sglang.io/docs/get-started/install.md). The source-install example is:
453
+
454
+ ```bash
455
+ python3.11 -m venv .venv-sglang
456
+ source .venv-sglang/bin/activate
457
+ pip install -U pip uv
458
+ uv pip install --prerelease=allow 'git+https://github.com/sgl-project/sglang.git#subdirectory=python' openai
459
+
460
+ MODEL=tencent/WeMM-Ecom-35B-A3B
461
+ python -m sglang.launch_server \
462
+ --model-path "$MODEL" \
463
+ --served-model-name "$MODEL" \
464
+ --tp-size 2 \
465
+ --mem-fraction-static 0.8 \
466
+ --context-length 32768 \
467
+ --reasoning-parser qwen3 \
468
+ --port 8000
469
+ ```
470
+
471
+ ### OpenAI-compatible API
472
+
473
+ Install the client where you send requests:
474
+
475
+ ```bash
476
+ pip install -U openai
477
+ ```
478
+
479
+ Set `enable_thinking` before constructing the shared request settings; rerun this setup when changing modes. Local media are encoded in the client so the server does not need access to their file paths.
480
+
481
+ ```python
482
+ import base64
483
+ from pathlib import Path
484
+ from openai import OpenAI
485
+
486
+ client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY")
487
+ enable_thinking = True
488
+ request_kwargs = {
489
+ "model": "tencent/WeMM-Ecom-35B-A3B",
490
+ "max_completion_tokens": 4096,
491
+ "temperature": 1.0 if enable_thinking else 0.7,
492
+ "top_p": 0.95 if enable_thinking else 0.8,
493
+ "presence_penalty": 1.5,
494
+ "extra_body": {
495
+ "top_k": 20, "min_p": 0.0, "repetition_penalty": 1.0,
496
+ "chat_template_kwargs": {"enable_thinking": enable_thinking},
497
+ },
498
+ }
499
+
500
+ def media_url(path, mime_type):
501
+ data = base64.b64encode(Path(path).read_bytes()).decode("ascii")
502
+ return f"data:{mime_type};base64,{data}"
503
+
504
+ def show_response(response):
505
+ message = response.choices[0].message
506
+ reasoning = getattr(message, "reasoning", None) or getattr(message, "reasoning_content", None)
507
+ if reasoning:
508
+ print("Reasoning:\n" + reasoning)
509
+ answer = message.content or ""
510
+ print("Answer:\n" + answer)
511
+ return answer
512
+ ```
513
+
514
+ #### Image Requests
515
+
516
+ ```python
517
+ messages = [{"role": "user", "content": [
518
+ {"type": "image_url", "image_url": {"url": media_url("./product.jpg", "image/jpeg")}},
519
+ {"type": "text", "text": "Describe this product and extract its visible attributes."},
520
+ ]}]
521
+ response = client.chat.completions.create(messages=messages, **request_kwargs)
522
+ final_text = show_response(response)
523
+ ```
524
+
525
+ <details>
526
+ <summary>Text Requests</summary>
527
+
528
+ ```python
529
+ messages = [{"role": "user", "content": "List attributes that distinguish product variants."}]
530
+ response = client.chat.completions.create(messages=messages, **request_kwargs)
531
+ final_text = show_response(response)
532
+ ```
533
+
534
+ </details>
535
+
536
+ <details>
537
+ <summary>Multi-Image Requests</summary>
538
+
539
+ ```python
540
+ messages = [{"role": "user", "content": [
541
+ {"type": "image_url", "image_url": {"url": media_url("./product_front.jpg", "image/jpeg")}},
542
+ {"type": "image_url", "image_url": {"url": media_url("./product_back.jpg", "image/jpeg")}},
543
+ {"type": "text", "text": "Compare these product views and extract the visible attributes."},
544
+ ]}]
545
+ response = client.chat.completions.create(messages=messages, **request_kwargs)
546
+ final_text = show_response(response)
547
+ ```
548
+
549
+ </details>
550
+
551
+ <details>
552
+ <summary>Video Requests</summary>
553
+
554
+ Use the engines' `video_url` input with a local MP4 clip:
555
+
556
+ ```python
557
+ messages = [{"role": "user", "content": [
558
+ {"type": "video_url", "video_url": {"url": media_url("./product_demo.mp4", "video/mp4")}},
559
+ {"type": "text", "text": "Summarize the visible events in this product demonstration."},
560
+ ]}]
561
+ response = client.chat.completions.create(messages=messages, **request_kwargs)
562
+ final_text = show_response(response)
563
+ ```
564
+
565
+ </details>
566
+
567
+ <details>
568
+ <summary>Multi-turn Requests</summary>
569
+
570
+ Send the conversation history with each request and keep only the final answer in assistant messages.
571
+
572
+ ```python
573
+ turns = [
574
+ [{"type": "image_url", "image_url": {"url": media_url("./product.jpg", "image/jpeg")}},
575
+ {"type": "text", "text": "Describe this product's visible attributes."}],
576
+ "Which details should be included in the product title?",
577
+ ]
578
+ history = []
579
+ for content in turns:
580
+ history.append({"role": "user", "content": content})
581
+ response = client.chat.completions.create(messages=history, **request_kwargs)
582
+ final_text = show_response(response)
583
+ if not final_text:
584
+ break
585
+ history.append({"role": "assistant", "content": final_text})
586
+ ```
587
+
588
+ </details>
589
+
590
+ <details>
591
+ <summary>Streaming Responses</summary>
592
+
593
+ ```python
594
+ messages = [{"role": "user", "content": [
595
+ {"type": "image_url", "image_url": {"url": media_url("./product.jpg", "image/jpeg")}},
596
+ {"type": "text", "text": "Describe this product and extract its visible attributes."},
597
+ ]}]
598
+ stream = client.chat.completions.create(messages=messages, stream=True, **request_kwargs)
599
+ channel = None
600
+ for chunk in stream:
601
+ if not chunk.choices:
602
+ continue
603
+ delta = chunk.choices[0].delta
604
+ reasoning = getattr(delta, "reasoning", None) or getattr(delta, "reasoning_content", None)
605
+ for label, text in [("Reasoning", reasoning), ("Answer", delta.content)]:
606
+ if not text:
607
+ continue
608
+ if label != channel:
609
+ print(f"\n{label}:\n", end="")
610
+ channel = label
611
+ print(text, end="", flush=True)
612
+ print()
613
+ ```
614
+
615
+ </details>
616
+
617
+ ## Best Practices
618
+
619
+ ### Sampling Parameters
620
+
621
+ Choose a profile by mode and task. The following settings are starting points drawn from our evaluation configurations.
622
+
623
+ - **Instruct Mode — general tasks:** `temperature=0.7`, `top_p=0.8`, `top_k=20`, `min_p=0.0`, `presence_penalty=1.5`, `repetition_penalty=1.0`.
624
+ - **Instruct Mode — structured outputs, such as attribute selection, product detection, and SKU matching:** `temperature=0.7`, `top_p=0.8`, `top_k=20`, `min_p=0.0`, `presence_penalty=0.0`, `repetition_penalty=1.0`.
625
+ - **Instruct Mode — reasoning tasks:** `temperature=1.0`, `top_p=1.0`, `top_k=40`, `min_p=0.0`, `presence_penalty=2.0`, `repetition_penalty=1.0`.
626
+ - **Thinking Mode — general tasks:** `temperature=1.0`, `top_p=0.95`, `top_k=20`, `min_p=0.0`, `presence_penalty=1.5`, `repetition_penalty=1.0`.
627
+ - **Thinking Mode — OCR, entity recognition, and SKU matching:** `temperature=1.0`, `top_p=0.95`, `top_k=20`, `min_p=0.0`, `presence_penalty=2.0`, `repetition_penalty=1.05`.
628
+
629
+ Use the OpenAI-compatible examples to apply all listed parameters. Pass `temperature`, `top_p`, and `presence_penalty` directly, and put `top_k`, `min_p`, and `repetition_penalty` in `extra_body`. The native Transformers examples use `do_sample=True` and omit `presence_penalty` from `generate()`.
630
+
631
+ ### Mode and Output Settings
632
+
633
+ - **Select the mode explicitly:** use `enable_thinking=False` for Instruct Mode and `enable_thinking=True` for Thinking Mode. In the serving API, pass this switch through `chat_template_kwargs` in `extra_body`.
634
+ - **Allow enough output tokens:** our evaluations use a maximum generation budget of **65,536 tokens**. The Quick Start uses **4,096 tokens** for a compact example; increase this budget for longer reasoning. Set `max_new_tokens` in Transformers or `max_completion_tokens` in the serving API. The serving context limit must accommodate both the input and the generated output.
635
+ - **Specify the output format:** for extraction, matching, and grounding, state the required fields, labels, and coordinate format. For multiple-choice tasks, request a clear final answer. In multi-turn conversations, append the assistant's final answer to the history.
636
+
637
+ ## Citation
638
+
639
+ If you find WeMM-Ecom useful, please consider starring our [GitHub repository](https://github.com/Tencent/WeMM-Ecom) and citing our technical report.
640
+
641
+ ```bibtex
642
+ @misc{wemm-ecom-2026,
643
+ title = {WeMM-Ecom: A New Era in Multimodal Content Understanding for WeChat E-Commerce},
644
+ author = {Binhui Xie and Jinmin Li and Haomiao Tang and Guangting Wang and Song Jin and Jianwei Zhu and Fengyun Rao and Jing LYU},
645
+ year = {2026},
646
+ url = {}
647
+ }
648
+ ```
649
+
650
+ ## License
651
+
652
+ The model weights are licensed under Apache-2.0, except for the third-party components listed in [LICENSE](LICENSE), which retain their respective original licenses. See that file for the full terms, notices, and dependencies.
653
+
654
+ ## Acknowledgements
655
+
656
+ We thank the Qwen team for the Qwen3.5 foundation and the open-source community for the tools and benchmarks used in this project.
assets/ecommerce-benchmarks.png ADDED

Git LFS Details

  • SHA256: a975951bf938c67750da6825c8455dfc717b50b43d074b5da6886035ab52c339
  • Pointer size: 131 Bytes
  • Size of remote file: 823 kB
assets/ecommerce-instruct-table.png ADDED

Git LFS Details

  • SHA256: 490c8f05cd19ffe0cadb2861f5ac96358802ba6a36f8dc9e6a9163c946da5d1a
  • Pointer size: 131 Bytes
  • Size of remote file: 548 kB
assets/ecommerce-thinking-table.png ADDED

Git LFS Details

  • SHA256: 400b769b8412fef7fc93f9de2aec1a796448ab6c748be09a6954cde0e8d3ceeb
  • Pointer size: 131 Bytes
  • Size of remote file: 607 kB
assets/general-benchmarks.png ADDED

Git LFS Details

  • SHA256: 38d763e4151209332980e944a66bb443f1536d6988291be231d30a6391fe17e8
  • Pointer size: 131 Bytes
  • Size of remote file: 792 kB
assets/general-instruct-table.png ADDED

Git LFS Details

  • SHA256: eb18c9ce19fc356611d1ddf7cbeed3b9ba39738380088bdfc2c9d6a5869fd43e
  • Pointer size: 132 Bytes
  • Size of remote file: 1.02 MB
assets/general-thinking-table.png ADDED

Git LFS Details

  • SHA256: e55bfe6e45487ab6e9cb03c5b7a902c08d07582e6c6fd140464e1054bc51c350
  • Pointer size: 132 Bytes
  • Size of remote file: 1.07 MB