Failed to load versions. Head to the versions page to see all versions for this model.
You're looking at a specific version of this model. Jump to the model overview.
chenxwh /deepseek-vl2:8ea88789
Input
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run chenxwh/deepseek-vl2 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"chenxwh/deepseek-vl2:8ea887897e772107ce53f3a7fa4850e78ae88b2b73ff854b4700db9f0d59c7cb",
{
input: {
text: "<|grounding|>In the first image, an object within the red rectangle is marked. Locate the object of the same category in the second image.",
top_p: 0.9,
image1: "https://raw.githubusercontent.com/deepseek-ai/DeepSeek-VL2/refs/heads/main/images/incontext_visual_grounding_1.jpeg",
image2: "https://raw.githubusercontent.com/deepseek-ai/DeepSeek-VL2/refs/heads/main/images/icl_vg_2.jpeg",
temperature: 0.1,
max_new_tokens: 2048,
repetition_penalty: 1.1
}
}
);
console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run chenxwh/deepseek-vl2 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"chenxwh/deepseek-vl2:8ea887897e772107ce53f3a7fa4850e78ae88b2b73ff854b4700db9f0d59c7cb",
input={
"text": "<|grounding|>In the first image, an object within the red rectangle is marked. Locate the object of the same category in the second image.",
"top_p": 0.9,
"image1": "https://raw.githubusercontent.com/deepseek-ai/DeepSeek-VL2/refs/heads/main/images/incontext_visual_grounding_1.jpeg",
"image2": "https://raw.githubusercontent.com/deepseek-ai/DeepSeek-VL2/refs/heads/main/images/icl_vg_2.jpeg",
"temperature": 0.1,
"max_new_tokens": 2048,
"repetition_penalty": 1.1
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run chenxwh/deepseek-vl2 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \
-H "Authorization: Bearer $REPLICATE_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Prefer: wait" \
-d $'{
"version": "chenxwh/deepseek-vl2:8ea887897e772107ce53f3a7fa4850e78ae88b2b73ff854b4700db9f0d59c7cb",
"input": {
"text": "<|grounding|>In the first image, an object within the red rectangle is marked. Locate the object of the same category in the second image.",
"top_p": 0.9,
"image1": "https://raw.githubusercontent.com/deepseek-ai/DeepSeek-VL2/refs/heads/main/images/incontext_visual_grounding_1.jpeg",
"image2": "https://raw.githubusercontent.com/deepseek-ai/DeepSeek-VL2/refs/heads/main/images/icl_vg_2.jpeg",
"temperature": 0.1,
"max_new_tokens": 2048,
"repetition_penalty": 1.1
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Add a payment method to run this model.
By signing in, you agree to our
terms of service and privacy policy
Output
{
"completed_at": "2024-12-29T15:54:37.402571Z",
"created_at": "2024-12-29T15:53:59.492000Z",
"data_removed": false,
"error": null,
"id": "g7g5qnefrhrma0cm2cft94nwvw",
"input": {
"text": "<|grounding|>In the first image, an object within the red rectangle is marked. Locate the object of the same category in the second image.",
"top_p": 0.9,
"image1": "https://raw.githubusercontent.com/deepseek-ai/DeepSeek-VL2/refs/heads/main/images/incontext_visual_grounding_1.jpeg",
"image2": "https://raw.githubusercontent.com/deepseek-ai/DeepSeek-VL2/refs/heads/main/images/icl_vg_2.jpeg",
"temperature": 0.1,
"max_new_tokens": 2048,
"repetition_penalty": 1.1
},
"logs": "2024-12-29 15:54:29,706 - gradio_logger - INFO - ================================================================================\n2024-12-29 15:54:29,706 - gradio_logger - INFO - <|User|>: <image>\n<image>\n<|grounding|>In the first image, an object within the red rectangle is marked. Locate the object of the same category in the second image.\n<|Assistant|>:\n[{'role': '<|User|>', 'content': '<image>\\n<image>\\n<|grounding|>In the first image, an object within the red rectangle is marked. Locate the object of the same category in the second image.', 'images': [<PIL.Image.Image image mode=RGB size=1738x1146 at 0x7250C05E17D0>, <PIL.Image.Image image mode=RGB size=868x1160 at 0x7250C0592D10>]}, {'role': '<|Assistant|>', 'content': ''}]",
"metrics": {
"predict_time": 8.492753054,
"total_time": 37.910571
},
"output": {
"img_out": "https://replicate.delivery/xezq/zrbPK8uiALqaOdMRCRocFTElQZonyP82Ta1pC2pgHcbvi8fJA/out.png",
"text_out": "<|ref|>bicolor cat<|/ref|><|det|>[[81, 273, 906, 820]]<|/det|><|end▁of▁sentence|>"
},
"started_at": "2024-12-29T15:54:28.909818Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/g7g5qnefrhrma0cm2cft94nwvw",
"cancel": "https://api.replicate.com/v1/predictions/g7g5qnefrhrma0cm2cft94nwvw/cancel"
},
"version": "8ea887897e772107ce53f3a7fa4850e78ae88b2b73ff854b4700db9f0d59c7cb"
}
2024-12-29 15:54:29,706 - gradio_logger - INFO - ================================================================================
2024-12-29 15:54:29,706 - gradio_logger - INFO - <|User|>: <image>
<image>
<|grounding|>In the first image, an object within the red rectangle is marked. Locate the object of the same category in the second image.
<|Assistant|>:
[{'role': '<|User|>', 'content': '<image>\n<image>\n<|grounding|>In the first image, an object within the red rectangle is marked. Locate the object of the same category in the second image.', 'images': [<PIL.Image.Image image mode=RGB size=1738x1146 at 0x7250C05E17D0>, <PIL.Image.Image image mode=RGB size=868x1160 at 0x7250C0592D10>]}, {'role': '<|Assistant|>', 'content': ''}]