Instructions to use tencent/WeMM-Ecom-35B-A3B-FP8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tencent/WeMM-Ecom-35B-A3B-FP8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="tencent/WeMM-Ecom-35B-A3B-FP8") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("tencent/WeMM-Ecom-35B-A3B-FP8") model = AutoModelForMultimodalLM.from_pretrained("tencent/WeMM-Ecom-35B-A3B-FP8", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use tencent/WeMM-Ecom-35B-A3B-FP8 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tencent/WeMM-Ecom-35B-A3B-FP8" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tencent/WeMM-Ecom-35B-A3B-FP8", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/tencent/WeMM-Ecom-35B-A3B-FP8
- SGLang
How to use tencent/WeMM-Ecom-35B-A3B-FP8 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "tencent/WeMM-Ecom-35B-A3B-FP8" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tencent/WeMM-Ecom-35B-A3B-FP8", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "tencent/WeMM-Ecom-35B-A3B-FP8" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tencent/WeMM-Ecom-35B-A3B-FP8", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use tencent/WeMM-Ecom-35B-A3B-FP8 with Docker Model Runner:
docker model run hf.co/tencent/WeMM-Ecom-35B-A3B-FP8
WeMM-Ecom-35B-A3B-FP8
Advancing Multimodal Content Understanding for WeChat E-Commerce
Evaluation · Quick Start · Best Practices
WeMM-Ecom-35B-A3B-FP8 is the block-wise FP8 quantized release of WeMM-Ecom-35B-A3B, developed by WeChat Vision, Tencent. It brings fine-grained e-commerce understanding, broad visual-language capabilities, and hybrid thinking to quantized deployment.
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
The following highlights summarize the corresponding WeMM-Ecom-35B-A3B BF16 checkpoint.
- 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.
- Broad general capabilities: Outperforms Qwen3.5-35B-A3B by 0.17 points, MiniCPM-V-4.7-35B-A3B by 5.60 points, and Valley3-32B by 9.13 points in average benchmark score.
- Flexible deployment: text, image, multi-image, and video inputs; BF16, FP8, GPTQ, and GGUF formats.
Model Overview
- Architecture: 35B total parameters, approximately 3B active parameters (MoE).
- Context window: 262,144 tokens.
- Checkpoint: FP8 E4M3 Safetensors.
Model family: 0.8B · 2B · 4B · 9B · 35B-A3B
Available formats: BF16 · FP8 · GPTQ · GGUF
Quantization
- Weights: FP8 E4M3, with a scale for each 128 × 128 block.
- Activations: dynamic FP8 quantization during inference.
- Precision selection: the vision encoder, output head, and selected sensitive projections retain their original precision.
Use an FP8-capable GPU and a serving engine with block-wise FP8 support. The checkpoint includes its quantization settings, which vLLM detects automatically.
Family Evaluation
The charts below present results for the WeMM-Ecom-35B-A3B BF16 checkpoint from our technical report.
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.
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.
Quick Start
Serve the checkpoint with vLLM, then use the OpenAI-compatible examples for text, image, multi-image, video, multi-turn, and streaming requests. Replace the local image and video paths with your own content.
Installation
Use a separate environment for the serving engine. Python 3.11 is an example; follow the requirements of your chosen vLLM release.
python3.11 -m venv .venv-vllm
source .venv-vllm/bin/activate
pip install -U pip uv
uv pip install -U "vllm>=0.31.0" openai --torch-backend=auto
Authentication and local checkpoints
For repositories that require authentication, sign in once. To download the checkpoint to a local directory:
pip install -U huggingface_hub
hf auth login
hf download tencent/WeMM-Ecom-35B-A3B-FP8 --local-dir ./WeMM-Ecom-35B-A3B-FP8
To serve the local checkpoint, use MODEL=./WeMM-Ecom-35B-A3B-FP8 below and keep the served model name unchanged.
Start vLLM
The example uses a 32,768-token serving context. Adjust the context and tensor parallelism for your deployment.
MODEL=tencent/WeMM-Ecom-35B-A3B-FP8
vllm serve "$MODEL" \
--served-model-name "tencent/WeMM-Ecom-35B-A3B-FP8" \
--tensor-parallel-size 2 \
--max-model-len 32768 \
--reasoning-parser qwen3 \
--port 8000
Hybrid Thinking
- Instruct Mode: set
enable_thinking=Falsefor a direct response. - Thinking Mode: set
enable_thinking=Truefor reasoning followed by the final answer.
The checkpoint default is Thinking Mode. The API examples pass the switch explicitly.
OpenAI-compatible API
Install the client where you send requests:
pip install -U openai pillow
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.
import base64
import io
from pathlib import Path
from PIL import Image, ImageOps
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY")
enable_thinking = True
request_kwargs = {
"model": "tencent/WeMM-Ecom-35B-A3B-FP8",
"max_completion_tokens": 4096,
"temperature": 1.0 if enable_thinking else 0.7,
"top_p": 0.95 if enable_thinking else 0.8,
"presence_penalty": 1.5,
"extra_body": {
"top_k": 20, "min_p": 0.0, "repetition_penalty": 1.0,
"chat_template_kwargs": {"enable_thinking": enable_thinking},
},
}
def media_url(path, mime_type):
if mime_type.startswith("image/"):
with Image.open(path) as source:
image = ImageOps.exif_transpose(source).convert("RGBA")
background = Image.new("RGBA", image.size, (255, 255, 255, 255))
image = Image.alpha_composite(background, image).convert("RGB")
buffer = io.BytesIO()
image.save(buffer, format="PNG")
data = buffer.getvalue()
mime_type = "image/png"
else:
data = Path(path).read_bytes()
encoded = base64.b64encode(data).decode("ascii")
return f"data:{mime_type};base64,{encoded}"
def show_response(response):
choice = response.choices[0]
message = choice.message
if choice.finish_reason == "length" or not (message.content or "").strip():
raise RuntimeError("No complete final answer. Review max_completion_tokens and generation settings.")
reasoning = getattr(message, "reasoning", None) or getattr(message, "reasoning_content", None)
if reasoning:
print("Reasoning:\n" + reasoning)
answer = message.content or ""
print("Answer:\n" + answer)
return answer
Image Requests
messages = [{"role": "user", "content": [
{"type": "image_url", "image_url": {"url": media_url("./product.jpg", "image/jpeg")}},
{"type": "text", "text": "Describe this product and extract its visible attributes."},
]}]
response = client.chat.completions.create(messages=messages, **request_kwargs)
final_text = show_response(response)
Text Requests
messages = [{"role": "user", "content": "List five attributes that distinguish product variants."}]
response = client.chat.completions.create(messages=messages, **request_kwargs)
final_text = show_response(response)
Multi-Image Requests
messages = [{"role": "user", "content": [
{"type": "image_url", "image_url": {"url": media_url("./product_front.jpg", "image/jpeg")}},
{"type": "image_url", "image_url": {"url": media_url("./product_back.jpg", "image/jpeg")}},
{"type": "text", "text": "Compare these product views and extract the visible attributes."},
]}]
response = client.chat.completions.create(messages=messages, **request_kwargs)
final_text = show_response(response)
Video Requests
Use the engines' video_url input with a local MP4 clip:
messages = [{"role": "user", "content": [
{"type": "video_url", "video_url": {"url": media_url("./product_demo.mp4", "video/mp4")}},
{"type": "text", "text": "Summarize the visible events in this product demonstration."},
]}]
response = client.chat.completions.create(messages=messages, **request_kwargs)
final_text = show_response(response)
Multi-turn Requests
Send the conversation history with each request and keep only the final answer in assistant messages.
turns = [
[{"type": "image_url", "image_url": {"url": media_url("./product.jpg", "image/jpeg")}},
{"type": "text", "text": "Describe this product's visible attributes."}],
"Which details should be included in the product title?",
]
history = []
for content in turns:
history.append({"role": "user", "content": content})
response = client.chat.completions.create(messages=history, **request_kwargs)
final_text = show_response(response)
if not final_text:
break
history.append({"role": "assistant", "content": final_text})
Streaming Responses
messages = [{"role": "user", "content": [
{"type": "image_url", "image_url": {"url": media_url("./product.jpg", "image/jpeg")}},
{"type": "text", "text": "Describe this product and extract its visible attributes."},
]}]
stream = client.chat.completions.create(messages=messages, stream=True, **request_kwargs)
channel = None
finish_reason = None
answer_parts = []
for chunk in stream:
if not chunk.choices:
continue
choice = chunk.choices[0]
finish_reason = choice.finish_reason or finish_reason
delta = choice.delta
if delta.content:
answer_parts.append(delta.content)
reasoning = getattr(delta, "reasoning", None) or getattr(delta, "reasoning_content", None)
for label, text in [("Reasoning", reasoning), ("Answer", delta.content)]:
if not text:
continue
if label != channel:
print(f"\n{label}:\n", end="")
channel = label
print(text, end="", flush=True)
print()
if finish_reason == "length" or not "".join(answer_parts).strip():
raise RuntimeError("No complete final answer. Review max_completion_tokens and generation settings.")
Best Practices
Sampling Parameters
Use the following sampling profiles according to the mode and task.
- 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. - 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. - 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. - 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. - 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.
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.
Mode and Output Settings
- Select the mode explicitly: use
enable_thinking=Falsefor Instruct Mode andenable_thinking=Truefor Thinking Mode. In the serving API, pass this switch throughchat_template_kwargsinextra_body. - Allow enough output tokens: the Quick Start uses 4,096 tokens for a compact example. Allow a larger budget for longer reasoning; in Thinking Mode, this budget covers both reasoning and the final answer. Set
max_completion_tokensin the serving API. The serving context limit must accommodate both the input and the generated output. - 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.
Citation
If you find WeMM-Ecom useful, please consider starring our GitHub repository and citing our technical report.
@misc{wemm-ecom-2026,
title = {WeMM-Ecom: Advancing Multimodal Content Understanding for WeChat E-Commerce},
author = {Binhui Xie and Jinmin Li and Haomiao Tang and Guangting Wang and Song Jin and Jianwei Zhu and Fengyun Rao and Jing Lyu},
year = {2026},
eprint = {2611.30662},
archivePrefix = {arXiv},
primaryClass = {cs.AI},
url = {https://arxiv.org/abs/2611.30662}
}
License
The model weights are licensed under Apache-2.0, except for the third-party components listed in LICENSE, which retain their respective original licenses. See that file for the full terms, notices, and dependencies.
Acknowledgements
We thank the Qwen team for the Qwen3.5 foundation and the open-source community for the tools and benchmarks used in this project.
- Downloads last month
- 269
Model tree for tencent/WeMM-Ecom-35B-A3B-FP8
Base model
Qwen/Qwen3.5-35B-A3B-Base




