WeMM-Video-2B Vision Encoder
This repository contains all original model.visual.* tensors from tencent/WeMM-Video-2B, pinned revision 821690998399cac0f55bb7f7f805ebafa650c3a4. The 24-layer Qwen3.5-style visual tower, patch embeddings and spatial merger are included. Audio encoder, language model and the full audio-video chat system are not included.
- 297 BF16 tensors; 331,416,576 parameters, 662,833,152 tensor bytes.
- 16 attention heads, hidden width 1024, patch size 16, temporal patch size 2, 2×2 spatial merger to width 2048.
model.safetensorsSHA-256:46d9cc91570255f769fe71709211659be6eede0cefb3d9c210a61c8649f3cd83.- Original keys, values, shapes and dtypes are retained. Exported tensor payloads were checked byte-for-byte against the source HTTP range cache; the full original shards were not independently downloaded or hashed.
Load
Install requirements.txt. The source's vision implementation and its required module imports are bundled under native_source; checkpoint keys are stripped only during strict state-dict loading. This component is not registered as an AutoModel.
from huggingface_hub import snapshot_download
from PIL import Image
from transformers import Qwen2VLImageProcessor
import importlib.util, sys, torch
root = snapshot_download('gatilin/wemm-video-2b-vision-encoder')
sys.path.insert(0, root)
spec = importlib.util.spec_from_file_location('wemm_visual', root + '/component.py')
module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(module)
model = module.load_model(root, device='cpu', dtype=torch.float32)
processor = Qwen2VLImageProcessor.from_pretrained(root)
inputs = processor(images=Image.open('image.jpg').convert('RGB'), return_tensors='pt')
with torch.inference_mode():
out = model(inputs['pixel_values'], grid_thw=inputs['image_grid_thw'])
print(out.last_hidden_state.shape, out.pooler_output.shape)
The processor's configuration is supplied as preprocessor_config.json. The full source configuration is source_config.json; config.json documents the extracted bundle rather than declaring a complete language model.
Validation
validation.json records strict loading and CPU float32 forwards on two real COCO128 images resized to 224 × 224. Each produced 196 patch tokens of width 1024 and 49 merged tokens of width 2048. At layers 0, 11 and 23, explicit attention matched native SDPA. This smoke test does not validate the full model, audio processing, video-language performance or task accuracy. It used the upstream source implementation over Transformers 5.21.1 with a locally relaxed tokenizer version check; the tokenizer was not used. See validate_local_reference.py and extraction.json.
License
The source model identifies Apache-2.0; the original license is included. Consult the upstream model for attribution and third-party dependencies.