Muse-12B-NVFP4-FP8 / README.md
DataSnake's picture
Update README.md
1276e97 verified
|
Raw
History Blame Contribute Delete
5.15 kB
---
base_model: LatitudeGames/Muse-12B
datasets:
- zerofata/Roleplay-Anime-Characters
language:
- en
license: apache-2.0
pipeline_tag: text-generation
library_name: transformers
tags:
- nvfp4
- text adventure
- roleplay
---
![image/jpeg](muse.jpg)
# Muse-12B-NVFP4-FP8
Quantized weights of the [Muse-12B](https://huggingface.co/LatitudeGames/Muse-12B) model for use with nVidia Blackwell GPUs, in a hybrid format using NVFP4 with [Four Over Six](https://huggingface.co/papers/2512.02010) adaptive block scaling for the MLP layers and `FP8_DYNAMIC` for the self-attention layers.
More information about the hybrid format [here](https://huggingface.co/DataSnake/Mistral-Nemo-Instruct-2407-NVFP4-FP8), but the short version is that FP8 attention has minimal impact on speed and VRAM usage while making a marked difference in output quality, especially at longer context lengths, and Four Over Six is effectively a free accuracy boost for the NVFP4 parts.
- **Paper:** [Four Over Six: More Accurate NVFP4 Quantization with Adaptive Block Scaling](https://huggingface.co/papers/2512.02010)
- **Official Code:** [GitHub - mit-han-lab/fouroversix](https://github.com/mit-han-lab/fouroversix)
## Inference
Tested on a RTX 5060 Ti 16GB with [Aphrodite Engine](https://github.com/aphrodite-engine/aphrodite-engine) and [vLLM](https://github.com/vllm-project/vllm). It requires compressed-tensors 0.14.0 or later, so you'll have to update the version in your venv if you use Aphrodite Engine 0.10.0 or an older version of vLLM. On my system, Aphrodite Engine 0.10.0 was able to run the checkpoint with a 32k context window with the `--single-user-mode` flag, while vLLM 0.20.0 and Aphrodite Engine 0.20.0, which don't have that flag, were able to do the same with `--max-num-seqs 1 --cudagraph-capture-sizes 2` flags, though with the caveat that each crashed with OOM errors the first time they ran the model but ran fine from the second time onwards.
<details>
<summary>Details about the 0.20.0 memory issue</summary>
From what I can determine, compiling the CUDA graph for the model uses enough VRAM that there's not enough left to allocate the full KV cache. In both cases, the first run mentions saving something to a cache and the second doesn't. And in both cases, the first run reports that has 4.16 GiB of VRAM available for the KV cache before crashing due to lack of memory and the second run has 5.2 and doesn't crash. For reference, a 32768-token KV cache for this model will use precisely 5.00 GiB.
</details>
<details>
<summary>Extra steps when using Aphrodite Engine 0.10.0</summary>
For the purposes of these instructions, I'm assuming you have Aphrodite Engine 0.10.0 installed in a Python 3.12 uv venv, as per the official [instructions](https://aphrodite.pygmalion.chat/installation/installation/).
First, update compressed-tensors to a more recent version:
```
uv pip install "compressed-tensors>=0.14.0"
```
Next, open `<venv directory>/lib/python3.12/site-packages/aphrodite/platforms/interface.py` in your text editor of choice and comment out or delete lines 487-491. To make sure you're in the right place, the lines should initially look like this:
```
logger.warning(
"Current platform %s does not have '%s' attribute.",
self.device_type,
key,
)
```
</details>
### Recommended Generation Settings
This is a mix of what it says on the Muse-12B model card and the [AI Dungeon Model Guide](https://help.aidungeon.com/ai-models-and-their-differences):
- Temperature: 1.0
- Top K: 250
- Top P: 1
- Min P: 0.025
- Repetition Penalty: 1.05
- Presence Penalty: 0.25
If using programs that support [DRY](https://github.com/oobabooga/text-generation-webui/pull/5677) and [XTC](https://github.com/oobabooga/text-generation-webui/pull/6335) (at time of writing, Aphrodite Engine supports both and vLLM doesn't support either yet), you can also try using them to cut down on repetition if necessary.
## Prompt Format
The calibration data was provided with the same ChatML tags as had been used to finetune Latitude's 12B models:
```
<|im_start|>system
You're a masterful storyteller and gamemaster. Write in second person present tense (You are), crafting vivid, engaging narratives with authority and confidence.<|im_end|>
<|im_start|>user
> You peer into the darkness.<|im_end|>
<|im_start|>assistant
You have been eaten by a grue.<|im_end|>
```
As such, I would recommend using that format for inference.
## Credits
Muse-12B was made by [Latitude Games](https://huggingface.co/LatitudeGames) with help from [Gryphe Padar](https://huggingface.co/Gryphe)
Four Over Six was discovered by Jack Cook, Junxian Guo, Guangxuan Xiao, Yujun Lin, and Song Han
## Citation
```bibtex
@misc{cook2025sixaccuratenvfp4quantization,
title={Four Over Six: More Accurate NVFP4 Quantization with Adaptive Block Scaling},
author={Jack Cook and Junxian Guo and Guangxuan Xiao and Yujun Lin and Song Han},
year={2025},
eprint={2512.02010},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2512.02010},
}
```