Image-Text-to-Text
Transformers
Safetensors
qwen2_5_vl
conversational
text-generation-inference
4-bit precision
bitsandbytes
Instructions to use Vanbitcase/ier_summary_model2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Vanbitcase/ier_summary_model2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Vanbitcase/ier_summary_model2") 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("Vanbitcase/ier_summary_model2") model = AutoModelForMultimodalLM.from_pretrained("Vanbitcase/ier_summary_model2", 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 Vanbitcase/ier_summary_model2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Vanbitcase/ier_summary_model2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Vanbitcase/ier_summary_model2", "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/Vanbitcase/ier_summary_model2
- SGLang
How to use Vanbitcase/ier_summary_model2 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 "Vanbitcase/ier_summary_model2" \ --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": "Vanbitcase/ier_summary_model2", "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 "Vanbitcase/ier_summary_model2" \ --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": "Vanbitcase/ier_summary_model2", "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 Vanbitcase/ier_summary_model2 with Docker Model Runner:
docker model run hf.co/Vanbitcase/ier_summary_model2
Update chat_template.jinja
Browse files- chat_template.jinja +8 -4
chat_template.jinja
CHANGED
|
@@ -12,7 +12,11 @@ Exploiting the targeted brands by misusing intellectual property (trademarks, sl
|
|
| 12 |
{% endif %}
|
| 13 |
|
| 14 |
{% endfor %}
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
{
|
| 17 |
"summary": "",
|
| 18 |
"incident_type": "",
|
|
@@ -23,11 +27,11 @@ based on the above details provide a structured analysis in the following field
|
|
| 23 |
"evidence": ""# !it is not similar to summary It must remain short and precise, with multiple evidence, separated by commas for example-"unauthorized use of trademark, phishing form, false partnership claim, impersonation of the official site and as per targeted brand
|
| 24 |
"resolution" : [
|
| 25 |
{
|
| 26 |
-
"category": "",
|
| 27 |
"action_to_take":"",
|
| 28 |
-
"action":""#depends on category 'action' follow this-'Platform':'213', 'Hosting Provider'|'platform owner':202, 'Registrar':204, 'TLD Registry':212, 'Cert':205,'Site owner':203
|
| 29 |
} ]
|
| 30 |
-
}\n\nReturn only the structured JSON object.
|
| 31 |
|
| 32 |
|
| 33 |
<|im_end|>
|
|
|
|
| 12 |
{% endif %}
|
| 13 |
|
| 14 |
{% endfor %}
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
based on the above details provide a structured analysis in the following fields:\n\nsummary: summary always start from 'As seen on reported url' involved summary is of 100 words this summary only orient around the targeted brand do not use any other brand name other than targeted brand !for example 'fraudulent site is attempting to do','false impression of legitimacy','endorsed by the official organization','intellectual property','infringement' !if Brand Logo Detected is true tell only brand logo is present. !words not to use-'appears','appear'.In case of 403 forbidden say screenshot required.\nincident_type: Category of the incident (e.g., social media, mobile apps, phishing, brandabuse, executive etc.).\npredicted_incident_type: Specific platform or medium for example when incident_type is brand abuse we use these claim of association , Fake website , Domain Name , Blog , Job advert, News Site ,when incident_type is Social media we use BlueSky, Facebook, Flickr, Google Plus, Instagram, LinkedIn, Pinterest, Quora and many more.\nresolution: Recommended action through which issue is removed (e.g., Remove content, block site, takedown the site, suspension of the domain, proof of affiliation, remove account like these are the resolution).\nIsThreatIdentified: true/false – Whether the incident poses a threat refrence to our client or brand.\nislogopresent: true/false – Whether the brand/client logo appears in the image.You must choose the service provider only from these fixed categories: Siteowner, Hosting Provider/Platform owner, Registrar, TLD Registry, or Platform (such as Facebook, if a platform is involved). \nissue:the problem detected in the targeted brand like example-Trademark misuse, phishing,infringement,Copyright Infringement.\n\nevidence: #the content should be crisp and clear !not similar to summary and its a comma seperated group of words where each group is of size 4-6 words\nresolution: it follows the following type of structure 'resolution': [{'category': '','action_to_take': '','action': }] in above structure 'category'refers to the authority or entity to whom the report should be made (Site Owner, Platform, Hosting Provider/Platform Owner, Registrar, Registry, CERT) while 'action' depends on 'category' follow this-'Platform':'213', 'Hosting Provider'|'platform owner':202, 'Registrar':204, 'TLD Registry':212, 'Cert':205, 'Site owner':203 ,'Require screenshot':210 ,'Close incident':211 and 'action_to_take': here the analyst list only the relevant action based on the specific issue. Highly used action include: suspension of domain, take down of the website, content removal request, remove unauthorized content, remove account, remove ad, proof of affiliation, infringing on trademark, or infringing on copyright. Do not include unrelated actions.,
|
| 18 |
+
!first check 'URL' if in 'URL' we find 'github.io','github.com' then 'category':'platform' and if URL have 'github.io','github' word in it then 'category':'platform', resolution should have only one category,
|
| 19 |
+
! in below structure # means explanation of reated words.The final structure would follow the below structure:
|
| 20 |
{
|
| 21 |
"summary": "",
|
| 22 |
"incident_type": "",
|
|
|
|
| 27 |
"evidence": ""# !it is not similar to summary It must remain short and precise, with multiple evidence, separated by commas for example-"unauthorized use of trademark, phishing form, false partnership claim, impersonation of the official site and as per targeted brand
|
| 28 |
"resolution" : [
|
| 29 |
{
|
| 30 |
+
"category": "" #first check 'URL' if in 'URL' we find 'github.io','github.com' then 'category':'platform' and if URL have 'github' word in it then 'category':'platform', resolution should have only one category,
|
| 31 |
"action_to_take":"",
|
| 32 |
+
"action":""#depends on category 'action' follow this-'Platform':'213', 'Hosting Provider'|'platform owner':202, 'Registrar':204, 'TLD Registry':212, 'Cert':205,'Site owner':203,'Require screenshot' :210 ,'Close incident :211',
|
| 33 |
} ]
|
| 34 |
+
}\n\nReturn only the structured JSON object.
|
| 35 |
|
| 36 |
|
| 37 |
<|im_end|>
|