Image-Text-to-Text
Transformers
Safetensors
English
qwen2_vl
multimodal
conversational
text-generation-inference
Run this model with HF Jobs
Run sitatech/VideoReward on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/sitatech/VideoReward. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/sitatech/VideoReward on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/sitatech/VideoReward. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/sitatech/VideoReward. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use sitatech/VideoReward with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sitatech/VideoReward with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="sitatech/VideoReward") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, Qwen2VLRewardModelBT processor = AutoProcessor.from_pretrained("sitatech/VideoReward") model = Qwen2VLRewardModelBT.from_pretrained("sitatech/VideoReward", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use sitatech/VideoReward with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sitatech/VideoReward" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sitatech/VideoReward", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/sitatech/VideoReward
- SGLang
How to use sitatech/VideoReward 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 "sitatech/VideoReward" \ --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": "sitatech/VideoReward", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "sitatech/VideoReward" \ --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": "sitatech/VideoReward", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use sitatech/VideoReward with Docker Model Runner:
docker model run hf.co/sitatech/VideoReward
Create reward_model_config.json
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224{ "data_config": { "meta_data": "", "data_dir": "", "meta_data_test": "", "max_frame_pixels": 200704, "num_frames": null, "fps": 2.0, "p_shuffle_frames": 0.0, "p_color_jitter": 0.0, "eval_dim": [ "VQ", "MQ", "TA" ], "prompt_template_type": "detailed_special", "add_noise": false, "sample_type": "uniform", "use_tied_data": true }, "training_args": { "output_dir": "", "overwrite_output_dir": false, "do_train": false, "do_eval": true, "do_predict": false, "eval_strategy": "steps", "prediction_loss_only": false, "per_device_train_batch_size": 1, "per_device_eval_batch_size": 4, "per_gpu_train_batch_size": null, "per_gpu_eval_batch_size": null, "gradient_accumulation_steps": 4, "eval_accumulation_steps": null, "eval_delay": 0, "torch_empty_cache_steps": null, "learning_rate": 2e-06, "weight_decay": 0.0, "adam_beta1": 0.9, "adam_beta2": 0.999, "adam_epsilon": 1e-08, "max_grad_norm": 1.0, "num_train_epochs": 3.0, "max_steps": -1, "lr_scheduler_type": "constant_with_warmup", "lr_scheduler_kwargs": {}, "warmup_ratio": 0.05, "warmup_steps": 0, "log_level": "passive", "log_level_replica": "warning", "log_on_each_node": true, "logging_dir": "", "logging_strategy": "steps", "logging_first_step": false, "logging_steps": 57, "logging_nan_inf_filter": true, "save_strategy": "steps", "save_steps": 1419, "save_total_limit": null, "save_safetensors": true, "save_on_each_node": false, "save_only_model": true, "restore_callback_states_from_checkpoint": false, "no_cuda": false, "use_cpu": false, "use_mps_device": false, "seed": 42, "data_seed": null, "jit_mode_eval": false, "use_ipex": false, "bf16": true, "fp16": false, "fp16_opt_level": "O1", "half_precision_backend": "auto", "bf16_full_eval": false, "fp16_full_eval": false, "tf32": null, "ddp_backend": null, "tpu_num_cores": null, "tpu_metrics_debug": false, "debug": [], "dataloader_drop_last": false, "eval_steps": 568, "dataloader_num_workers": 8, "dataloader_prefetch_factor": null, "past_index": -1, "run_name": "", "disable_tqdm": false, "remove_unused_columns": false, "label_names": null, "load_best_model_at_end": false, "metric_for_best_model": null, "greater_is_better": null, "ignore_data_skip": false, "fsdp": [], "fsdp_min_num_params": 0, "fsdp_config": { "min_num_params": 0, "xla": false, "xla_fsdp_v2": false, "xla_fsdp_grad_ckpt": false }, "fsdp_transformer_layer_cls_to_wrap": null, "accelerator_config": { "split_batches": false, "dispatch_batches": null, "even_batches": true, "use_seedable_sampler": true, "non_blocking": false, "gradient_accumulation_kwargs": null, "use_configured_state": false }, "deepspeed": "ds_config/zero0.json", "label_smoothing_factor": 0.0, "optim": "adamw_torch", "optim_args": null, "adafactor": false, "group_by_length": false, "length_column_name": "length", "report_to": [ "tensorboard" ], "ddp_find_unused_parameters": null, "ddp_bucket_cap_mb": null, "ddp_broadcast_buffers": null, "dataloader_pin_memory": true, "dataloader_persistent_workers": false, "skip_memory_metrics": true, "use_legacy_prediction_loop": false, "push_to_hub": false, "resume_from_checkpoint": null, "hub_model_id": null, "hub_strategy": "every_save", "hub_token": null, "hub_private_repo": false, "hub_always_push": false, "gradient_checkpointing": false, "gradient_checkpointing_kwargs": null, "include_inputs_for_metrics": false, "eval_do_concat_batches": true, "fp16_backend": "auto", "evaluation_strategy": null, "push_to_hub_model_id": null, "push_to_hub_organization": null, "push_to_hub_token": null, "mp_parameters": "", "auto_find_batch_size": false, "full_determinism": false, "torchdynamo": null, "ray_scope": "last", "ddp_timeout": 1800, "torch_compile": false, "torch_compile_backend": null, "torch_compile_mode": null, "dispatch_batches": null, "split_batches": null, "include_tokens_per_second": false, "include_num_input_tokens_seen": false, "neftune_noise_alpha": null, "optim_target_modules": null, "batch_eval_metrics": false, "eval_on_start": false, "use_liger_kernel": false, "eval_use_gather_object": false, "max_length": 6144, "dataset_num_proc": null, "center_rewards_coefficient": null, "disable_flash_attn2": false, "vision_lr": 2e-06, "merger_lr": 2e-06, "special_token_lr": 2e-06, "conduct_eval": true, "load_from_pretrained": null, "load_from_pretrained_step": null, "logging_epochs": 0.01, "eval_epochs": 0.1, "save_epochs": 0.25, "save_full_model": false }, "model_config": { "model_name_or_path": "Qwen/Qwen2-VL-2B-Instruct", "model_revision": "main", "output_dim": 1, "use_special_tokens": true, "freeze_vision_tower": false, "freeze_llm": false, "tune_merger": true, "torch_dtype": "bfloat16", "trust_remote_code": false, "attn_implementation": null, "load_in_8bit": false, "load_in_4bit": false, "bnb_4bit_quant_type": "nf4", "use_bnb_nested_quant": false, "reward_token": "special", "loss_type": "btt" }, "peft_lora_config": { "lora_enable": true, "vision_lora": false, "lora_r": 64, "lora_alpha": 128, "lora_dropout": 0.05, "lora_target_modules": null, "lora_namespan_exclude": [ "lm_head", "rm_head", "embed_tokens", "visual" ], "lora_modules_to_save": null, "lora_task_type": "CAUSAL_LM", "use_rslora": false, "num_lora_modules": -1 }, "inference_config": { "VQ_mean": 3.6757, "VQ_std": 2.2476, "MQ_mean": 1.1646, "MQ_std": 1.3811, "TA_mean": 2.8105, "TA_std": 2.5121 }}reward_model_config.jsonAdded+224