Instructions to use bigmo6286/undefinedbehaviouringguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use bigmo6286/undefinedbehaviouringguf with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf bigmo6286/undefinedbehaviouringguf # Run inference directly in the terminal: llama cli -hf bigmo6286/undefinedbehaviouringguf
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf bigmo6286/undefinedbehaviouringguf # Run inference directly in the terminal: llama cli -hf bigmo6286/undefinedbehaviouringguf
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 bigmo6286/undefinedbehaviouringguf # Run inference directly in the terminal: ./llama-cli -hf bigmo6286/undefinedbehaviouringguf
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 bigmo6286/undefinedbehaviouringguf # Run inference directly in the terminal: ./build/bin/llama-cli -hf bigmo6286/undefinedbehaviouringguf
Use Docker
docker model run hf.co/bigmo6286/undefinedbehaviouringguf
- LM Studio
- Jan
- Ollama
How to use bigmo6286/undefinedbehaviouringguf with Ollama:
ollama run hf.co/bigmo6286/undefinedbehaviouringguf
- Unsloth Desktop
- Docker Model Runner
How to use bigmo6286/undefinedbehaviouringguf with Docker Model Runner:
docker model run hf.co/bigmo6286/undefinedbehaviouringguf
- Lemonade
How to use bigmo6286/undefinedbehaviouringguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull bigmo6286/undefinedbehaviouringguf
Run and chat with the model
lemonade run user.undefinedbehaviouringguf-{{QUANT_TAG}}List all available models
lemonade list
- Atomic Chat
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
𧨠Undefined Behavior in llama.cpp GGUF Loader
Summary
This repository demonstrates an undefined behavior bug in the test-gguf binary from the llama.cpp project. The bug is triggered via multiple real-world .gguf vocab model files, including those provided here.
Vulnerability
Due to missing input validation in the GGUF file parsing logic, malformed or unexpected values can trigger an unsigned integer underflow inside C++ STL's std::string::compare():
runtime error: unsigned integer overflow: 6 - 10 cannot be represented in type 'size_type'
SUMMARY: UndefinedBehaviorSanitizer: basic_string.h:495:51
How to Reproduce
π Build llama.cpp with UBSan
git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp
mkdir build && cd build
CC=clang CXX=clang++ CFLAGS="-fsanitize=undefined,address -g" \
CXXFLAGS="-fsanitize=undefined,address -g" cmake .. -DLLAMA_BUILD_TESTS=on
make -j$(nproc) test-gguf
π₯ Trigger the crash
UBSAN_OPTIONS=print_stacktrace=1 ./bin/test-gguf -- ./ggml-vocab-aquila.gguf
You should see output like:
/bits/basic_string.h:495:51: runtime error: unsigned integer overflow
...
Files
ggml-vocab-aquila.gguf: Used to reliably trigger the bug
Credit
Discovered by: bigmo6286
- Downloads last month
- -
We're not able to determine the quantization variants.