Image-Text-to-Text
Transformers
Safetensors
qwen3_5
vllm
video
multimodal
reinforcement-learning
temporal-grounding
object-tracking
video-segmentation
visual-question-answering
spatial-reasoning
qwen3.5
conversational
Instructions to use OraRL/Video-ORA-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OraRL/Video-ORA-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="OraRL/Video-ORA-4B") 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)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("OraRL/Video-ORA-4B") model = AutoModelForMultimodalLM.from_pretrained("OraRL/Video-ORA-4B", 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=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use OraRL/Video-ORA-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OraRL/Video-ORA-4B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OraRL/Video-ORA-4B", "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/OraRL/Video-ORA-4B
- SGLang
How to use OraRL/Video-ORA-4B 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 "OraRL/Video-ORA-4B" \ --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": "OraRL/Video-ORA-4B", "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 "OraRL/Video-ORA-4B" \ --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": "OraRL/Video-ORA-4B", "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 OraRL/Video-ORA-4B with Docker Model Runner:
docker model run hf.co/OraRL/Video-ORA-4B
| """Locate OraRL configuration, documentation, and launcher resources.""" | |
| from __future__ import annotations | |
| from importlib.metadata import PackageNotFoundError, distribution | |
| from pathlib import Path, PurePosixPath | |
| _RESOURCE_KINDS = frozenset({"configs", "docs", "scripts"}) | |
| def _safe_name(name: str) -> str: | |
| candidate = str(name).strip() | |
| if not candidate or candidate in {".", ".."} or Path(candidate).name != candidate: | |
| raise ValueError(f"resource name must be a file name, got {name!r}") | |
| return candidate | |
| def _source_resource(kind: str, name: str) -> Path | None: | |
| candidate = Path(__file__).resolve().parent.parent / kind / name | |
| return candidate if candidate.is_file() else None | |
| def _installed_resource(kind: str, name: str) -> Path | None: | |
| try: | |
| package_distribution = distribution("orarl") | |
| except PackageNotFoundError: | |
| return None | |
| suffix = ("share", "orarl", kind, name) | |
| for entry in package_distribution.files or (): | |
| parts = PurePosixPath(str(entry)).parts | |
| if len(parts) >= len(suffix) and tuple(parts[-len(suffix) :]) == suffix: | |
| candidate = Path(package_distribution.locate_file(entry)).resolve() | |
| if candidate.is_file(): | |
| return candidate | |
| return None | |
| def resource_path(kind: str, name: str) -> Path: | |
| """Return one packaged resource from a source or wheel installation.""" | |
| normalized_kind = str(kind).strip().casefold() | |
| if normalized_kind not in _RESOURCE_KINDS: | |
| choices = ", ".join(sorted(_RESOURCE_KINDS)) | |
| raise ValueError(f"resource kind must be one of {{{choices}}}, got {kind!r}") | |
| normalized_name = _safe_name(name) | |
| candidate = _source_resource(normalized_kind, normalized_name) | |
| if candidate is None: | |
| candidate = _installed_resource(normalized_kind, normalized_name) | |
| if candidate is None: | |
| raise FileNotFoundError( | |
| f"OraRL {normalized_kind} resource was not found: {normalized_name}" | |
| ) | |
| return candidate | |
| def config_path(name: str) -> Path: | |
| """Return an included public YAML configuration.""" | |
| return resource_path("configs", name) | |
| def documentation_path(name: str) -> Path: | |
| """Return an included release document.""" | |
| return resource_path("docs", name) | |
| def script_path(name: str) -> Path: | |
| """Return an included shell or Python launcher.""" | |
| return resource_path("scripts", name) | |
| def available_configs() -> tuple[str, ...]: | |
| """Return the stable names of the four public training recipes.""" | |
| return ( | |
| "grpo_4b.yaml", | |
| "grpo_9b.yaml", | |
| "orarl_4b.yaml", | |
| "orarl_9b.yaml", | |
| ) | |