Instructions to use salvepilo/llama-cpp-jinja-crash-poc with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use salvepilo/llama-cpp-jinja-crash-poc with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="salvepilo/llama-cpp-jinja-crash-poc", filename="poc_crash_model.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use salvepilo/llama-cpp-jinja-crash-poc with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf salvepilo/llama-cpp-jinja-crash-poc # Run inference directly in the terminal: llama-cli -hf salvepilo/llama-cpp-jinja-crash-poc
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf salvepilo/llama-cpp-jinja-crash-poc # Run inference directly in the terminal: llama-cli -hf salvepilo/llama-cpp-jinja-crash-poc
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 salvepilo/llama-cpp-jinja-crash-poc # Run inference directly in the terminal: ./llama-cli -hf salvepilo/llama-cpp-jinja-crash-poc
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 salvepilo/llama-cpp-jinja-crash-poc # Run inference directly in the terminal: ./build/bin/llama-cli -hf salvepilo/llama-cpp-jinja-crash-poc
Use Docker
docker model run hf.co/salvepilo/llama-cpp-jinja-crash-poc
- LM Studio
- Jan
- Ollama
How to use salvepilo/llama-cpp-jinja-crash-poc with Ollama:
ollama run hf.co/salvepilo/llama-cpp-jinja-crash-poc
- Unsloth Studio new
How to use salvepilo/llama-cpp-jinja-crash-poc 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 salvepilo/llama-cpp-jinja-crash-poc 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 salvepilo/llama-cpp-jinja-crash-poc to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for salvepilo/llama-cpp-jinja-crash-poc to start chatting
- Docker Model Runner
How to use salvepilo/llama-cpp-jinja-crash-poc with Docker Model Runner:
docker model run hf.co/salvepilo/llama-cpp-jinja-crash-poc
- Lemonade
How to use salvepilo/llama-cpp-jinja-crash-poc with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull salvepilo/llama-cpp-jinja-crash-poc
Run and chat with the model
lemonade run user.llama-cpp-jinja-crash-poc-{{QUANT_TAG}}List all available models
lemonade list
How to use from
llama.cppInstall from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama-server -hf salvepilo/llama-cpp-jinja-crash-poc# Run inference directly in the terminal:
llama-cli -hf salvepilo/llama-cpp-jinja-crash-pocUse 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 salvepilo/llama-cpp-jinja-crash-poc# Run inference directly in the terminal:
./llama-cli -hf salvepilo/llama-cpp-jinja-crash-pocBuild 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 salvepilo/llama-cpp-jinja-crash-poc# Run inference directly in the terminal:
./build/bin/llama-cli -hf salvepilo/llama-cpp-jinja-crash-pocUse Docker
docker model run hf.co/salvepilo/llama-cpp-jinja-crash-pocQuick Links
PoC: Stack Overflow in llama.cpp Jinja Parser
This is a security research proof-of-concept. Do NOT use this model for inference.
This repository contains a minimal GGUF model file that triggers a stack overflow
(SIGSEGV) in llama.cpp's Jinja template parser due to unbounded recursion in
parse_if_expression() (common/jinja/parser.cpp).
Reproduction
git clone https://github.com/ggml-org/llama.cpp && cd llama.cpp
cmake -B build && cmake --build build -j
# Download the PoC model
huggingface-cli download salvepilo/llama-cpp-jinja-crash-poc poc_crash_model.gguf
# Trigger the crash (no --jinja flag needed)
./build/bin/llama-cli -m poc_crash_model.gguf -p 'hello'
# Expected: Segmentation fault (exit code 139)
Files
poc_crash_model.gguf- Malicious GGUF with deeply nested Jinja chat templatecraft_full_gguf_poc.py- Python script to regenerate the PoC file
- Downloads last month
- 10
Hardware compatibility
Log In to add your hardware
We're not able to determine the quantization variants.
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support
Install from brew
# Start a local OpenAI-compatible server with a web UI: llama-server -hf salvepilo/llama-cpp-jinja-crash-poc# Run inference directly in the terminal: llama-cli -hf salvepilo/llama-cpp-jinja-crash-poc