Instructions to use FreedomIntelligence/ALLaVA-Phi2-2_7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use FreedomIntelligence/ALLaVA-Phi2-2_7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="FreedomIntelligence/ALLaVA-Phi2-2_7B", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("FreedomIntelligence/ALLaVA-Phi2-2_7B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use FreedomIntelligence/ALLaVA-Phi2-2_7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "FreedomIntelligence/ALLaVA-Phi2-2_7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "FreedomIntelligence/ALLaVA-Phi2-2_7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/FreedomIntelligence/ALLaVA-Phi2-2_7B
- SGLang
How to use FreedomIntelligence/ALLaVA-Phi2-2_7B 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 "FreedomIntelligence/ALLaVA-Phi2-2_7B" \ --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": "FreedomIntelligence/ALLaVA-Phi2-2_7B", "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 "FreedomIntelligence/ALLaVA-Phi2-2_7B" \ --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": "FreedomIntelligence/ALLaVA-Phi2-2_7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use FreedomIntelligence/ALLaVA-Phi2-2_7B with Docker Model Runner:
docker model run hf.co/FreedomIntelligence/ALLaVA-Phi2-2_7B
Commit History
-
upload merges.txt
Verified signature7291663 -
upload generation_config.json
Verified signaturef6abb24 -
upload tokenizer.json
Verified signaturebeea53d -
upload README.md
Verified signatureaabb713 -
upload configuration_phi.py
Verified signatureb7f6ebe -
upload modeling_phi.py
Verified signatureb5d6580 -
upload added_tokens.json
Verified signaturee7b497f -
upload special_tokens_map.json
Verified signaturec351ec9 -
upload modeling_llava_phi.py
Verified signature2637057 -
upload model.safetensors.index.json
Verified signature5330c84 -
upload model-00001-of-00002.safetensors
Verified signaturece7ab46 -
upload generation_utils.py
Verified signature6b2320c -
upload tokenizer_config.json
Verified signature8262763 -
upload model-00002-of-00002.safetensors
Verified signature56f30b2 -
upload vocab.json
Verified signature03b930a -
upload llava_arch.py
Verified signature27d4f38 -
upload training_datasets_by_stage.jpg
Verified signature19d5fc1 -
upload training_args.bin
Verified signature7448b29 -
upload config.json
Verified signature4f465b3 -
upload trainer_state.json
Verified signature9513a2e -
Update README.md
Verified signaturebaa2743 -
upload merges.txt
Verified signature73025a9 -
upload generation_config.json
Verified signature1f190b6 -
upload tokenizer.json
Verified signature2a1ef6d -
upload README.md
Verified signaturefd86fe6 -
upload configuration_phi.py
Verified signaturec060d67 -
upload modeling_phi.py
Verified signatureb00a908 -
upload added_tokens.json
Verified signature1b16704 -
upload special_tokens_map.json
Verified signaturebb2cb38 -
upload modeling_llava_phi.py
Verified signatureb491de4 -
upload model.safetensors.index.json
Verified signature4c35e5b -
upload model-00001-of-00002.safetensors
Verified signature88a9d5e -
upload generation_utils.py
Verified signature458faf6 -
upload tokenizer_config.json
Verified signature0eb8c78 -
upload model-00002-of-00002.safetensors
Verified signature1070622 -
upload generation_utils.py
Verified signature9e4a5ec -
upload tokenizer_config.json
Verified signature352d2e9 -
upload model-00002-of-00002.safetensors
Verified signaturec86518c -
upload vocab.json
Verified signaturee56c332 -
upload llava_arch.py
Verified signature39a7d22 -
upload training_args.bin
Verified signaturee42064a -
upload config.json
Verified signature7ffae92 -
upload trainer_state.json
Verified signaturee0fc28b -
upload vocab.json
Verified signature5ce8719 -
upload llava_arch.py
Verified signature752f248 -
upload training_args.bin
Verified signature13abbc8 -
upload config.json
Verified signaturee0fd308 -
upload trainer_state.json
Verified signatureeeb83b1 -
upload vocab.json
Verified signaturefde52fe -
upload llava_arch.py
Verified signature4ab5baf