Video-Text-to-Text
Transformers
Safetensors
English
Chinese
qwen3_5
feature-extraction
wemm
multimodal
video
audio
custom_code
Instructions to use tencent/WeMM-Video-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tencent/WeMM-Video-4B with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModel processor = AutoProcessor.from_pretrained("tencent/WeMM-Video-4B", trust_remote_code=True) model = AutoModel.from_pretrained("tencent/WeMM-Video-4B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Document recommended sampling parameters
Browse files- README.md +11 -0
- SHA256SUMS +1 -1
README.md
CHANGED
|
@@ -152,6 +152,17 @@ python examples/chat.py video-audio --model "$MODEL"
|
|
| 152 |
|
| 153 |
Set `fps` and `max_frames` inside `video_url` to control sampling for a clip. Set `chat_template_kwargs.enable_thinking` to `true` for Thinking mode. See the [complete video request](https://github.com/Tencent/WeMM-Video/blob/main/docs/serving.md#send-a-video-request).
|
| 154 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 155 |
## Validation
|
| 156 |
|
| 157 |
Patched vLLM loaded the checkpoint on H20 and completed generation checks for text, image, audio, and video with a soundtrack. The local checkpoint also passed direct Transformers loading and a CPU text generation check.
|
|
|
|
| 152 |
|
| 153 |
Set `fps` and `max_frames` inside `video_url` to control sampling for a clip. Set `chat_template_kwargs.enable_thinking` to `true` for Thinking mode. See the [complete video request](https://github.com/Tencent/WeMM-Video/blob/main/docs/serving.md#send-a-video-request).
|
| 154 |
|
| 155 |
+
## Recommended Sampling Parameters
|
| 156 |
+
|
| 157 |
+
| Mode | Task | `temperature` | `top_p` | `top_k` | `presence_penalty` | `repetition_penalty` |
|
| 158 |
+
| --- | --- | ---: | ---: | ---: | ---: | ---: |
|
| 159 |
+
| Thinking | Silent video and audio-visual video | 0.6 | 0.95 | 20 | 1.5 | 1.0 |
|
| 160 |
+
| Thinking | Image and text | 1.0 | 0.95 | 20 | 1.5 | 1.0 |
|
| 161 |
+
| Thinking | Audio only | 0.9 | 0.95 | 20 | 1.5 | 1.0 |
|
| 162 |
+
| Instruct | General tasks | 1.0 | 0.95 | 20 | 1.5 | 1.0 |
|
| 163 |
+
|
| 164 |
+
For Transformers, set `do_sample=True` and pass `temperature`, `top_p`, `top_k`, and `repetition_penalty` to `generate()`. Apply `presence_penalty` in a runtime that exposes it, such as vLLM.
|
| 165 |
+
|
| 166 |
## Validation
|
| 167 |
|
| 168 |
Patched vLLM loaded the checkpoint on H20 and completed generation checks for text, image, audio, and video with a soundtrack. The local checkpoint also passed direct Transformers loading and a CPU text generation check.
|
SHA256SUMS
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
bac4d42ddebadb11e405fc4de2335579e67676362ac870108012ab4899ef1e5b LICENSE
|
| 2 |
-
|
| 3 |
5cf26c5a561880138295ce9921c270e1a4c5ca7ac11b489b83fb9c8acbebaf37 README_PROCESSOR.md
|
| 4 |
273d8e0e683b885071fb17e08d71e5f2a5ddfb5309756181681de4f5a1822d80 chat_template.jinja
|
| 5 |
5eca5c5955cdc4ec20ddb433053130c690304a0a26c2dcd031daef032b7235a4 config.json
|
|
|
|
| 1 |
bac4d42ddebadb11e405fc4de2335579e67676362ac870108012ab4899ef1e5b LICENSE
|
| 2 |
+
1a4b8115baf90ee26d0cc071e3877b9b9c4dfddf4507c616798fdd68c19e1694 README.md
|
| 3 |
5cf26c5a561880138295ce9921c270e1a4c5ca7ac11b489b83fb9c8acbebaf37 README_PROCESSOR.md
|
| 4 |
273d8e0e683b885071fb17e08d71e5f2a5ddfb5309756181681de4f5a1822d80 chat_template.jinja
|
| 5 |
5eca5c5955cdc4ec20ddb433053130c690304a0a26c2dcd031daef032b7235a4 config.json
|