Instructions to use CCCCCC/VPO-5B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CCCCCC/VPO-5B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="CCCCCC/VPO-5B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("CCCCCC/VPO-5B") model = AutoModelForCausalLM.from_pretrained("CCCCCC/VPO-5B") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use CCCCCC/VPO-5B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "CCCCCC/VPO-5B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CCCCCC/VPO-5B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/CCCCCC/VPO-5B
- SGLang
How to use CCCCCC/VPO-5B 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 "CCCCCC/VPO-5B" \ --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": "CCCCCC/VPO-5B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "CCCCCC/VPO-5B" \ --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": "CCCCCC/VPO-5B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use CCCCCC/VPO-5B with Docker Model Runner:
docker model run hf.co/CCCCCC/VPO-5B
Improve model card: Remove non-standard metadata, shorten title, add citation and tags
Browse filesThis PR improves the model card by:
- Removing the non-standard `inference: false` tag from the metadata.
- Shortening the main heading in the content for better readability.
- Adding the BibTeX citation for proper attribution.
- Adding `tags` metadata to better describe the model's function (prompt optimization for text-to-video generation).
The existing links to the paper, code repository, and sample usage are correctly preserved.
README.md
CHANGED
|
@@ -1,19 +1,20 @@
|
|
| 1 |
---
|
| 2 |
language:
|
| 3 |
- en
|
| 4 |
-
license: apache-2.0
|
| 5 |
-
inference: false
|
| 6 |
library_name: transformers
|
|
|
|
| 7 |
pipeline_tag: text-generation
|
|
|
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
<h1>VPO
|
| 11 |
|
| 12 |
- **Repository:** https://github.com/thu-coai/VPO
|
| 13 |
- **Paper:** [VPO: Aligning Text-to-Video Generation Models with Prompt Optimization](https://huggingface.co/papers/2503.20491)
|
| 14 |
- **Data:** https://huggingface.co/datasets/CCCCCC/VPO
|
| 15 |
|
| 16 |
-
# VPO
|
| 17 |
VPO is a principled prompt optimization framework grounded in the principles of harmlessness, accuracy, and helpfulness.
|
| 18 |
VPO employs a two-stage process that first constructs a supervised fine-tuning dataset guided by safety and alignment, and then conducts preference learning with both text-level and video-level feedback. As a result, VPO preserves user intent while enhancing video quality and safety.
|
| 19 |
|
|
@@ -82,9 +83,12 @@ print(resp)
|
|
| 82 |
```
|
| 83 |
See our [Github Repo](https://github.com/thu-coai/VPO) for more detailed usage (e.g. Inference with Vllm).
|
| 84 |
|
| 85 |
-
|
| 86 |
-
<!-- ## Citation
|
| 87 |
-
If you find our model is useful in your work, please cite it with:
|
| 88 |
```
|
| 89 |
-
|
| 90 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
language:
|
| 3 |
- en
|
|
|
|
|
|
|
| 4 |
library_name: transformers
|
| 5 |
+
license: apache-2.0
|
| 6 |
pipeline_tag: text-generation
|
| 7 |
+
tags:
|
| 8 |
+
- text-to-video
|
| 9 |
+
- prompt-optimization
|
| 10 |
---
|
| 11 |
|
| 12 |
+
<h1>VPO</h1>
|
| 13 |
|
| 14 |
- **Repository:** https://github.com/thu-coai/VPO
|
| 15 |
- **Paper:** [VPO: Aligning Text-to-Video Generation Models with Prompt Optimization](https://huggingface.co/papers/2503.20491)
|
| 16 |
- **Data:** https://huggingface.co/datasets/CCCCCC/VPO
|
| 17 |
|
|
|
|
| 18 |
VPO is a principled prompt optimization framework grounded in the principles of harmlessness, accuracy, and helpfulness.
|
| 19 |
VPO employs a two-stage process that first constructs a supervised fine-tuning dataset guided by safety and alignment, and then conducts preference learning with both text-level and video-level feedback. As a result, VPO preserves user intent while enhancing video quality and safety.
|
| 20 |
|
|
|
|
| 83 |
```
|
| 84 |
See our [Github Repo](https://github.com/thu-coai/VPO) for more detailed usage (e.g. Inference with Vllm).
|
| 85 |
|
| 86 |
+
## Citation
|
|
|
|
|
|
|
| 87 |
```
|
| 88 |
+
@article{cheng2025vpo,
|
| 89 |
+
title={Vpo: Aligning text-to-video generation models with prompt optimization},
|
| 90 |
+
author={Cheng, Jiale and Lyu, Ruiliang and Gu, Xiaotao and Liu, Xiao and Xu, Jiazheng and Lu, Yida and Teng, Jiayan and Yang, Zhuoyi and Dong, Yuxiao and Tang, Jie and others},
|
| 91 |
+
journal={arXiv preprint arXiv:2503.20491},
|
| 92 |
+
year={2025}
|
| 93 |
+
}
|
| 94 |
+
```
|