Image-Text-to-Text
Transformers
PyTorch
English
phi3_v
text-generation
Retrieval
Multimodal
Embedding
conversational
custom_code
Instructions to use DeepGlint-AI/UniME-Phi3.5-V-4.2B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DeepGlint-AI/UniME-Phi3.5-V-4.2B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="DeepGlint-AI/UniME-Phi3.5-V-4.2B", 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("DeepGlint-AI/UniME-Phi3.5-V-4.2B", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use DeepGlint-AI/UniME-Phi3.5-V-4.2B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DeepGlint-AI/UniME-Phi3.5-V-4.2B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DeepGlint-AI/UniME-Phi3.5-V-4.2B", "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/DeepGlint-AI/UniME-Phi3.5-V-4.2B
- SGLang
How to use DeepGlint-AI/UniME-Phi3.5-V-4.2B 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 "DeepGlint-AI/UniME-Phi3.5-V-4.2B" \ --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": "DeepGlint-AI/UniME-Phi3.5-V-4.2B", "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 "DeepGlint-AI/UniME-Phi3.5-V-4.2B" \ --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": "DeepGlint-AI/UniME-Phi3.5-V-4.2B", "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 DeepGlint-AI/UniME-Phi3.5-V-4.2B with Docker Model Runner:
docker model run hf.co/DeepGlint-AI/UniME-Phi3.5-V-4.2B
Update README.md
Browse files
README.md
CHANGED
|
@@ -27,13 +27,17 @@ Yingda Chen,</span>
|
|
| 27 |
|
| 28 |
[🏡 Project Page](https://garygutc.github.io/UniME) | [📄 Paper](https://arxiv.org/pdf/2504.17432) | [💻 Github](https://github.com/deepglint/UniME)
|
| 29 |
|
|
|
|
| 30 |
|
| 31 |
<p align="center">
|
| 32 |
-
<img src="figures/
|
| 33 |
</p>
|
| 34 |
|
| 35 |
-
|
| 36 |
## 💡 Highlights
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
To enhance the MLLM's embedding capability, we propose textual discriminative knowledge distillation. The training process involves decoupling the MLLM's LLM component and processing text with the prompt "Summarize the above sentences in one word.", followed by aligning the student (MLLM) and teacher (NV-Embed V2) embeddings via KL divergence on batch-wise similarity distributions. **Notably, only the LLM component is fine-tuned during this process, while all other parameters remain frozen**.
|
| 38 |
|
| 39 |
<p align="center">
|
|
|
|
| 27 |
|
| 28 |
[🏡 Project Page](https://garygutc.github.io/UniME) | [📄 Paper](https://arxiv.org/pdf/2504.17432) | [💻 Github](https://github.com/deepglint/UniME)
|
| 29 |
|
| 30 |
+
UniME achieves the top ranking on the MMEB leaderboard training using a 336×336 image resolution.(The screenshot is captured at 08:00 UTC+8 on May 6, 2025.)
|
| 31 |
|
| 32 |
<p align="center">
|
| 33 |
+
<img src="figures/MMEB.png">
|
| 34 |
</p>
|
| 35 |
|
|
|
|
| 36 |
## 💡 Highlights
|
| 37 |
+
<p align="center">
|
| 38 |
+
<img src="figures/fig1.png">
|
| 39 |
+
</p>
|
| 40 |
+
|
| 41 |
To enhance the MLLM's embedding capability, we propose textual discriminative knowledge distillation. The training process involves decoupling the MLLM's LLM component and processing text with the prompt "Summarize the above sentences in one word.", followed by aligning the student (MLLM) and teacher (NV-Embed V2) embeddings via KL divergence on batch-wise similarity distributions. **Notably, only the LLM component is fine-tuned during this process, while all other parameters remain frozen**.
|
| 42 |
|
| 43 |
<p align="center">
|