Instructions to use FreedomIntelligence/LongLLaVA-9B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use FreedomIntelligence/LongLLaVA-9B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="FreedomIntelligence/LongLLaVA-9B", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("FreedomIntelligence/LongLLaVA-9B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use FreedomIntelligence/LongLLaVA-9B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "FreedomIntelligence/LongLLaVA-9B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "FreedomIntelligence/LongLLaVA-9B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/FreedomIntelligence/LongLLaVA-9B
- SGLang
How to use FreedomIntelligence/LongLLaVA-9B 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/LongLLaVA-9B" \ --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/LongLLaVA-9B", "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/LongLLaVA-9B" \ --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/LongLLaVA-9B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use FreedomIntelligence/LongLLaVA-9B with Docker Model Runner:
docker model run hf.co/FreedomIntelligence/LongLLaVA-9B
Commit History
-
Update README.md
Verified signature2b1bc03 -
Update README.md
Verified signature7887e74 -
Upload 6 files
Verified signaturea5f609a -
Update README.md
Verified signature71f09bf -
Update README.md
Verified signature0b06c06 -
Upload 8 files
Verified signaturedae38f2 -
Create assets/demo
Verified signature1fdfff5 -
Update README.md
Verified signature3222c7a
-
Upload configuration_jamba.py with huggingface_hub
Verified signatureb2495a0 -
Upload model-00001-of-00004.safetensors with huggingface_hub
Verified signatureabf07bf -
Upload generation_config.json with huggingface_hub
Verified signature65b2f69 -
Upload tokenizer.json with huggingface_hub
Verified signature1451ae4 -
Upload modeling_jamba.py with huggingface_hub
Verified signature4f64953 -
Upload special_tokens_map.json with huggingface_hub
Verified signature27219c4 -
Upload model.safetensors.index.json with huggingface_hub
Verified signature7ba1f69 -
Upload tokenizer_config.json with huggingface_hub
Verified signature21e07de -
Upload model-00004-of-00004.safetensors with huggingface_hub
Verified signature14db644 -
Upload config.json with huggingface_hub
Verified signature5c71a10 -
Upload model-00002-of-00004.safetensors with huggingface_hub
Verified signature00c5413 -
Upload model-00003-of-00004.safetensors with huggingface_hub
Verified signature73b6427 -
Upload tokenizer.model with huggingface_hub
Verified signature75762d9 -
Upload tokenizer.model with huggingface_hub
Verified signaturec125d8f -
initial commit
Verified signatureca0c0e6