Video-Text-to-Text
Transformers
Safetensors
English
Chinese
mllama
text-generation
multimodal
video
vision-language
sft
custom_code
text-generation-inference
Instructions to use OpenMOSS-Team/moss-video-preview-sft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OpenMOSS-Team/moss-video-preview-sft with Transformers:
# Load model directly from transformers import AutoProcessor, AutoModelForCausalLM processor = AutoProcessor.from_pretrained("OpenMOSS-Team/moss-video-preview-sft", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("OpenMOSS-Team/moss-video-preview-sft", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse files
README.md
CHANGED
|
@@ -3,6 +3,9 @@ language:
|
|
| 3 |
- en
|
| 4 |
library_name: transformers
|
| 5 |
pipeline_tag: image-text-to-text
|
|
|
|
|
|
|
|
|
|
| 6 |
tags:
|
| 7 |
- multimodal
|
| 8 |
- video
|
|
@@ -45,7 +48,8 @@ For architecture diagrams and full system details, see the top-level repository:
|
|
| 45 |
|
| 46 |
### Offline video inference (recommended)
|
| 47 |
|
| 48 |
-
|
|
|
|
| 49 |
|
| 50 |
```python
|
| 51 |
import torch
|
|
@@ -94,10 +98,13 @@ inputs = processor(
|
|
| 94 |
with torch.no_grad():
|
| 95 |
output_ids = model.generate(**inputs, max_new_tokens=512, do_sample=False)
|
| 96 |
|
| 97 |
-
print(processor.decode(output_ids[0], skip_special_tokens=
|
| 98 |
```
|
| 99 |
|
| 100 |
-
|
|
|
|
|
|
|
|
|
|
| 101 |
|
| 102 |
```python
|
| 103 |
import torch
|
|
@@ -140,9 +147,11 @@ inputs = processor(
|
|
| 140 |
with torch.no_grad():
|
| 141 |
output_ids = model.generate(**inputs, max_new_tokens=256, do_sample=False)
|
| 142 |
|
| 143 |
-
print(processor.decode(output_ids[0], skip_special_tokens=
|
| 144 |
```
|
| 145 |
|
|
|
|
|
|
|
| 146 |
## ✅ Intended use
|
| 147 |
|
| 148 |
- **Offline instruction-following** for video/image understanding (recommended default checkpoint for most users).
|
|
@@ -180,7 +189,7 @@ For full environment setup (including optional FlashAttention2 extras), see the
|
|
| 180 |
year = {2026},
|
| 181 |
publisher = {GitHub},
|
| 182 |
journal = {GitHub repository},
|
| 183 |
-
howpublished = {\url{https://github.com/
|
| 184 |
}
|
| 185 |
```
|
| 186 |
|
|
|
|
| 3 |
- en
|
| 4 |
library_name: transformers
|
| 5 |
pipeline_tag: image-text-to-text
|
| 6 |
+
license: apache-2.0
|
| 7 |
+
base_model: fnlp-vision/moss-video-preview-base
|
| 8 |
+
model_type: video_mllama
|
| 9 |
tags:
|
| 10 |
- multimodal
|
| 11 |
- video
|
|
|
|
| 48 |
|
| 49 |
### Offline video inference (recommended)
|
| 50 |
|
| 51 |
+
<details>
|
| 52 |
+
<summary><strong>Video inference (Python)</strong></summary>
|
| 53 |
|
| 54 |
```python
|
| 55 |
import torch
|
|
|
|
| 98 |
with torch.no_grad():
|
| 99 |
output_ids = model.generate(**inputs, max_new_tokens=512, do_sample=False)
|
| 100 |
|
| 101 |
+
print(processor.decode(output_ids[0], skip_special_tokens=True))
|
| 102 |
```
|
| 103 |
|
| 104 |
+
</details>
|
| 105 |
+
|
| 106 |
+
<details>
|
| 107 |
+
<summary><strong>Image inference (Python)</strong></summary>
|
| 108 |
|
| 109 |
```python
|
| 110 |
import torch
|
|
|
|
| 147 |
with torch.no_grad():
|
| 148 |
output_ids = model.generate(**inputs, max_new_tokens=256, do_sample=False)
|
| 149 |
|
| 150 |
+
print(processor.decode(output_ids[0], skip_special_tokens=True))
|
| 151 |
```
|
| 152 |
|
| 153 |
+
</details>
|
| 154 |
+
|
| 155 |
## ✅ Intended use
|
| 156 |
|
| 157 |
- **Offline instruction-following** for video/image understanding (recommended default checkpoint for most users).
|
|
|
|
| 189 |
year = {2026},
|
| 190 |
publisher = {GitHub},
|
| 191 |
journal = {GitHub repository},
|
| 192 |
+
howpublished = {\url{https://github.com/fnlp-vision/MOSS-Video-Preview}}
|
| 193 |
}
|
| 194 |
```
|
| 195 |
|