Image-Text-to-Text
Transformers
Safetensors
gemma4
quantized
w8a16
fp8
conversational
compressed-tensors
Instructions to use hoborific/Pantheon-Reasoning-31B-1.1-W8A16-FP8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hoborific/Pantheon-Reasoning-31B-1.1-W8A16-FP8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="hoborific/Pantheon-Reasoning-31B-1.1-W8A16-FP8") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("hoborific/Pantheon-Reasoning-31B-1.1-W8A16-FP8") model = AutoModelForMultimodalLM.from_pretrained("hoborific/Pantheon-Reasoning-31B-1.1-W8A16-FP8", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use hoborific/Pantheon-Reasoning-31B-1.1-W8A16-FP8 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hoborific/Pantheon-Reasoning-31B-1.1-W8A16-FP8" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hoborific/Pantheon-Reasoning-31B-1.1-W8A16-FP8", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/hoborific/Pantheon-Reasoning-31B-1.1-W8A16-FP8
- SGLang
How to use hoborific/Pantheon-Reasoning-31B-1.1-W8A16-FP8 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 "hoborific/Pantheon-Reasoning-31B-1.1-W8A16-FP8" \ --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": "hoborific/Pantheon-Reasoning-31B-1.1-W8A16-FP8", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "hoborific/Pantheon-Reasoning-31B-1.1-W8A16-FP8" \ --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": "hoborific/Pantheon-Reasoning-31B-1.1-W8A16-FP8", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use hoborific/Pantheon-Reasoning-31B-1.1-W8A16-FP8 with Docker Model Runner:
docker model run hf.co/hoborific/Pantheon-Reasoning-31B-1.1-W8A16-FP8
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,100 +1,42 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
- en
|
| 5 |
-
base_model:
|
| 6 |
-
- Gryphe/Gemma-4-31B-StyleTune
|
| 7 |
tags:
|
| 8 |
-
-
|
| 9 |
-
-
|
| 10 |
-
-
|
| 11 |
-
- finetune
|
| 12 |
-
- roleplay
|
| 13 |
-
- reasoning
|
| 14 |
-
- creative-writing
|
| 15 |
-
pipeline_tag: text-generation
|
| 16 |
---
|
| 17 |
|
| 18 |
-
# Pantheon-Reasoning-31B-1.1
|
| 19 |
|
| 20 |
-
[
|
| 21 |
|
| 22 |
-
|
| 23 |
|
| 24 |
-
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
-
|
| 27 |
|
| 28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
|
| 30 |
-
|
|
|
|
|
|
|
|
|
|
| 31 |
|
| 32 |
-
|
| 33 |
|
| 34 |
-
- **
|
| 35 |
-
- **
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
Note that I deliberately skipped including an instruct set this time around, being far more interested in pushing writing style first and foremost.
|
| 41 |
-
|
| 42 |
-
### Reasoning back-generation
|
| 43 |
-
|
| 44 |
-
For the Pantheon, text adventure and general roleplay data, thinking traces were generated using DeepSeek 3.2 after the fact rather than being native to the source material. I tried V4 Flash as well but it proved to be terrible at this specific task. The approach prompts the model to think **as a writer planning their next response** — before writing — rather than annotating a response that already exists. This distinction matters: the goal is genuine forward planning (considering character psychology, tone, and narrative direction), not post-hoc explanation.
|
| 45 |
-
|
| 46 |
-
Each generated trace was validated by a judge model before being kept. Traces that slipped into character voice, produced pure restatement, or read as analysis rather than planning were rejected and retried. The result is thinking that reflects real craft decisions rather than a summary of what the response contains. For 1.1 I introduced a master judge that oversaw each trace generation project and further discarded and regenerated traces that had slipped through in the form of a self-iterating pipeline. Self-iterating pipelines are neat.
|
| 47 |
-
|
| 48 |
-
The theory is that this reasoning ties semi-seamlessly into Gemma 4's native training and therefore enhances, rather than blatantly overwrites. The reasoning traces aren't as condensed as I expected them to be, but they've definitely condensed down into something far more bearable. Gemma continues to be a stubborn architecture to deal with.
|
| 49 |
-
|
| 50 |
-
## What is Pantheon?
|
| 51 |
-
|
| 52 |
-
Pantheon is my ongoing series of roleplay-focused finetunes built around a collection of diverse personas — characters with distinct personalities, voices, accents and mannerisms. Though I made sure to mention exactly which personas these were in the past in reality I'm generally the only one bothering to actually use them (lol) so I'm not going to bother with a huge list this time around. Since the original dataset had duplicate subjects I distilled this down to a smaller, more meaningful core, emphasizing variety first and foremost.
|
| 53 |
-
|
| 54 |
-
TLDR: Ten personas put through hundreds of scenarios, from good to bad and anything in-between.
|
| 55 |
-
|
| 56 |
-
## Inference
|
| 57 |
-
|
| 58 |
-
These settings have been working well for me:
|
| 59 |
-
|
| 60 |
-
```
|
| 61 |
-
"temperature": 1.0,
|
| 62 |
-
"repetition_penalty": 1.0,
|
| 63 |
-
"min_p": 0.05
|
| 64 |
-
```
|
| 65 |
-
|
| 66 |
-
Reasoning models seem to work better without a repetition penalty — likely because it also affects the thinking traces, even though those aren't visible in the output.
|
| 67 |
-
|
| 68 |
-
I obviously recommend leaving thinking enabled. Having said that, I'm also very curious about non-reasoning performance!
|
| 69 |
-
|
| 70 |
-
## Prompt Format
|
| 71 |
-
|
| 72 |
-
The model was trained using Gemma 4's native chat template, which should be applied automatically.
|
| 73 |
-
|
| 74 |
-
Since reasoning doesn't tend to play nice with character name prefixes enabled I'm inclined to recommend against using them.
|
| 75 |
-
|
| 76 |
-
## Bonus: Writing Quality Metrics
|
| 77 |
-
|
| 78 |
-
| Metric | Base | Style Tune | Pantheon Reasoning |
|
| 79 |
-
|--------|------|-----------|------|
|
| 80 |
-
| Avg sentence length | 15.1w | 15.0w | 12.5w |
|
| 81 |
-
| Type-token ratio | 0.705 | 0.735 | 0.774 |
|
| 82 |
-
| Avg paragraph length | 54.5w | 57.3w | 55.6w |
|
| 83 |
-
| Jaccard top-500 ngrams | — | 21.7% overlap w/ base | 14.0% overlap w/ base |
|
| 84 |
-
|
| 85 |
-
| Model | Clichés/resp | Clichés/100w | Reduction | Avg reasoning | Avg output |
|
| 86 |
-
|-------|-------------|--------------|-----------|---------------|------------|
|
| 87 |
-
| Base instruct | 2.38 | 1.231 | — | 310.5w | 193.4w |
|
| 88 |
-
| Style Tune | 0.92 | 0.523 | −57.5% | 294.0w | 175.0w |
|
| 89 |
-
| Pantheon Reasoning | 0.49 | 0.399 | −67.6% | 214.4w | 122.8w |
|
| 90 |
-
|
| 91 |
-
## Notes
|
| 92 |
-
|
| 93 |
-
This is, like most of my releases nowadays, a research release and hasn't gone through extensive quality testing beyond basic sanity checks. The core question — does reasoning actually help roleplay, or does it just add latency? — is one I'm genuinely curious about, and your feedback will be far more informative than my own bias here. Let me know what you find!
|
| 94 |
-
|
| 95 |
-
## Credits
|
| 96 |
-
|
| 97 |
-
- Everyone from [Anthracite](https://huggingface.co/anthracite-org)! Hi, guys!
|
| 98 |
-
- [Latitude](https://huggingface.co/LatitudeGames), for which I am still producing finetunes on a regular basis, helping me keep my skills sharp and up-to-date!
|
| 99 |
-
- All the folks I chat with on a daily basis on Discord! You know who you are.
|
| 100 |
-
- Anyone I forgot to mention, just in case!
|
|
|
|
| 1 |
---
|
| 2 |
+
base_model: Gryphe/Pantheon-Reasoning-31B-1.1
|
| 3 |
+
library_name: transformers
|
|
|
|
|
|
|
|
|
|
| 4 |
tags:
|
| 5 |
+
- quantized
|
| 6 |
+
- w8a16
|
| 7 |
+
- fp8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
+
# Pantheon-Reasoning-31B-1.1-W8A16-FP8
|
| 11 |
|
| 12 |
+
Quantized version of [Gryphe/Pantheon-Reasoning-31B-1.1](https://huggingface.co/Gryphe/Pantheon-Reasoning-31B-1.1).
|
| 13 |
|
| 14 |
+
## Format
|
| 15 |
|
| 16 |
+
Offline-quantized **W8A16 FP8** in the
|
| 17 |
+
[compressed-tensors](https://github.com/neuralmagic/compressed-tensors)
|
| 18 |
+
`float-quantized` format: weights in `float8_e4m3fn` with per-output-channel
|
| 19 |
+
symmetric scales, activations kept in bf16/fp16.
|
| 20 |
|
| 21 |
+
## How it was quantized
|
| 22 |
|
| 23 |
+
For each linear layer, every output row gets its own scale starting from
|
| 24 |
+
`amax / 448`, refined by an MSE clip search over ~9 clip fractions
|
| 25 |
+
(0.8–1.0× amax) picking the lowest-error scale per row. Weights are then
|
| 26 |
+
quantized `q = e4m3(w / scale)` with round-to-nearest and saturation. This
|
| 27 |
+
per-channel + clipping scheme gives better SNR than vLLM's online per-tensor
|
| 28 |
+
`--quantization fp8` path.
|
| 29 |
|
| 30 |
+
Only 2D linear projection weights are quantized (attention q/k/v/o, MLP
|
| 31 |
+
gate/up/down). Embeddings, norms, lm_head, routers/experts, and the vision
|
| 32 |
+
tower stay in bf16 and are listed in the checkpoint's `ignore` list, so vLLM
|
| 33 |
+
leaves them untouched.
|
| 34 |
|
| 35 |
+
## Supported vLLM platforms
|
| 36 |
|
| 37 |
+
- **Intel XPU** — `XPUW8A16FP8LinearKernel` (the intended target).
|
| 38 |
+
- **NVIDIA CUDA** (SM75+, i.e. Turing and newer) —
|
| 39 |
+
`HummingFP8ScaledMMLinearKernel` when the `humming` package is installed,
|
| 40 |
+
otherwise `MarlinFP8ScaledMMLinearKernel`.
|
| 41 |
+
- **Not supported**: ROCm, CPU, TPU — vLLM has no W8A16-FP8 kernel for these
|
| 42 |
+
backends yet, so loading will fail with a "no kernel" error.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|