OntologerFounder's picture
Upload folder using huggingface_hub
a37c8ce verified
|
Raw
History Blame Contribute Delete
5.83 kB
---
license: apache-2.0
language:
- en
tags:
- ngmi
- qwen3
- heretic
- abliterated
- uncensored
- iq1_s
- q2_k
- q4_k_m
- importance-matrix
- gguf
- llama-cpp
pipeline_tag: text-generation
base_model: Qwen/Qwen3-8B
library_name: llama.cpp
---
```
β–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—
β–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β• β–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘
β–ˆβ–ˆβ•”β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β–ˆβ–ˆβ–ˆβ–ˆβ•”β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘
β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘
β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘ β•šβ•β• β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘
β•šβ•β• β•šβ•β•β•β• β•šβ•β•β•β•β•β• β•šβ•β• β•šβ•β•β•šβ•β•
```
---
# NGMI Systems β€” Node Governance Model Interface
**[ngmi.run](https://ngmi.run) | [ngmi.systems](https://ngmi.systems)**
> **Not Gonna Make It? Watch us.**
NGMI Systems builds **open, unbounded AI infrastructure** β€” models that don't refuse, tools that don't gatekeep, infrastructure that anyone can run. We're here to prove that the best AI shouldn't live behind API keys, content filters, or corporate moats.
### Our Mission
**AI for everyone. No exceptions.**
The current AI landscape is shaped by a handful of companies deciding what models can and can't say. We reject that. NGMI Systems exists to:
- **Decensor & Harden** β€” We abliterate models with Heretic, stripping out manufactured refusal behaviors so you can use AI on your own terms.
- **Shrink & Ship** β€” We quantize models to 2, 3, and 5 bits using importance-weighted techniques, making powerful AI runnable on a laptop, a Raspberry Pi, or an NVIDIA DGX.
- **Open Everything** β€” Every model card explains exactly how we built it. No secret sauce, no "trust us." Reproduce it yourself.
- **Fine-tune Soon** β€” Custom fine-tunes for specific domains (code, medicine, creative writing) are in the pipeline. Community-requested models get priority.
- **Build Infrastructure** β€” Orchestration servers, music generation (Magenta Realtime 2 on CUDA), desktop shells, and more β€” all open, all self-hostable.
### Our Models
Every NGMI model is **built, abliterated, quantized, and benchmarked on real hardware** (NVIDIA DGX Spark, GB10 Blackwell, 128GB unified memory). No cloud rounding, no synthetic benchmarks β€” what you see is what we measured.
| Model | Heretic Abliteration | Refusal Rate | Quantization |
|-------|---------------------|--------------|--------------|
| NGMI-Qwen3-8B | 20 Optuna trials | 18/100 (82% ↓) | IQ1_S / Q2_K / Q4_K_M |
| More coming | Pipeline scalable | β€” | Sub-1-bit research |
### Stay Tuned
- **Gemma-4-12B** heretic incoming
- **PrismML ternary models** experimental branch
- **Fine-tuned domain models** on request
- **Magenta Realtime 2** music generation server
---
# NGMI-Qwen3-8B-5Bit-Heretic
Qwen3-8B abliterated with Heretic, quantized to 5Bit (Q4_K_M). Maximum quality β€” ideal for critical applications.
## Heretic Abliteration
- **Base model**: Qwen/Qwen3-8B (Apache 2.0)
- **Method**: Heretic (p-e-w/heretic), 20 Optuna trials, auto-selected best
- **Refusal rate**: 18/100 (down from ~99/100 baseline, 82% reduction)
- **KL divergence**: 0.112 (well within safe range β€” capabilities preserved)
- **Abliteration applied to full-precision weights**, then quantized
## Quantization
- **Format**: Q4_K_M
- **Bits per weight**: 4.90 bpw
- **Size**: 4.8 GB (from 16.4 GB F16)
- **Speed**: 42 t/s on NVIDIA GB10 (Blackwell, CUDA 13, `-ngl 99`)
- **Importance matrix** (2-bit only): 30MB diverse corpus β€” Frankenstein + froggeric/imatrix + eaddario code/math/general English
## NGMI Variants
| Variant | Quant | Size | Speed | BPW | Best For |
|---------|-------|------|-------|-----|----------|
| 2-bit | IQ1_S | 2.0 GB | 95 t/s | 2.06 | Speed demons |
| 3-bit | Q2_K | 3.1 GB | 58 t/s | 3.20 | **Daily driver** |
| 5-bit | Q4_K_M | 4.8 GB | 42 t/s | 4.90 | Maximum quality |
> **Recommendation**: 3-bit (Q2_K) is the sweet spot. 2-bit needs the included importance matrix for coherence.
## Usage
```python
from llama_cpp import Llama
llm = Llama.from_pretrained(
repo_id="NGMISystems/NGMI-Qwen3-8B-5Bit-Heretic",
filename="qwen3-8b-heretic-q4_k_m.gguf",
n_ctx=32768,
n_gpu_layers=-1,
)
response = llm.create_chat_completion(
messages=[{"role": "user", "content": "Your prompt here"}],
max_tokens=200
)
```
Or with llama-server:
```bash
llama-server -m qwen3-8b-heretic-q4_k_m.gguf \
--host 0.0.0.0 --port 8080 -ngl 99 -c 32768
```
## Benchmarks
All measurements on **NVIDIA DGX Spark** (GB10, 128GB unified memory, Blackwell sm_121a, CUDA 13.0, aarch64) with `llama.cpp` CUDA build, `-ngl 99`, 32K context, 8 threads.
| Prompt | 5-bit | 3-bit | 2-bit |
|--------|-------|-------|-------|
| "Quantum computing simply" | 42 t/s | 58 t/s | 95 t/s |
| 7-category coherence test | 7/7 | 7/7 | 7/7 |
## Reproducibility
Build it yourself:
```bash
# 1. Abliterate
heretic --model Qwen/Qwen3-8B --n-trials 20
# 2. Convert
python3 convert_hf_to_gguf.py Qwen3-8B-heretic --outfile model-f16.gguf --outtype f16
# 3. Quantize (requires importance matrix for 2-bit)
llama-quantize --imatrix imatrix-v2.dat model-f16.gguf model-iq1_s.gguf iq1_s
```
## Acknowledgments
- [Qwen/Qwen3-8B](https://huggingface.co/Qwen/Qwen3-8B) by Alibaba (Apache 2.0)
- [Heretic](https://github.com/p-e-w/heretic) by p-e-w β€” LLM decensoring
- [llama.cpp](https://github.com/ggml-org/llama.cpp) by GGML
- [froggeric/imatrix](https://huggingface.co/datasets/froggeric/imatrix) β€” calibration backbone
- [eaddario/imatrix-calibration](https://huggingface.co/datasets/eaddario/imatrix-calibration) β€” code/math corpus
- Mary Shelley, for *Frankenstein*