Run this model with HF Jobs
Run moonbox-dev/IndexTTS-2.5-TensorRT on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/moonbox-dev/IndexTTS-2.5-TensorRT. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/moonbox-dev/IndexTTS-2.5-TensorRT on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use moonbox-dev/IndexTTS-2.5-TensorRT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- TensorRT
How to use moonbox-dev/IndexTTS-2.5-TensorRT with TensorRT:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
fp16 build of IndexTTS 2.5
Browse filesFiles changed (20)
- .gitattributes+12
- fp16/campplus.engineAdded+3
- fp16/codec.engineAdded+3
- fp16/decoder_0.engineAdded+3
- fp16/decoder_1.engineAdded+3
- fp16/decoder_split.jsonAdded+178
- fp16/device_chain.pyAdded+188
- fp16/embed.engineAdded+3
- fp16/emovec.engineAdded+3
- fp16/estimator.engineAdded+3
- fp16/estimator_long.engineAdded+3
- fp16/pipeline.pyAdded+471
- fp16/pipeline_trt.pyAdded+122
- fp16/prefix.engineAdded+3
- fp16/regulator.engineAdded+3
- fp16/semantic.engineAdded+3
- fp16/tokenizer.jsonAdded+1787
- fp16/tokenizer.tiktokenAdded
- fp16/trt_runner.pyAdded+98
- fp16/vocoder.engineAdded+3
32 unmodified lines33343536373839404142434445464732 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -textfp16/campplus.engine filter=lfs diff=lfs merge=lfs -textfp16/codec.engine filter=lfs diff=lfs merge=lfs -textfp16/decoder_0.engine filter=lfs diff=lfs merge=lfs -textfp16/decoder_1.engine filter=lfs diff=lfs merge=lfs -textfp16/embed.engine filter=lfs diff=lfs merge=lfs -textfp16/emovec.engine filter=lfs diff=lfs merge=lfs -textfp16/estimator.engine filter=lfs diff=lfs merge=lfs -textfp16/estimator_long.engine filter=lfs diff=lfs merge=lfs -textfp16/prefix.engine filter=lfs diff=lfs merge=lfs -textfp16/regulator.engine filter=lfs diff=lfs merge=lfs -textfp16/semantic.engine filter=lfs diff=lfs merge=lfs -textfp16/vocoder.engine filter=lfs diff=lfs merge=lfs -text123version https://git-lfs.github.com/spec/v1oid sha256:280752169674e02acdb21074a47481061eb230958545dffa1b2150945fc018a4size 141114908123version https://git-lfs.github.com/spec/v1oid sha256:4678285e3b227c99f6c0e06692a8463a56b6281be59ba5d252c0d251cad098f4size 121820956123version https://git-lfs.github.com/spec/v1oid sha256:f26e98a3e7f53ac6e1100f5f57ee287eee2a9cbcb03e4403eeebe519a42673c6size 624602540123version https://git-lfs.github.com/spec/v1oid sha256:b940b21c57afbf1b876f351849b034feb560c8a59a915c21bdf0c17358ca3ea8size 483886988123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178[
{
"engine": "decoder_0.engine",
"inputs": [
"inputs_embeds",
"beam_idx",
"past_key_values.0.key",
"past_key_values.0.value",
"past_key_values.1.key",
"past_key_values.1.value",
"past_key_values.2.key",
"past_key_values.2.value",
"past_key_values.3.key",
"past_key_values.3.value",
"past_key_values.4.key",
"past_key_values.4.value",
"past_key_values.5.key",
"past_key_values.5.value",
"past_key_values.6.key",
"past_key_values.6.value",
"past_key_values.7.key",
"past_key_values.7.value",
"past_key_values.8.key",
"past_key_values.8.value",
"past_key_values.9.key",
"past_key_values.9.value",
"past_key_values.10.key",
"past_key_values.10.value",
"past_key_values.11.key",
"past_key_values.11.value",
"past_key_values.12.key",
"past_key_values.12.value",
"past_key_values.13.key",
"past_key_values.13.value",
"past_key_values.14.key",
"past_key_values.14.value"
],
"outputs": [
"/Add_99_output_0",
"present.0.key_inner",
"present.0.value_inner",
"present.1.key_inner",
"present.1.value_inner",
"present.10.key_inner",
"present.10.value_inner",
"present.11.key_inner",
"present.11.value_inner",
"present.12.key_inner",
"present.12.value_inner",
"present.13.key_inner",
"present.13.value_inner",
"present.2.key_inner",
"present.2.value_inner",
"present.3.key_inner",
"present.3.value_inner",
"present.4.key_inner",
"present.4.value_inner",
"present.5.key_inner",
"present.5.value_inner",
"present.6.key_inner",
"present.6.value_inner",
"present.7.key_inner",
"present.7.value_inner",
"present.8.key_inner",
"present.8.value_inner",
"present.9.key_inner",
"present.9.value_inner"
]
},
{
"engine": "decoder_1.engine",
"inputs": [
"inputs_embeds",
"beam_idx",
"past_key_values.0.key",
"past_key_values.14.key",
"past_key_values.14.value",
"past_key_values.15.key",
"past_key_values.15.value",
"past_key_values.16.key",
"past_key_values.16.value",
"past_key_values.17.key",
"past_key_values.17.value",
"past_key_values.18.key",
"past_key_values.18.value",
"past_key_values.19.key",
"past_key_values.19.value",
"past_key_values.20.key",
"past_key_values.20.value",
"past_key_values.21.key",
"past_key_values.21.value",
"past_key_values.22.key",
"past_key_values.22.value",
"past_key_values.23.key",
"past_key_values.23.value",
"/Add_99_output_0",
"present.0.key_inner",
"present.0.value_inner",
"present.1.key_inner",
"present.1.value_inner",
"present.10.key_inner",
"present.10.value_inner",
"present.11.key_inner",
"present.11.value_inner",
"present.12.key_inner",
"present.12.value_inner",
"present.13.key_inner",
"present.13.value_inner",
"present.2.key_inner",
"present.2.value_inner",
"present.3.key_inner",
"present.3.value_inner",
"present.4.key_inner",
"present.4.value_inner",
"present.5.key_inner",
"present.5.value_inner",
"present.6.key_inner",
"present.6.value_inner",
"present.7.key_inner",
"present.7.value_inner",
"present.8.key_inner",
"present.8.value_inner",
"present.9.key_inner",
"present.9.value_inner"
],
"outputs": [
"logits",
"present.0.key",
"present.0.value",
"present.1.key",
"present.1.value",
"present.2.key",
"present.2.value",
"present.3.key",
"present.3.value",
"present.4.key",
"present.4.value",
"present.5.key",
"present.5.value",
"present.6.key",
"present.6.value",
"present.7.key",
"present.7.value",
"present.8.key",
"present.8.value",
"present.9.key",
"present.9.value",
"present.10.key",
"present.10.value",
"present.11.key",
"present.11.value",
"present.12.key",
"present.12.value",
"present.13.key",
"present.13.value",
"present.14.key",
"present.14.value",
"present.15.key",
"present.15.value",
"present.16.key",
"present.16.value",
"present.17.key",
"present.17.value",
"present.18.key",
"present.18.value",
"present.19.key",
"present.19.value",
"present.20.key",
"present.20.value",
"present.21.key",
"present.21.value",
"present.22.key",
"present.22.value",
"present.23.key",
"present.23.value"
]
}
]123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188"""TensorRT engines run on GPU buffers (Polygraphy's CUDA wrapper; no torch): a decoder's KV cache stays on the GPUbetween steps, and the activations between split engines (piecewise.py) never leave it.
from device_chain import Chain, Buffers step = Chain(folder, [{"engine": "gpt_step_0.engine"}, ...]) # or Chain.from_split(folder, "gpt_step") out = step({"token": np.array(...), "c_k0": cache_a["c_k0"], ...}, # numpy arrays are copied in, DeviceArrays used outputs={"n_k0": cache_b["n_k0"], ...}, # where these outputs go (else the chain's own) fetch=["logits"]) # -> {"logits": numpy array}
A tensor a call writes must not be one it reads: a cache is read from one set of buffers and written to another, andthe two sets swap after every step (Buffers.swap). Buffers are allocated at their largest shape once; a smaller shapereuses the allocation (DeviceArray.resize), so the steps allocate nothing."""from __future__ import annotations
import jsonfrom pathlib import Path
import numpy as np
def _cuda(): from polygraphy import cuda return cuda
def device_array(shape, dtype): """A DeviceArray of a numpy dtype (Polygraphy's DataType: numpy dtypes there are deprecated), which also keeps the numpy dtype (reading DeviceArray.dtype logs a deprecation warning on every call).""" from polygraphy.datatype import DataType a = _cuda().DeviceArray(shape=tuple(shape), dtype=DataType.from_dtype(np.dtype(dtype))) a.np_dtype = np.dtype(dtype) return a
def host_dtype(a) -> np.dtype: return a.np_dtype
class Engine: """One engine on device buffers. Its execution context holds device memory for the profile's largest shapes, or, with shared=True, none of its own: Chain gives all its engines one scratch buffer (they run one at a time on one stream), the size of the largest one's."""
def __init__(self, path, shared=False): import tensorrt as trt from trt_runner import lean_dlls lean_dlls() self.trt = trt runtime = trt.Runtime(trt.Logger(trt.Logger.WARNING)) runtime.engine_host_code_allowed = True # version-compatible engines carry their own lean runtime engine = runtime.deserialize_cuda_engine(Path(path).read_bytes()) if engine is None: raise RuntimeError(f"could not load {path} (TensorRT {trt.__version__}; the engine needs TensorRT 10.x " "and an RTX 30-series or newer GPU)") self.engine = engine if shared: self.context = engine.create_execution_context(trt.ExecutionContextAllocationStrategy.USER_MANAGED) self.scratch = engine.get_device_memory_size_for_profile_v2(0) else: self.context, self.scratch = engine.create_execution_context(), 0 names = [engine.get_tensor_name(i) for i in range(engine.num_io_tensors)] self.inputs = [n for n in names if engine.get_tensor_mode(n) == trt.TensorIOMode.INPUT] self.outputs = [n for n in names if engine.get_tensor_mode(n) == trt.TensorIOMode.OUTPUT] self.dtype = {n: np.dtype(trt.nptype(engine.get_tensor_dtype(n))) for n in names}
def enqueue(self, inputs: dict, outputs: dict, stream) -> None: """inputs / outputs: name -> DeviceArray. Each output is resized to its shape for these inputs.""" c = self.context for n in self.inputs: a = inputs[n] c.set_input_shape(n, tuple(a.shape)) c.set_tensor_address(n, a.ptr) for n in self.outputs: o = outputs[n] o.resize(tuple(c.get_tensor_shape(n))) c.set_tensor_address(n, o.ptr) if not c.execute_async_v3(stream.ptr): raise RuntimeError("TensorRT execution failed")
def use_memory(self, buf) -> None: self.context.set_device_memory(buf.ptr, self.scratch)
def close(self): self.context = self.engine = None
class Chain: """Engines run in order on one CUDA stream; each reads the call's inputs and earlier engines' outputs by name."""
def __init__(self, folder, plan: list[dict], shared_memory=True): self.folder, self.plan, self.engines = Path(folder), plan, [] self.pool = {} # the chain's own buffers, by tensor name self.stream = None self.shared = shared_memory # one scratch buffer for all the engines' activations
@classmethod def from_split(cls, folder, part: str): """<part>_split.json (the engines in order) if the part was split, else <part>.engine alone.""" f = Path(folder) / f"{part}_split.json" return cls(folder, json.loads(f.read_text()) if f.exists() else [{"engine": f"{part}.engine"}])
def load(self): if not self.engines: self.stream = _cuda().Stream() self.engines = [Engine(self.folder / p["engine"], self.shared) for p in self.plan] if self.shared: scratch = self.pool["scratch"] = device_array((max(1, *(e.scratch for e in self.engines)),), np.uint8) for e in self.engines: e.use_memory(scratch) return self
def buffer(self, name: str, dtype, shape=(1,)): """The chain's own buffer for a tensor (allocated on first use, at least one element).""" b = self.pool.get(name) if b is None: b = self.pool[name] = device_array(tuple(max(1, d) for d in shape) or (1,), dtype) return b
def __call__(self, feeds: dict, outputs: dict | None = None, fetch=()) -> dict: self.load() outputs = outputs or {} env, keep = {}, [] for n, v in feeds.items(): if isinstance(v, np.ndarray): # host -> a pooled device buffer of the engine's dtype want = next((e.dtype[n] for e in self.engines if n in e.dtype), v.dtype) h = np.ascontiguousarray(v, dtype=want) b = self.buffer("in:" + n, want, h.shape) b.resize(h.shape) b.copy_from(h, self.stream) keep.append(h) # alive until the stream has copied it env[n] = b else: env[n] = v for e in self.engines: outs = {n: outputs[n] if n in outputs else self.buffer(n, e.dtype[n]) for n in e.outputs} e.enqueue(env, outs, self.stream) env.update(outs) res = {} for n in fetch: a = env[n] res[n] = np.empty(tuple(a.shape), dtype=host_dtype(a)) a.copy_to(res[n], self.stream) self.stream.synchronize() return res
def close(self): for e in self.engines: e.close() for b in self.pool.values(): b.free() self.engines, self.pool = [], {}
class Buffers: """Two sets of device buffers for a decoder's caches, each allocated at the largest shape: step k reads set A and writes set B, then swap() exchanges them."""
def __init__(self, names_in: list[str], names_out: list[str], dtype, max_shape): self.names_in, self.names_out = names_in, names_out self.a = [device_array(max_shape, dtype) for _ in names_in] self.b = [device_array(max_shape, dtype) for _ in names_in]
def reads(self) -> dict: return dict(zip(self.names_in, self.a))
def writes(self) -> dict: return dict(zip(self.names_out, self.b))
def swap(self): self.a, self.b = self.b, self.a
def reset(self, shape): """Set A as an empty cache of this shape (e.g. [1, 0, 256] before a prefill): no copy, no allocation.""" for buf in self.a: buf.resize(tuple(shape))
def load(self, arrays, stream=None): """Fill set A from host arrays (the prompt's cache).""" for buf, x in zip(self.a, arrays): x = np.ascontiguousarray(x, dtype=host_dtype(buf)) buf.resize(x.shape) buf.copy_from(x, stream)
def free(self): for b in self.a + self.b: b.free() self.a = self.b = []123version https://git-lfs.github.com/spec/v1oid sha256:ffb0392830f766bbe4e3bdbfbc3144609c943c45aadd476ca1e1a0aa44eaf490size 69978844123version https://git-lfs.github.com/spec/v1oid sha256:9098af3fde2f262757f3d4d0077709cff867f77ecfc7c4c19d89b277196ce5ebsize 390486484123version https://git-lfs.github.com/spec/v1oid sha256:e1378c96f7b4c759567de3631f94f2d25ebc716639b5370ceb1d710ffbf278a0size 447326412123version https://git-lfs.github.com/spec/v1oid sha256:7bb62de8715d22882268ba07fb21b8519533b030667df7db0f6238508b529072size 446058484123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471"""IndexTTS-2.5 voice cloning with ONNX Runtime. Follows the official `IndexTTS2.infer_generator(spk_audio_prompt,text, lang, text_normalization=False)` (index-tts @d9e41aa, infer_v2_5.py): w2v-BERT 2.0 features and CAM++ style ofthe reference, the emotion vector taken from the reference itself, the GPT-2 speech-token model with the officialbeam sampling (3 beams, top-p 0.8, top-k 30, temperature 0.8, repetition penalty 10 on the log-probabilities,length penalty 0, at most 1500 tokens), the semantic codec decoder, the s2mel flow (25 Euler steps, classifier-freeguidance 0.7) with the reference mel as prompt, BigVGAN v2. 22.05 kHz output. Needs numpy, onnxruntime (oronnxruntime-gpu), tiktoken, soundfile and soxr.
python fp16/pipeline.py "Text to say." out.wav --ref voice.wav --lang en [--cuda] [--seed 0]
Not included: the official text normalisation (wetext; pass written-out text), Japanese / Spanish frontends, emotioncontrol by vector, text or a second reference (the reference's own emotion is used, as by default), and theduration factor. Sampling uses numpy's generator, so a seed gives the same speech every run here, not the same asPyTorch with that seed."""
from __future__ import annotations
import jsonimport mathimport refrom pathlib import Path
import numpy as np
SR, HOP, N_FFT = 22050, 256, 1024LAYERS, HEADS, HEAD_DIM = 24, 20, 64START_TEXT, STOP_TEXT, START_MEL, STOP_MEL = 0, 1, 8192, 8193MAX_TEXT_POS = 602 # gpt.text_pos_embedding size: max_text_tokens + 2CHAR_REP = {":": ",", ";": ",", ";": ",", ",": ",", "。": ".", "!": "!", "?": "?", "\n": " ", "·": "-", "、": ",", "...": "…", ",,,": "…", ",,,": "…", "……": "…", "“": "'", "”": "'", '"': "'", "‘": "'", "’": "'", "(": "'", ")": "'", "(": "'", ")": "'", "《": "'", "》": "'", "【": "'", "】": "'", "[": "'", "]": "'", "—": "-", "~": "-", "~": "-", "「": "'", "」": "'", ":": ","}CLEAN = re.compile("|".join(re.escape(p) for p in CHAR_REP))ANNOT = re.compile(r'<([^|>\n]+)\|([^>\n]+)>')PROTECTED = re.compile(r'<\|SPECIAL_TOKEN_\d+\|>.*?<\|SPECIAL_TOKEN_\d+\|>')
# -- features ----------------------------------------------------------------------------------------------------def resample(x, orig, new, lowpass_filter_width=6, rolloff=0.99): """torchaudio.transforms.Resample(orig, new) (sinc_interp_hann), which the official code uses for 16 kHz.""" g = math.gcd(int(orig), int(new)) o, n = int(orig) // g, int(new) // g if o == n: return np.asarray(x, np.float32) base = min(o, n) * rolloff width = math.ceil(lowpass_filter_width * o / base) idx = np.arange(-width, width + o, dtype=np.float64)[None, :] / o t = (np.arange(0, -n, -1, dtype=np.float64)[:, None] / n + idx) * base t = np.clip(t, -lowpass_filter_width, lowpass_filter_width) win = np.cos(t * math.pi / lowpass_filter_width / 2) ** 2 t = t * math.pi with np.errstate(invalid="ignore", divide="ignore"): k = np.where(t == 0, 1.0, np.sin(t) / t) k = (k * win * base / o).astype(np.float32) xp = np.pad(np.asarray(x, np.float32), (width, width + o)) frames = np.lib.stride_tricks.sliding_window_view(xp, k.shape[1])[::o] y = (frames @ k.T).reshape(-1) return y[: math.ceil(n * len(x) / o)].astype(np.float32)
def _kaldi_bank(): melf = lambda hz: 1127.0 * np.log(1.0 + hz / 700.0) centers = np.linspace(melf(20.0), melf(8000.0), 82) fft_mel = melf(np.arange(256) * 16000.0 / 512) bank = np.zeros((80, 257)) for m in range(80): l, c, r = centers[m], centers[m + 1], centers[m + 2] bank[m, :256] = np.maximum(0, np.minimum((fft_mel - l) / (c - l), (r - fft_mel) / (r - c))) return bank
def _povey_power(x): """25 / 10 ms frames (snip edges), DC removal, pre-emphasis 0.97, povey window, 512-point power spectrum.""" fl, fs = 400, 160 n = 1 + (len(x) - fl) // fs f = x[np.arange(fl)[None, :] + fs * np.arange(n)[:, None]] f = f - f.mean(1, keepdims=True) f = np.concatenate([f[:, :1] - 0.97 * f[:, :1], f[:, 1:] - 0.97 * f[:, :-1]], 1) win = (0.5 - 0.5 * np.cos(2 * np.pi * np.arange(fl) / (fl - 1))) ** 0.85 return np.abs(np.fft.rfft(f * win, 512, axis=1)) ** 2
def kaldi_fbank(wav16): """torchaudio.compliance.kaldi.fbank(num_mel_bins=80, dither=0, sample_frequency=16000). Returns [T, 80].""" e = _povey_power(np.asarray(wav16, np.float64)) @ _kaldi_bank().T return np.log(np.maximum(e, np.finfo(np.float32).eps)).astype(np.float32)
def w2v_features(wav16): """SeamlessM4TFeatureExtractor (w2v-bert-2.0's preprocessor): Kaldi fbank of the 16-bit-scaled audio, each bin normalised over time (ddof 1), padded to an even frame count with 1.0, frame pairs stacked -> [1, T, 160], and the attention mask [1, T] (the padded pair is masked).""" x = np.asarray(wav16, np.float32).astype(np.float64) * 32768.0 e = _povey_power(x) @ _kaldi_bank().T f = np.log(np.maximum(e, 1.192092955078125e-07)).astype(np.float32) f = (f - f.mean(0, keepdims=True)) / np.sqrt(f.var(0, ddof=1, keepdims=True) + 1e-7) mask = np.ones(len(f), np.int64) if len(f) % 2: f = np.concatenate([f, np.ones((1, 80), np.float32)]) mask = np.concatenate([mask, [0]]) return f.reshape(1, -1, 160).astype(np.float32), mask[1::2][None].astype(np.int64)
def mel(wav22, basis): """s2mel mel_spectrogram(n_fft 1024, 80 mels, hop 256, win 1024, center=False): reflect padding of 384 each side, periodic Hann, magnitude, log of the clamp at 1e-5. Returns [1, 80, T].""" x = np.pad(np.asarray(wav22, np.float32), ((N_FFT - HOP) // 2, (N_FFT - HOP) // 2), mode="reflect") win = (0.5 - 0.5 * np.cos(2 * np.pi * np.arange(N_FFT) / N_FFT)).astype(np.float32) n = 1 + (len(x) - N_FFT) // HOP s = np.fft.rfft(x[np.arange(N_FFT)[None, :] + HOP * np.arange(n)[:, None]] * win, axis=1) mag = np.sqrt(s.real.astype(np.float64) ** 2 + s.imag.astype(np.float64) ** 2 + 1e-9).astype(np.float32) return np.log(np.maximum(basis @ mag.T, 1e-5))[None].astype(np.float32)
def mel_basis(): """librosa.filters.mel(sr=22050, n_fft=1024, n_mels=80, fmin=0, fmax=None): Slaney scale and norm.""" def hz2mel(f): f = np.asarray(f, np.float64) lin = f / (200.0 / 3) return np.where(f >= 1000.0, 15.0 + np.log(np.maximum(f, 1e-10) / 1000.0) / (np.log(6.4) / 27.0), lin)
def mel2hz(m): m = np.asarray(m, np.float64) return np.where(m >= 15.0, 1000.0 * np.exp((np.log(6.4) / 27.0) * (m - 15.0)), (200.0 / 3) * m) fft = np.linspace(0, SR / 2, N_FFT // 2 + 1) pts = mel2hz(np.linspace(hz2mel(0.0), hz2mel(SR / 2), 82)) fd = np.diff(pts) ramps = pts[:, None] - fft[None, :] w = np.zeros((80, len(fft))) for i in range(80): w[i] = np.maximum(0, np.minimum(-ramps[i] / fd[i], ramps[i + 2] / fd[i + 1])) w *= (2.0 / (pts[2:82] - pts[:80]))[:, None] return w.astype(np.float32)
def nearest(x, n): """F.interpolate(mode='nearest') along time of [1, T, C] to length n.""" t = x.shape[1] src = np.minimum(np.floor(np.arange(n, dtype=np.float32) * (np.float32(t) / np.float32(n))).astype(np.int64), t - 1) return np.ascontiguousarray(x[:, src])
# -- text ----------------------------------------------------------------------------------------------------------def prepare_text(text, lang): """The official clean-up with text_normalization off: punctuation map, lower case (zh / en), pronunciation annotations <word|PRON> -> special-token-wrapped pronunciations, tags upper-cased.""" text = CLEAN.sub(lambda m: CHAR_REP[m.group()], text) if lang in ("ja", "zh", "zhen", "en"): text = text.lower() if lang == "es": text = text.upper()
def rep(m): word, pron = m.group(1), m.group(2).upper() if re.fullmatch(r'[-ゟ]+', pron) or re.fullmatch(r'[゠-ヿ]+', pron): return f' {pron} ' tok = 'SPECIAL_TOKEN_2' if re.search(r"[一-鿿]", word) else 'SPECIAL_TOKEN_1' return f'<|{tok}|>{pron}<|{tok}|>' text = ANNOT.sub(rep, text) return re.sub(r'<\|([^|]+)\|>', lambda m: f'<|{m.group(1).upper()}|>', text)
class Tokenizer: def __init__(self, folder): import base64 import tiktoken cfg = json.loads((folder / "tokenizer.json").read_text(encoding="utf-8")) ranks = {base64.b64decode(t): int(r) for t, r in (l.split() for l in (folder / "tokenizer.tiktoken").read_text().splitlines() if l)} self.enc = tiktoken.Encoding(name="multilingual_zh_ja_yue_char_del", explicit_n_vocab=cfg["n_vocab"], pat_str=cfg["pat_str"], mergeable_ranks=ranks, special_tokens=cfg["special_tokens"]) self.lang = cfg["languages"]
def encode(self, text): return self.enc.encode(text, allowed_special="all")
def split(self, text, prefix, max_tokens=120): """split_text_by_tokens: segments of at most max_tokens (with the language prefix), at punctuation.""" n = lambda t: len(self.encode(t)) budget = max(1, min(max_tokens, MAX_TEXT_POS - 2) - n(prefix)) if n(text) <= budget: return [text] pieces, pos = [], 0 for m in PROTECTED.finditer(text): if m.start() > pos: pieces.append((text[pos:m.start()], False)) pieces.append((m.group(0), True)); pos = m.end() if pos < len(text): pieces.append((text[pos:], False)) chunks = [] for piece, atomic in pieces: if atomic: chunks.append(piece); continue for part in re.split(r'(?<=[,。!?、;:,\.!\?;:\n])', piece): if not part: continue if n(part) <= budget: chunks.append(part); continue cur = "" for ch in part: if cur and n(cur + ch) > budget: chunks.append(cur); cur = ch else: cur += ch if cur: chunks.append(cur) segs, cur = [], "" for c in chunks: if cur and n(cur + c) > budget: segs.append(cur); cur = c else: cur += c if cur: segs.append(cur) return segs or [text]
# -- the speech-token model ----------------------------------------------------------------------------------------def log_softmax(x): m = x.max(-1, keepdims=True) return x - m - np.log(np.exp(x - m).sum(-1, keepdims=True))
def warp(scores, ids, penalty=10.0, temperature=0.8, top_k=30, top_p=0.8, keep=2): """The processors HF's beam sampling applies to the log-probabilities, in its order: repetition penalty on every token already in the sequence (the prompt's placeholder ids 1 and the start token included), temperature, top-k, top-p (both keeping at least 2).""" s = scores.copy() for b in range(len(s)): u = np.unique(ids[b]) v = s[b, u] s[b, u] = np.where(v < 0, v * penalty, v / penalty) s = s / temperature kth = np.sort(s, -1)[:, -top_k][:, None] s = np.where(s < kth, -np.inf, s) order = np.argsort(s, -1, kind="stable") srt = np.take_along_axis(s, order, -1) e = np.exp(srt - srt.max(-1, keepdims=True)) cum = np.cumsum(e / e.sum(-1, keepdims=True), -1) remove = cum <= 1 - top_p remove[:, -keep:] = False out = np.full_like(s, -np.inf) np.put_along_axis(out, order, np.where(remove, -np.inf, srt), -1) return out
class Beams: """BeamSearchScorer (num_beams 3, length_penalty 0 so a hypothesis scores its summed log-probability, early_stopping off).""" def __init__(self, n=3): self.n, self.hyps, self.done = n, [], False
def add(self, seq, score): if len(self.hyps) < self.n or score > min(h[0] for h in self.hyps): self.hyps.append((score, seq)) if len(self.hyps) > self.n: self.hyps.remove(min(self.hyps, key=lambda h: h[0]))
def is_done(self, best): return len(self.hyps) >= self.n and min(h[0] for h in self.hyps) >= best
class IndexTTS25: def __init__(self, folder, provider="cpu", threads=4): import onnxruntime as ort folder = Path(folder) if provider != "cpu" and hasattr(ort, "preload_dlls"): try: ort.preload_dlls() except Exception: pass self.ort = ort so = ort.SessionOptions() so.intra_op_num_threads = threads so.log_severity_level = 3 # host memory: no CPU arena (it would keep the initializers' staging copies) and initializers allocated # with the device allocator; ten sessions of ~1-2.5 GB otherwise hold about twice their size so.enable_cpu_mem_arena = False so.add_session_config_entry("session.use_device_allocator_for_initializers", "1") cuda = ("CUDAExecutionProvider", {"arena_extend_strategy": "kSameAsRequested", "cudnn_conv_algo_search": "HEURISTIC"}) prov = ["CPUExecutionProvider"] if provider == "cpu" else [cuda, "CPUExecutionProvider"] self.s = {n: ort.InferenceSession(str(folder / f"{n}.onnx"), so, providers=prov) for n in ("semantic", "emovec", "campplus", "prefix", "embed", "decoder", "codec", "regulator", "estimator", "vocoder")} self.device = "cuda" if "CUDAExecutionProvider" in self.s["decoder"].get_providers() else "cpu" p = {i.name: i for i in self.s["decoder"].get_inputs()} self.kv_dtype = np.float16 if "float16" in p["past_key_values.0.key"].type else np.float32 self.emb_dtype = np.float16 if "float16" in p["inputs_embeds"].type else np.float32 self.out_names = [o.name for o in self.s["decoder"].get_outputs()] # every input length differs (the KV cache grows by one position per step), so the GPU arena could rarely # reuse a block: shrink it after each run (on Windows device allocations count against the process's commit) self.ro = ort.RunOptions() if self.device == "cuda": self.ro.add_run_config_entry("memory.enable_memory_arena_shrinkage", "gpu:0") self.tok = Tokenizer(folder) self.basis = mel_basis() self.cache = None
def run(self, name, **feeds): return self.s[name].run(None, feeds, self.ro)[0]
# reference ------------------------------------------------------------------------------------------------ def reference(self, wav, sr): """The official prompt features: 22.05 kHz and (torchaudio-resampled from it) 16 kHz copies of the first 15 s for the s2mel prompt, CAM++ style and mel; a direct 16 kHz load of the first 15 s for the emotion vector.""" import soxr key = (id(wav), len(wav), sr) if self.cache and self.cache[0] == key: return self.cache[1] wav = np.asarray(wav, np.float32) rs = lambda r: soxr.resample(wav, sr, r, quality="HQ").astype(np.float32) if sr != r else wav a22 = rs(SR)[: int(15 * SR)] a16 = resample(a22, SR, 16000) e16 = rs(16000)[: int(15 * 16000)] f, m = w2v_features(a16) spk = self.run("semantic", feats=f, mask=m) f, m = w2v_features(e16) emo = self.run("semantic", feats=f, mask=m) ref_mel = mel(a22, self.basis) fb = kaldi_fbank(a16) style = self.run("campplus", feat=(fb - fb.mean(0, keepdims=True))[None].astype(np.float32)) prompt_cond = self.run("regulator", feat=nearest(spk, ref_mel.shape[2])) emovec = self.run("emovec", feat=emo) out = dict(style=style, emovec=emovec, ref_mel=ref_mel, prompt_cond=prompt_cond) self.cache = (key, out) return out
# GPT ---------------------------------------------------------------------------------------------------------- def _decode_step(self, embeds, beam_idx, past): s = self.s["decoder"] if self.device == "cpu": feeds = {"inputs_embeds": embeds.astype(self.emb_dtype), "beam_idx": beam_idx} feeds.update({f"past_key_values.{i // 2}.{'key' if i % 2 == 0 else 'value'}": past[i] for i in range(2 * LAYERS)}) outs = s.run(self.out_names, feeds, self.ro) return outs[0], outs[1:] io = s.io_binding() # a fresh binding per step; the cache stays on the GPU io.bind_cpu_input("inputs_embeds", embeds.astype(self.emb_dtype)) io.bind_cpu_input("beam_idx", beam_idx) for i in range(2 * LAYERS): io.bind_ortvalue_input(f"past_key_values.{i // 2}.{'key' if i % 2 == 0 else 'value'}", past[i]) io.bind_output("logits", "cpu") for n in self.out_names[1:]: io.bind_output(n, "cuda") s.run_with_iobinding(io, self.ro) outs = io.get_outputs() return outs[0].numpy(), outs[1:]
def speech_tokens(self, ref, text_ids, lang, rng, max_new=1500, n_beams=3): ids = [t for t in text_ids if t not in (START_TEXT, STOP_TEXT)] text = np.array([[START_TEXT, *ids, STOP_TEXT]], np.int64) prefix = self.run("prefix", style=ref["style"], emovec=ref["emovec"], text=text, lang=np.array([lang], np.int64)) # [1, mel_len + 1, 1280] mel_len = prefix.shape[1] - 1 empty = np.zeros((1, HEADS, 0, HEAD_DIM), self.kv_dtype) if self.device == "cuda": empty = self.ort.OrtValue.ortvalue_from_numpy(empty, "cuda", 0) logits, past = self._decode_step(prefix, np.zeros(1, np.int64), [empty] * (2 * LAYERS)) logits = np.repeat(logits.astype(np.float32), n_beams, 0) seqs = np.tile(np.array([[1] * mel_len + [START_MEL]], np.int64), (n_beams, 1)) beam_scores = np.array([0.0] + [-1e9] * (n_beams - 1), np.float32) beams = Beams(n_beams) beam_idx = np.zeros(n_beams, np.int64) # the prefill cache has batch 1 V = logits.shape[1] for step in range(max_new): scores = warp(log_softmax(logits), seqs) + beam_scores[:, None] flat = scores.reshape(-1) p = np.exp(flat - flat[np.isfinite(flat)].max()) p = np.where(np.isfinite(flat), p, 0.0) p = p / p.sum() k = min(2 * n_beams, int((p > 0).sum())) pick = rng.choice(len(p), size=k, replace=False, p=p) sc = flat[pick] order = np.argsort(-sc, kind="stable") pick, sc = pick[order], sc[order] nxt_score, nxt_tok, nxt_beam = [], [], [] for rank, (tok_flat, s_) in enumerate(zip(pick, sc)): b, t = divmod(int(tok_flat), V) if t == STOP_MEL: if rank >= n_beams: continue beams.add(seqs[b, mel_len + 1:].tolist(), float(s_)) else: nxt_score.append(s_); nxt_tok.append(t); nxt_beam.append(b) if len(nxt_tok) == n_beams: break if beams.is_done(float(sc.max())): beams.done = True break beam_idx = np.array(nxt_beam, np.int64) beam_scores = np.array(nxt_score, np.float32) seqs = np.concatenate([seqs[beam_idx], np.array(nxt_tok, np.int64)[:, None]], 1) if step == max_new - 1: break n_gen = seqs.shape[1] - (mel_len + 1) # GPT2InferenceModel embeds a step's token at attention-mask length - mel_len: position n_gen + 1 emb = self.run("embed", tokens=np.array(nxt_tok, np.int64)[:, None], pos=np.array([n_gen + 1], np.int64)) logits, past = self._decode_step(emb, beam_idx, past) logits = logits.astype(np.float32) if not beams.done: # finalize: running beams join for b in range(n_beams): beams.add(seqs[b, mel_len + 1:].tolist(), float(beam_scores[b])) return max(beams.hyps, key=lambda h: h[0])[1]
# s2mel + vocoder ---------------------------------------------------------------------------------------------- def flow(self, cond, prompt, style, rng, steps=25, cfg=0.7): T, pl = cond.shape[1], prompt.shape[2] x = rng.standard_normal((1, 80, T)).astype(np.float32) ts = np.linspace(0, 1, steps + 1, dtype=np.float32) t = ts[0] px = np.zeros_like(x) px[..., :pl] = prompt[..., :pl] x[..., :pl] = 0 z = np.zeros_like for step in range(1, len(ts)): dt = ts[step] - ts[step - 1] v = self.run("estimator", x=np.concatenate([x, x]), prompt_x=np.concatenate([px, z(px)]), t=np.full(2, t, np.float32), style=np.concatenate([style, z(style)]), cond=np.concatenate([cond, z(cond)])) d = (1.0 + cfg) * v[0:1] - cfg * v[1:2] x = (x + dt * d).astype(np.float32) t = np.float32(t + dt) x[:, :, :pl] = 0 return x
def __call__(self, text, ref_wav, ref_sr, lang="en", seed=0, interval_silence_ms=200): rng = np.random.default_rng(seed) lang = lang.lower() ref = self.reference(ref_wav, ref_sr) prefix = f"<|{lang}|> " text = prepare_text(text, lang) lang_id = self.tok.lang.get(lang, self.tok.lang["common"]) wavs = [] for seg in self.tok.split(text, prefix): ids = self.tok.encode(prefix + seg) + [STOP_TEXT] codes = self.speech_tokens(ref, ids, lang_id, rng) if STOP_MEL in codes: codes = codes[: codes.index(STOP_MEL)] S = self.run("codec", codes=np.array([codes], np.int64)) # [1, 2 N, 1024] cond = self.run("regulator", feat=nearest(S, int(S.shape[1] * 1.72))) cat = np.concatenate([ref["prompt_cond"], cond], 1) m = self.flow(cat, ref["ref_mel"], ref["style"], rng)[:, :, ref["ref_mel"].shape[2]:] w = self.run("vocoder", mel=np.ascontiguousarray(m)).reshape(-1) wavs.append(np.clip(32767 * w, -32767.0, 32767.0)) out = [] for i, w in enumerate(wavs): # insert_interval_silence out.append(w) if i < len(wavs) - 1: out.append(np.zeros(int(SR * interval_silence_ms / 1000), np.float32)) wav = np.concatenate(out) n = min(int(SR * 20 / 1000), len(wav)) # fade_out_tail, 20 ms if n > 1: wav[-n:] = wav[-n:] * (0.5 * (1.0 + np.cos(np.linspace(0.0, math.pi, n)))).astype(np.float32) return (wav / 32767.0).astype(np.float32), SR
if __name__ == "__main__": import argparse import soundfile as sf ap = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter) ap.add_argument("text"); ap.add_argument("output") ap.add_argument("--ref", required=True); ap.add_argument("--lang", default="en") ap.add_argument("--dir", default=str(Path(__file__).resolve().parent)) ap.add_argument("--cuda", action="store_true"); ap.add_argument("--seed", type=int, default=0) a = ap.parse_args() r, rsr = sf.read(a.ref, dtype="float32", always_2d=True) tts = IndexTTS25(a.dir, "cuda" if a.cuda else "cpu") y, sr = tts(a.text, r.mean(1), rsr, a.lang, seed=a.seed) sf.write(a.output, y, sr)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122"""IndexTTS-2.5 voice cloning with TensorRT: the ONNX build's pipeline.py (the official`IndexTTS2.infer_generator(spk_audio_prompt, text, lang, text_normalization=False)`: beam sampling with 3 beams, 25flow steps with CFG 0.7) with its graphs run as the engines in this folder:
decoder_0..k.engine the 24-layer GPT-2 (decoder_split.json): inputs_embeds [B, S, 1280], beam_idx [B], past_key_values.{i}.key / .value [B', 20, P, 64] (fp16) -> logits [B, 8194], present.* semantic, emovec, campplus, prefix, embed, codec, regulator .engine estimator.engine the s2mel DiT for flows up to 2,048 mel frames; estimator_long.engine for 2,048-4,096 (loaded when a flow needs it: its attention keeps 3.5 GB of working memory) vocoder.engine BigVGAN in windows of 512 mel frames with 64 of context on each side (local: one whole pass's samples)
The decoder's KV cache stays on the GPU (device_chain.py): two buffer sets, a step reading one (reordered by beam_idxinside the engine) and writing the longer cache into the other. Limits of the engines: a text segment up to 160 ids(pipeline.py splits text at 120 tokens), up to 800 speech tokens a segment (32 s), and the flow's mel (thereference's first 15 s plus the segment) up to 4,096 frames: a segment's speech tokens stop where its mel would passthat. 22.05 kHz output. Needs numpy, tiktoken, soundfile, soxr, tensorrt-cu12 / tensorrt-lean-cu12 10.13 and polygraphy.
python pipeline_trt.py "Text to say." out.wav --ref voice.wav [--lang en] [--seed 0]"""
from __future__ import annotations
import sysfrom pathlib import Path
import numpy as np
HERE = Path(__file__).resolve().parentsys.path.insert(0, str(HERE))from device_chain import Buffers, Chain # noqa: E402from pipeline import HEAD_DIM, HEADS, HOP, LAYERS, IndexTTS25, Tokenizer, mel_basis # noqa: E402from trt_runner import OrtLike # noqa: E402
BEAMS, MAX_TEXT, MAX_TOKENS, MAX_MEL = 3, 160, 800, 4096LONG = 2048 # flows over this many mel frames run on estimator_long.engine (loaded then)MAX_CACHE = 3 + MAX_TEXT + 1 + MAX_TOKENS + 1VOC_WIN, VOC_CTX = 512, 64 # vocoder windows (mel frames): the engine takes up to 640MEL_PER_TOKEN = 2 * 1.72 # pipeline.py: codec doubles the tokens, the regulator stretches by 1.72OUTS = {"semantic": "feat", "emovec": "emovec", "campplus": "style", "prefix": "embeds", "embed": "embeds", "codec": "feat", "regulator": "cond", "estimator": "velocity", "vocoder": "wav"}STATIC = ("prefix", "embed", "regulator") # small profiles; the others take their memory per call's shapes
class IndexTTS25Trt(IndexTTS25): def __init__(self, folder=HERE): folder = self.folder = Path(folder) self.s = {n: OrtLike(folder / f"{n}.engine", [o], allocation="static" if n in STATIC else "runtime") for n, o in OUTS.items()} self.chain = Chain.from_split(folder, "decoder") names = [f"{i}.{kv}" for i in range(LAYERS) for kv in ("key", "value")] self.kv = Buffers([f"past_key_values.{n}" for n in names], [f"present.{n}" for n in names], np.float16, (BEAMS, HEADS, MAX_CACHE, HEAD_DIM)) self.kv_len = 0 self.device = "trt" self.kv_dtype, self.emb_dtype = np.float16, np.float32 self.tok = Tokenizer(folder) self.basis = mel_basis() self.cache = None
def run(self, name, **feeds): if name == "vocoder": return self.vocode(feeds["mel"]) if name == "estimator" and feeds["x"].shape[2] > LONG: # the long engine, loaded on first use if "estimator_long" not in self.s: self.s["estimator_long"] = OrtLike(self.folder / "estimator_long.engine", ["velocity"], "runtime") name = "estimator_long" return self.s[name].run(None, feeds)[0]
def vocode(self, m): """BigVGAN over [1, 80, T] in windows of VOC_WIN frames with VOC_CTX frames of context on each side, whose audio is dropped: its output is local (on the CPU the windows give one whole pass's samples exactly).""" T, out = m.shape[2], [] for a in range(0, T, VOC_WIN): lo, hi = max(0, a - VOC_CTX), min(T, a + VOC_WIN + VOC_CTX) y = self.s["vocoder"].run(None, {"mel": np.ascontiguousarray(m[:, :, lo:hi])})[0] out.append(y[..., (a - lo) * HOP:(a - lo + min(VOC_WIN, T - a)) * HOP]) return np.concatenate(out, -1)
def _decode_step(self, embeds, beam_idx, past): """past: pipeline.py's empty start (a list: a new prompt) or what the last step returned; the cache itself stays on the GPU.""" if isinstance(past, list): self.kv.reset((1, HEADS, 0, HEAD_DIM)) self.kv_len = 0 n = embeds.shape[1] if self.kv_len + n > MAX_CACHE: raise ValueError(f"decoder: {self.kv_len} cached + {n} new positions; the engines take up to {MAX_CACHE}") out = self.chain({"inputs_embeds": np.asarray(embeds, np.float32), "beam_idx": np.asarray(beam_idx, np.int64), **self.kv.reads()}, outputs=self.kv.writes(), fetch=["logits"]) self.kv.swap() self.kv_len += n return out["logits"], "gpu"
def speech_tokens(self, ref, text_ids, lang, rng, max_new=1500, n_beams=3): if n_beams != BEAMS: raise ValueError(f"the engines are built for {BEAMS} beams") if len(text_ids) + 1 > MAX_TEXT: raise ValueError(f"a text segment of {len(text_ids) + 1} ids; the engines take up to {MAX_TEXT}") room = int((MAX_MEL - ref["ref_mel"].shape[2]) / MEL_PER_TOKEN) - 1 return super().speech_tokens(ref, text_ids, lang, rng, min(max_new, MAX_TOKENS, room), n_beams)
def close(self): self.chain.close() self.kv.free() for s in self.s.values(): s.e.close()
if __name__ == "__main__": import argparse import soundfile as sf ap = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter) ap.add_argument("text"); ap.add_argument("output") ap.add_argument("--ref", required=True); ap.add_argument("--lang", default="en") ap.add_argument("--dir", default=str(HERE)) ap.add_argument("--seed", type=int, default=0) a = ap.parse_args() r, rsr = sf.read(a.ref, dtype="float32", always_2d=True) tts = IndexTTS25Trt(a.dir) y, sr = tts(a.text, r.mean(1), rsr, a.lang, seed=a.seed) sf.write(a.output, y, sr)123version https://git-lfs.github.com/spec/v1oid sha256:ffed4ed1bdcd234f36bd24a11966a21d1c25ec70f4b21aa08363bef35ea6eac4size 201685572123version https://git-lfs.github.com/spec/v1oid sha256:8f704a229ff349cefb132a12283490b58071d6331c76d79d8c8e336387f55b9fsize 66306244123version https://git-lfs.github.com/spec/v1oid sha256:7cddb50666e83478ee2498b515c4a5eb7bb2d780dc1b5fda41e5c597c77e0f90size 94758352412345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787{
"pat_str": "'s|'t|'re|'ve|'m|'ll|'d| ?\\p{L}+| ?\\p{N}+| ?[^\\s\\p{L}\\p{N}]+|\\s+(?!\\S)|\\s+",
"n_vocab": 60509,
"special_tokens": {
"<|endoftext|>": 58836,
"<|startoftranscript|>": 58837,
"<|en|>": 58838,
"<|zh|>": 58839,
"<|de|>": 58840,
"<|es|>": 58841,
"<|ru|>": 58842,
"<|ko|>": 58843,
"<|fr|>": 58844,
"<|ja|>": 58845,
"<|pt|>": 58846,
"<|tr|>": 58847,
"<|pl|>": 58848,
"<|ca|>": 58849,
"<|nl|>": 58850,
"<|ar|>": 58851,
"<|sv|>": 58852,
"<|it|>": 58853,
"<|id|>": 58854,
"<|hi|>": 58855,
"<|fi|>": 58856,
"<|vi|>": 58857,
"<|he|>": 58858,
"<|uk|>": 58859,
"<|el|>": 58860,
"<|ms|>": 58861,
"<|cs|>": 58862,
"<|ro|>": 58863,
"<|da|>": 58864,
"<|hu|>": 58865,
"<|ta|>": 58866,
"<|no|>": 58867,
"<|th|>": 58868,
"<|ur|>": 58869,
"<|hr|>": 58870,
"<|bg|>": 58871,
"<|lt|>": 58872,
"<|la|>": 58873,
"<|mi|>": 58874,
"<|ml|>": 58875,
"<|cy|>": 58876,
"<|sk|>": 58877,
"<|te|>": 58878,
"<|fa|>": 58879,
"<|lv|>": 58880,
"<|bn|>": 58881,
"<|sr|>": 58882,
"<|az|>": 58883,
"<|sl|>": 58884,
"<|kn|>": 58885,
"<|et|>": 58886,
"<|mk|>": 58887,
"<|br|>": 58888,
"<|eu|>": 58889,
"<|is|>": 58890,
"<|hy|>": 58891,
"<|ne|>": 58892,
"<|mn|>": 58893,
"<|bs|>": 58894,
"<|kk|>": 58895,
"<|sq|>": 58896,
"<|sw|>": 58897,
"<|gl|>": 58898,
"<|mr|>": 58899,
"<|pa|>": 58900,
"<|si|>": 58901,
"<|km|>": 58902,
"<|sn|>": 58903,
"<|yo|>": 58904,
"<|so|>": 58905,
"<|af|>": 58906,
"<|oc|>": 58907,
"<|ka|>": 58908,
"<|be|>": 58909,
"<|tg|>": 58910,
"<|sd|>": 58911,
"<|gu|>": 58912,
"<|am|>": 58913,
"<|yi|>": 58914,
"<|lo|>": 58915,
"<|uz|>": 58916,
"<|fo|>": 58917,
"<|ht|>": 58918,
"<|ps|>": 58919,
"<|tk|>": 58920,
"<|nn|>": 58921,
"<|mt|>": 58922,
"<|sa|>": 58923,
"<|lb|>": 58924,
"<|my|>": 58925,
"<|bo|>": 58926,
"<|tl|>": 58927,
"<|mg|>": 58928,
"<|as|>": 58929,
"<|tt|>": 58930,
"<|haw|>": 58931,
"<|ln|>": 58932,
"<|ha|>": 58933,
"<|ba|>": 58934,
"<|jw|>": 58935,
"<|su|>": 58936,
"<|ASR|>": 58937,
"<|AED|>": 58938,
"<|SER|>": 58939,
"<|Speech|>": 58940,
"<|/Speech|>": 58941,
"<|BGM|>": 58942,
"<|/BGM|>": 58943,
"<|Laughter|>": 58944,
"<|/Laughter|>": 58945,
"<|Applause|>": 58946,
"<|/Applause|>": 58947,
"<|HAPPY|>": 58948,
"<|SAD|>": 58949,
"<|ANGRY|>": 58950,
"<|NEUTRAL|>": 58951,
"<|translate|>": 58952,
"<|transcribe|>": 58953,
"<|startoflm|>": 58954,
"<|startofprev|>": 58955,
"<|nospeech|>": 58956,
"<|notimestamps|>": 58957,
"<|SPECIAL_TOKEN_1|>": 58958,
"<|SPECIAL_TOKEN_2|>": 58959,
"<|SPECIAL_TOKEN_3|>": 58960,
"<|SPECIAL_TOKEN_4|>": 58961,
"<|SPECIAL_TOKEN_5|>": 58962,
"<|SPECIAL_TOKEN_6|>": 58963,
"<|SPECIAL_TOKEN_7|>": 58964,
"<|SPECIAL_TOKEN_8|>": 58965,
"<|SPECIAL_TOKEN_9|>": 58966,
"<|SPECIAL_TOKEN_10|>": 58967,
"<|SPECIAL_TOKEN_11|>": 58968,
"<|SPECIAL_TOKEN_12|>": 58969,
"<|SPECIAL_TOKEN_13|>": 58970,
"<|SPECIAL_TOKEN_14|>": 58971,
"<|SPECIAL_TOKEN_15|>": 58972,
"<|SPECIAL_TOKEN_16|>": 58973,
"<|SPECIAL_TOKEN_17|>": 58974,
"<|SPECIAL_TOKEN_18|>": 58975,
"<|SPECIAL_TOKEN_19|>": 58976,
"<|SPECIAL_TOKEN_20|>": 58977,
"<|SPECIAL_TOKEN_21|>": 58978,
"<|SPECIAL_TOKEN_22|>": 58979,
"<|SPECIAL_TOKEN_23|>": 58980,
"<|SPECIAL_TOKEN_24|>": 58981,
"<|SPECIAL_TOKEN_25|>": 58982,
"<|SPECIAL_TOKEN_26|>": 58983,
"<|SPECIAL_TOKEN_27|>": 58984,
"<|SPECIAL_TOKEN_28|>": 58985,
"<|SPECIAL_TOKEN_29|>": 58986,
"<|SPECIAL_TOKEN_30|>": 58987,
"<|TTS/B|>": 58988,
"<|TTS/O|>": 58989,
"<|TTS/Q|>": 58990,
"<|TTS/A|>": 58991,
"<|TTS/CO|>": 58992,
"<|TTS/CL|>": 58993,
"<|TTS/H|>": 58994,
"<|TTS/SP01|>": 58995,
"<|TTS/SP02|>": 58996,
"<|TTS/SP03|>": 58997,
"<|TTS/SP04|>": 58998,
"<|TTS/SP05|>": 58999,
"<|TTS/SP06|>": 59000,
"<|TTS/SP07|>": 59001,
"<|TTS/SP08|>": 59002,
"<|TTS/SP09|>": 59003,
"<|TTS/SP10|>": 59004,
"<|TTS/SP11|>": 59005,
"<|TTS/SP12|>": 59006,
"<|TTS/SP13|>": 59007,
"<|0.00|>": 59008,
"<|0.02|>": 59009,
"<|0.04|>": 59010,
"<|0.06|>": 59011,
"<|0.08|>": 59012,
"<|0.10|>": 59013,
"<|0.12|>": 59014,
"<|0.14|>": 59015,
"<|0.16|>": 59016,
"<|0.18|>": 59017,
"<|0.20|>": 59018,
"<|0.22|>": 59019,
"<|0.24|>": 59020,
"<|0.26|>": 59021,
"<|0.28|>": 59022,
"<|0.30|>": 59023,
"<|0.32|>": 59024,
"<|0.34|>": 59025,
"<|0.36|>": 59026,
"<|0.38|>": 59027,
"<|0.40|>": 59028,
"<|0.42|>": 59029,
"<|0.44|>": 59030,
"<|0.46|>": 59031,
"<|0.48|>": 59032,
"<|0.50|>": 59033,
"<|0.52|>": 59034,
"<|0.54|>": 59035,
"<|0.56|>": 59036,
"<|0.58|>": 59037,
"<|0.60|>": 59038,
"<|0.62|>": 59039,
"<|0.64|>": 59040,
"<|0.66|>": 59041,
"<|0.68|>": 59042,
"<|0.70|>": 59043,
"<|0.72|>": 59044,
"<|0.74|>": 59045,
"<|0.76|>": 59046,
"<|0.78|>": 59047,
"<|0.80|>": 59048,
"<|0.82|>": 59049,
"<|0.84|>": 59050,
"<|0.86|>": 59051,
"<|0.88|>": 59052,
"<|0.90|>": 59053,
"<|0.92|>": 59054,
"<|0.94|>": 59055,
"<|0.96|>": 59056,
"<|0.98|>": 59057,
"<|1.00|>": 59058,
"<|1.02|>": 59059,
"<|1.04|>": 59060,
"<|1.06|>": 59061,
"<|1.08|>": 59062,
"<|1.10|>": 59063,
"<|1.12|>": 59064,
"<|1.14|>": 59065,
"<|1.16|>": 59066,
"<|1.18|>": 59067,
"<|1.20|>": 59068,
"<|1.22|>": 59069,
"<|1.24|>": 59070,
"<|1.26|>": 59071,
"<|1.28|>": 59072,
"<|1.30|>": 59073,
"<|1.32|>": 59074,
"<|1.34|>": 59075,
"<|1.36|>": 59076,
"<|1.38|>": 59077,
"<|1.40|>": 59078,
"<|1.42|>": 59079,
"<|1.44|>": 59080,
"<|1.46|>": 59081,
"<|1.48|>": 59082,
"<|1.50|>": 59083,
"<|1.52|>": 59084,
"<|1.54|>": 59085,
"<|1.56|>": 59086,
"<|1.58|>": 59087,
"<|1.60|>": 59088,
"<|1.62|>": 59089,
"<|1.64|>": 59090,
"<|1.66|>": 59091,
"<|1.68|>": 59092,
"<|1.70|>": 59093,
"<|1.72|>": 59094,
"<|1.74|>": 59095,
"<|1.76|>": 59096,
"<|1.78|>": 59097,
"<|1.80|>": 59098,
"<|1.82|>": 59099,
"<|1.84|>": 59100,
"<|1.86|>": 59101,
"<|1.88|>": 59102,
"<|1.90|>": 59103,
"<|1.92|>": 59104,
"<|1.94|>": 59105,
"<|1.96|>": 59106,
"<|1.98|>": 59107,
"<|2.00|>": 59108,
"<|2.02|>": 59109,
"<|2.04|>": 59110,
"<|2.06|>": 59111,
"<|2.08|>": 59112,
"<|2.10|>": 59113,
"<|2.12|>": 59114,
"<|2.14|>": 59115,
"<|2.16|>": 59116,
"<|2.18|>": 59117,
"<|2.20|>": 59118,
"<|2.22|>": 59119,
"<|2.24|>": 59120,
"<|2.26|>": 59121,
"<|2.28|>": 59122,
"<|2.30|>": 59123,
"<|2.32|>": 59124,
"<|2.34|>": 59125,
"<|2.36|>": 59126,
"<|2.38|>": 59127,
"<|2.40|>": 59128,
"<|2.42|>": 59129,
"<|2.44|>": 59130,
"<|2.46|>": 59131,
"<|2.48|>": 59132,
"<|2.50|>": 59133,
"<|2.52|>": 59134,
"<|2.54|>": 59135,
"<|2.56|>": 59136,
"<|2.58|>": 59137,
"<|2.60|>": 59138,
"<|2.62|>": 59139,
"<|2.64|>": 59140,
"<|2.66|>": 59141,
"<|2.68|>": 59142,
"<|2.70|>": 59143,
"<|2.72|>": 59144,
"<|2.74|>": 59145,
"<|2.76|>": 59146,
"<|2.78|>": 59147,
"<|2.80|>": 59148,
"<|2.82|>": 59149,
"<|2.84|>": 59150,
"<|2.86|>": 59151,
"<|2.88|>": 59152,
"<|2.90|>": 59153,
"<|2.92|>": 59154,
"<|2.94|>": 59155,
"<|2.96|>": 59156,
"<|2.98|>": 59157,
"<|3.00|>": 59158,
"<|3.02|>": 59159,
"<|3.04|>": 59160,
"<|3.06|>": 59161,
"<|3.08|>": 59162,
"<|3.10|>": 59163,
"<|3.12|>": 59164,
"<|3.14|>": 59165,
"<|3.16|>": 59166,
"<|3.18|>": 59167,
"<|3.20|>": 59168,
"<|3.22|>": 59169,
"<|3.24|>": 59170,
"<|3.26|>": 59171,
"<|3.28|>": 59172,
"<|3.30|>": 59173,
"<|3.32|>": 59174,
"<|3.34|>": 59175,
"<|3.36|>": 59176,
"<|3.38|>": 59177,
"<|3.40|>": 59178,
"<|3.42|>": 59179,
"<|3.44|>": 59180,
"<|3.46|>": 59181,
"<|3.48|>": 59182,
"<|3.50|>": 59183,
"<|3.52|>": 59184,
"<|3.54|>": 59185,
"<|3.56|>": 59186,
"<|3.58|>": 59187,
"<|3.60|>": 59188,
"<|3.62|>": 59189,
"<|3.64|>": 59190,
"<|3.66|>": 59191,
"<|3.68|>": 59192,
"<|3.70|>": 59193,
"<|3.72|>": 59194,
"<|3.74|>": 59195,
"<|3.76|>": 59196,
"<|3.78|>": 59197,
"<|3.80|>": 59198,
"<|3.82|>": 59199,
"<|3.84|>": 59200,
"<|3.86|>": 59201,
"<|3.88|>": 59202,
"<|3.90|>": 59203,
"<|3.92|>": 59204,
"<|3.94|>": 59205,
"<|3.96|>": 59206,
"<|3.98|>": 59207,
"<|4.00|>": 59208,
"<|4.02|>": 59209,
"<|4.04|>": 59210,
"<|4.06|>": 59211,
"<|4.08|>": 59212,
"<|4.10|>": 59213,
"<|4.12|>": 59214,
"<|4.14|>": 59215,
"<|4.16|>": 59216,
"<|4.18|>": 59217,
"<|4.20|>": 59218,
"<|4.22|>": 59219,
"<|4.24|>": 59220,
"<|4.26|>": 59221,
"<|4.28|>": 59222,
"<|4.30|>": 59223,
"<|4.32|>": 59224,
"<|4.34|>": 59225,
"<|4.36|>": 59226,
"<|4.38|>": 59227,
"<|4.40|>": 59228,
"<|4.42|>": 59229,
"<|4.44|>": 59230,
"<|4.46|>": 59231,
"<|4.48|>": 59232,
"<|4.50|>": 59233,
"<|4.52|>": 59234,
"<|4.54|>": 59235,
"<|4.56|>": 59236,
"<|4.58|>": 59237,
"<|4.60|>": 59238,
"<|4.62|>": 59239,
"<|4.64|>": 59240,
"<|4.66|>": 59241,
"<|4.68|>": 59242,
"<|4.70|>": 59243,
"<|4.72|>": 59244,
"<|4.74|>": 59245,
"<|4.76|>": 59246,
"<|4.78|>": 59247,
"<|4.80|>": 59248,
"<|4.82|>": 59249,
"<|4.84|>": 59250,
"<|4.86|>": 59251,
"<|4.88|>": 59252,
"<|4.90|>": 59253,
"<|4.92|>": 59254,
"<|4.94|>": 59255,
"<|4.96|>": 59256,
"<|4.98|>": 59257,
"<|5.00|>": 59258,
"<|5.02|>": 59259,
"<|5.04|>": 59260,
"<|5.06|>": 59261,
"<|5.08|>": 59262,
"<|5.10|>": 59263,
"<|5.12|>": 59264,
"<|5.14|>": 59265,
"<|5.16|>": 59266,
"<|5.18|>": 59267,
"<|5.20|>": 59268,
"<|5.22|>": 59269,
"<|5.24|>": 59270,
"<|5.26|>": 59271,
"<|5.28|>": 59272,
"<|5.30|>": 59273,
"<|5.32|>": 59274,
"<|5.34|>": 59275,
"<|5.36|>": 59276,
"<|5.38|>": 59277,
"<|5.40|>": 59278,
"<|5.42|>": 59279,
"<|5.44|>": 59280,
"<|5.46|>": 59281,
"<|5.48|>": 59282,
"<|5.50|>": 59283,
"<|5.52|>": 59284,
"<|5.54|>": 59285,
"<|5.56|>": 59286,
"<|5.58|>": 59287,
"<|5.60|>": 59288,
"<|5.62|>": 59289,
"<|5.64|>": 59290,
"<|5.66|>": 59291,
"<|5.68|>": 59292,
"<|5.70|>": 59293,
"<|5.72|>": 59294,
"<|5.74|>": 59295,
"<|5.76|>": 59296,
"<|5.78|>": 59297,
"<|5.80|>": 59298,
"<|5.82|>": 59299,
"<|5.84|>": 59300,
"<|5.86|>": 59301,
"<|5.88|>": 59302,
"<|5.90|>": 59303,
"<|5.92|>": 59304,
"<|5.94|>": 59305,
"<|5.96|>": 59306,
"<|5.98|>": 59307,
"<|6.00|>": 59308,
"<|6.02|>": 59309,
"<|6.04|>": 59310,
"<|6.06|>": 59311,
"<|6.08|>": 59312,
"<|6.10|>": 59313,
"<|6.12|>": 59314,
"<|6.14|>": 59315,
"<|6.16|>": 59316,
"<|6.18|>": 59317,
"<|6.20|>": 59318,
"<|6.22|>": 59319,
"<|6.24|>": 59320,
"<|6.26|>": 59321,
"<|6.28|>": 59322,
"<|6.30|>": 59323,
"<|6.32|>": 59324,
"<|6.34|>": 59325,
"<|6.36|>": 59326,
"<|6.38|>": 59327,
"<|6.40|>": 59328,
"<|6.42|>": 59329,
"<|6.44|>": 59330,
"<|6.46|>": 59331,
"<|6.48|>": 59332,
"<|6.50|>": 59333,
"<|6.52|>": 59334,
"<|6.54|>": 59335,
"<|6.56|>": 59336,
"<|6.58|>": 59337,
"<|6.60|>": 59338,
"<|6.62|>": 59339,
"<|6.64|>": 59340,
"<|6.66|>": 59341,
"<|6.68|>": 59342,
"<|6.70|>": 59343,
"<|6.72|>": 59344,
"<|6.74|>": 59345,
"<|6.76|>": 59346,
"<|6.78|>": 59347,
"<|6.80|>": 59348,
"<|6.82|>": 59349,
"<|6.84|>": 59350,
"<|6.86|>": 59351,
"<|6.88|>": 59352,
"<|6.90|>": 59353,
"<|6.92|>": 59354,
"<|6.94|>": 59355,
"<|6.96|>": 59356,
"<|6.98|>": 59357,
"<|7.00|>": 59358,
"<|7.02|>": 59359,
"<|7.04|>": 59360,
"<|7.06|>": 59361,
"<|7.08|>": 59362,
"<|7.10|>": 59363,
"<|7.12|>": 59364,
"<|7.14|>": 59365,
"<|7.16|>": 59366,
"<|7.18|>": 59367,
"<|7.20|>": 59368,
"<|7.22|>": 59369,
"<|7.24|>": 59370,
"<|7.26|>": 59371,
"<|7.28|>": 59372,
"<|7.30|>": 59373,
"<|7.32|>": 59374,
"<|7.34|>": 59375,
"<|7.36|>": 59376,
"<|7.38|>": 59377,
"<|7.40|>": 59378,
"<|7.42|>": 59379,
"<|7.44|>": 59380,
"<|7.46|>": 59381,
"<|7.48|>": 59382,
"<|7.50|>": 59383,
"<|7.52|>": 59384,
"<|7.54|>": 59385,
"<|7.56|>": 59386,
"<|7.58|>": 59387,
"<|7.60|>": 59388,
"<|7.62|>": 59389,
"<|7.64|>": 59390,
"<|7.66|>": 59391,
"<|7.68|>": 59392,
"<|7.70|>": 59393,
"<|7.72|>": 59394,
"<|7.74|>": 59395,
"<|7.76|>": 59396,
"<|7.78|>": 59397,
"<|7.80|>": 59398,
"<|7.82|>": 59399,
"<|7.84|>": 59400,
"<|7.86|>": 59401,
"<|7.88|>": 59402,
"<|7.90|>": 59403,
"<|7.92|>": 59404,
"<|7.94|>": 59405,
"<|7.96|>": 59406,
"<|7.98|>": 59407,
"<|8.00|>": 59408,
"<|8.02|>": 59409,
"<|8.04|>": 59410,
"<|8.06|>": 59411,
"<|8.08|>": 59412,
"<|8.10|>": 59413,
"<|8.12|>": 59414,
"<|8.14|>": 59415,
"<|8.16|>": 59416,
"<|8.18|>": 59417,
"<|8.20|>": 59418,
"<|8.22|>": 59419,
"<|8.24|>": 59420,
"<|8.26|>": 59421,
"<|8.28|>": 59422,
"<|8.30|>": 59423,
"<|8.32|>": 59424,
"<|8.34|>": 59425,
"<|8.36|>": 59426,
"<|8.38|>": 59427,
"<|8.40|>": 59428,
"<|8.42|>": 59429,
"<|8.44|>": 59430,
"<|8.46|>": 59431,
"<|8.48|>": 59432,
"<|8.50|>": 59433,
"<|8.52|>": 59434,
"<|8.54|>": 59435,
"<|8.56|>": 59436,
"<|8.58|>": 59437,
"<|8.60|>": 59438,
"<|8.62|>": 59439,
"<|8.64|>": 59440,
"<|8.66|>": 59441,
"<|8.68|>": 59442,
"<|8.70|>": 59443,
"<|8.72|>": 59444,
"<|8.74|>": 59445,
"<|8.76|>": 59446,
"<|8.78|>": 59447,
"<|8.80|>": 59448,
"<|8.82|>": 59449,
"<|8.84|>": 59450,
"<|8.86|>": 59451,
"<|8.88|>": 59452,
"<|8.90|>": 59453,
"<|8.92|>": 59454,
"<|8.94|>": 59455,
"<|8.96|>": 59456,
"<|8.98|>": 59457,
"<|9.00|>": 59458,
"<|9.02|>": 59459,
"<|9.04|>": 59460,
"<|9.06|>": 59461,
"<|9.08|>": 59462,
"<|9.10|>": 59463,
"<|9.12|>": 59464,
"<|9.14|>": 59465,
"<|9.16|>": 59466,
"<|9.18|>": 59467,
"<|9.20|>": 59468,
"<|9.22|>": 59469,
"<|9.24|>": 59470,
"<|9.26|>": 59471,
"<|9.28|>": 59472,
"<|9.30|>": 59473,
"<|9.32|>": 59474,
"<|9.34|>": 59475,
"<|9.36|>": 59476,
"<|9.38|>": 59477,
"<|9.40|>": 59478,
"<|9.42|>": 59479,
"<|9.44|>": 59480,
"<|9.46|>": 59481,
"<|9.48|>": 59482,
"<|9.50|>": 59483,
"<|9.52|>": 59484,
"<|9.54|>": 59485,
"<|9.56|>": 59486,
"<|9.58|>": 59487,
"<|9.60|>": 59488,
"<|9.62|>": 59489,
"<|9.64|>": 59490,
"<|9.66|>": 59491,
"<|9.68|>": 59492,
"<|9.70|>": 59493,
"<|9.72|>": 59494,
"<|9.74|>": 59495,
"<|9.76|>": 59496,
"<|9.78|>": 59497,
"<|9.80|>": 59498,
"<|9.82|>": 59499,
"<|9.84|>": 59500,
"<|9.86|>": 59501,
"<|9.88|>": 59502,
"<|9.90|>": 59503,
"<|9.92|>": 59504,
"<|9.94|>": 59505,
"<|9.96|>": 59506,
"<|9.98|>": 59507,
"<|10.00|>": 59508,
"<|10.02|>": 59509,
"<|10.04|>": 59510,
"<|10.06|>": 59511,
"<|10.08|>": 59512,
"<|10.10|>": 59513,
"<|10.12|>": 59514,
"<|10.14|>": 59515,
"<|10.16|>": 59516,
"<|10.18|>": 59517,
"<|10.20|>": 59518,
"<|10.22|>": 59519,
"<|10.24|>": 59520,
"<|10.26|>": 59521,
"<|10.28|>": 59522,
"<|10.30|>": 59523,
"<|10.32|>": 59524,
"<|10.34|>": 59525,
"<|10.36|>": 59526,
"<|10.38|>": 59527,
"<|10.40|>": 59528,
"<|10.42|>": 59529,
"<|10.44|>": 59530,
"<|10.46|>": 59531,
"<|10.48|>": 59532,
"<|10.50|>": 59533,
"<|10.52|>": 59534,
"<|10.54|>": 59535,
"<|10.56|>": 59536,
"<|10.58|>": 59537,
"<|10.60|>": 59538,
"<|10.62|>": 59539,
"<|10.64|>": 59540,
"<|10.66|>": 59541,
"<|10.68|>": 59542,
"<|10.70|>": 59543,
"<|10.72|>": 59544,
"<|10.74|>": 59545,
"<|10.76|>": 59546,
"<|10.78|>": 59547,
"<|10.80|>": 59548,
"<|10.82|>": 59549,
"<|10.84|>": 59550,
"<|10.86|>": 59551,
"<|10.88|>": 59552,
"<|10.90|>": 59553,
"<|10.92|>": 59554,
"<|10.94|>": 59555,
"<|10.96|>": 59556,
"<|10.98|>": 59557,
"<|11.00|>": 59558,
"<|11.02|>": 59559,
"<|11.04|>": 59560,
"<|11.06|>": 59561,
"<|11.08|>": 59562,
"<|11.10|>": 59563,
"<|11.12|>": 59564,
"<|11.14|>": 59565,
"<|11.16|>": 59566,
"<|11.18|>": 59567,
"<|11.20|>": 59568,
"<|11.22|>": 59569,
"<|11.24|>": 59570,
"<|11.26|>": 59571,
"<|11.28|>": 59572,
"<|11.30|>": 59573,
"<|11.32|>": 59574,
"<|11.34|>": 59575,
"<|11.36|>": 59576,
"<|11.38|>": 59577,
"<|11.40|>": 59578,
"<|11.42|>": 59579,
"<|11.44|>": 59580,
"<|11.46|>": 59581,
"<|11.48|>": 59582,
"<|11.50|>": 59583,
"<|11.52|>": 59584,
"<|11.54|>": 59585,
"<|11.56|>": 59586,
"<|11.58|>": 59587,
"<|11.60|>": 59588,
"<|11.62|>": 59589,
"<|11.64|>": 59590,
"<|11.66|>": 59591,
"<|11.68|>": 59592,
"<|11.70|>": 59593,
"<|11.72|>": 59594,
"<|11.74|>": 59595,
"<|11.76|>": 59596,
"<|11.78|>": 59597,
"<|11.80|>": 59598,
"<|11.82|>": 59599,
"<|11.84|>": 59600,
"<|11.86|>": 59601,
"<|11.88|>": 59602,
"<|11.90|>": 59603,
"<|11.92|>": 59604,
"<|11.94|>": 59605,
"<|11.96|>": 59606,
"<|11.98|>": 59607,
"<|12.00|>": 59608,
"<|12.02|>": 59609,
"<|12.04|>": 59610,
"<|12.06|>": 59611,
"<|12.08|>": 59612,
"<|12.10|>": 59613,
"<|12.12|>": 59614,
"<|12.14|>": 59615,
"<|12.16|>": 59616,
"<|12.18|>": 59617,
"<|12.20|>": 59618,
"<|12.22|>": 59619,
"<|12.24|>": 59620,
"<|12.26|>": 59621,
"<|12.28|>": 59622,
"<|12.30|>": 59623,
"<|12.32|>": 59624,
"<|12.34|>": 59625,
"<|12.36|>": 59626,
"<|12.38|>": 59627,
"<|12.40|>": 59628,
"<|12.42|>": 59629,
"<|12.44|>": 59630,
"<|12.46|>": 59631,
"<|12.48|>": 59632,
"<|12.50|>": 59633,
"<|12.52|>": 59634,
"<|12.54|>": 59635,
"<|12.56|>": 59636,
"<|12.58|>": 59637,
"<|12.60|>": 59638,
"<|12.62|>": 59639,
"<|12.64|>": 59640,
"<|12.66|>": 59641,
"<|12.68|>": 59642,
"<|12.70|>": 59643,
"<|12.72|>": 59644,
"<|12.74|>": 59645,
"<|12.76|>": 59646,
"<|12.78|>": 59647,
"<|12.80|>": 59648,
"<|12.82|>": 59649,
"<|12.84|>": 59650,
"<|12.86|>": 59651,
"<|12.88|>": 59652,
"<|12.90|>": 59653,
"<|12.92|>": 59654,
"<|12.94|>": 59655,
"<|12.96|>": 59656,
"<|12.98|>": 59657,
"<|13.00|>": 59658,
"<|13.02|>": 59659,
"<|13.04|>": 59660,
"<|13.06|>": 59661,
"<|13.08|>": 59662,
"<|13.10|>": 59663,
"<|13.12|>": 59664,
"<|13.14|>": 59665,
"<|13.16|>": 59666,
"<|13.18|>": 59667,
"<|13.20|>": 59668,
"<|13.22|>": 59669,
"<|13.24|>": 59670,
"<|13.26|>": 59671,
"<|13.28|>": 59672,
"<|13.30|>": 59673,
"<|13.32|>": 59674,
"<|13.34|>": 59675,
"<|13.36|>": 59676,
"<|13.38|>": 59677,
"<|13.40|>": 59678,
"<|13.42|>": 59679,
"<|13.44|>": 59680,
"<|13.46|>": 59681,
"<|13.48|>": 59682,
"<|13.50|>": 59683,
"<|13.52|>": 59684,
"<|13.54|>": 59685,
"<|13.56|>": 59686,
"<|13.58|>": 59687,
"<|13.60|>": 59688,
"<|13.62|>": 59689,
"<|13.64|>": 59690,
"<|13.66|>": 59691,
"<|13.68|>": 59692,
"<|13.70|>": 59693,
"<|13.72|>": 59694,
"<|13.74|>": 59695,
"<|13.76|>": 59696,
"<|13.78|>": 59697,
"<|13.80|>": 59698,
"<|13.82|>": 59699,
"<|13.84|>": 59700,
"<|13.86|>": 59701,
"<|13.88|>": 59702,
"<|13.90|>": 59703,
"<|13.92|>": 59704,
"<|13.94|>": 59705,
"<|13.96|>": 59706,
"<|13.98|>": 59707,
"<|14.00|>": 59708,
"<|14.02|>": 59709,
"<|14.04|>": 59710,
"<|14.06|>": 59711,
"<|14.08|>": 59712,
"<|14.10|>": 59713,
"<|14.12|>": 59714,
"<|14.14|>": 59715,
"<|14.16|>": 59716,
"<|14.18|>": 59717,
"<|14.20|>": 59718,
"<|14.22|>": 59719,
"<|14.24|>": 59720,
"<|14.26|>": 59721,
"<|14.28|>": 59722,
"<|14.30|>": 59723,
"<|14.32|>": 59724,
"<|14.34|>": 59725,
"<|14.36|>": 59726,
"<|14.38|>": 59727,
"<|14.40|>": 59728,
"<|14.42|>": 59729,
"<|14.44|>": 59730,
"<|14.46|>": 59731,
"<|14.48|>": 59732,
"<|14.50|>": 59733,
"<|14.52|>": 59734,
"<|14.54|>": 59735,
"<|14.56|>": 59736,
"<|14.58|>": 59737,
"<|14.60|>": 59738,
"<|14.62|>": 59739,
"<|14.64|>": 59740,
"<|14.66|>": 59741,
"<|14.68|>": 59742,
"<|14.70|>": 59743,
"<|14.72|>": 59744,
"<|14.74|>": 59745,
"<|14.76|>": 59746,
"<|14.78|>": 59747,
"<|14.80|>": 59748,
"<|14.82|>": 59749,
"<|14.84|>": 59750,
"<|14.86|>": 59751,
"<|14.88|>": 59752,
"<|14.90|>": 59753,
"<|14.92|>": 59754,
"<|14.94|>": 59755,
"<|14.96|>": 59756,
"<|14.98|>": 59757,
"<|15.00|>": 59758,
"<|15.02|>": 59759,
"<|15.04|>": 59760,
"<|15.06|>": 59761,
"<|15.08|>": 59762,
"<|15.10|>": 59763,
"<|15.12|>": 59764,
"<|15.14|>": 59765,
"<|15.16|>": 59766,
"<|15.18|>": 59767,
"<|15.20|>": 59768,
"<|15.22|>": 59769,
"<|15.24|>": 59770,
"<|15.26|>": 59771,
"<|15.28|>": 59772,
"<|15.30|>": 59773,
"<|15.32|>": 59774,
"<|15.34|>": 59775,
"<|15.36|>": 59776,
"<|15.38|>": 59777,
"<|15.40|>": 59778,
"<|15.42|>": 59779,
"<|15.44|>": 59780,
"<|15.46|>": 59781,
"<|15.48|>": 59782,
"<|15.50|>": 59783,
"<|15.52|>": 59784,
"<|15.54|>": 59785,
"<|15.56|>": 59786,
"<|15.58|>": 59787,
"<|15.60|>": 59788,
"<|15.62|>": 59789,
"<|15.64|>": 59790,
"<|15.66|>": 59791,
"<|15.68|>": 59792,
"<|15.70|>": 59793,
"<|15.72|>": 59794,
"<|15.74|>": 59795,
"<|15.76|>": 59796,
"<|15.78|>": 59797,
"<|15.80|>": 59798,
"<|15.82|>": 59799,
"<|15.84|>": 59800,
"<|15.86|>": 59801,
"<|15.88|>": 59802,
"<|15.90|>": 59803,
"<|15.92|>": 59804,
"<|15.94|>": 59805,
"<|15.96|>": 59806,
"<|15.98|>": 59807,
"<|16.00|>": 59808,
"<|16.02|>": 59809,
"<|16.04|>": 59810,
"<|16.06|>": 59811,
"<|16.08|>": 59812,
"<|16.10|>": 59813,
"<|16.12|>": 59814,
"<|16.14|>": 59815,
"<|16.16|>": 59816,
"<|16.18|>": 59817,
"<|16.20|>": 59818,
"<|16.22|>": 59819,
"<|16.24|>": 59820,
"<|16.26|>": 59821,
"<|16.28|>": 59822,
"<|16.30|>": 59823,
"<|16.32|>": 59824,
"<|16.34|>": 59825,
"<|16.36|>": 59826,
"<|16.38|>": 59827,
"<|16.40|>": 59828,
"<|16.42|>": 59829,
"<|16.44|>": 59830,
"<|16.46|>": 59831,
"<|16.48|>": 59832,
"<|16.50|>": 59833,
"<|16.52|>": 59834,
"<|16.54|>": 59835,
"<|16.56|>": 59836,
"<|16.58|>": 59837,
"<|16.60|>": 59838,
"<|16.62|>": 59839,
"<|16.64|>": 59840,
"<|16.66|>": 59841,
"<|16.68|>": 59842,
"<|16.70|>": 59843,
"<|16.72|>": 59844,
"<|16.74|>": 59845,
"<|16.76|>": 59846,
"<|16.78|>": 59847,
"<|16.80|>": 59848,
"<|16.82|>": 59849,
"<|16.84|>": 59850,
"<|16.86|>": 59851,
"<|16.88|>": 59852,
"<|16.90|>": 59853,
"<|16.92|>": 59854,
"<|16.94|>": 59855,
"<|16.96|>": 59856,
"<|16.98|>": 59857,
"<|17.00|>": 59858,
"<|17.02|>": 59859,
"<|17.04|>": 59860,
"<|17.06|>": 59861,
"<|17.08|>": 59862,
"<|17.10|>": 59863,
"<|17.12|>": 59864,
"<|17.14|>": 59865,
"<|17.16|>": 59866,
"<|17.18|>": 59867,
"<|17.20|>": 59868,
"<|17.22|>": 59869,
"<|17.24|>": 59870,
"<|17.26|>": 59871,
"<|17.28|>": 59872,
"<|17.30|>": 59873,
"<|17.32|>": 59874,
"<|17.34|>": 59875,
"<|17.36|>": 59876,
"<|17.38|>": 59877,
"<|17.40|>": 59878,
"<|17.42|>": 59879,
"<|17.44|>": 59880,
"<|17.46|>": 59881,
"<|17.48|>": 59882,
"<|17.50|>": 59883,
"<|17.52|>": 59884,
"<|17.54|>": 59885,
"<|17.56|>": 59886,
"<|17.58|>": 59887,
"<|17.60|>": 59888,
"<|17.62|>": 59889,
"<|17.64|>": 59890,
"<|17.66|>": 59891,
"<|17.68|>": 59892,
"<|17.70|>": 59893,
"<|17.72|>": 59894,
"<|17.74|>": 59895,
"<|17.76|>": 59896,
"<|17.78|>": 59897,
"<|17.80|>": 59898,
"<|17.82|>": 59899,
"<|17.84|>": 59900,
"<|17.86|>": 59901,
"<|17.88|>": 59902,
"<|17.90|>": 59903,
"<|17.92|>": 59904,
"<|17.94|>": 59905,
"<|17.96|>": 59906,
"<|17.98|>": 59907,
"<|18.00|>": 59908,
"<|18.02|>": 59909,
"<|18.04|>": 59910,
"<|18.06|>": 59911,
"<|18.08|>": 59912,
"<|18.10|>": 59913,
"<|18.12|>": 59914,
"<|18.14|>": 59915,
"<|18.16|>": 59916,
"<|18.18|>": 59917,
"<|18.20|>": 59918,
"<|18.22|>": 59919,
"<|18.24|>": 59920,
"<|18.26|>": 59921,
"<|18.28|>": 59922,
"<|18.30|>": 59923,
"<|18.32|>": 59924,
"<|18.34|>": 59925,
"<|18.36|>": 59926,
"<|18.38|>": 59927,
"<|18.40|>": 59928,
"<|18.42|>": 59929,
"<|18.44|>": 59930,
"<|18.46|>": 59931,
"<|18.48|>": 59932,
"<|18.50|>": 59933,
"<|18.52|>": 59934,
"<|18.54|>": 59935,
"<|18.56|>": 59936,
"<|18.58|>": 59937,
"<|18.60|>": 59938,
"<|18.62|>": 59939,
"<|18.64|>": 59940,
"<|18.66|>": 59941,
"<|18.68|>": 59942,
"<|18.70|>": 59943,
"<|18.72|>": 59944,
"<|18.74|>": 59945,
"<|18.76|>": 59946,
"<|18.78|>": 59947,
"<|18.80|>": 59948,
"<|18.82|>": 59949,
"<|18.84|>": 59950,
"<|18.86|>": 59951,
"<|18.88|>": 59952,
"<|18.90|>": 59953,
"<|18.92|>": 59954,
"<|18.94|>": 59955,
"<|18.96|>": 59956,
"<|18.98|>": 59957,
"<|19.00|>": 59958,
"<|19.02|>": 59959,
"<|19.04|>": 59960,
"<|19.06|>": 59961,
"<|19.08|>": 59962,
"<|19.10|>": 59963,
"<|19.12|>": 59964,
"<|19.14|>": 59965,
"<|19.16|>": 59966,
"<|19.18|>": 59967,
"<|19.20|>": 59968,
"<|19.22|>": 59969,
"<|19.24|>": 59970,
"<|19.26|>": 59971,
"<|19.28|>": 59972,
"<|19.30|>": 59973,
"<|19.32|>": 59974,
"<|19.34|>": 59975,
"<|19.36|>": 59976,
"<|19.38|>": 59977,
"<|19.40|>": 59978,
"<|19.42|>": 59979,
"<|19.44|>": 59980,
"<|19.46|>": 59981,
"<|19.48|>": 59982,
"<|19.50|>": 59983,
"<|19.52|>": 59984,
"<|19.54|>": 59985,
"<|19.56|>": 59986,
"<|19.58|>": 59987,
"<|19.60|>": 59988,
"<|19.62|>": 59989,
"<|19.64|>": 59990,
"<|19.66|>": 59991,
"<|19.68|>": 59992,
"<|19.70|>": 59993,
"<|19.72|>": 59994,
"<|19.74|>": 59995,
"<|19.76|>": 59996,
"<|19.78|>": 59997,
"<|19.80|>": 59998,
"<|19.82|>": 59999,
"<|19.84|>": 60000,
"<|19.86|>": 60001,
"<|19.88|>": 60002,
"<|19.90|>": 60003,
"<|19.92|>": 60004,
"<|19.94|>": 60005,
"<|19.96|>": 60006,
"<|19.98|>": 60007,
"<|20.00|>": 60008,
"<|20.02|>": 60009,
"<|20.04|>": 60010,
"<|20.06|>": 60011,
"<|20.08|>": 60012,
"<|20.10|>": 60013,
"<|20.12|>": 60014,
"<|20.14|>": 60015,
"<|20.16|>": 60016,
"<|20.18|>": 60017,
"<|20.20|>": 60018,
"<|20.22|>": 60019,
"<|20.24|>": 60020,
"<|20.26|>": 60021,
"<|20.28|>": 60022,
"<|20.30|>": 60023,
"<|20.32|>": 60024,
"<|20.34|>": 60025,
"<|20.36|>": 60026,
"<|20.38|>": 60027,
"<|20.40|>": 60028,
"<|20.42|>": 60029,
"<|20.44|>": 60030,
"<|20.46|>": 60031,
"<|20.48|>": 60032,
"<|20.50|>": 60033,
"<|20.52|>": 60034,
"<|20.54|>": 60035,
"<|20.56|>": 60036,
"<|20.58|>": 60037,
"<|20.60|>": 60038,
"<|20.62|>": 60039,
"<|20.64|>": 60040,
"<|20.66|>": 60041,
"<|20.68|>": 60042,
"<|20.70|>": 60043,
"<|20.72|>": 60044,
"<|20.74|>": 60045,
"<|20.76|>": 60046,
"<|20.78|>": 60047,
"<|20.80|>": 60048,
"<|20.82|>": 60049,
"<|20.84|>": 60050,
"<|20.86|>": 60051,
"<|20.88|>": 60052,
"<|20.90|>": 60053,
"<|20.92|>": 60054,
"<|20.94|>": 60055,
"<|20.96|>": 60056,
"<|20.98|>": 60057,
"<|21.00|>": 60058,
"<|21.02|>": 60059,
"<|21.04|>": 60060,
"<|21.06|>": 60061,
"<|21.08|>": 60062,
"<|21.10|>": 60063,
"<|21.12|>": 60064,
"<|21.14|>": 60065,
"<|21.16|>": 60066,
"<|21.18|>": 60067,
"<|21.20|>": 60068,
"<|21.22|>": 60069,
"<|21.24|>": 60070,
"<|21.26|>": 60071,
"<|21.28|>": 60072,
"<|21.30|>": 60073,
"<|21.32|>": 60074,
"<|21.34|>": 60075,
"<|21.36|>": 60076,
"<|21.38|>": 60077,
"<|21.40|>": 60078,
"<|21.42|>": 60079,
"<|21.44|>": 60080,
"<|21.46|>": 60081,
"<|21.48|>": 60082,
"<|21.50|>": 60083,
"<|21.52|>": 60084,
"<|21.54|>": 60085,
"<|21.56|>": 60086,
"<|21.58|>": 60087,
"<|21.60|>": 60088,
"<|21.62|>": 60089,
"<|21.64|>": 60090,
"<|21.66|>": 60091,
"<|21.68|>": 60092,
"<|21.70|>": 60093,
"<|21.72|>": 60094,
"<|21.74|>": 60095,
"<|21.76|>": 60096,
"<|21.78|>": 60097,
"<|21.80|>": 60098,
"<|21.82|>": 60099,
"<|21.84|>": 60100,
"<|21.86|>": 60101,
"<|21.88|>": 60102,
"<|21.90|>": 60103,
"<|21.92|>": 60104,
"<|21.94|>": 60105,
"<|21.96|>": 60106,
"<|21.98|>": 60107,
"<|22.00|>": 60108,
"<|22.02|>": 60109,
"<|22.04|>": 60110,
"<|22.06|>": 60111,
"<|22.08|>": 60112,
"<|22.10|>": 60113,
"<|22.12|>": 60114,
"<|22.14|>": 60115,
"<|22.16|>": 60116,
"<|22.18|>": 60117,
"<|22.20|>": 60118,
"<|22.22|>": 60119,
"<|22.24|>": 60120,
"<|22.26|>": 60121,
"<|22.28|>": 60122,
"<|22.30|>": 60123,
"<|22.32|>": 60124,
"<|22.34|>": 60125,
"<|22.36|>": 60126,
"<|22.38|>": 60127,
"<|22.40|>": 60128,
"<|22.42|>": 60129,
"<|22.44|>": 60130,
"<|22.46|>": 60131,
"<|22.48|>": 60132,
"<|22.50|>": 60133,
"<|22.52|>": 60134,
"<|22.54|>": 60135,
"<|22.56|>": 60136,
"<|22.58|>": 60137,
"<|22.60|>": 60138,
"<|22.62|>": 60139,
"<|22.64|>": 60140,
"<|22.66|>": 60141,
"<|22.68|>": 60142,
"<|22.70|>": 60143,
"<|22.72|>": 60144,
"<|22.74|>": 60145,
"<|22.76|>": 60146,
"<|22.78|>": 60147,
"<|22.80|>": 60148,
"<|22.82|>": 60149,
"<|22.84|>": 60150,
"<|22.86|>": 60151,
"<|22.88|>": 60152,
"<|22.90|>": 60153,
"<|22.92|>": 60154,
"<|22.94|>": 60155,
"<|22.96|>": 60156,
"<|22.98|>": 60157,
"<|23.00|>": 60158,
"<|23.02|>": 60159,
"<|23.04|>": 60160,
"<|23.06|>": 60161,
"<|23.08|>": 60162,
"<|23.10|>": 60163,
"<|23.12|>": 60164,
"<|23.14|>": 60165,
"<|23.16|>": 60166,
"<|23.18|>": 60167,
"<|23.20|>": 60168,
"<|23.22|>": 60169,
"<|23.24|>": 60170,
"<|23.26|>": 60171,
"<|23.28|>": 60172,
"<|23.30|>": 60173,
"<|23.32|>": 60174,
"<|23.34|>": 60175,
"<|23.36|>": 60176,
"<|23.38|>": 60177,
"<|23.40|>": 60178,
"<|23.42|>": 60179,
"<|23.44|>": 60180,
"<|23.46|>": 60181,
"<|23.48|>": 60182,
"<|23.50|>": 60183,
"<|23.52|>": 60184,
"<|23.54|>": 60185,
"<|23.56|>": 60186,
"<|23.58|>": 60187,
"<|23.60|>": 60188,
"<|23.62|>": 60189,
"<|23.64|>": 60190,
"<|23.66|>": 60191,
"<|23.68|>": 60192,
"<|23.70|>": 60193,
"<|23.72|>": 60194,
"<|23.74|>": 60195,
"<|23.76|>": 60196,
"<|23.78|>": 60197,
"<|23.80|>": 60198,
"<|23.82|>": 60199,
"<|23.84|>": 60200,
"<|23.86|>": 60201,
"<|23.88|>": 60202,
"<|23.90|>": 60203,
"<|23.92|>": 60204,
"<|23.94|>": 60205,
"<|23.96|>": 60206,
"<|23.98|>": 60207,
"<|24.00|>": 60208,
"<|24.02|>": 60209,
"<|24.04|>": 60210,
"<|24.06|>": 60211,
"<|24.08|>": 60212,
"<|24.10|>": 60213,
"<|24.12|>": 60214,
"<|24.14|>": 60215,
"<|24.16|>": 60216,
"<|24.18|>": 60217,
"<|24.20|>": 60218,
"<|24.22|>": 60219,
"<|24.24|>": 60220,
"<|24.26|>": 60221,
"<|24.28|>": 60222,
"<|24.30|>": 60223,
"<|24.32|>": 60224,
"<|24.34|>": 60225,
"<|24.36|>": 60226,
"<|24.38|>": 60227,
"<|24.40|>": 60228,
"<|24.42|>": 60229,
"<|24.44|>": 60230,
"<|24.46|>": 60231,
"<|24.48|>": 60232,
"<|24.50|>": 60233,
"<|24.52|>": 60234,
"<|24.54|>": 60235,
"<|24.56|>": 60236,
"<|24.58|>": 60237,
"<|24.60|>": 60238,
"<|24.62|>": 60239,
"<|24.64|>": 60240,
"<|24.66|>": 60241,
"<|24.68|>": 60242,
"<|24.70|>": 60243,
"<|24.72|>": 60244,
"<|24.74|>": 60245,
"<|24.76|>": 60246,
"<|24.78|>": 60247,
"<|24.80|>": 60248,
"<|24.82|>": 60249,
"<|24.84|>": 60250,
"<|24.86|>": 60251,
"<|24.88|>": 60252,
"<|24.90|>": 60253,
"<|24.92|>": 60254,
"<|24.94|>": 60255,
"<|24.96|>": 60256,
"<|24.98|>": 60257,
"<|25.00|>": 60258,
"<|25.02|>": 60259,
"<|25.04|>": 60260,
"<|25.06|>": 60261,
"<|25.08|>": 60262,
"<|25.10|>": 60263,
"<|25.12|>": 60264,
"<|25.14|>": 60265,
"<|25.16|>": 60266,
"<|25.18|>": 60267,
"<|25.20|>": 60268,
"<|25.22|>": 60269,
"<|25.24|>": 60270,
"<|25.26|>": 60271,
"<|25.28|>": 60272,
"<|25.30|>": 60273,
"<|25.32|>": 60274,
"<|25.34|>": 60275,
"<|25.36|>": 60276,
"<|25.38|>": 60277,
"<|25.40|>": 60278,
"<|25.42|>": 60279,
"<|25.44|>": 60280,
"<|25.46|>": 60281,
"<|25.48|>": 60282,
"<|25.50|>": 60283,
"<|25.52|>": 60284,
"<|25.54|>": 60285,
"<|25.56|>": 60286,
"<|25.58|>": 60287,
"<|25.60|>": 60288,
"<|25.62|>": 60289,
"<|25.64|>": 60290,
"<|25.66|>": 60291,
"<|25.68|>": 60292,
"<|25.70|>": 60293,
"<|25.72|>": 60294,
"<|25.74|>": 60295,
"<|25.76|>": 60296,
"<|25.78|>": 60297,
"<|25.80|>": 60298,
"<|25.82|>": 60299,
"<|25.84|>": 60300,
"<|25.86|>": 60301,
"<|25.88|>": 60302,
"<|25.90|>": 60303,
"<|25.92|>": 60304,
"<|25.94|>": 60305,
"<|25.96|>": 60306,
"<|25.98|>": 60307,
"<|26.00|>": 60308,
"<|26.02|>": 60309,
"<|26.04|>": 60310,
"<|26.06|>": 60311,
"<|26.08|>": 60312,
"<|26.10|>": 60313,
"<|26.12|>": 60314,
"<|26.14|>": 60315,
"<|26.16|>": 60316,
"<|26.18|>": 60317,
"<|26.20|>": 60318,
"<|26.22|>": 60319,
"<|26.24|>": 60320,
"<|26.26|>": 60321,
"<|26.28|>": 60322,
"<|26.30|>": 60323,
"<|26.32|>": 60324,
"<|26.34|>": 60325,
"<|26.36|>": 60326,
"<|26.38|>": 60327,
"<|26.40|>": 60328,
"<|26.42|>": 60329,
"<|26.44|>": 60330,
"<|26.46|>": 60331,
"<|26.48|>": 60332,
"<|26.50|>": 60333,
"<|26.52|>": 60334,
"<|26.54|>": 60335,
"<|26.56|>": 60336,
"<|26.58|>": 60337,
"<|26.60|>": 60338,
"<|26.62|>": 60339,
"<|26.64|>": 60340,
"<|26.66|>": 60341,
"<|26.68|>": 60342,
"<|26.70|>": 60343,
"<|26.72|>": 60344,
"<|26.74|>": 60345,
"<|26.76|>": 60346,
"<|26.78|>": 60347,
"<|26.80|>": 60348,
"<|26.82|>": 60349,
"<|26.84|>": 60350,
"<|26.86|>": 60351,
"<|26.88|>": 60352,
"<|26.90|>": 60353,
"<|26.92|>": 60354,
"<|26.94|>": 60355,
"<|26.96|>": 60356,
"<|26.98|>": 60357,
"<|27.00|>": 60358,
"<|27.02|>": 60359,
"<|27.04|>": 60360,
"<|27.06|>": 60361,
"<|27.08|>": 60362,
"<|27.10|>": 60363,
"<|27.12|>": 60364,
"<|27.14|>": 60365,
"<|27.16|>": 60366,
"<|27.18|>": 60367,
"<|27.20|>": 60368,
"<|27.22|>": 60369,
"<|27.24|>": 60370,
"<|27.26|>": 60371,
"<|27.28|>": 60372,
"<|27.30|>": 60373,
"<|27.32|>": 60374,
"<|27.34|>": 60375,
"<|27.36|>": 60376,
"<|27.38|>": 60377,
"<|27.40|>": 60378,
"<|27.42|>": 60379,
"<|27.44|>": 60380,
"<|27.46|>": 60381,
"<|27.48|>": 60382,
"<|27.50|>": 60383,
"<|27.52|>": 60384,
"<|27.54|>": 60385,
"<|27.56|>": 60386,
"<|27.58|>": 60387,
"<|27.60|>": 60388,
"<|27.62|>": 60389,
"<|27.64|>": 60390,
"<|27.66|>": 60391,
"<|27.68|>": 60392,
"<|27.70|>": 60393,
"<|27.72|>": 60394,
"<|27.74|>": 60395,
"<|27.76|>": 60396,
"<|27.78|>": 60397,
"<|27.80|>": 60398,
"<|27.82|>": 60399,
"<|27.84|>": 60400,
"<|27.86|>": 60401,
"<|27.88|>": 60402,
"<|27.90|>": 60403,
"<|27.92|>": 60404,
"<|27.94|>": 60405,
"<|27.96|>": 60406,
"<|27.98|>": 60407,
"<|28.00|>": 60408,
"<|28.02|>": 60409,
"<|28.04|>": 60410,
"<|28.06|>": 60411,
"<|28.08|>": 60412,
"<|28.10|>": 60413,
"<|28.12|>": 60414,
"<|28.14|>": 60415,
"<|28.16|>": 60416,
"<|28.18|>": 60417,
"<|28.20|>": 60418,
"<|28.22|>": 60419,
"<|28.24|>": 60420,
"<|28.26|>": 60421,
"<|28.28|>": 60422,
"<|28.30|>": 60423,
"<|28.32|>": 60424,
"<|28.34|>": 60425,
"<|28.36|>": 60426,
"<|28.38|>": 60427,
"<|28.40|>": 60428,
"<|28.42|>": 60429,
"<|28.44|>": 60430,
"<|28.46|>": 60431,
"<|28.48|>": 60432,
"<|28.50|>": 60433,
"<|28.52|>": 60434,
"<|28.54|>": 60435,
"<|28.56|>": 60436,
"<|28.58|>": 60437,
"<|28.60|>": 60438,
"<|28.62|>": 60439,
"<|28.64|>": 60440,
"<|28.66|>": 60441,
"<|28.68|>": 60442,
"<|28.70|>": 60443,
"<|28.72|>": 60444,
"<|28.74|>": 60445,
"<|28.76|>": 60446,
"<|28.78|>": 60447,
"<|28.80|>": 60448,
"<|28.82|>": 60449,
"<|28.84|>": 60450,
"<|28.86|>": 60451,
"<|28.88|>": 60452,
"<|28.90|>": 60453,
"<|28.92|>": 60454,
"<|28.94|>": 60455,
"<|28.96|>": 60456,
"<|28.98|>": 60457,
"<|29.00|>": 60458,
"<|29.02|>": 60459,
"<|29.04|>": 60460,
"<|29.06|>": 60461,
"<|29.08|>": 60462,
"<|29.10|>": 60463,
"<|29.12|>": 60464,
"<|29.14|>": 60465,
"<|29.16|>": 60466,
"<|29.18|>": 60467,
"<|29.20|>": 60468,
"<|29.22|>": 60469,
"<|29.24|>": 60470,
"<|29.26|>": 60471,
"<|29.28|>": 60472,
"<|29.30|>": 60473,
"<|29.32|>": 60474,
"<|29.34|>": 60475,
"<|29.36|>": 60476,
"<|29.38|>": 60477,
"<|29.40|>": 60478,
"<|29.42|>": 60479,
"<|29.44|>": 60480,
"<|29.46|>": 60481,
"<|29.48|>": 60482,
"<|29.50|>": 60483,
"<|29.52|>": 60484,
"<|29.54|>": 60485,
"<|29.56|>": 60486,
"<|29.58|>": 60487,
"<|29.60|>": 60488,
"<|29.62|>": 60489,
"<|29.64|>": 60490,
"<|29.66|>": 60491,
"<|29.68|>": 60492,
"<|29.70|>": 60493,
"<|29.72|>": 60494,
"<|29.74|>": 60495,
"<|29.76|>": 60496,
"<|29.78|>": 60497,
"<|29.80|>": 60498,
"<|29.82|>": 60499,
"<|29.84|>": 60500,
"<|29.86|>": 60501,
"<|29.88|>": 60502,
"<|29.90|>": 60503,
"<|29.92|>": 60504,
"<|29.94|>": 60505,
"<|29.96|>": 60506,
"<|29.98|>": 60507,
"<|30.00|>": 60508
},
"languages": {
"en": 0,
"zh": 1,
"de": 2,
"es": 3,
"ru": 4,
"ko": 5,
"fr": 6,
"ja": 7,
"pt": 8,
"tr": 9,
"pl": 10,
"ca": 11,
"nl": 12,
"ar": 13,
"sv": 14,
"it": 15,
"id": 16,
"hi": 17,
"fi": 18,
"vi": 19,
"he": 20,
"uk": 21,
"el": 22,
"ms": 23,
"cs": 24,
"ro": 25,
"da": 26,
"hu": 27,
"ta": 28,
"no": 29,
"th": 30,
"ur": 31,
"hr": 32,
"bg": 33,
"lt": 34,
"la": 35,
"mi": 36,
"ml": 37,
"cy": 38,
"sk": 39,
"te": 40,
"fa": 41,
"lv": 42,
"bn": 43,
"sr": 44,
"az": 45,
"sl": 46,
"kn": 47,
"et": 48,
"mk": 49,
"br": 50,
"eu": 51,
"is": 52,
"hy": 53,
"ne": 54,
"mn": 55,
"bs": 56,
"kk": 57,
"sq": 58,
"sw": 59,
"gl": 60,
"mr": 61,
"pa": 62,
"si": 63,
"km": 64,
"sn": 65,
"yo": 66,
"so": 67,
"af": 68,
"oc": 69,
"ka": 70,
"be": 71,
"tg": 72,
"sd": 73,
"gu": 74,
"am": 75,
"yi": 76,
"lo": 77,
"uz": 78,
"fo": 79,
"ht": 80,
"ps": 81,
"tk": 82,
"nn": 83,
"mt": 84,
"sa": 85,
"lb": 86,
"my": 87,
"bo": 88,
"tl": 89,
"mg": 90,
"as": 91,
"tt": 92,
"haw": 93,
"ln": 94,
"ha": 95,
"ba": 96,
"jw": 97,
"su": 98,
"yue": 99,
"minnan": 100,
"wuyu": 101,
"dialect": 102,
"zh/en": 103,
"en/zh": 104,
"common": 105
}
}1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798"""A minimal TensorRT engine runner: numpy in, numpy out (tensorrt-cu12 10.x and polygraphy; no torch).
from trt_runner import Engine e = Engine("model.engine") out = e({"input": x}) # dict of output name -> numpy array"""from __future__ import annotations
from pathlib import Path
import numpy as np
def lean_dlls(): """Version-compatible engines are built against and run on TensorRT's lean runtime (pip tensorrt-lean-cu12): put its DLL folder on the search path (Windows).""" import importlib.util import os spec = importlib.util.find_spec("tensorrt_lean_libs") if spec and spec.submodule_search_locations: d = list(spec.submodule_search_locations)[0] os.environ["PATH"] = d + os.pathsep + os.environ.get("PATH", "") if hasattr(os, "add_dll_directory"): os.add_dll_directory(d)
class Engine: """allocation: "static" (memory for the profiles' largest shapes, reserved once) or "runtime" (sized to each call's shapes: for pipelines of many engines with wide profiles, which would otherwise reserve every engine's maximum)."""
def __init__(self, path, allocation="static"): lean_dlls() import tensorrt as trt from polygraphy.backend.trt import TrtRunner self.trt = trt logger = trt.Logger(trt.Logger.WARNING) runtime = trt.Runtime(logger) runtime.engine_host_code_allowed = True # version-compatible engines carry their own lean runtime engine = runtime.deserialize_cuda_engine(Path(path).read_bytes()) if engine is None: raise RuntimeError(f"could not load {path} (TensorRT {trt.__version__}; the engine needs TensorRT 10.x " "and an RTX 30-series or newer GPU)") self.engine = engine self.runner = TrtRunner(engine, allocation_strategy=allocation) self.runner.activate() self.inputs = [engine.get_tensor_name(i) for i in range(engine.num_io_tensors) if engine.get_tensor_mode(engine.get_tensor_name(i)) == trt.TensorIOMode.INPUT]
def __call__(self, feed: dict) -> dict: feed = {k: np.ascontiguousarray(v) for k, v in feed.items() if k in self.inputs} out = self.runner.infer(feed, check_inputs=True) return {k: np.array(v) for k, v in out.items()}
def close(self): """Release the engine's device memory and weights now (deactivating the runner alone keeps the weights on the GPU until the engine object is collected).""" runner = getattr(self, "runner", None) if runner is not None and runner.is_active: runner.deactivate() self.runner = self.engine = None
def __del__(self): try: self.close() except Exception: pass
class OrtLike: """An engine behind onnxruntime's InferenceSession calls (run / get_inputs / get_outputs / get_providers), so a pipeline.py written for ONNX Runtime runs its graphs on TensorRT unchanged. Outputs come back in the order the ONNX graph listed them (pass `outputs`), else in the engine's order."""
def __init__(self, path, outputs=None, allocation="static"): self.e = Engine(path, allocation) eng = self.e.engine names = [eng.get_tensor_name(i) for i in range(eng.num_io_tensors)] self.outs = list(outputs) if outputs else [n for n in names if n not in self.e.inputs]
def get_inputs(self): """name, type ("tensor(float16)" etc., as onnxruntime spells it) and shape (-1 for dynamic dimensions).""" from types import SimpleNamespace eng, trt = self.e.engine, self.e.trt names = {trt.float16: "float16", trt.float32: "float", trt.int64: "int64", trt.int32: "int32", trt.bool: "bool", trt.int8: "int8", trt.bfloat16: "bfloat16"} return [SimpleNamespace(name=n, type=f"tensor({names.get(eng.get_tensor_dtype(n), 'float')})", shape=list(eng.get_tensor_shape(n))) for n in self.e.inputs]
def get_outputs(self): from types import SimpleNamespace return [SimpleNamespace(name=n) for n in self.outs]
def get_providers(self): return ["TensorRT"]
def run(self, names, feed, run_options=None): out = self.e(feed) return [out[n] for n in (names or self.outs)]123version https://git-lfs.github.com/spec/v1oid sha256:24d2fb18d0c254c8552aa45629aebf7e8f842c2dcae2e272ee20323b7720a6a3size 569629188.gitattributes+12
fp16/campplus.engineAdded+3
fp16/codec.engineAdded+3
fp16/decoder_0.engineAdded+3
fp16/decoder_1.engineAdded+3
fp16/decoder_split.jsonAdded+178
fp16/device_chain.pyAdded+188
fp16/embed.engineAdded+3
fp16/emovec.engineAdded+3
fp16/estimator.engineAdded+3
fp16/estimator_long.engineAdded+3
fp16/pipeline.pyAdded+471
fp16/pipeline_trt.pyAdded+122
fp16/prefix.engineAdded+3
fp16/regulator.engineAdded+3
fp16/semantic.engineAdded+3
fp16/tokenizer.jsonAdded+1787
fp16/tokenizer.tiktokenAdded
fp16/trt_runner.pyAdded+98
fp16/vocoder.engineAdded+3