Instructions to use prism-ml/Ternary-Bonsai-27B-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use prism-ml/Ternary-Bonsai-27B-gguf with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="prism-ml/Ternary-Bonsai-27B-gguf", filename="Ternary-Bonsai-27B-F16.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Inference
- HuggingChat
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use prism-ml/Ternary-Bonsai-27B-gguf 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 prism-ml/Ternary-Bonsai-27B-gguf:F16 # Run inference directly in the terminal: llama cli -hf prism-ml/Ternary-Bonsai-27B-gguf:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf prism-ml/Ternary-Bonsai-27B-gguf:F16 # Run inference directly in the terminal: llama cli -hf prism-ml/Ternary-Bonsai-27B-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 prism-ml/Ternary-Bonsai-27B-gguf:F16 # Run inference directly in the terminal: ./llama-cli -hf prism-ml/Ternary-Bonsai-27B-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 prism-ml/Ternary-Bonsai-27B-gguf:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf prism-ml/Ternary-Bonsai-27B-gguf:F16
Use Docker
docker model run hf.co/prism-ml/Ternary-Bonsai-27B-gguf:F16
- LM Studio
- Jan
- vLLM
How to use prism-ml/Ternary-Bonsai-27B-gguf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "prism-ml/Ternary-Bonsai-27B-gguf" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prism-ml/Ternary-Bonsai-27B-gguf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/prism-ml/Ternary-Bonsai-27B-gguf:F16
- Ollama
How to use prism-ml/Ternary-Bonsai-27B-gguf with Ollama:
ollama run hf.co/prism-ml/Ternary-Bonsai-27B-gguf:F16
- Unsloth Studio
How to use prism-ml/Ternary-Bonsai-27B-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 prism-ml/Ternary-Bonsai-27B-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 prism-ml/Ternary-Bonsai-27B-gguf to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for prism-ml/Ternary-Bonsai-27B-gguf to start chatting
- Atomic Chat new
- Docker Model Runner
How to use prism-ml/Ternary-Bonsai-27B-gguf with Docker Model Runner:
docker model run hf.co/prism-ml/Ternary-Bonsai-27B-gguf:F16
- Lemonade
How to use prism-ml/Ternary-Bonsai-27B-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull prism-ml/Ternary-Bonsai-27B-gguf:F16
Run and chat with the model
lemonade run user.Ternary-Bonsai-27B-gguf-F16
List all available models
lemonade list
Generates gibberish and repeats itself in the middle of thinking and token generation
Looks like model is broken or something.
it generates random text and repeats that until the token-windows is filled. An image of the situation in OpenCode is attached below.
Command:
llama-server -m "path-to\Ternary-Bonsai-27B-Q2_0.gguf" --temp 0.7 --top-p 0.95 --top-k 20 -ngl 99
I used other commands too, but no difference.
Sample: opencode
Llama.cpp chat interface
Windows 11
Prism llama.cpp fork
Rtx 3080 ti
I've tried it, so far there's no looping, but there are syntax hallucinations while coding.
RTX 5060 Ti, windows 11, prism llama.cpp fork,
@echo off
.\build-prism\llama-server.exe ^
-m "models\ternary-bonsai-27b\Ternary-Bonsai-27B-Q2_0.gguf" ^
--mmproj "models\ternary-bonsai-27b\Ternary-Bonsai-27B-mmproj-BF16.gguf" ^
--alias "ternary-bonsai-27b" ^
--models-max 1 ^
--models-autoload ^
--no-mmap ^
--mlock ^
-np 1 ^
--no-mmproj-offload ^
-ngl 99 ^
--flash-attn on ^
--fit-ctx 8192 ^
--image-min-tokens 1024 ^
-ctk q8_0 ^
-ctv q8_0 ^
--cache-ram 2048 ^
--ctx-checkpoints 8 ^
-t 6 ^
--ubatch-size 1024 ^
--reasoning-budget 2048 ^
--temp 0.7 ^
--top-p 0.95 ^
--top-k 20 ^
--repeat-penalty 1.15
pause
.\build-prism\llama-server.exe ^
-m "models\ternary-bonsai-27b\Ternary-Bonsai-27B-Q2_0.gguf" ^
--mmproj "models\ternary-bonsai-27b\Ternary-Bonsai-27B-mmproj-BF16.gguf" ^
--alias "ternary-bonsai-27b" ^
--models-max 1 ^
--models-autoload ^
--no-mmap ^
--mlock ^
-np 1 ^
--no-mmproj-offload ^
-ngl 99 ^
--flash-attn on ^
--fit-ctx 8192 ^
--image-min-tokens 1024 ^
-ctk q8_0 ^
-ctv q8_0 ^
--cache-ram 2048 ^
--ctx-checkpoints 8 ^
-t 6 ^
--ubatch-size 1024 ^
--reasoning-budget 2048 ^
--temp 0.7 ^
--top-p 0.95 ^
--top-k 20 ^
--repeat-penalty 1.15
I tried with you're command, still the same problem. It's weird, because I don't have this problem with any other models like vanilla Qwen-35b, Gemma12b end a lot more
Yeah, I'm a bit confused as well. Since we're supposed to be using the same model and parameters, I would have expected similar results.
I'm not an expert on CUDA or llama.cpp internals, so this is really just me being curious and trying to compare our setups as closely as possible.
I'm using the official PrismML release prism-b9591-62061f9, specifically:
llama-prism-b1-62061f9-bin-win-cuda-12.4-x64.zip
cudart-llama-bin-win-cuda-12.4-x64.zip
https://github.com/PrismML-Eng/llama.cpp/releases#release-prism-b9591-62061f9


