SoMeLVLM: A Large Vision Language Model for Social Media Processing
Paper • 2402.13022 • Published
How to use Lishi0905/SoMeLVLM with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="Lishi0905/SoMeLVLM") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("Lishi0905/SoMeLVLM")
model = AutoModelForCausalLM.from_pretrained("Lishi0905/SoMeLVLM")How to use Lishi0905/SoMeLVLM with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "Lishi0905/SoMeLVLM"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "Lishi0905/SoMeLVLM",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/Lishi0905/SoMeLVLM
How to use Lishi0905/SoMeLVLM with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "Lishi0905/SoMeLVLM" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "Lishi0905/SoMeLVLM",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'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 "Lishi0905/SoMeLVLM" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "Lishi0905/SoMeLVLM",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use Lishi0905/SoMeLVLM with Docker Model Runner:
docker model run hf.co/Lishi0905/SoMeLVLM
This repository contains checkpoints for SoMeLVLM: A Large Vision Language Model for Social Media Processing.
More information on the arxiv, homepage, and github.
If you find our SoMeLVLM or datasets useful, we will greatly appreciate it if you could consider citing our paper:
@article{zhang2024somelvlm,
author = {Xinnong Zhang and Haoyu Kuang and Xinyi Mou and Hanjia Lyu and Kun Wu and Siming Chen and Jiebo Luo and Xuanjing Huang and Zhongyu Wei},
title = {SoMeLVLM: A Large Vision Language Model for Social Media Processing},
year = {2024},
journal = {arXiv preprint arXiv: 2402.13022}
}