Text Generation
Transformers
Safetensors
PyTorch
GGUF
qwen2
coding
uncensored
llama-cpp
conversational
Eval Results (legacy)
text-generation-inference
Instructions to use ImposterOnline/Pyrex-8B-Instruct-Uncensored with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ImposterOnline/Pyrex-8B-Instruct-Uncensored with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ImposterOnline/Pyrex-8B-Instruct-Uncensored") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ImposterOnline/Pyrex-8B-Instruct-Uncensored") model = AutoModelForCausalLM.from_pretrained("ImposterOnline/Pyrex-8B-Instruct-Uncensored", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ImposterOnline/Pyrex-8B-Instruct-Uncensored with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ImposterOnline/Pyrex-8B-Instruct-Uncensored" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ImposterOnline/Pyrex-8B-Instruct-Uncensored", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ImposterOnline/Pyrex-8B-Instruct-Uncensored
- SGLang
How to use ImposterOnline/Pyrex-8B-Instruct-Uncensored with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "ImposterOnline/Pyrex-8B-Instruct-Uncensored" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ImposterOnline/Pyrex-8B-Instruct-Uncensored", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "ImposterOnline/Pyrex-8B-Instruct-Uncensored" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ImposterOnline/Pyrex-8B-Instruct-Uncensored", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ImposterOnline/Pyrex-8B-Instruct-Uncensored with Docker Model Runner:
docker model run hf.co/ImposterOnline/Pyrex-8B-Instruct-Uncensored
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
| 2 |
license: apache-2.0
|
| 3 |
library_name: transformers
|
| 4 |
pipeline_tag: text-generation
|
|
|
|
| 5 |
tags:
|
| 6 |
- code
|
| 7 |
- coding
|
|
@@ -11,7 +12,16 @@ tags:
|
|
| 11 |
- qlora
|
| 12 |
- gguf
|
| 13 |
- llama.cpp
|
|
|
|
|
|
|
| 14 |
- agentic
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
model-index:
|
| 16 |
- name: Pyrex 8B Instruct Uncensored
|
| 17 |
results:
|
|
@@ -27,44 +37,67 @@ model-index:
|
|
| 27 |
---
|
| 28 |
|
| 29 |
<p align="center">
|
| 30 |
-
<img src="https://huggingface.co/ImposterOnline/Pyrex-8B-Instruct-Uncensored/resolve/main/pyrex-banner.png" width="100%" alt="Pyrex
|
| 31 |
</p>
|
| 32 |
|
| 33 |
<p align="center">
|
| 34 |
-
<b>
|
| 35 |
-
Strong
|
| 36 |
</p>
|
| 37 |
|
| 38 |
<p align="center">
|
| 39 |
-
<a href="
|
| 40 |
<a href="#benchmarks">Benchmarks</a> ·
|
| 41 |
-
<a href="#
|
|
|
|
| 42 |
<a href="#training">Training</a>
|
| 43 |
</p>
|
| 44 |
|
| 45 |
---
|
| 46 |
|
| 47 |
-
##
|
| 48 |
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
|
|
|
|
|
|
| 52 |
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
- **
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
- **
|
|
|
|
|
|
|
|
|
|
| 59 |
llama.cpp and LM Studio.
|
| 60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
## Benchmarks
|
| 62 |
|
| 63 |
-
|
| 64 |
-
executed in a sandbox. No sampling luck, no leaked answers.
|
| 65 |
|
| 66 |
<p align="center">
|
| 67 |
-
<img src="https://huggingface.co/ImposterOnline/Pyrex-8B-Instruct-Uncensored/resolve/main/pyrex-bench.png" width="72%" alt="HumanEval
|
| 68 |
</p>
|
| 69 |
|
| 70 |
| Model | HumanEval pass@1 |
|
|
@@ -73,41 +106,23 @@ executed in a sandbox. No sampling luck, no leaked answers.
|
|
| 73 |
| Pyrex (previous) | 41.5% (68/164) |
|
| 74 |
| **Pyrex 8B Instruct Uncensored** | **52.4% (86/164)** |
|
| 75 |
|
| 76 |
-
> **+23.1 points** over the
|
| 77 |
-
|
| 78 |
-
## Quick start
|
| 79 |
|
| 80 |
-
##
|
| 81 |
|
| 82 |
-
|
| 83 |
-
[**Pyrex-8B-Instruct-Uncensored-GGUF**](https://huggingface.co/ImposterOnline/Pyrex-8B-Instruct-Uncensored-GGUF):
|
| 84 |
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
| `pyrex-q4_k_m.gguf` | 4.4 GB | Recommended daily driver |
|
| 88 |
-
| `pyrex-q5_k_m.gguf` | 5.1 GB | Higher quality |
|
| 89 |
-
| `pyrex-q8_0.gguf` | 8.1 GB | Near-lossless |
|
| 90 |
-
| `pyrex-f16.gguf` | 15.2 GB | Full precision |
|
| 91 |
-
|
| 92 |
-
```bash
|
| 93 |
-
# Ollama (the Modelfile ships in the GGUF repo)
|
| 94 |
-
ollama create pyrex-8b -f Modelfile
|
| 95 |
-
ollama run pyrex-8b "Write a Python function that merges overlapping intervals."
|
| 96 |
-
|
| 97 |
-
# llama.cpp
|
| 98 |
-
./llama-cli -m pyrex-q4_k_m.gguf \
|
| 99 |
-
-p "<|im_start|>user\nYour question here\n<|im_end|>\n<|im_start|>assistant\n" \
|
| 100 |
-
-n 512 -c 8192
|
| 101 |
-
```
|
| 102 |
|
| 103 |
-
### Python
|
| 104 |
|
| 105 |
```python
|
| 106 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 107 |
|
| 108 |
model_id = "ImposterOnline/Pyrex-8B-Instruct-Uncensored"
|
| 109 |
tok = AutoTokenizer.from_pretrained(model_id)
|
| 110 |
-
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")
|
| 111 |
|
| 112 |
messages = [{"role": "user", "content": "Explain async/await in Python."}]
|
| 113 |
text = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
|
@@ -115,22 +130,45 @@ out = model.generate(**tok(text, return_tensors="pt"), max_new_tokens=512)
|
|
| 115 |
print(tok.decode(out[0], skip_special_tokens=True))
|
| 116 |
```
|
| 117 |
|
| 118 |
-
Chat format is `chatml`
|
|
|
|
| 119 |
|
| 120 |
### Server / agentic
|
| 121 |
|
| 122 |
-
|
| 123 |
-
|
| 124 |
|
| 125 |
```bash
|
| 126 |
vllm serve ImposterOnline/Pyrex-8B-Instruct-Uncensored
|
| 127 |
```
|
| 128 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 129 |
## Training
|
| 130 |
|
| 131 |
| Parameter | Value |
|
| 132 |
|---|---|
|
| 133 |
-
| Method | QLoRA (4-bit NF4) + LoRA r=48, α=96 |
|
| 134 |
| Data | ~95k cleaned examples (code + tool-use + general) |
|
| 135 |
| Sequence length | 3072 |
|
| 136 |
| Loss masking | Assistant-only (completion-only SFT) |
|
|
@@ -138,9 +176,14 @@ vllm serve ImposterOnline/Pyrex-8B-Instruct-Uncensored
|
|
| 138 |
| Epochs | 1 |
|
| 139 |
| Hardware | Hugging Face A100 GPU job |
|
| 140 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 141 |
The pipeline is config-driven and reproducible — `prepare_data.py` →
|
| 142 |
-
`train_qlora.py` → `eval_humaneval.py` → `publish.sh` — in the companion
|
| 143 |
-
`Arhan-w/pyrut`.
|
| 144 |
|
| 145 |
## License
|
| 146 |
|
|
|
|
| 2 |
license: apache-2.0
|
| 3 |
library_name: transformers
|
| 4 |
pipeline_tag: text-generation
|
| 5 |
+
base_model: BlossomsAI/Qwen2.5-Coder-7B-Instruct-Uncensored
|
| 6 |
tags:
|
| 7 |
- code
|
| 8 |
- coding
|
|
|
|
| 12 |
- qlora
|
| 13 |
- gguf
|
| 14 |
- llama.cpp
|
| 15 |
+
- text-generation-inference
|
| 16 |
+
- transformers
|
| 17 |
- agentic
|
| 18 |
+
- function-calling
|
| 19 |
+
datasets:
|
| 20 |
+
- OpenCoder-LLM/opencoder-sft-stage1
|
| 21 |
+
- sahil2801/CodeAlpaca-20k
|
| 22 |
+
- theblackcat102/evol-codealpaca-v1
|
| 23 |
+
- databricks/databricks-dolly-15k
|
| 24 |
+
- NousResearch/hermes-function-calling-v1
|
| 25 |
model-index:
|
| 26 |
- name: Pyrex 8B Instruct Uncensored
|
| 27 |
results:
|
|
|
|
| 37 |
---
|
| 38 |
|
| 39 |
<p align="center">
|
| 40 |
+
<img src="https://huggingface.co/ImposterOnline/Pyrex-8B-Instruct-Uncensored/resolve/main/pyrex-banner.png" width="100%" alt="Pyrex banner">
|
| 41 |
</p>
|
| 42 |
|
| 43 |
<p align="center">
|
| 44 |
+
<b>Pyrex 8B Instruct Uncensored</b> — a sharp, uncensored coding model.<br>
|
| 45 |
+
Strong at code · honest by design · runs anywhere.
|
| 46 |
</p>
|
| 47 |
|
| 48 |
<p align="center">
|
| 49 |
+
<a href="#model-details">Model</a> ·
|
| 50 |
<a href="#benchmarks">Benchmarks</a> ·
|
| 51 |
+
<a href="#usage">Usage</a> ·
|
| 52 |
+
<a href="#gguf">GGUF</a> ·
|
| 53 |
<a href="#training">Training</a>
|
| 54 |
</p>
|
| 55 |
|
| 56 |
---
|
| 57 |
|
| 58 |
+
## Introduction
|
| 59 |
|
| 60 |
+
Pyrex 8B Instruct Uncensored is a **real, trained model** — built with our own
|
| 61 |
+
data recipe, our own QLoRA fine-tune, and our own evaluation pipeline on
|
| 62 |
+
Hugging Face GPU compute. It is a coding-first instruction model designed for
|
| 63 |
+
real developer work: writing code, fixing bugs, explaining technical problems,
|
| 64 |
+
and driving agent loops.
|
| 65 |
|
| 66 |
+
### Key strengths
|
| 67 |
+
|
| 68 |
+
- **Coding-first** — trained mostly on high-quality code instructions
|
| 69 |
+
(OpenCoder real-user data, CodeAlpaca, evol-codealpaca), so it writes
|
| 70 |
+
clean and correct code.
|
| 71 |
+
- **Uncensored** — answers directly and honestly, without refusals.
|
| 72 |
+
- **Agentic / tool-use ready** — function-calling data was part of training;
|
| 73 |
+
suited for OpenAI-compatible APIs and agent workflows.
|
| 74 |
+
- **Portable** — full-precision safetensors plus GGUF quants for Ollama,
|
| 75 |
llama.cpp and LM Studio.
|
| 76 |
|
| 77 |
+
> **Uncensored usage note.** This model has no safety-alignment softening built
|
| 78 |
+
> in. It can produce content that is explicit, offensive, or otherwise
|
| 79 |
+
> unsuitable for some audiences. Use it responsibly and at your own discretion —
|
| 80 |
+
> the model and its authors assume no liability for outputs.
|
| 81 |
+
|
| 82 |
+
## Model details
|
| 83 |
+
|
| 84 |
+
| Property | Value |
|
| 85 |
+
|---|---|
|
| 86 |
+
| Parameters | 7.6B |
|
| 87 |
+
| Architecture | Transformers · RoPE · SwiGLU · RMSNorm · GQA |
|
| 88 |
+
| Context window | Up to 32k native (trained at 3072) |
|
| 89 |
+
| Base | Coding-specialized instruct model (uncensored variant) |
|
| 90 |
+
| Method | QLoRA (4-bit NF4) + LoRA r=48, α=96 |
|
| 91 |
+
| Chat format | `chatml` (`<|im_start|>user` / `<|im_end|>`) |
|
| 92 |
+
| License | Apache-2.0 |
|
| 93 |
+
|
| 94 |
## Benchmarks
|
| 95 |
|
| 96 |
+
Measured with greedy pass@1 on **HumanEval** — 164 unseen problems, official
|
| 97 |
+
unit tests executed in a sandbox. No sampling luck, no leaked answers.
|
| 98 |
|
| 99 |
<p align="center">
|
| 100 |
+
<img src="https://huggingface.co/ImposterOnline/Pyrex-8B-Instruct-Uncensored/resolve/main/pyrex-bench.png" width="72%" alt="HumanEval benchmark">
|
| 101 |
</p>
|
| 102 |
|
| 103 |
| Model | HumanEval pass@1 |
|
|
|
|
| 106 |
| Pyrex (previous) | 41.5% (68/164) |
|
| 107 |
| **Pyrex 8B Instruct Uncensored** | **52.4% (86/164)** |
|
| 108 |
|
| 109 |
+
> **+23.1 points** over the base on unseen problems.
|
|
|
|
|
|
|
| 110 |
|
| 111 |
+
## Usage
|
| 112 |
|
| 113 |
+
### Requirements
|
|
|
|
| 114 |
|
| 115 |
+
- `transformers >= 4.44` for best `apply_chat_template` support.
|
| 116 |
+
- Any recent PyTorch build (CUDA or CPU).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 117 |
|
| 118 |
+
### Python
|
| 119 |
|
| 120 |
```python
|
| 121 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 122 |
|
| 123 |
model_id = "ImposterOnline/Pyrex-8B-Instruct-Uncensored"
|
| 124 |
tok = AutoTokenizer.from_pretrained(model_id)
|
| 125 |
+
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto", torch_dtype="auto")
|
| 126 |
|
| 127 |
messages = [{"role": "user", "content": "Explain async/await in Python."}]
|
| 128 |
text = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
|
|
|
| 130 |
print(tok.decode(out[0], skip_special_tokens=True))
|
| 131 |
```
|
| 132 |
|
| 133 |
+
Chat format is `chatml`. System prompt is optional; when used it is a system
|
| 134 |
+
message before the user turn.
|
| 135 |
|
| 136 |
### Server / agentic
|
| 137 |
|
| 138 |
+
Works with any OpenAI-compatible server (vLLM, llama.cpp server, Ollama,
|
| 139 |
+
Text Generation Inference). Function calling was part of training.
|
| 140 |
|
| 141 |
```bash
|
| 142 |
vllm serve ImposterOnline/Pyrex-8B-Instruct-Uncensored
|
| 143 |
```
|
| 144 |
|
| 145 |
+
## GGUF
|
| 146 |
+
|
| 147 |
+
Quantized builds live in
|
| 148 |
+
[**Pyrex-8B-Instruct-Uncensored-GGUF**](https://huggingface.co/ImposterOnline/Pyrex-8B-Instruct-Uncensored-GGUF).
|
| 149 |
+
|
| 150 |
+
| File | Size | Notes |
|
| 151 |
+
|---|---|---|
|
| 152 |
+
| `pyrex-q4_k_m.gguf` | 4.4 GB | Fast, recommended daily driver |
|
| 153 |
+
| `pyrex-q5_k_m.gguf` | 5.1 GB | Higher quality |
|
| 154 |
+
| `pyrex-q8_0.gguf` | 8.1 GB | Fast, best quality |
|
| 155 |
+
| `pyrex-f16.gguf` | 15.2 GB | Full precision |
|
| 156 |
+
|
| 157 |
+
```bash
|
| 158 |
+
# Ollama (Modelfile ships in the GGUF repo)
|
| 159 |
+
ollama create pyrex-8b -f Modelfile
|
| 160 |
+
ollama run pyrex-8b "Write a Python function that merges overlapping intervals."
|
| 161 |
+
|
| 162 |
+
# llama.cpp
|
| 163 |
+
./llama-cli -m pyrex-q4_k_m.gguf \
|
| 164 |
+
-p "<|im_start|>user\nYour question here\n<|im_end|>\n<|im_start|>assistant\n" \
|
| 165 |
+
-n 512 -c 8192
|
| 166 |
+
```
|
| 167 |
+
|
| 168 |
## Training
|
| 169 |
|
| 170 |
| Parameter | Value |
|
| 171 |
|---|---|
|
|
|
|
| 172 |
| Data | ~95k cleaned examples (code + tool-use + general) |
|
| 173 |
| Sequence length | 3072 |
|
| 174 |
| Loss masking | Assistant-only (completion-only SFT) |
|
|
|
|
| 176 |
| Epochs | 1 |
|
| 177 |
| Hardware | Hugging Face A100 GPU job |
|
| 178 |
|
| 179 |
+
Data sources (credited): `OpenCoder-LLM/opencoder-sft-stage1`
|
| 180 |
+
(realuser + largescale-diverse), `sahil2801/CodeAlpaca-20k`,
|
| 181 |
+
`theblackcat102/evol-codealpaca-v1`, `databricks/databricks-dolly-15k`,
|
| 182 |
+
`NousResearch/hermes-function-calling-v1`.
|
| 183 |
+
|
| 184 |
The pipeline is config-driven and reproducible — `prepare_data.py` →
|
| 185 |
+
`train_qlora.py` → `eval_humaneval.py` → `publish.sh` — in the companion
|
| 186 |
+
repo `Arhan-w/pyrut`.
|
| 187 |
|
| 188 |
## License
|
| 189 |
|