groxaxo/fish-speech-int4-patch

Fish Speech S2-Pro INT4 quantization patches for low VRAM inference

Python

26

724 commits

updated Mar 30, 2026

See the code

README

Fish Speech — 12 GB Ready BnB NF4 Fork

English | 简体中文 | Portuguese | 日本語 | 한국어 | العربية

This is a community fork of fishaudio/fish-speech that adds bitsandbytes NF4 4-bit quantization support, enabling inference on GPUs with as little as 12 GB of VRAM.
Huge thanks to the amazing team at Fish Audio for building and open-sourcing the original Fish Speech model — all credit for the core research and architecture belongs to them.

Fish Audio S1 - Expressive Voice Cloning and Text-to-Speech | Product Hunt fishaudio%2Ffish-speech | Trendshift


Run flagship S2-Pro on 12 GB cards, grab the NF4 model on Hugging Face, and if this saves you GPU pain, please star the fork.


[!IMPORTANT] License Notice
This codebase and its associated model weights are released under FISH AUDIO RESEARCH LICENSE. Please refer to LICENSE for more details. We will take action against any violation of the license.

[!WARNING] Legal Disclaimer
We do not hold any responsibility for any illegal usage of the codebase. Please refer to your local laws about DMCA and other related laws.

Default Deployment: S2-Pro on a Single 12 GB GPU

This fork is tuned to make Fish Speech S2-Pro feel practical on everyday hardware. The default path is now a polished RTX 3060 / 12 GB deployment with:

  • bitsandbytes NF4 4-bit quantization via --bnb4
  • lazy model loading so the API starts fast and loads weights on first inference
  • an OpenAI-compatible API on http://0.0.0.0:8880/v1
  • a refreshed Gradio frontend tuned for reference-audio workflows
  • a bundled default voice sample so generations stay on a consistent voice even when no reference is supplied
  • an automatic 5 minute idle shutdown to give VRAM back when the server is not being used
  • a one-command installer and one-command launcher

The bundled default sample uses the repo's included Spanish reference clip and transcript. If you want a different default voice, replace sample.mp3 and sample.lab with your preferred reference pair.

If you want the fastest path from clone to audio, use this:

git clone https://github.com/groxaxo/fish-speech-int4-patch
cd fish-speech-int4-patch

./install_bnb4_3060.sh
./start_bnb4_3060.sh

The launcher defaults to:

  • GPU_INDEX=0
  • PORT=8880
  • --bnb4 --half
  • --lazy-load
  • --idle-timeout-seconds 300
  • --max-seq-len 4096

The direct entrypoints now follow the same defaults too:

  • python tools/api_server.py starts on 0.0.0.0:8880 with --bnb4 --half
  • python tools/run_webui.py loads the WebUI with --bnb4 --half
  • pass --no-bnb4 or --no-half if you need to opt out

[!NOTE] --bnb4 is designed for the Groxaxo-hosted s2-pro NF4 checkpoint. Do not point it at legacy int4 or int8 checkpoint directories.

Published model

  • Hugging Face model: groxaxo/s2-pro
  • Loader path: keep --bnb4 --half enabled when targeting this checkpoint
  • Export helper: python tools/llama/export_nf4.py --checkpoint-path checkpoints/s2-pro --output-path /tmp/s2-pro-nf4
  • Smoke-tested flow: exported NF4 model.pth reloads correctly through init_model(...)

Why star this fork

  • It turns upstream S2-Pro into a cleaner 12 GB-friendly deployment with sensible bnb4 defaults
  • It ships the live NF4 publishing path used for groxaxo/s2-pro
  • It keeps the original Fish Audio model front and center while making self-hosting dramatically easier

Why this fork exists

The upstream S2-Pro model is outstanding, but the default out-of-box setup assumes more GPU headroom than many single-card workstations have. This fork closes that gap and turns S2-Pro into a professional, API-first voice stack for 12 GB cards without sacrificing the flagship model experience.

Quick Start

[!IMPORTANT] For SGLang server deployment, read the SGLang-Omni README.

For LLM agents

