Instructions to use terrorswift/BugTraceAI-Apex-G4-26B-APEX-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use terrorswift/BugTraceAI-Apex-G4-26B-APEX-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="terrorswift/BugTraceAI-Apex-G4-26B-APEX-GGUF", filename="BugTraceAI-Apex-G4-26B-APEX-Balanced.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use terrorswift/BugTraceAI-Apex-G4-26B-APEX-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 terrorswift/BugTraceAI-Apex-G4-26B-APEX-GGUF # Run inference directly in the terminal: llama cli -hf terrorswift/BugTraceAI-Apex-G4-26B-APEX-GGUF
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf terrorswift/BugTraceAI-Apex-G4-26B-APEX-GGUF # Run inference directly in the terminal: llama cli -hf terrorswift/BugTraceAI-Apex-G4-26B-APEX-GGUF
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 terrorswift/BugTraceAI-Apex-G4-26B-APEX-GGUF # Run inference directly in the terminal: ./llama-cli -hf terrorswift/BugTraceAI-Apex-G4-26B-APEX-GGUF
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 terrorswift/BugTraceAI-Apex-G4-26B-APEX-GGUF # Run inference directly in the terminal: ./build/bin/llama-cli -hf terrorswift/BugTraceAI-Apex-G4-26B-APEX-GGUF
Use Docker
docker model run hf.co/terrorswift/BugTraceAI-Apex-G4-26B-APEX-GGUF
- LM Studio
- Jan
- vLLM
How to use terrorswift/BugTraceAI-Apex-G4-26B-APEX-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "terrorswift/BugTraceAI-Apex-G4-26B-APEX-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": "terrorswift/BugTraceAI-Apex-G4-26B-APEX-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/terrorswift/BugTraceAI-Apex-G4-26B-APEX-GGUF
- Ollama
How to use terrorswift/BugTraceAI-Apex-G4-26B-APEX-GGUF with Ollama:
ollama run hf.co/terrorswift/BugTraceAI-Apex-G4-26B-APEX-GGUF
- Unsloth Studio
How to use terrorswift/BugTraceAI-Apex-G4-26B-APEX-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 terrorswift/BugTraceAI-Apex-G4-26B-APEX-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 terrorswift/BugTraceAI-Apex-G4-26B-APEX-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for terrorswift/BugTraceAI-Apex-G4-26B-APEX-GGUF to start chatting
- Pi
How to use terrorswift/BugTraceAI-Apex-G4-26B-APEX-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf terrorswift/BugTraceAI-Apex-G4-26B-APEX-GGUF
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "terrorswift/BugTraceAI-Apex-G4-26B-APEX-GGUF" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use terrorswift/BugTraceAI-Apex-G4-26B-APEX-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf terrorswift/BugTraceAI-Apex-G4-26B-APEX-GGUF
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default terrorswift/BugTraceAI-Apex-G4-26B-APEX-GGUF
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use terrorswift/BugTraceAI-Apex-G4-26B-APEX-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf terrorswift/BugTraceAI-Apex-G4-26B-APEX-GGUF
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "terrorswift/BugTraceAI-Apex-G4-26B-APEX-GGUF" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- Docker Model Runner
How to use terrorswift/BugTraceAI-Apex-G4-26B-APEX-GGUF with Docker Model Runner:
docker model run hf.co/terrorswift/BugTraceAI-Apex-G4-26B-APEX-GGUF
- Lemonade
How to use terrorswift/BugTraceAI-Apex-G4-26B-APEX-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull terrorswift/BugTraceAI-Apex-G4-26B-APEX-GGUF
Run and chat with the model
lemonade run user.BugTraceAI-Apex-G4-26B-APEX-GGUF-{{QUANT_TAG}}List all available models
lemonade list
Bugtrace Apex G4 26B APEX
| Architecture | Gemma 4 |
| Variant | BugtraceAI-Apex-G4-26B |
| Quantization | Adaptive Precision for EXpert Models |
| Parameters | 26B A4B (MoE) |
| Layers | 30 |
| Multi-modal | (Supported - see below) |
| Context window | 131072 |
Variants
| Name | Quants | Size |
|---|---|---|
| Balanced | Q6_K/Q5_K experts, Q8_0 shared, Q6_K attn | 19.2 GB |
| i-Balanced | Same + imatrix | 19.2 GB |
| Quality | Q6_K/Q5_K/IQ4_XS experts, Q8_0 shared, Q6_K attn | 18.4 GB |
| i-Quality | Same + imatrix | 18.4 GB |
| Compact | Q4_K/Q3_K experts, Q6_K shared, Q4_K attn | 13.6 GB |
| i-Compact | Same + imatrix | 13.6 GB |
| Mini | Q3_K/IQ2_S experts, Q5_0 shared, Q4_K/Q3_K attn | 11.4 GB |
Description
APEX quantizations of BugTraceAI/BugTraceAI-Apex-G4-26B-Master-f16.
Bugtrace:
The Apex Predator of Offensive Security Reasoning.
BugTraceAI-CORE-G4-Apex is a high-performance, uncensored 26B Mixture-of-Experts (MoE) model based on Gemma 4 architecture. It has been meticulously fine-tuned via DPO (Direct Preference Optimization) on a curated "Super Dataset" comprising elite Bug Bounty reports, advanced malware methodologies, and multi-layer WAF evasion techniques.
Unlike standard security models, the Apex variant features an injected Opus-style reasoning engine, forcing the model to perform a deep step-by-step analysis inside a block before providing technical payloads or remediation strategies.
APEX:
A novel MoE-aware mixed-precision quantization technique for llama.cpp
Beats Q8_0 perplexity at half the size -- and even beats F16. APEX outperforms Unsloth Dynamic 2.0 (UD) quantizations on perplexity, HellaSwag, and inference speed while being 2x smaller: APEX I-Quality (21.3 GB) achieves PPL 6.552 and 83.5% HellaSwag vs Unsloth UD-Q8_K_XL (45.3 GB) at PPL 6.536 and 82.5% HellaSwag. At the consumer tier, APEX Mini (12.2 GB) beats bartowski IQ2_M on every metric.
APEX assigns quantization precision per tensor type and per layer, exploiting the structural sparsity of Mixture-of-Experts models to achieve lossless compression that uniform quantization cannot. Five tiers from 21.3 GB (I-Quality) to 12.2 GB (Mini) cover every deployment scenario from maximum accuracy to consumer GPU inference. I-variants use a diverse imatrix (chat, code, reasoning, tool-calling -- no Wikipedia) that trades tiny perplexity increases for significant accuracy gains and lower KL divergence.
Yes, this is the APEX variant of a model named Apex. Nomen omen.
Process & Notes
- Built from BugTraceAI/BugTraceAI-Apex-G4-26B-Master-f16 with llama-quantize (b9840).
- Uses mudler/LocalAI's APEX Quantization strategy for Gemma 4.
- Importance matrix used for i-variants originates from mudler's own imatrix.dat from the mudler/gemma-4-26B-A4B-it-APEX-GGUF variant, based on "multi-turn chat[s], code generation, reasoning traces, tool calling", as opposed to an additional security-focused calibration corpus. This adheres more closely to the APEX philosophy as stated in their paper. Bugtrace already includes security-focused finetuning via DPO retraining.
- Vision mmproj is not included with Bugtrace. The upstream model had its Vision Tower stripped "to dedicate 100% of its MoE experts and context window to technical reasoning, payload generation, and language analysis". However, multimodal still works and is compatible with the mmproj included in, for example, mudler/gemma-4-26B-A4B-it-APEX-GGUF.
Example llama.cpp startup
llama-server \
-m BugTraceAI-Apex-G4-26B-APEX/BugTraceAI-Apex-G4-26B-APEX-I-Compact.gguf \
--mmproj mmproj.gguf \
--no-mmproj-offload \
--reasoning auto \
--jinja \
--fit on \
-c 131072 \
--no-mmap \
--flash-attn on \
-ctk q8_0 \
-ctv q8_0 \
--temp 0.1 \
--top-p 0.9 \
--top-k 20 \
--min-p 0.0 \
--repeat-penalty 1.1
Actual values depend on your hardware and preferences.
Disclaimer
This model is uncensored, with a refusal rate as low as 1% according to upstream testing.
By using the model, you accept that it may generate content that is distressing, potentially harmful, or illegal in your country of residence.
This model is experimental, and its intended uses are research on AI and cybersecurity, and local testing. Do not use it for evil.
License
The quantization offered with this model is to be considered a derivative work of Gemma 4 - therefore, it inherits its Apache-2.0 license.
Acknowledgements
Sincere thanks to:
- BugtraceAI for delivering one of the most solid variants of Gemma 4 26B - not just for cyber research, but general use as well.
- mudler / LocalAI for creating a quantization strategy rooted in sound theory, and very convincing in practice.
- Downloads last month
- 2,195
We're not able to determine the quantization variants.
Model tree for terrorswift/BugTraceAI-Apex-G4-26B-APEX-GGUF
Base model
google/gemma-4-26B-A4B