Instructions to use xtuner/llava-llama-3-8b-v1_1-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use xtuner/llava-llama-3-8b-v1_1-gguf with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="xtuner/llava-llama-3-8b-v1_1-gguf", filename="llava-llama-3-8b-v1_1-f16.gguf", )
llm.create_chat_completion( messages = "\"cats.jpg\"" )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use xtuner/llava-llama-3-8b-v1_1-gguf with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf xtuner/llava-llama-3-8b-v1_1-gguf:F16 # Run inference directly in the terminal: llama-cli -hf xtuner/llava-llama-3-8b-v1_1-gguf:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf xtuner/llava-llama-3-8b-v1_1-gguf:F16 # Run inference directly in the terminal: llama-cli -hf xtuner/llava-llama-3-8b-v1_1-gguf:F16
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf xtuner/llava-llama-3-8b-v1_1-gguf:F16 # Run inference directly in the terminal: ./llama-cli -hf xtuner/llava-llama-3-8b-v1_1-gguf:F16
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf xtuner/llava-llama-3-8b-v1_1-gguf:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf xtuner/llava-llama-3-8b-v1_1-gguf:F16
Use Docker
docker model run hf.co/xtuner/llava-llama-3-8b-v1_1-gguf:F16
- LM Studio
- Jan
- Ollama
How to use xtuner/llava-llama-3-8b-v1_1-gguf with Ollama:
ollama run hf.co/xtuner/llava-llama-3-8b-v1_1-gguf:F16
- Unsloth Studio
How to use xtuner/llava-llama-3-8b-v1_1-gguf with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for xtuner/llava-llama-3-8b-v1_1-gguf to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for xtuner/llava-llama-3-8b-v1_1-gguf to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for xtuner/llava-llama-3-8b-v1_1-gguf to start chatting
- Docker Model Runner
How to use xtuner/llava-llama-3-8b-v1_1-gguf with Docker Model Runner:
docker model run hf.co/xtuner/llava-llama-3-8b-v1_1-gguf:F16
- Lemonade
How to use xtuner/llava-llama-3-8b-v1_1-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull xtuner/llava-llama-3-8b-v1_1-gguf:F16
Run and chat with the model
lemonade run user.llava-llama-3-8b-v1_1-gguf-F16
List all available models
lemonade list
Update README.md
I added a very basic templating support into llava-cli which is triggered if you use <image> in a prompt
Example: -e -p "<|start_header_id|>user<|end_header_id|>\n\n<image>\nDescribe this image<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n\n"
If you do not use the template llava-cli will use the llava-1.5 type of SYSTEM and USER/ASSISTANT prompt which are not going to yield good results and can even make this model output garbage in some cases.
Please verify the template looks fine, I've not included the empty system prompt, I added a newline after the image
I've been trying to get this to work with the custom prompt, but it's still not working, I'm still going down the 1.5 LLava path (only generating 576 tokens). Should include the path to the image?
I've been trying to get this to work with the custom prompt, but it's still not working, I'm still going down the 1.5 LLava path (only generating 576 tokens). Should
include the path to the image?
You do everything as specified in the readme, but you add this custom prompt template to it.
This model is using a llama-1.5 architecture, but it uses a different prompt syntax.
Ah my apologies. I thought this was supposed to go down the 1.6 pathway. Thanks for the quick response.
LGTM!