Instructions to use PahaII/MM-LLaMA-2-7B-projector with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use PahaII/MM-LLaMA-2-7B-projector with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="PahaII/MM-LLaMA-2-7B-projector")# Load model directly from transformers import AutoProcessor, AutoModelForCausalLM processor = AutoProcessor.from_pretrained("PahaII/MM-LLaMA-2-7B-projector") model = AutoModelForCausalLM.from_pretrained("PahaII/MM-LLaMA-2-7B-projector", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use PahaII/MM-LLaMA-2-7B-projector with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "PahaII/MM-LLaMA-2-7B-projector" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "PahaII/MM-LLaMA-2-7B-projector", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/PahaII/MM-LLaMA-2-7B-projector
- SGLang
How to use PahaII/MM-LLaMA-2-7B-projector 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 "PahaII/MM-LLaMA-2-7B-projector" \ --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": "PahaII/MM-LLaMA-2-7B-projector", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "PahaII/MM-LLaMA-2-7B-projector" \ --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": "PahaII/MM-LLaMA-2-7B-projector", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use PahaII/MM-LLaMA-2-7B-projector with Docker Model Runner:
docker model run hf.co/PahaII/MM-LLaMA-2-7B-projector
Download mm_projector.bin from PahaII/MM-LLaMA-2-7B-projector: direct link, hf CLI and curl.
- Browser
- Download file 541 MB
-
https://huggingface.co/PahaII/MM-LLaMA-2-7B-projector/resolve/main/mm_projector.bin
- Command line
-
hf download hf://PahaII/MM-LLaMA-2-7B-projector/mm_projector.bin
-
curl -L -o mm_projector.bin https://huggingface.co/PahaII/MM-LLaMA-2-7B-projector/resolve/main/mm_projector.bin
541 MB
- Xet hash:
- 7e37395f34485389fa230aca6d7383ccf87e6e35ec2e3ff9113319d83f9bd137
- Size of remote file:
- 541 MB
- SHA256:
- b772503ac85ab851b7b0d6dc9037ceae73ad833137331802ce77e036f92d563d
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.