Clone the repo, run ./install_bnb4_3060.sh, then run ./start_bnb4_3060.sh. This launches the OpenAI-compatible API on port 8880 with BnB NF4, lazy loading, and a 5 minute idle timeout. The canonical model name is `s2-pro`; compatible OpenAI-style model IDs include `tts-1` and `tts-1-hd`.

Fish Audio S2

Best text-to-speech system among both open source and closed source

Fish Audio S2 is the latest model developed by Fish Audio. Trained on over 10 million hours of audio across approximately 50 languages, S2 combines reinforcement learning alignment with a Dual-Autoregressive architecture to generate speech that sounds natural, realistic, and emotionally rich.

S2 supports fine-grained inline control of prosody and emotion using natural-language tags like [laugh], [whispers], and [super happy], as well as native multi-speaker and multi-turn generation.

Visit the Fish Audio website for live playground. Read the blog post and technical report for more details.

Model Variants

ModelSizeAvailabilityDescription
S2-Pro4B parametersHuggingFaceGroxaxo-hosted NF4 build of the flagship model

More details of the model can be found in the technical report.

Benchmark Results

BenchmarkFish Audio S2
Seed-TTS Eval — WER (Chinese)0.54% (best overall)
Seed-TTS Eval — WER (English)0.99% (best overall)
Audio Turing Test (with instruction)0.515 posterior mean
EmergentTTS-Eval — Win Rate81.88% (highest overall)
Fish Instruction Benchmark — TAR93.3%
Fish Instruction Benchmark — Quality4.51 / 5.0
Multilingual (MiniMax Testset) — Best WER11 of 24 languages
Multilingual (MiniMax Testset) — Best SIM17 of 24 languages

On Seed-TTS Eval, S2 achieves the lowest WER among all evaluated models including closed-source systems: Qwen3-TTS (0.77/1.24), MiniMax Speech-02 (0.99/1.90), Seed-TTS (1.12/2.25). On the Audio Turing Test, 0.515 surpasses Seed-TTS (0.417) by 24% and MiniMax-Speech (0.387) by 33%. On EmergentTTS-Eval, S2 achieves particularly strong results in paralinguistics (91.61% win rate), questions (84.41%), and syntactic complexity (83.39%).

Highlights

Fine-Grained Inline Control via Natural Language

S2 enables localized control over speech generation by embedding natural-language instructions directly at specific word or phrase positions within the text. Rather than relying on a fixed set of predefined tags, S2 accepts free-form textual descriptions — such as [whisper in small voice], [professional broadcast tone], or [pitch up] — allowing open-ended expression control at the word level.

Dual-Autoregressive Architecture

S2 builds on a decoder-only transformer combined with an RVQ-based audio codec (10 codebooks, ~21 Hz frame rate). The Dual-AR architecture splits generation into two stages:

  • Slow AR operates along the time axis and predicts the primary semantic codebook.
  • Fast AR generates the remaining 9 residual codebooks at each time step, reconstructing fine-grained acoustic detail.

This asymmetric design — 4B parameters along the time axis, 400M parameters along the depth axis — keeps inference efficient while preserving audio fidelity.

Reinforcement Learning Alignment

S2 uses Group Relative Policy Optimization (GRPO) for post-training alignment. The same models used to filter and annotate training data are directly reused as reward models during RL — eliminating distribution mismatch between pre-training data and post-training objectives. The reward signal combines semantic accuracy, instruction adherence, acoustic preference scoring, and timbre similarity.

Production Streaming via SGLang

Because the Dual-AR architecture is structurally isomorphic to standard autoregressive LLMs, S2 directly inherits all LLM-native serving optimizations from SGLang — including continuous batching, paged KV cache, CUDA graph replay, and RadixAttention-based prefix caching.

On a single NVIDIA H200 GPU:

  • Real-Time Factor (RTF): 0.195
  • Time-to-first-audio: ~100 ms
  • Throughput: 3,000+ acoustic tokens/s while maintaining RTF below 0.5

Multilingual Support

S2 supports high-quality multilingual text-to-speech without requiring phonemes or language-specific preprocessing. Including:

English, Chinese, Japanese, Korean, Arabics, German, French...

AND MORE!

The list is constantly expanding, check Fish Audio for the latest releases.

Native Multi-Speaker Generation

