Instructions to use prithivMLmods/Chamaeleontis-7B-Reason-rVL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use prithivMLmods/Chamaeleontis-7B-Reason-rVL with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="prithivMLmods/Chamaeleontis-7B-Reason-rVL") 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, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("prithivMLmods/Chamaeleontis-7B-Reason-rVL") model = AutoModelForImageTextToText.from_pretrained("prithivMLmods/Chamaeleontis-7B-Reason-rVL") 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
- vLLM
How to use prithivMLmods/Chamaeleontis-7B-Reason-rVL with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "prithivMLmods/Chamaeleontis-7B-Reason-rVL" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prithivMLmods/Chamaeleontis-7B-Reason-rVL", "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/prithivMLmods/Chamaeleontis-7B-Reason-rVL
- SGLang
How to use prithivMLmods/Chamaeleontis-7B-Reason-rVL 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 "prithivMLmods/Chamaeleontis-7B-Reason-rVL" \ --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": "prithivMLmods/Chamaeleontis-7B-Reason-rVL", "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 "prithivMLmods/Chamaeleontis-7B-Reason-rVL" \ --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": "prithivMLmods/Chamaeleontis-7B-Reason-rVL", "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 prithivMLmods/Chamaeleontis-7B-Reason-rVL with Docker Model Runner:
docker model run hf.co/prithivMLmods/Chamaeleontis-7B-Reason-rVL
Chamaeleontis-7B-Reason-rVL
The Chamaeleontis-7B-Reason-rVL model is a general-purpose multimodal reasoning model built on Qwen2.5-VL-7B-Instruct, optimized for image and video frame understanding, contextual analysis, and natural language reasoning. It excels at extracting structured insights from both static visuals and video streams through step-by-step logical interpretation and visual common sense grounding.
Chamaeleontis: Reason-based Qwen2.5VL model for visual understanding and CoT reasoning
Key Capabilities
- Visual Frame Reasoning: Understands and interprets key frames from videos or images with attention to spatial and physical relationships.
- Chain-of-Thought Natural Language Output: Generates thoughtful, logically connected answers for visual queries.
- General-Purpose Multimodal Insight: Applicable across diverse domains for both still image and sequential video analysis.
- Custom Frame Selection Logic: Applies smart frame sampling for high-relevance visual inputs during training and inference.
- Common Sense Visual Comprehension: Supports physical reasoning, object interaction detection, and real-world logic estimation from visuals.
- Q&A Over Visual Inputs: Ideal for use cases like question answering, summarization, and temporal information extraction from visual sources.
Quick Start with Transformers
from transformers import Qwen2_5_VLForConditionalGeneration, AutoTokenizer, AutoProcessor
from qwen_vl_utils import process_vision_info
model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
"prithivMLmods/Chamaeleontis-7B-Reason-rVL", torch_dtype="auto", device_map="auto"
)
processor = AutoProcessor.from_pretrained("prithivMLmods/Chamaeleontis-7B-Reason-rVL")
messages = [
{
"role": "user",
"content": [
{"type": "video", "video": "path/to/your/video.mp4"},
{"type": "text", "text": "Briefly describe the physical events and interactions in this video using logical steps."},
],
}
]
text = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
image_inputs, video_inputs = process_vision_info(messages)
inputs = processor(
text=[text],
images=image_inputs,
videos=video_inputs,
padding=True,
return_tensors="pt",
)
inputs = inputs.to("cuda")
generated_ids = model.generate(**inputs, max_new_tokens=512)
generated_ids_trimmed = [
out_ids[len(in_ids):] for in_ids, out_ids in zip(inputs.input_ids, generated_ids)
]
output_text = processor.batch_decode(
generated_ids_trimmed, skip_special_tokens=True, clean_up_tokenization_spaces=False
)
print(output_text)
Use Cases
- Image and Video Q&A: Responds to natural language queries with logical, visual-grounded answers.
- Physical Event Interpretation: Understands object motion, cause-effect dynamics, and temporal interactions.
- Visual Insight Summarization: Extracts core narrative and insights from multimedia content.
- Educational Content Understanding: Supports reasoning-based tasks in educational and research video analysis.
- Multimodal Reasoning: Merges visual and textual understanding to support complex interpretation tasks.
Limitations
- Experimental Architecture: While robust, it may need tuning for domain-specific datasets.
- Inference Overhead: High GPU memory requirements for long or high-resolution video processing.
- Frame Sampling Bias: Quality depends on relevance and spacing of sampled frames.
- Context Window Boundaries: Very long inputs may require segmenting or hierarchical reasoning strategies.
- Downloads last month
- 1
