ModelTencent HunyuanTencent Hunyuanpublished Nov 18, 2026seen 4d

tencent/WeMM-Ecom-4B

Open original ↗

Captured source

source ↗
published Nov 18, 2026seen 4dcaptured 4dhttp 200method plaintask image-text-to-textlicense apache-2.0library transformersparams 4.5Bdownloads 1klikes 6

WeMM-Ecom-4B

Advancing Multimodal Content Understanding for WeChat E-Commerce

Evaluation · Quick Start · Best Practices

WeMM-Ecom-4B is a 4B-scale dense 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.

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.

Highlights

  • E-commerce understanding: Outperforms Qwen3.5-4B by 6.47 points in average benchmark score.
  • Broad general capabilities: Outperforms Qwen3.5-4B by 0.40 points in average benchmark score.
  • Flexible deployment: text, image, multi-image, and video inputs; BF16, FP8, GPTQ, and GGUF formats.

Model Overview

  • Architecture: 4B dense model.
  • Context window: 262,144 tokens.
  • Checkpoint: BF16 Safetensors.

Model family: 0.8B · 2B · 4B · 9B · 35B-A3B

Quantized formats: FP8 · GPTQ · GGUF

Evaluation

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.

E-commerce Benchmarks

The suite covers product attributes, moderation, OCR, retrieval, grounding, reasoning, public e-commerce benchmarks, and product knowledge.

![WeMM-Ecom-4B e-commerce comparisons](assets/ecommerce-benchmarks.png)

Full e-commerce benchmark results

Instruct Mode

![WeMM-Ecom-4B Instruct Mode e-commerce results](assets/ecommerce-instruct-table.png)

Thinking Mode

![WeMM-Ecom-4B Thinking Mode e-commerce results](assets/ecommerce-thinking-table.png)

General Benchmarks

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.

![WeMM-Ecom-4B general comparisons](assets/general-benchmarks.png)

Full general benchmark results

Instruct Mode

![WeMM-Ecom-4B Instruct Mode general results](assets/general-instruct-table.png)

Thinking Mode

![WeMM-Ecom-4B Thinking Mode general results](assets/general-thinking-table.png)

Quick Start

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.

> 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.

Transformers

Installation

The commands below use Python 3.11 as an example environment. For other Python versions, follow the requirements of your Transformers and PyTorch releases. uv selects the PyTorch backend for your machine.

python3.11 -m venv .venv-transformers
source .venv-transformers/bin/activate
pip install -U pip uv
uv pip install -U "transformers>=5.2.0" accelerate torch torchvision pillow --torch-backend=auto

Authentication and local checkpoints

For repositories that require authentication, sign in once. You can also download a checkpoint to a local directory:

pip install -U huggingface_hub
hf auth login
hf download tencent/WeMM-Ecom-4B --local-dir ./WeMM-Ecom-4B

To use the downloaded checkpoint, set model_id = "./WeMM-Ecom-4B" in the loading example below. Both the model and processor accept the same local directory.

Load the Model

Load the processor and model once. The following examples share these objects and generation settings.

import torch
from PIL import Image, ImageOps
from transformers import AutoModelForImageTextToText, AutoProcessor

# Apply camera orientation and use white behind transparent image regions.
def load_image(path):
with Image.open(path) as source:
image = ImageOps.exif_transpose(source).convert("RGBA")
background = Image.new("RGBA", image.size, (255, 255, 255, 255))
return Image.alpha_composite(background, image).convert("RGB")

model_id = "tencent/WeMM-Ecom-4B"
processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForImageTextToText.from_pretrained(
model_id, dtype=torch.bfloat16, device_map="auto",
).eval()

enable_thinking = True
generation_kwargs = {
"max_new_tokens": 4096,
"do_sample": True,
"top_k": 20,
"min_p": 0.0,
"repetition_penalty": 1.0,
}

def check_output_stopped(token_ids, eos_token_id):
if type(eos_token_id) is int:
eos_ids = {eos_token_id}
elif isinstance(eos_token_id, list) and all(type(value) is int for value in eos_token_id):
eos_ids = set(eos_token_id)
else:
raise RuntimeError("No valid EOS token IDs are configured.")
rows = token_ids.tolist()
if not eos_ids or not rows or any(not any(token_id in eos_ids for token_id in row) for row in rows):
raise RuntimeError("Generation ended without an EOS token. Review max_new_tokens and generation settings.")

def split_output(text, thinking):
if not thinking:
if not text.strip():
raise RuntimeError("No final answer. Review the output budget and generation settings.")
return "", text.strip()
reasoning, closed, answer = text.partition("")
if not closed or not answer.strip():
raise RuntimeError("No complete final answer. Review max_new_tokens and generation settings.")
return reasoning.removeprefix("").strip(), answer.strip()

The examples print the final answer. In Thinking Mode, reasoning_text contains the reasoning and the final answer starts after ``.

Image Understanding

Describe an image and its visible details:

messages = [{
"role": "user",
"content": [
{"type": "image", "image": load_image("./product.jpg")},
{"type": "text", "text": "Briefly describe the main subjects and their...

Excerpt shown — open the source for the full document.

Notability

notability 7.0/10

Notable model release by Tencent Hunyuan