Fish Audio S2 allows users to upload reference audio with multi-speaker, the model will deal with every speaker's feature via <|speaker:i|> token. Then you can control the model's performance with the speaker id token, allowing a single generation to include multiple speakers. You no longer need to upload reference audio separately for each speaker.

Multi-Turn Generation

Thanks to the expansion of the model context, our model can now use previous information to improve the expressiveness of subsequent generated content, thereby increasing the naturalness of the content.

Rapid Voice Cloning

Fish Audio S2 supports accurate voice cloning using a short reference sample (typically 10–30 seconds). The model captures timbre, speaking style, and emotional tendencies, producing realistic and consistent cloned voices without additional fine-tuning. Please refer to SGLang-Omni README to use the SGLang server.

Credits

Tech Report

@misc{fish-speech-v1.4,
      title={Fish-Speech: Leveraging Large Language Models for Advanced Multilingual Text-to-Speech Synthesis},
      author={Shijia Liao and Yuxuan Wang and Tianyu Li and Yifan Cheng and Ruoyi Zhang and Rongzhi Zhou and Yijin Xing},
      year={2024},
      eprint={2411.01156},
      archivePrefix={arXiv},
      primaryClass={cs.SD},
      url={https://arxiv.org/abs/2411.01156},
}

@misc{liao2026fishaudios2technical,
      title={Fish Audio S2 Technical Report}, 
      author={Shijia Liao and Yuxuan Wang and Songting Liu and Yifan Cheng and Ruoyi Zhang and Tianyu Li and Shidong Li and Yisheng Zheng and Xingwei Liu and Qingzheng Wang and Zhizhuo Zhou and Jiahua Liu and Xin Chen and Dawei Han},
      year={2026},
      eprint={2603.08823},
      archivePrefix={arXiv},
      primaryClass={cs.SD},
      url={https://arxiv.org/abs/2603.08823}, 
}

Contributors

(top 30 of 85)

leng-yue

446 commits

AnyaCoder

68 commits

Stardust-minus

29 commits

PoTaTo-Mika

27 commits

groxaxo/fish-speech-int4-patch

Fish Speech S2-Pro INT4 quantization patches for low VRAM inference

Python

26

724 commits

updated Mar 30, 2026

See the code

README

Fish Speech — 12 GB Ready BnB NF4 Fork

English | 简体中文 | Portuguese | 日本語 | 한국어 | العربية

This is a community fork of fishaudio/fish-speech that adds bitsandbytes NF4 4-bit quantization support, enabling inference on GPUs with as little as 12 GB of VRAM.
Huge thanks to the amazing team at Fish Audio for building and open-sourcing the original Fish Speech model — all credit for the core research and architecture belongs to them.

Fish Audio S1 - Expressive Voice Cloning and Text-to-Speech | Product Hunt fishaudio%2Ffish-speech | Trendshift


Run flagship S2-Pro on 12 GB cards, grab the NF4 model on Hugging Face, and if this saves you GPU pain, please star the fork.


[!IMPORTANT] License Notice
This codebase and its associated model weights are released under FISH AUDIO RESEARCH LICENSE. Please refer to LICENSE for more details. We will take action against any violation of the license.

[!WARNING] Legal Disclaimer
We do not hold any responsibility for any illegal usage of the codebase. Please refer to your local laws about DMCA and other related laws.

Default Deployment: S2-Pro on a Single 12 GB GPU

This fork is tuned to make Fish Speech S2-Pro feel practical on everyday hardware. The default path is now a polished RTX 3060 / 12 GB deployment with:

  • bitsandbytes NF4 4-bit quantization via --bnb4
  • lazy model loading so the API starts fast and loads weights on first inference
  • an OpenAI-compatible API on http://0.0.0.0:8880/v1
  • a refreshed Gradio frontend tuned for reference-audio workflows
  • a bundled default voice sample so generations stay on a consistent voice even when no reference is supplied
  • an automatic 5 minute idle shutdown to give VRAM back when the server is not being used
  • a one-command installer and one-command launcher

The bundled default sample uses the repo's included Spanish reference clip and transcript. If you want a different default voice, replace sample.mp3 and sample.lab with your preferred reference pair.

If you want the fastest path from clone to audio, use this:

git clone https://github.com/groxaxo/fish-speech-int4-patch
cd fish-speech-int4-patch

./install_bnb4_3060.sh
./start_bnb4_3060.sh

The launcher defaults to:

  • GPU_INDEX=0
  • PORT=8880
  • --bnb4 --half
  • --lazy-load
  • --idle-timeout-seconds 300
  • --max-seq-len 4096

The direct entrypoints now follow the same defaults too:

  • python tools/api_server.py starts on 0.0.0.0:8880 with --bnb4 --half
  • python tools/run_webui.py loads the WebUI with --bnb4 --half
  • pass --no-bnb4 or --no-half if you need to opt out

[!NOTE] --bnb4 is designed for the Groxaxo-hosted s2-pro NF4 checkpoint. Do not point it at legacy int4 or int8 checkpoint directories.

Published model

  • Hugging Face model: groxaxo/s2-pro
  • Loader path: keep --bnb4 --half enabled when targeting this checkpoint
  • Export helper: python tools/llama/export_nf4.py --checkpoint-path checkpoints/s2-pro --output-path /tmp/s2-pro-nf4
  • Smoke-tested flow: exported NF4 model.pth reloads correctly through init_model(...)

Why star this fork

  • It turns upstream S2-Pro into a cleaner 12 GB-friendly deployment with sensible bnb4 defaults
  • It ships the live NF4 publishing path used for groxaxo/s2-pro
  • It keeps the original Fish Audio model front and center while making self-hosting dramatically easier

Why this fork exists

The upstream S2-Pro model is outstanding, but the default out-of-box setup assumes more GPU headroom than many single-card workstations have. This fork closes that gap and turns S2-Pro into a professional, API-first voice stack for 12 GB cards without sacrificing the flagship model experience.

Quick Start

[!IMPORTANT] For SGLang server deployment, read the SGLang-Omni README.

For LLM agents

Clone the repo, run ./install_bnb4_3060.sh, then run ./start_bnb4_3060.sh. This launches the OpenAI-compatible API on port 8880 with BnB NF4, lazy loading, and a 5 minute idle timeout. The canonical model name is `s2-pro`; compatible OpenAI-style model IDs include `tts-1` and `tts-1-hd`.

Fish Audio S2

Best text-to-speech system among both open source and closed source

Fish Audio S2 is the latest model developed by Fish Audio. Trained on over 10 million hours of audio across approximately 50 languages, S2 combines reinforcement learning alignment with a Dual-Autoregressive architecture to generate speech that sounds natural, realistic, and emotionally rich.

S2 supports fine-grained inline control of prosody and emotion using natural-language tags like [laugh], [whispers], and [super happy], as well as native multi-speaker and multi-turn generation.

Visit the Fish Audio website for live playground. Read the blog post and technical report for more details.

Model Variants

ModelSizeAvailabilityDescription
S2-Pro4B parametersHuggingFaceGroxaxo-hosted NF4 build of the flagship model

More details of the model can be found in the technical report.

Benchmark Results

BenchmarkFish Audio S2
Seed-TTS Eval — WER (Chinese)0.54% (best overall)
Seed-TTS Eval — WER (English)0.99% (best overall)
Audio Turing Test (with instruction)0.515 posterior mean
EmergentTTS-Eval — Win Rate81.88% (highest overall)
Fish Instruction Benchmark — TAR93.3%
Fish Instruction Benchmark — Quality4.51 / 5.0
Multilingual (MiniMax Testset) — Best WER11 of 24 languages
Multilingual (MiniMax Testset) — Best SIM17 of 24 languages

On Seed-TTS Eval, S2 achieves the lowest WER among all evaluated models including closed-source systems: Qwen3-TTS (0.77/1.24), MiniMax Speech-02 (0.99/1.90), Seed-TTS (1.12/2.25). On the Audio Turing Test, 0.515 surpasses Seed-TTS (0.417) by 24% and MiniMax-Speech (0.387) by 33%. On EmergentTTS-Eval, S2 achieves particularly strong results in paralinguistics (91.61% win rate), questions (84.41%), and syntactic complexity (83.39%).

Highlights

Fine-Grained Inline Control via Natural Language

S2 enables localized control over speech generation by embedding natural-language instructions directly at specific word or phrase positions within the text. Rather than relying on a fixed set of predefined tags, S2 accepts free-form textual descriptions — such as [whisper in small voice], [professional broadcast tone], or [pitch up] — allowing open-ended expression control at the word level.

Dual-Autoregressive Architecture

S2 builds on a decoder-only transformer combined with an RVQ-based audio codec (10 codebooks, ~21 Hz frame rate). The Dual-AR architecture splits generation into two stages:

  • Slow AR operates along the time axis and predicts the primary semantic codebook.
  • Fast AR generates the remaining 9 residual codebooks at each time step, reconstructing fine-grained acoustic detail.

This asymmetric design — 4B parameters along the time axis, 400M parameters along the depth axis — keeps inference efficient while preserving audio fidelity.

Reinforcement Learning Alignment

S2 uses Group Relative Policy Optimization (GRPO) for post-training alignment. The same models used to filter and annotate training data are directly reused as reward models during RL — eliminating distribution mismatch between pre-training data and post-training objectives. The reward signal combines semantic accuracy, instruction adherence, acoustic preference scoring, and timbre similarity.

Production Streaming via SGLang

Because the Dual-AR architecture is structurally isomorphic to standard autoregressive LLMs, S2 directly inherits all LLM-native serving optimizations from SGLang — including continuous batching, paged KV cache, CUDA graph replay, and RadixAttention-based prefix caching.

On a single NVIDIA H200 GPU:

  • Real-Time Factor (RTF): 0.195
  • Time-to-first-audio: ~100 ms
  • Throughput: 3,000+ acoustic tokens/s while maintaining RTF below 0.5

Multilingual Support

S2 supports high-quality multilingual text-to-speech without requiring phonemes or language-specific preprocessing. Including:

English, Chinese, Japanese, Korean, Arabics, German, French...

AND MORE!

The list is constantly expanding, check Fish Audio for the latest releases.

Native Multi-Speaker Generation

Fish Audio S2 allows users to upload reference audio with multi-speaker, the model will deal with every speaker's feature via <|speaker:i|> token. Then you can control the model's performance with the speaker id token, allowing a single generation to include multiple speakers. You no longer need to upload reference audio separately for each speaker.

Multi-Turn Generation

Thanks to the expansion of the model context, our model can now use previous information to improve the expressiveness of subsequent generated content, thereby increasing the naturalness of the content.

Rapid Voice Cloning

Fish Audio S2 supports accurate voice cloning using a short reference sample (typically 10–30 seconds). The model captures timbre, speaking style, and emotional tendencies, producing realistic and consistent cloned voices without additional fine-tuning. Please refer to SGLang-Omni README to use the SGLang server.

Credits

Tech Report

@misc{fish-speech-v1.4,
      title={Fish-Speech: Leveraging Large Language Models for Advanced Multilingual Text-to-Speech Synthesis},
      author={Shijia Liao and Yuxuan Wang and Tianyu Li and Yifan Cheng and Ruoyi Zhang and Rongzhi Zhou and Yijin Xing},
      year={2024},
      eprint={2411.01156},
      archivePrefix={arXiv},
      primaryClass={cs.SD},
      url={https://arxiv.org/abs/2411.01156},
}

@misc{liao2026fishaudios2technical,
      title={Fish Audio S2 Technical Report}, 
      author={Shijia Liao and Yuxuan Wang and Songting Liu and Yifan Cheng and Ruoyi Zhang and Tianyu Li and Shidong Li and Yisheng Zheng and Xingwei Liu and Qingzheng Wang and Zhizhuo Zhou and Jiahua Liu and Xin Chen and Dawei Han},
      year={2026},
      eprint={2603.08823},
      archivePrefix={arXiv},
      primaryClass={cs.SD},
      url={https://arxiv.org/abs/2603.08823}, 
}

Contributors

(top 30 of 85)

leng-yue

446 commits

AnyaCoder

68 commits

Stardust-minus

29 commits

PoTaTo-Mika

27 commits

Languages

Python

94.0%

Dockerfile

3.3%

Shell

1.6%

Jupyter Notebook

1.2%