Text Generation
Transformers
Safetensors
English
penguinvl_qwen3
multi-modal
large-language-model
vision-language-model
vision-encoder
conversational
custom_code
Instructions to use tencent/Penguin-VL-2B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tencent/Penguin-VL-2B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tencent/Penguin-VL-2B", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("tencent/Penguin-VL-2B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use tencent/Penguin-VL-2B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tencent/Penguin-VL-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": "tencent/Penguin-VL-2B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/tencent/Penguin-VL-2B
- SGLang
How to use tencent/Penguin-VL-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 "tencent/Penguin-VL-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": "tencent/Penguin-VL-2B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "tencent/Penguin-VL-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": "tencent/Penguin-VL-2B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use tencent/Penguin-VL-2B with Docker Model Runner:
docker model run hf.co/tencent/Penguin-VL-2B
Commit History
-
Update README.md (#6)
- Update README.md (8fae3f448564267762a169521f47966b44af3a99) Co-authored-by: Boqiang Zhang <Cyril666@users.noreply.huggingface.co>26ac2ce
-
Update processing_penguinvl.py (#4)
- Update processing_penguinvl.py (8cc408b5c8b4b3916a66181c47e6917f7a23c299) Co-authored-by: Boqiang Zhang <Cyril666@users.noreply.huggingface.co>7617afb -
Update processing_penguinvl.py (#3)
- Update processing_penguinvl.py (3ad2572fbed3eefa67511c31aba863dd17e1e53d) Co-authored-by: Boqiang Zhang <Cyril666@users.noreply.huggingface.co>f2e6f5b -
Update README.md (#2)
- Update README.md (2fc6babf57c0f948718727e80510005fa89b888e) Co-authored-by: Ruihan Yang <rhyang@users.noreply.huggingface.co>8197d4d -
Update README.md
Verified signature752f0c8 -
Update README.md
Verified signature1fc14fc
-
Update README.md
Verified signaturec35c499 -
Update README.md
Verified signature35eaf72 -
Update README.md
Verified signaturec0c17ec
-
update vision encoder
Verified signature8a3f83a
-
Update README.md
Verified signature4cba438 -
Update README.md
Verified signatureb9d371d -
Update README.md
Verified signature355e843 -
Upload LICENSE.txt
Verified signature7da11c4 -
Update README.md
Verified signatureba0a0a1 -
Transfer from pg-team/pg-vl-2b-hf
Verified signaturea10fac4
-
initial commit
Verified signature5eb792c