Image-Text-to-Text
Transformers
Safetensors
English
qwen3_5
coer
agent-security
research
conversational
Instructions to use Z-Edgar/CoER-Defender with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Z-Edgar/CoER-Defender with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Z-Edgar/CoER-Defender") 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)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("Z-Edgar/CoER-Defender") model = AutoModelForMultimodalLM.from_pretrained("Z-Edgar/CoER-Defender", 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=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Z-Edgar/CoER-Defender with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Z-Edgar/CoER-Defender" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Z-Edgar/CoER-Defender", "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/Z-Edgar/CoER-Defender
- SGLang
How to use Z-Edgar/CoER-Defender 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 "Z-Edgar/CoER-Defender" \ --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": "Z-Edgar/CoER-Defender", "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 "Z-Edgar/CoER-Defender" \ --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": "Z-Edgar/CoER-Defender", "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 Z-Edgar/CoER-Defender with Docker Model Runner:
docker model run hf.co/Z-Edgar/CoER-Defender
Commit History
-
Update paper overview, project links and release documentation
Verified signature9900ea5 -
Complete model configuration and weight index
Verified signatureb3b5863 -
Add weight shard model-00002-of-00070.safetensors
Verified signature93af849 -
Add weight shard model-00001-of-00070.safetensors
Verified signature33d661d -
Add weight shard model-00068-of-00070.safetensors
Verified signature53189dd -
Add weight shard model-00066-of-00070.safetensors
Verified signature070944f -
Add weight shard model-00067-of-00070.safetensors
Verified signaturef3e7a6d -
Add weight shard model-00003-of-00070.safetensors
Verified signatureaf76d35 -
Add weight shard model-00065-of-00070.safetensors
Verified signature9256e03 -
Add weight shard model-00063-of-00070.safetensors
Verified signature4d93316 -
Add weight shard model-00057-of-00070.safetensors
Verified signature678899a -
Add weight shard model-00059-of-00070.safetensors
Verified signature316e935 -
Add weight shard model-00055-of-00070.safetensors
Verified signature1975bb4 -
Add weight shard model-00051-of-00070.safetensors
Verified signature7713336 -
Add weight shard model-00047-of-00070.safetensors
Verified signature5d97533 -
Add weight shard model-00045-of-00070.safetensors
Verified signature83d3e7b -
Add weight shard model-00041-of-00070.safetensors
Verified signatured2f4995 -
Add weight shard model-00039-of-00070.safetensors
Verified signatureb0efb42 -
Add weight shard model-00037-of-00070.safetensors
Verified signature0943ae4 -
Add weight shard model-00033-of-00070.safetensors
Verified signaturee4df37d -
Add weight shard model-00031-of-00070.safetensors
Verified signature409356d -
Add weight shard model-00029-of-00070.safetensors
Verified signature6bb2449 -
Add weight shard model-00027-of-00070.safetensors
Verified signature891b9c7 -
Add weight shard model-00023-of-00070.safetensors
Verified signature296b6d9 -
Add weight shard model-00021-of-00070.safetensors
Verified signature9afd1b4 -
Add weight shard model-00015-of-00070.safetensors
Verified signature832e79b -
Add weight shard model-00019-of-00070.safetensors
Verified signature96b6300 -
Add weight shard model-00011-of-00070.safetensors
Verified signaturecefcd18 -
Add weight shard model-00013-of-00070.safetensors
Verified signaturee62e664 -
Add weight shard model-00005-of-00070.safetensors
Verified signature0797877 -
Add weight shard model-00007-of-00070.safetensors
Verified signatured01ea7b -
Add weight shard model-00069-of-00070.safetensors
Verified signature03464fd -
Add weight shard model-00062-of-00070.safetensors
Verified signaturecde5edc -
Add weight shard model-00054-of-00070.safetensors
Verified signature00b4a74 -
Add weight shard model-00050-of-00070.safetensors
Verified signature2eaf22f -
Add weight shard model-00044-of-00070.safetensors
Verified signature8eb54e2 -
Add weight shard model-00036-of-00070.safetensors
Verified signature1e774f0 -
Add weight shard model-00018-of-00070.safetensors
Verified signaturebed80be -
Add weight shard model-00026-of-00070.safetensors
Verified signaturee91e10d -
Add weight shard model-00058-of-00070.safetensors
Verified signaturee5956f2 -
Add weight shard model-00010-of-00070.safetensors
Verified signature04228a1 -
Add weight shard model-00064-of-00070.safetensors
Verified signature1ce03b6 -
Add weight shard model-00056-of-00070.safetensors
Verified signaturead60788 -
Add weight shard model-00046-of-00070.safetensors
Verified signatureacf582e -
Add weight shard model-00040-of-00070.safetensors
Verified signature9f39542 -
Add weight shard model-00038-of-00070.safetensors
Verified signature69b3b06 -
Add weight shard model-00028-of-00070.safetensors
Verified signature299a1a0 -
Add weight shard model-00032-of-00070.safetensors
Verified signatureae261c8 -
Add weight shard model-00030-of-00070.safetensors
Verified signatureca4dc57 -
Add weight shard model-00022-of-00070.safetensors
Verified signature3297d98