Any-to-Any
Transformers
Safetensors
English
Chinese
qwen2_5_vl
text-generation
text-generation-inference
Instructions to use PaDT-MLLM/PaDT_OVD_3B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use PaDT-MLLM/PaDT_OVD_3B with Transformers:
# Load model directly from transformers import AutoProcessor, AutoModelForSeq2SeqLM processor = AutoProcessor.from_pretrained("PaDT-MLLM/PaDT_OVD_3B") model = AutoModelForSeq2SeqLM.from_pretrained("PaDT-MLLM/PaDT_OVD_3B") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -85,7 +85,7 @@ from PaDT import PaDTForConditionalGeneration, VisonTextProcessingClass, parseVR
|
|
| 85 |
|
| 86 |
|
| 87 |
TEST_IMG_PATH="./eval/imgs/000000368335.jpg"
|
| 88 |
-
MODEL_PATH="PaDT-MLLM/
|
| 89 |
|
| 90 |
# load model
|
| 91 |
model = PaDTForConditionalGeneration.from_pretrained(MODEL_PATH, torch_dtype=torch.bfloat16, device_map={"": 0})
|
|
@@ -97,7 +97,7 @@ processor = VisonTextProcessingClass(processor, model.config.vision_config.spati
|
|
| 97 |
processor.prepare(model.model.embed_tokens.weight.shape[0])
|
| 98 |
|
| 99 |
# question prompt
|
| 100 |
-
PROMPT = "Please
|
| 101 |
|
| 102 |
# construct conversation
|
| 103 |
message = [
|
|
|
|
| 85 |
|
| 86 |
|
| 87 |
TEST_IMG_PATH="./eval/imgs/000000368335.jpg"
|
| 88 |
+
MODEL_PATH="PaDT-MLLM/PaDT_OVD_3B"
|
| 89 |
|
| 90 |
# load model
|
| 91 |
model = PaDTForConditionalGeneration.from_pretrained(MODEL_PATH, torch_dtype=torch.bfloat16, device_map={"": 0})
|
|
|
|
| 97 |
processor.prepare(model.model.embed_tokens.weight.shape[0])
|
| 98 |
|
| 99 |
# question prompt
|
| 100 |
+
PROMPT = """Please carefully check the image and detect the following objects: ["person", "bicycle", "car", "motorcycle", "horse"]."""
|
| 101 |
|
| 102 |
# construct conversation
|
| 103 |
message = [
|