Image-Text-to-Text
Transformers
Safetensors
English
mllama
llava
reasoning
vqa
conversational
text-generation-inference
Instructions to use Xkev/Llama-3.2V-11B-cot with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Xkev/Llama-3.2V-11B-cot with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Xkev/Llama-3.2V-11B-cot") 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("Xkev/Llama-3.2V-11B-cot") model = AutoModelForMultimodalLM.from_pretrained("Xkev/Llama-3.2V-11B-cot", 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 Xkev/Llama-3.2V-11B-cot with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Xkev/Llama-3.2V-11B-cot" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Xkev/Llama-3.2V-11B-cot", "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/Xkev/Llama-3.2V-11B-cot
- SGLang
How to use Xkev/Llama-3.2V-11B-cot 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 "Xkev/Llama-3.2V-11B-cot" \ --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": "Xkev/Llama-3.2V-11B-cot", "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 "Xkev/Llama-3.2V-11B-cot" \ --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": "Xkev/Llama-3.2V-11B-cot", "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 Xkev/Llama-3.2V-11B-cot with Docker Model Runner:
docker model run hf.co/Xkev/Llama-3.2V-11B-cot
add AIBOM (#14)
Browse files- add AIBOM (67b45bb0284faed40d1e022b273d04e9c9d98035)
Co-authored-by: Sabato Nocera <sabato-nocera@users.noreply.huggingface.co>
- Xkev_Llama-3.2V-11B-cot.json +123 -0
Xkev_Llama-3.2V-11B-cot.json
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bomFormat": "CycloneDX",
|
| 3 |
+
"specVersion": "1.6",
|
| 4 |
+
"serialNumber": "urn:uuid:4ec612d6-0e01-4883-8931-409c560fd885",
|
| 5 |
+
"version": 1,
|
| 6 |
+
"metadata": {
|
| 7 |
+
"timestamp": "2025-07-21T08:19:51.846071+00:00",
|
| 8 |
+
"component": {
|
| 9 |
+
"type": "machine-learning-model",
|
| 10 |
+
"bom-ref": "Xkev/Llama-3.2V-11B-cot-9618fe23-9615-538b-9533-c062d681ea6b",
|
| 11 |
+
"licenses": [
|
| 12 |
+
{
|
| 13 |
+
"license": {
|
| 14 |
+
"id": "Apache-2.0",
|
| 15 |
+
"url": "https://spdx.org/licenses/Apache-2.0.html"
|
| 16 |
+
}
|
| 17 |
+
}
|
| 18 |
+
],
|
| 19 |
+
"externalReferences": [
|
| 20 |
+
{
|
| 21 |
+
"url": "https://huggingface.co/Xkev/Llama-3.2V-11B-cot",
|
| 22 |
+
"type": "documentation"
|
| 23 |
+
}
|
| 24 |
+
],
|
| 25 |
+
"modelCard": {
|
| 26 |
+
"modelParameters": {
|
| 27 |
+
"datasets": [
|
| 28 |
+
{
|
| 29 |
+
"ref": "Xkev/LLaVA-CoT-100k-c9c723f9-0fc7-5fcc-a916-d80870eaabe0"
|
| 30 |
+
}
|
| 31 |
+
],
|
| 32 |
+
"task": "image-text-to-text",
|
| 33 |
+
"architectureFamily": "mllama",
|
| 34 |
+
"modelArchitecture": "MllamaForConditionalGeneration"
|
| 35 |
+
},
|
| 36 |
+
"properties": [
|
| 37 |
+
{
|
| 38 |
+
"name": "library_name",
|
| 39 |
+
"value": "transformers"
|
| 40 |
+
},
|
| 41 |
+
{
|
| 42 |
+
"name": "base_model",
|
| 43 |
+
"value": "meta-llama/Llama-3.2-11B-Vision-Instruct"
|
| 44 |
+
}
|
| 45 |
+
]
|
| 46 |
+
},
|
| 47 |
+
"name": "Xkev/Llama-3.2V-11B-cot",
|
| 48 |
+
"authors": [
|
| 49 |
+
{
|
| 50 |
+
"name": "Xkev"
|
| 51 |
+
}
|
| 52 |
+
],
|
| 53 |
+
"description": "<!-- Provide a longer summary of what this model is. -->- **License:** apache-2.0- **Finetuned from model:** meta-llama/Llama-3.2-11B-Vision-Instruct",
|
| 54 |
+
"tags": [
|
| 55 |
+
"transformers",
|
| 56 |
+
"safetensors",
|
| 57 |
+
"mllama",
|
| 58 |
+
"image-to-text",
|
| 59 |
+
"image-text-to-text",
|
| 60 |
+
"conversational",
|
| 61 |
+
"en",
|
| 62 |
+
"dataset:Xkev/LLaVA-CoT-100k",
|
| 63 |
+
"arxiv:2411.10440",
|
| 64 |
+
"base_model:meta-llama/Llama-3.2-11B-Vision-Instruct",
|
| 65 |
+
"base_model:finetune:meta-llama/Llama-3.2-11B-Vision-Instruct",
|
| 66 |
+
"license:apache-2.0",
|
| 67 |
+
"text-generation-inference",
|
| 68 |
+
"endpoints_compatible",
|
| 69 |
+
"region:us"
|
| 70 |
+
]
|
| 71 |
+
}
|
| 72 |
+
},
|
| 73 |
+
"components": [
|
| 74 |
+
{
|
| 75 |
+
"type": "data",
|
| 76 |
+
"bom-ref": "Xkev/LLaVA-CoT-100k-c9c723f9-0fc7-5fcc-a916-d80870eaabe0",
|
| 77 |
+
"name": "Xkev/LLaVA-CoT-100k",
|
| 78 |
+
"data": [
|
| 79 |
+
{
|
| 80 |
+
"type": "dataset",
|
| 81 |
+
"bom-ref": "Xkev/LLaVA-CoT-100k-c9c723f9-0fc7-5fcc-a916-d80870eaabe0",
|
| 82 |
+
"name": "Xkev/LLaVA-CoT-100k",
|
| 83 |
+
"contents": {
|
| 84 |
+
"url": "https://huggingface.co/datasets/Xkev/LLaVA-CoT-100k",
|
| 85 |
+
"properties": [
|
| 86 |
+
{
|
| 87 |
+
"name": "task_categories",
|
| 88 |
+
"value": "visual-question-answering"
|
| 89 |
+
},
|
| 90 |
+
{
|
| 91 |
+
"name": "language",
|
| 92 |
+
"value": "en"
|
| 93 |
+
},
|
| 94 |
+
{
|
| 95 |
+
"name": "size_categories",
|
| 96 |
+
"value": "10K<n<100K"
|
| 97 |
+
},
|
| 98 |
+
{
|
| 99 |
+
"name": "pretty_name",
|
| 100 |
+
"value": "LLaVA-CoT"
|
| 101 |
+
},
|
| 102 |
+
{
|
| 103 |
+
"name": "license",
|
| 104 |
+
"value": "apache-2.0"
|
| 105 |
+
}
|
| 106 |
+
]
|
| 107 |
+
},
|
| 108 |
+
"description": "\n\t\n\t\t\n\t\tDataset Card for LLaVA-CoT\n\t\n\n\n\t\n\t\t\n\t\tDataset Sources\n\t\n\n\nRepository: [https://github.com/PKU-YuanGroup/LLaVA-CoT]\nPaper: [https://arxiv.org/abs/2411.10440]\n\n\n\t\n\t\t\n\t\tDataset Structure\n\t\n\nThe repository includes image.zip.part-{aa-ap}, which you need to merge manually. Use the following command to combine them:\ncat image.zip.part-* > image.zip\nunzip image.zip\n\nThe train.jsonl file contains the question-answering data in the following format:\n{\n\"id\": ID,\n\"image\": IMAGE_PATH\u2026 See the full description on the dataset page: https://huggingface.co/datasets/Xkev/LLaVA-CoT-100k.",
|
| 109 |
+
"governance": {
|
| 110 |
+
"owners": [
|
| 111 |
+
{
|
| 112 |
+
"organization": {
|
| 113 |
+
"name": "Xkev",
|
| 114 |
+
"url": "https://huggingface.co/Xkev"
|
| 115 |
+
}
|
| 116 |
+
}
|
| 117 |
+
]
|
| 118 |
+
}
|
| 119 |
+
}
|
| 120 |
+
]
|
| 121 |
+
}
|
| 122 |
+
]
|
| 123 |
+
}
|