Image-Text-to-Text
Transformers
Safetensors
Chinese
English
IAA
text-generation
conversational
custom_code
Instructions to use qihoo360/Inner-Adaptor-Architecture with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use qihoo360/Inner-Adaptor-Architecture with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="qihoo360/Inner-Adaptor-Architecture", trust_remote_code=True) 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 AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("qihoo360/Inner-Adaptor-Architecture", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use qihoo360/Inner-Adaptor-Architecture with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "qihoo360/Inner-Adaptor-Architecture" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "qihoo360/Inner-Adaptor-Architecture", "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/qihoo360/Inner-Adaptor-Architecture
- SGLang
How to use qihoo360/Inner-Adaptor-Architecture 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 "qihoo360/Inner-Adaptor-Architecture" \ --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": "qihoo360/Inner-Adaptor-Architecture", "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 "qihoo360/Inner-Adaptor-Architecture" \ --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": "qihoo360/Inner-Adaptor-Architecture", "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 qihoo360/Inner-Adaptor-Architecture with Docker Model Runner:
docker model run hf.co/qihoo360/Inner-Adaptor-Architecture
Update pipeline tag and add library name
#1
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -1,5 +1,4 @@
|
|
| 1 |
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
datasets:
|
| 4 |
- liuhaotian/LLaVA-CC3M-Pretrain-595K
|
| 5 |
- liuhaotian/LLaVA-Instruct-150K
|
|
@@ -8,7 +7,9 @@ datasets:
|
|
| 8 |
language:
|
| 9 |
- zh
|
| 10 |
- en
|
| 11 |
-
|
|
|
|
|
|
|
| 12 |
---
|
| 13 |
|
| 14 |
# Model Card for IAA: Inner-Adaptor Architecture
|
|
@@ -152,6 +153,42 @@ outputs = outputs.strip()
|
|
| 152 |
print(outputs)
|
| 153 |
```
|
| 154 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 155 |
## We Are Hiring
|
| 156 |
We are seeking academic interns in the Multimodal field. If interested, please send your resume to xiechunyu@360.cn.
|
| 157 |
|
|
@@ -168,19 +205,12 @@ If you find IAA useful for your research and applications, please cite using thi
|
|
| 168 |
```
|
| 169 |
|
| 170 |
## License
|
| 171 |
-
This project utilizes certain datasets and checkpoints that are subject to their respective original licenses. Users must comply with all terms and conditions of these original licenses.
|
| 172 |
-
The content of this project itself is licensed under the [Apache license 2.0]
|
| 173 |
-
|
| 174 |
-
**Where to send questions or comments about the model:**
|
| 175 |
-
https://github.com/360CVGroup/Inner-Adaptor-Architecture
|
| 176 |
-
|
| 177 |
|
|
|
|
|
|
|
| 178 |
|
| 179 |
## Related Projects
|
| 180 |
This work wouldn't be possible without the incredible open-source code of these projects. Huge thanks!
|
| 181 |
- [Meta Llama 3](https://github.com/meta-llama/llama3)
|
| 182 |
- [LLaVA: Large Language and Vision Assistant](https://github.com/haotian-liu/LLaVA)
|
| 183 |
-
- [360VL](https://github.com/360CVGroup/360VL)
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
|
|
|
| 1 |
---
|
|
|
|
| 2 |
datasets:
|
| 3 |
- liuhaotian/LLaVA-CC3M-Pretrain-595K
|
| 4 |
- liuhaotian/LLaVA-Instruct-150K
|
|
|
|
| 7 |
language:
|
| 8 |
- zh
|
| 9 |
- en
|
| 10 |
+
license: apache-2.0
|
| 11 |
+
pipeline_tag: image-text-to-text
|
| 12 |
+
library_name: transformers
|
| 13 |
---
|
| 14 |
|
| 15 |
# Model Card for IAA: Inner-Adaptor Architecture
|
|
|
|
| 153 |
print(outputs)
|
| 154 |
```
|
| 155 |
|
| 156 |
+
## CLI Inference
|
| 157 |
+
|
| 158 |
+
Chat about images using IAA without the need of Gradio interface.
|
| 159 |
+
|
| 160 |
+
```Shell
|
| 161 |
+
name="qihoo360/Inner-Adaptor-Architecture"
|
| 162 |
+
python -m iaa.eval.infer \
|
| 163 |
+
--model-path $name \
|
| 164 |
+
--image-path testimg/readpanda.jpg \
|
| 165 |
+
--task_type MM \
|
| 166 |
+
```
|
| 167 |
+
```Shell
|
| 168 |
+
name="qihoo360/Inner-Adaptor-Architecture"
|
| 169 |
+
|
| 170 |
+
python -m iaa.eval.infer_interleave \
|
| 171 |
+
--model-path $name \
|
| 172 |
+
--image-path testimg/COCO_train2014_000000014502.jpg \
|
| 173 |
+
```
|
| 174 |
+
|
| 175 |
+
## Evaluation
|
| 176 |
+
|
| 177 |
+
First, download the MME image from the following link to ./MME/MME_Benchmark_release_version.
|
| 178 |
+
https://github.com/BradyFU/Awesome-Multimodal-Large-Language-Models/tree/Evaluation
|
| 179 |
+
|
| 180 |
+
```Shell
|
| 181 |
+
bash scripts/mme.sh
|
| 182 |
+
```
|
| 183 |
+
|
| 184 |
+
For Refcoco testing, please refer to the following links for data downloads
|
| 185 |
+
https://github.com/lichengunc/refer
|
| 186 |
+
|
| 187 |
+
```Shell
|
| 188 |
+
bash scripts/refcoco.sh
|
| 189 |
+
```
|
| 190 |
+
|
| 191 |
+
<!-- ## Acknowledgement -->
|
| 192 |
## We Are Hiring
|
| 193 |
We are seeking academic interns in the Multimodal field. If interested, please send your resume to xiechunyu@360.cn.
|
| 194 |
|
|
|
|
| 205 |
```
|
| 206 |
|
| 207 |
## License
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 208 |
|
| 209 |
+
This project utilizes certain datasets and checkpoints that are subject to their respective original licenses. Users must comply with all terms and conditions of these original licenses.
|
| 210 |
+
The content of this project itself is licensed under the [Apache license 2.0](./LICENSE).
|
| 211 |
|
| 212 |
## Related Projects
|
| 213 |
This work wouldn't be possible without the incredible open-source code of these projects. Huge thanks!
|
| 214 |
- [Meta Llama 3](https://github.com/meta-llama/llama3)
|
| 215 |
- [LLaVA: Large Language and Vision Assistant](https://github.com/haotian-liu/LLaVA)
|
| 216 |
+
- [360VL](https://github.com/360CVGroup/360VL)
|
|
|
|
|
|
|
|
|