跳到正文
腾讯混元模型发布·· 15 小时前精选AI 评分62

腾讯微信 AI 发布 WePocketModel 1.0 4B GGUF 端侧多模态模型

tencent/WePocketModel1.0-4B-GGUF

AI 导读

腾讯微信 AI 发布 WePocketModel 1.0 的 4B GGUF 版本,面向端侧应用,用共享主干和视觉编码器在单一模型中支持文生文、图文生成、L2 归一化多模态嵌入以及结构化选择、打分和二元判断。

推荐理由

微信 AI 把视觉语言模型压到 4B 并给出 GGUF 量化包,读者可据此判断端侧多模态的部署门槛。

正文 · 原文

WePocketModel 1.0 4B GGUF

WePocketModel (WePM) is a vision-language model family developed by WeChat AI, Tencent for on-device applications. A shared backbone and vision encoder support three capabilities in a single model.

This CPU bundle is derived from the 4B safetensors checkpoint. It supports text generation from text and images, L2-normalized multimodal embeddings, and structured choices, scores, and binary judgments.

Available Variants

Choose one language weight file and use it with the shared multimodal-BF16.gguf file.

Language precision Language weights Shared vision and task weights Combined weight file size
Q4_K_M (default) language-Q4_K_M.gguf multimodal-BF16.gguf 3.42 GB
BF16 language-BF16.gguf multimodal-BF16.gguf 9.14 GB

The sizes above are on-disk weights in decimal GB. Runtime memory depends on the selected variant, inputs, context size, and backend overhead. Quantization applies to the language weights. The shared vision and task tensors are stored in BF16 and computed in FP32 by the WePM CPU runtime.

Quick Start

Build the WePM CPU runtime

Use Python 3.10–3.13, Git, CMake 3.20 or later, and a C++17 compiler. The build script fetches the llama.cpp revision pinned by WePM and builds libwepm_gguf.

git clone https://github.com/Tencent/WePocketModel.git
cd WePocketModel
python -m venv .venv
source .venv/bin/activate
python -m pip install torch==2.10.0 torchvision==0.25.0 \
  --index-url https://download.pytorch.org/whl/cpu
python -m pip install -r inference/requirements-gguf.txt
python inference/build_gguf.py

Download and run Q4_K_M

The following command downloads the Q4_K_M language file and the accompanying bundle files.

hf download tencent/WePocketModel1.0-4B-GGUF \
  --exclude language-BF16.gguf \
  --local-dir checkpoints/WePocketModel1.0-4B-GGUF-q4

export WEPM_MODEL="$PWD/checkpoints/WePocketModel1.0-4B-GGUF-q4"
bash examples/cpu/generation/run.sh single_text

The default q4 setting selects Q4_K_M. The examples use the same local bundle for image-conditioned generation, embedding, and decision.

bash examples/cpu/generation/run.sh interleaved
bash examples/cpu/embedding/run.sh
bash examples/cpu/decision/run.sh

Run the BF16 variant

hf download tencent/WePocketModel1.0-4B-GGUF \
  --exclude language-Q4_K_M.gguf \
  --local-dir checkpoints/WePocketModel1.0-4B-GGUF-bf16

python inference/infer_cpu.py \
  --model checkpoints/WePocketModel1.0-4B-GGUF-bf16 \
  --gguf-variant bf16 --task generate \
  --prompt "Introduce yourself in one sentence." \
  --output results/wepm-4b-gguf-bf16.json

The CLI writes a JSON result to a new path. For repeated runs, choose a fresh output path. See the GGUF inference guide for thread count, context size, and native library selection.

Matryoshka embeddings

WePM supports Matryoshka Representation Learning (MRL) for multimodal embeddings. Select 64, 128, 256, 512, 1,024, or 2,048 dimensions with --embedding-dim. The runtime L2-normalizes the selected prefix of the embedding projection. The CLI defaults to 2,048 dimensions.

Both Q4_K_M and BF16 support these dimensions. This example uses the Q4_K_M bundle selected above.

python inference/infer_cpu.py \
  --model "$WEPM_MODEL" --task embed \
  --prompt "A photo of a red square." --embedding-dim 256 \
  --output results/wepm-4b-gguf-embedding-256.json

Bundle Files

Keep the selected language weights and multimodal-BF16.gguf alongside bundle.json, the config, tokenizer, processor, chat template, and runtime_sources/. The bundle manifest maps each precision to its file and records file sizes and hashes. SHA256SUMS.txt provides checksums for all three GGUF weight files.

Evaluation

WePM benchmark comparison across Embedding, Generation, and Decision

Benchmark results for the WePM model family across embedding, generation, and structured decision tasks.

Intended Use and Limitations

WePM is intended for local applications that combine multimodal retrieval, generation, and structured decisions. Application developers should evaluate output quality on representative inputs and validate structured decisions before using them to trigger actions.

The pinned llama.cpp build executes the language backbone. The WePM Python runtime runs the shared vision encoder and task heads. The 4B checkpoint’s full embedding dimension is 2,048.

License and Citation

The WePM inference code is licensed under Apache 2.0.

The model weights in this repository are licensed under the Apache License 2.0. The listed third-party components retain their original licenses.

If you find our work useful, please cite it as:

@misc{wepm2026,
  title = {WePM: Hierarchical Conflict Reconciliation for Unified MLLMs},
  author = {{WeChat AI, Tencent}},
  year = {2026},
  howpublished = {Technical Report},
  url = {https://arxiv.org/abs/2611.27365}
}

来源:腾讯混元模型发布 · hf-mirror.com

同类内容