moss-nano / README.md
eugenehp's picture
Upload README.md with huggingface_hub
b53f57b verified
|
Raw
History Blame Contribute Delete
4.96 kB
---
license: apache-2.0
pipeline_tag: text-to-speech
library_name: rlx
tags:
- moss-tts
- rlxp
- tts
- rlx
---
# MOSS-TTS-Nano (RLX)
Single runnable `moss-nano.rlxp`: nested native graphs (prefill/local/codec) + tokenizer + voices. No ONNX on Hub.
| Field | Value |
|---|---|
| **Hub id** | [`eugenehp/moss-nano`](https://huggingface.co/eugenehp/moss-nano) |
| **Kind** | RLX-native weight bundle (graphs + sidecars ready for `rlx-*` crates). |
| **RLX crate** | [`rlx-moss-nano`](https://github.com/MIT-RLX/rlx-models/tree/main/crates/rlx-moss-nano) |
| **Upstream** | https://huggingface.co/OpenMOSS-Team/MOSS-TTS-Nano-100M-ONNX |
## Quick start
```bash
just fetch-moss-nano # or: hf download eugenehp/moss-nano moss-nano.rlxp --local-dir weights/tts/moss-nano
just fetch-moss-nano && just moss-nano
```
## Primary files (use these)
- `moss-nano.rlxp` β€” 639.0 MiB
## Contents
Hub ships `moss-nano.rlxp` only (nested `graphs/*.rlxp`). Pack locally with `just export-moss-nano-rlxp`. CPU / Metal / MLX / CUDA / wgpu.
## Pack layout (`.rlxp`)
Outer RLXPFLAT: nested native subgraph packs (prefill, local frame, codec) plus tokenizer and voice manifest. **No `.onnx` / `.data` on Hub.** Weights are hot tensors inside each nested `.rlxp`; graph structure is `graph.json`.
Official RLX package format (`RLXPFLAT`, container v2).
```text
[0..8) magic RLXPFLAT
[8..12) version u32 LE (= 2)
[12..16) flags u32 LE (hybrid hot/warm/cold)
[16..24) toc_len u64 LE
[24..) TOC JSON table of contents
data region 64-byte aligned payloads
```
The TOC lists **tensors** (named weight blobs) and/or **sidecars** (files: ONNX,
tokenizers, manifests, …). Sidecars are usually **cold + zstd**; model weights in
tensor packs are **hot + uncompressed** for mmap. Runtime crates open the pack
directly (or materialize sidecars to a temp dir for asset-only packs).
### This pack
| Field | Value |
|---|---|
| **File** | `moss-nano.rlxp` (639.0 MiB) |
| **Manifest name** | `moss-nano` |
| **Producer** | `rlx-assets` |
| **Container** | RLXPFLAT v2, flags=0x1 |
| **Tensors** | 0 |
| **Sidecars** | 12 |
### Sidecars (file assets)
Outer TOC: tokenizer/manifest + nested `graphs/*.rlxp` (neural).
Paths below are logical ids inside the pack (`__flat__/sidecar/<id>`).
Cold sidecars are zstd-compressed; sizes show raw β†’ stored.
| Sidecar | Raw | Stored | Role |
|---|---:|---:|---|
| `.gitattributes` | 695 B | 136 B | |
| `LICENSE` | 9.9 KiB | 3.6 KiB | |
| `README.md` | 4.2 KiB | 1.9 KiB | |
| `browser_poc_manifest.json` | 491.6 KiB | 64.5 KiB | Voice / style manifest (builtin prompt codes) |
| `codec/moss_audio_tokenizer_decode_shared.data` | 42.2 MiB | 39.1 MiB | |
| `graphs/moss_audio_tokenizer_decode_full.rlxp` | 42.4 MiB | 39.2 MiB | Nested codec pack |
| `graphs/moss_tts_local_fixed_sampled_frame.rlxp` | 216.4 MiB | 95.7 MiB | Nested: hot tensors + graph.json |
| `graphs/moss_tts_prefill.rlxp` | 420.6 MiB | 183.7 MiB | Nested: hot tensors + graph.json |
| `moss_tts_global_shared.data` | 420.4 MiB | 183.6 MiB | |
| `moss_tts_local_shared.data` | 219.0 MiB | 97.0 MiB | |
| `tokenizer.json` | 1.3 MiB | 346.8 KiB | Text tokenizer |
| `tokenizer.model` | 459.9 KiB | 267.3 KiB | |
### Architecture
**Pipeline:** text β†’ tokenizer β†’ global prefill (12-layer) β†’ local frame sampler (16 codebook tokens/frame, CPU-pinned) β†’ MOSS audio tokenizer decode β†’ 48 kHz stereo.
| Module | Role | Sample rate | Notes |
|---|---|---|---|
| `moss_tts_prefill` | global AR transformer | β€” | growing padded seq |
| `moss_tts_local_fixed_sampled_frame` | local codebook sampler | β€” | 16 tokens/frame |
| `moss_audio_tokenizer_decode_full` | codec β†’ waveform | 48 kHz stereo | |
| `browser_poc_manifest.json` | builtin voices | β€” | reference codes |
### Logical tree
```text
moss-nano.rlxp
β”œβ”€β”€ graphs/
β”‚ β”œβ”€β”€ moss_tts_prefill.rlxp
β”‚ β”œβ”€β”€ moss_tts_local_fixed_sampled_frame.rlxp
β”‚ └── moss_audio_tokenizer_decode_full.rlxp
β”œβ”€β”€ browser_poc_manifest.json
└── tokenizer.json
```
### How it is packed
`just export-moss-nano-rlxp` β€” pack-time ONNX+`.data` β†’ nested `graphs/*.rlxp` (external data inlined as tensors). Hub has zero ONNX.
## Note
Hub ships `.rlxp` only β€” **no ONNX / `.data`**. Nested packs hold hot tensors + graph.json.
## Run with RLX
Clone [rlx-models](https://github.com/MIT-RLX/rlx-models), place this repo under `weights/tts/moss-nano` (or pass the path explicitly), then:
```bash
just fetch-moss-nano && just moss-nano
```
## License
Apache License 2.0 β€” see `LICENSE`. Inherit upstream terms when redistributing.
Original weights and authorship: https://huggingface.co/OpenMOSS-Team/MOSS-TTS-Nano-100M-ONNX
## Maintenance
Cards and LFS attrs are regenerated from the local `weights/` tree in [rlx-models](https://github.com/MIT-RLX/rlx-models) via `python3 scripts/prepare_weights_hf.py`.