From d0d1efb386453e7c3331c3ddc0eeb7b5b68780c9 Mon Sep 17 00:00:00 2001 From: 70sh1 <70sh1@proton.me> Date: Sat, 28 Nov 2026 04:11:21 +0300 Subject: [PATCH 01/13] gigaam: add GigaAM-v4 Zapformer encoder and GGUF converter --- scripts/convert-gigaam-v4.py | 381 +++++++++++++++++++++++++++++++++++ src/arch/gigaam/encoder.cpp | 316 +++++++++++++++++++++++++++++ src/arch/gigaam/encoder.h | 6 + src/arch/gigaam/model.cpp | 24 ++- src/arch/gigaam/weights.cpp | 367 ++++++++++++++++++++++++++------- src/arch/gigaam/weights.h | 87 +++++++- src/transcribe-meta.cpp | 24 +++ src/transcribe-meta.h | 1 + 8 files changed, 1130 insertions(+), 76 deletions(-) create mode 100644 scripts/convert-gigaam-v4.py diff --git a/scripts/convert-gigaam-v4.py b/scripts/convert-gigaam-v4.py new file mode 100644 index 000000000..9874b2a12 --- /dev/null +++ b/scripts/convert-gigaam-v4.py @@ -0,0 +1,381 @@ +#!/usr/bin/env python3 +"""convert-gigaam-v4.py - convert an ai-sage/GigaAM-v4 checkpoint directory +(model.safetensors + config.json + {e2e,raw}_tokenizer.model) into a GGUF +for transcribe.cpp's Zapformer GigaAM backend. + +Output is an F32 reference GGUF; use tools/transcribe-quantize to produce +F16, Q8_0, Q6_K, Q5_K_M, or Q4_K_M deployment files. +""" + +from __future__ import annotations + +import argparse +import json +import sys +from pathlib import Path + +import numpy as np +import sentencepiece as spm +from gguf import GGMLQuantizationType, LlamaFileType +from safetensors.numpy import load_file + +sys.path.insert(0, str(Path(__file__).resolve().parent)) +from lib.gguf_common import ( # noqa: E402 + TOKEN_TYPE_BYTE, + TOKEN_TYPE_CONTROL, + TOKEN_TYPE_NORMAL, + TOKEN_TYPE_UNKNOWN, + TOKEN_TYPE_UNUSED, + add_general_identity, + gguf_writer, + safe_id, +) + + +def parse_int_list(value) -> list[int]: + if isinstance(value, str): + return [int(x.strip()) for x in value.split(",")] + if isinstance(value, int): + return [value] + return [int(x) for x in value] + + +def extract_sp_tokenizer(sp_path: Path, blank_piece: str = "") -> dict: + sp = spm.SentencePieceProcessor(model_file=str(sp_path)) + vocab_size = sp.vocab_size() + tokens: list[str] = [] + scores: list[float] = [] + types: list[int] = [] + for i in range(vocab_size): + tokens.append(sp.id_to_piece(i)) + scores.append(float(sp.get_score(i))) + if sp.is_unknown(i): + ttype = TOKEN_TYPE_UNKNOWN + elif sp.is_control(i): + ttype = TOKEN_TYPE_CONTROL + elif sp.is_unused(i): + ttype = TOKEN_TYPE_UNUSED + elif sp.is_byte(i): + ttype = TOKEN_TYPE_BYTE + else: + ttype = TOKEN_TYPE_NORMAL + types.append(ttype) + + tokens.append(blank_piece) + scores.append(0.0) + types.append(TOKEN_TYPE_CONTROL) + return { + "tokens": tokens, + "scores": scores, + "types": types, + "unk_id": safe_id(sp.unk_id), + "bos_id": safe_id(sp.bos_id), + "eos_id": safe_id(sp.eos_id), + "blank_id": vocab_size, + } + + +def convert(model_dir: Path, out_path: Path, head: str, repo_id: str) -> None: + cfg_path = model_dir / "config.json" + st_path = model_dir / "model.safetensors" + with open(cfg_path, encoding="utf-8") as f: + root_cfg = json.load(f) + cfg = root_cfg["cfg"] + enc_cfg = cfg["encoder"] + pre_cfg = cfg["preprocessor"] + head_cfg = cfg["heads"][head] + dec_cfg = cfg["decodings"][head] + + tok_path = model_dir / dec_cfg["model_path"] + tok = extract_sp_tokenizer(tok_path) + + sd = load_file(str(st_path)) + sd_keys = set(sd.keys()) + + def get_f32(key: str) -> np.ndarray: + if key not in sd: + raise KeyError(f"missing tensor {key!r}") + return np.ascontiguousarray(sd[key].astype(np.float32)) + + # Encoder structure + frontend_channels = parse_int_list(enc_cfg["frontend_channels"]) + stage_layers = parse_int_list(enc_cfg["num_encoder_layers"]) + stage_dims = parse_int_list(enc_cfg["encoder_dim"]) + stage_heads = parse_int_list(enc_cfg["num_heads"]) + stage_qdim = parse_int_list(enc_cfg["query_head_dim"]) + stage_vdim = parse_int_list(enc_cfg["value_head_dim"]) + stage_ff_mult = parse_int_list(enc_cfg["feedforward_multiple"]) + stage_conv_kernel = parse_int_list(enc_cfg["conv_params"]) + stage_downsampling = parse_int_list(enc_cfg["downsampling_factor"]) + causal_frontend = bool(enc_cfg.get("causal_frontend", True)) + activation = str(enc_cfg.get("activation", "SiLU")).lower() + if activation != "silu": + raise ValueError(f"unsupported Zapformer activation {activation!r} (only SiLU implemented)") + + feat_in = int(enc_cfg["in_channels"]) + d_model = stage_dims[0] + if stage_dims[-1] != d_model: + raise ValueError(f"expected final stage dim {stage_dims[-1]} == {d_model}") + + # RNN-T head hparams + pred_cfg = head_cfg["decoder"] + joint_cfg = head_cfg["joint"] + pred_hidden = int(pred_cfg["pred_hidden"]) + pred_n_layers = int(pred_cfg["pred_rnn_layers"]) + pred_vocab = int(pred_cfg["num_classes"]) + joint_hidden = int(joint_cfg["joint_hidden"]) + joint_n_classes = int(joint_cfg["num_classes"]) + if len(tok["tokens"]) != pred_vocab or tok["blank_id"] != pred_vocab - 1: + raise ValueError( + f"tokenizer size {len(tok['tokens'])} / blank {tok['blank_id']} != pred_vocab {pred_vocab}" + ) + + # Preprocessor hparams + sample_rate = int(pre_cfg["sample_rate"]) + n_fft = int(pre_cfg["n_fft"]) + win_length = int(pre_cfg["win_length"]) + hop_length = int(pre_cfg["hop_length"]) + n_mels = int(pre_cfg["features"]) + center = bool(pre_cfg.get("center", False)) + mel_scale = str(pre_cfg["mel_scale"]) + mel_norm_raw = pre_cfg.get("mel_norm") + fe_mel_norm = mel_scale if mel_norm_raw is None else f"{mel_scale}+{mel_norm_raw}" + + # Stage scalar/small-vector parameters stored as KVs (avoids quantizer edge cases) + n_stages = len(stage_layers) + stage_input_scales: list[float] = [] + stage_residual_scales: list[list[float]] = [] + for s in range(n_stages): + inp_s = get_f32(f"model.encoder.encoder.encoders.{s}.input_scale") + res_s = get_f32(f"model.encoder.encoder.encoders.{s}.residual_scales") + stage_input_scales.append(float(inp_s.reshape(-1)[0])) + stage_residual_scales.append([float(v) for v in res_s.reshape(-1)]) + out_norm_scale = float(get_f32("model.encoder.encoder.out_norm.scale").reshape(-1)[0]) + out_norm_eps = float(get_f32("model.encoder.encoder.out_norm.eps").reshape(-1)[0]) + + # Frontend buffers (mel filterbank transposed [161, 64] -> [64, 161]) + fb = np.ascontiguousarray(get_f32("model.preprocessor.featurizer.0.mel_scale.fb").T) + window = get_f32("model.preprocessor.featurizer.0.spectrogram.window") + + variant = f"gigaam-v4-{head}-rnnt" + display_name = f"GigaAM v4 {'E2E' if head == 'e2e' else 'Raw'}-RNN-T" + + # Compute parameter count for size_label (encoder + selected head) + total_params = sum( + int(np.prod(sd[k].shape)) + for k in sd_keys + if (k.startswith("model.encoder.") and "rope_bank" not in k) + or k.startswith(f"model.heads.{head}.") + ) + size_label = f"{total_params / 1_000_000:.0f}M" + print(f"Converting {variant} ({total_params:,} params -> {size_label}) -> {out_path}") + + out_path.parent.mkdir(parents=True, exist_ok=True) + writer = gguf_writer(str(out_path), "gigaam") + + add_general_identity( + writer, + name=display_name, + basename="gigaam-v4", + size_label=size_label, + version="v4", + file_type=LlamaFileType.ALL_F32, + languages=["ru", "en"], + author="Salute Developers", + organization="ai-sage", + license="mit", + license_name="MIT License", + license_link="https://opensource.org/license/mit", + repo_url=f"https://huggingface.co/{repo_id}", + ) + + writer.add_string("stt.variant", variant) + writer.add_bool("stt.capability.translate", False) + writer.add_bool("stt.capability.lang_detect", False) + writer.add_bool("stt.capability.streaming", False) + writer.add_string("stt.gigaam.head_kind", "rnnt") + + # Tokenizer + writer.add_string("tokenizer.ggml.model", "bpe") + writer.add_array("tokenizer.ggml.tokens", tok["tokens"]) + writer.add_array("tokenizer.ggml.scores", tok["scores"]) + writer.add_array("tokenizer.ggml.token_type", tok["types"]) + if tok["unk_id"] is not None: + writer.add_uint32("tokenizer.ggml.unknown_token_id", tok["unk_id"]) + if tok["bos_id"] is not None: + writer.add_uint32("tokenizer.ggml.bos_token_id", tok["bos_id"]) + if tok["eos_id"] is not None: + writer.add_uint32("tokenizer.ggml.eos_token_id", tok["eos_id"]) + writer.add_uint32("tokenizer.ggml.blank_token_id", tok["blank_id"]) + + # Zapformer encoder metadata + writer.add_string("stt.gigaam.encoder.type", "zapformer") + writer.add_uint32("stt.gigaam.encoder.n_layers", sum(stage_layers)) + writer.add_uint32("stt.gigaam.encoder.d_model", d_model) + writer.add_uint32("stt.gigaam.encoder.feat_in", feat_in) + writer.add_uint32("stt.gigaam.encoder.subsampling_factor", 4) + writer.add_bool("stt.gigaam.encoder.causal_frontend", causal_frontend) + writer.add_array("stt.gigaam.encoder.frontend_channels", frontend_channels) + writer.add_array("stt.gigaam.encoder.stage_layers", stage_layers) + writer.add_array("stt.gigaam.encoder.stage_dims", stage_dims) + writer.add_array("stt.gigaam.encoder.stage_heads", stage_heads) + writer.add_array("stt.gigaam.encoder.stage_qdim", stage_qdim) + writer.add_array("stt.gigaam.encoder.stage_vdim", stage_vdim) + writer.add_array("stt.gigaam.encoder.stage_ff_mult", stage_ff_mult) + writer.add_array("stt.gigaam.encoder.stage_conv_kernel", stage_conv_kernel) + writer.add_array("stt.gigaam.encoder.stage_downsampling", stage_downsampling) + writer.add_array("stt.gigaam.encoder.stage_input_scales", stage_input_scales) + for s in range(n_stages): + writer.add_array( + f"stt.gigaam.encoder.stage_{s}.residual_scales", + stage_residual_scales[s], + ) + writer.add_float32("stt.gigaam.encoder.out_norm.scale", out_norm_scale) + writer.add_float32("stt.gigaam.encoder.out_norm.eps", out_norm_eps) + writer.add_float32("stt.gigaam.encoder.rope_base", 10000.0) + + # RNN-T predictor + joint + writer.add_uint32("stt.gigaam.predictor.hidden", pred_hidden) + writer.add_uint32("stt.gigaam.predictor.n_layers", pred_n_layers) + writer.add_uint32("stt.gigaam.predictor.vocab", pred_vocab) + writer.add_uint32("stt.gigaam.joint.hidden", joint_hidden) + writer.add_uint32("stt.gigaam.joint.num_classes", joint_n_classes) + writer.add_string("stt.gigaam.joint.activation", "relu") + + # Frontend metadata (same contract as GigaAM v3) + writer.add_string("stt.frontend.type", "mel") + writer.add_uint32("stt.frontend.num_mels", n_mels) + writer.add_uint32("stt.frontend.sample_rate", sample_rate) + writer.add_uint32("stt.frontend.n_fft", n_fft) + writer.add_uint32("stt.frontend.win_length", win_length) + writer.add_uint32("stt.frontend.hop_length", hop_length) + writer.add_string("stt.frontend.window", "hann_periodic") + writer.add_string("stt.frontend.normalize", "none") + writer.add_float32("stt.frontend.dither", 0.0) + writer.add_float32("stt.frontend.pre_emphasis", 0.0) + writer.add_float32("stt.frontend.f_min", float(pre_cfg.get("lowfreq", 0.0))) + writer.add_float32("stt.frontend.f_max", float(pre_cfg.get("highfreq", sample_rate / 2.0))) + writer.add_bool("stt.frontend.center", center) + writer.add_string("stt.frontend.mel_norm", fe_mel_norm) + writer.add_float32("stt.frontend.log_clamp_min", 1e-9) + writer.add_float32("stt.frontend.log_clamp_max", 1e9) + + # Tensors + n_added = 0 + bytes_out = 0 + + def add_arr(dst_name: str, arr: np.ndarray) -> None: + nonlocal n_added, bytes_out + arr = np.ascontiguousarray(arr.astype(np.float32)) + writer.add_tensor(dst_name, arr, raw_dtype=GGMLQuantizationType.F32) + n_added += 1 + bytes_out += int(arr.nbytes) + + def add(src_name: str, dst_name: str) -> None: + add_arr(dst_name, get_f32(src_name)) + + # 1. Mel frontend buffers + add_arr("frontend.mel_filterbank", fb) + add_arr("frontend.window", window) + + # 2. Zapformer frontend + fe_pfx = "model.encoder.encoder_embed" + add(f"{fe_pfx}.conv1.weight", "enc.frontend.conv.0.weight") + add(f"{fe_pfx}.conv1.bias", "enc.frontend.conv.0.bias") + add(f"{fe_pfx}.conv2.weight", "enc.frontend.conv.1.weight") + add(f"{fe_pfx}.conv2.bias", "enc.frontend.conv.1.bias") + add(f"{fe_pfx}.conv3.weight", "enc.frontend.conv.2.weight") + add(f"{fe_pfx}.conv3.bias", "enc.frontend.conv.2.bias") + add(f"{fe_pfx}.convnext.depthwise_conv.weight", "enc.frontend.convnext.conv.dw.weight") + add(f"{fe_pfx}.convnext.depthwise_conv.bias", "enc.frontend.convnext.conv.dw.bias") + add(f"{fe_pfx}.convnext.pointwise_conv1.weight", "enc.frontend.convnext.conv.pw1.weight") + add(f"{fe_pfx}.convnext.pointwise_conv1.bias", "enc.frontend.convnext.conv.pw1.bias") + add(f"{fe_pfx}.convnext.pointwise_conv2.weight", "enc.frontend.convnext.conv.pw2.weight") + add(f"{fe_pfx}.convnext.pointwise_conv2.bias", "enc.frontend.convnext.conv.pw2.bias") + add(f"{fe_pfx}.out.weight", "enc.frontend.out.weight") + add(f"{fe_pfx}.out.bias", "enc.frontend.out.bias") + + # 3. Zapformer stages + for s in range(n_stages): + st_pfx = f"model.encoder.encoder.encoders.{s}" + dst_st = f"enc.stages.{s}" + + # OrthogonalLinear: bake weight_scale = in_channels^(-0.5) / 0.3 + # and store pre-transposed proj_out.weight so both directions support quantization. + in_channels = stage_downsampling[s] * d_model + weight_scale = (in_channels ** -0.5) / 0.3 + proj_w = get_f32(f"{st_pfx}.proj.weight") * np.float32(weight_scale) + add_arr(f"{dst_st}.proj.weight", proj_w) + add_arr(f"{dst_st}.proj_out.weight", proj_w.T) + + for l in range(stage_layers[s]): + lp = f"{st_pfx}.layers.{l}" + dp = f"{dst_st}.layers.{l}" + + add(f"{lp}.feed_forward1.in_proj.weight", f"{dp}.ff1.in.weight") + add(f"{lp}.feed_forward1.in_proj.bias", f"{dp}.ff1.in.bias") + add(f"{lp}.feed_forward1.out_proj.weight", f"{dp}.ff1.out.weight") + add(f"{lp}.feed_forward1.out_proj.bias", f"{dp}.ff1.out.bias") + + add(f"{lp}.self_attn.in_norm.weight", f"{dp}.attn.in_norm.weight") + add(f"{lp}.self_attn.qk_in_proj.weight", f"{dp}.attn.qk_in.weight") + add(f"{lp}.self_attn.qk_in_proj.bias", f"{dp}.attn.qk_in.bias") + add(f"{lp}.self_attn.vg_in_proj.weight", f"{dp}.attn.vg_in.weight") + add(f"{lp}.self_attn.vg_in_proj.bias", f"{dp}.attn.vg_in.bias") + add(f"{lp}.self_attn.out_proj.weight", f"{dp}.attn.out.weight") + add(f"{lp}.self_attn.out_proj.bias", f"{dp}.attn.out.bias") + + if stage_conv_kernel[s] > 0: + add(f"{lp}.conv_module.in_proj.weight", f"{dp}.conv_in.weight") + add(f"{lp}.conv_module.in_proj.bias", f"{dp}.conv_in.bias") + add(f"{lp}.conv_module.depthwise_conv.weight", f"{dp}.conv.dw.weight") + add(f"{lp}.conv_module.depthwise_conv.bias", f"{dp}.conv.dw.bias") + add(f"{lp}.conv_module.weighted_mean.weights", f"{dp}.conv.weighted_mean.weight") + add(f"{lp}.conv_module.out_proj.weight", f"{dp}.conv_out.weight") + add(f"{lp}.conv_module.out_proj.bias", f"{dp}.conv_out.bias") + + add(f"{lp}.feed_forward2.in_proj.weight", f"{dp}.ff2.in.weight") + add(f"{lp}.feed_forward2.in_proj.bias", f"{dp}.ff2.in.bias") + add(f"{lp}.feed_forward2.out_proj.weight", f"{dp}.ff2.out.weight") + add(f"{lp}.feed_forward2.out_proj.bias", f"{dp}.ff2.out.bias") + + add(f"{lp}.norm.weight", f"{dp}.out_norm.weight") + + # 4. RNN-T head (exact same tensor names as GigaAM v3) + hpfx = f"model.heads.{head}" + add(f"{hpfx}.decoder.embed.weight", "pred.embed.weight") + for i in range(pred_n_layers): + add(f"{hpfx}.decoder.lstm.weight_ih_l{i}", f"pred.lstm.{i}.Wx") + add(f"{hpfx}.decoder.lstm.weight_hh_l{i}", f"pred.lstm.{i}.Wh") + b_ih = get_f32(f"{hpfx}.decoder.lstm.bias_ih_l{i}") + b_hh = get_f32(f"{hpfx}.decoder.lstm.bias_hh_l{i}") + add_arr(f"pred.lstm.{i}.bias", b_ih + b_hh) + + add(f"{hpfx}.joint.enc.weight", "joint.enc.weight") + add(f"{hpfx}.joint.enc.bias", "joint.enc.bias") + add(f"{hpfx}.joint.pred.weight", "joint.pred.weight") + add(f"{hpfx}.joint.pred.bias", "joint.pred.bias") + add(f"{hpfx}.joint.joint_net.1.weight", "joint.out.weight") + add(f"{hpfx}.joint.joint_net.1.bias", "joint.out.bias") + + print(f"Added {n_added} tensors ({bytes_out / (1024 * 1024):.1f} MB)") + writer.write_header_to_file() + writer.write_kv_data_to_file() + writer.write_tensors_to_file() + writer.close() + print(f"Done. Wrote {out_path} ({out_path.stat().st_size / (1024 * 1024):.1f} MB)") + + +def main(argv: list[str]) -> int: + p = argparse.ArgumentParser(description="Convert ai-sage/GigaAM-v4 directory to GGUF.") + p.add_argument("model_dir", type=Path, help="Directory with model.safetensors, config.json, *_tokenizer.model") + p.add_argument("out_path", type=Path, help="Output .gguf path") + p.add_argument("--head", choices=("e2e", "raw"), default="e2e", help="RNN-T head to export (default: e2e)") + p.add_argument("--repo-id", default="ai-sage/GigaAM-v4", help="Upstream HF repo id for metadata") + args = p.parse_args(argv[1:]) + convert(args.model_dir, args.out_path, args.head, args.repo_id) + return 0 + + +if __name__ == "__main__": + raise SystemExit(main(sys.argv)) diff --git a/src/arch/gigaam/encoder.cpp b/src/arch/gigaam/encoder.cpp index 897173fe6..01ccf462c 100644 --- a/src/arch/gigaam/encoder.cpp +++ b/src/arch/gigaam/encoder.cpp @@ -275,6 +275,318 @@ ggml_tensor * build_block(ggml_context * ctx, return x; } +// --------------------------------------------------------------------------- +// Zapformer encoder (GigaAM-v4, offline full-context) +// --------------------------------------------------------------------------- + +constexpr float kZapRmsNormEps = 1e-6f; + +ggml_tensor * zap_rms_norm(ggml_context * ctx, ggml_tensor * x, ggml_tensor * w) { + return ggml_mul(ctx, ggml_rms_norm(ctx, x, kZapRmsNormEps), w); +} + +ggml_tensor * zap_causal_time_pad(ggml_context * ctx, ggml_tensor * x, int64_t pad_top) { + ggml_tensor * z = ggml_fill(ctx, ggml_new_tensor_4d(ctx, GGML_TYPE_F32, x->ne[0], pad_top, x->ne[2], x->ne[3]), 0.0f); + return ggml_concat(ctx, z, x, /*dim=*/1); +} + +// ZapformerFrontend: mel_in [T_mel, F=64, 1] -> [d_model, T_enc, 1]. +ggml_tensor * build_zapformer_frontend(ggml_context * ctx, + const ZapformerFrontendWeights & fe, + ggml_tensor * mel_in, + bool causal) { + const int64_t T_mel = mel_in->ne[0]; + const int64_t F = mel_in->ne[1]; + const int64_t B = mel_in->ne[2]; + + // Transpose [T_mel, F, B] -> [W=F, H=T_mel, C=1, B]. + ggml_tensor * x = ggml_cont(ctx, ggml_permute(ctx, mel_in, 1, 0, 2, 3)); + x = ggml_reshape_4d(ctx, x, F, T_mel, 1, B); + + // Conv1: stride=1, causal pad (W:1,1; H:2,0) or symmetric (1,1). + if (causal) { + x = zap_causal_time_pad(ctx, x, 2); + x = conf::conv_2d_f32(ctx, fe.conv0_w, x, /*s0=*/1, /*s1=*/1, /*p0=*/1, /*p1=*/0, 1, 1); + } else { + x = conf::conv_2d_f32(ctx, fe.conv0_w, x, 1, 1, 1, 1, 1, 1); + } + x = ggml_silu(ctx, conf::add_conv_bias(ctx, x, fe.conv0_b)); + + // Conv2: stride=2, pad=(pH=1, pW=0) -> p0=0 (W/freq), p1=1 (H/time). + x = conf::conv_2d_f32(ctx, fe.conv1_w, x, /*s0=*/2, /*s1=*/2, /*p0=*/0, /*p1=*/1, 1, 1); + x = ggml_silu(ctx, conf::add_conv_bias(ctx, x, fe.conv1_b)); + + // Conv3: stride=2, pad=(pH=1, pW=0). + x = conf::conv_2d_f32(ctx, fe.conv2_w, x, /*s0=*/2, /*s1=*/2, /*p0=*/0, /*p1=*/1, 1, 1); + x = ggml_silu(ctx, conf::add_conv_bias(ctx, x, fe.conv2_b)); + + // ZapformerConvNeXt: residual + pw2(silu(pw1(dw(x)))). + { + ggml_tensor * res = x; + ggml_tensor * y = x; + if (causal) { + y = zap_causal_time_pad(ctx, y, 2); + y = conf::conv_2d_dw_f32(ctx, fe.cn_dw_w, y, 1, 1, /*p0=*/1, /*p1=*/0, 1, 1); + } else { + y = conf::conv_2d_dw_f32(ctx, fe.cn_dw_w, y, 1, 1, 3, 3, 1, 1); + } + y = conf::add_conv_bias(ctx, y, fe.cn_dw_b); + y = conf::conv_2d_f32(ctx, fe.cn_pw1_w, y, 1, 1, 0, 0, 1, 1); + y = ggml_silu(ctx, conf::add_conv_bias(ctx, y, fe.cn_pw1_b)); + y = conf::conv_2d_f32(ctx, fe.cn_pw2_w, y, 1, 1, 0, 0, 1, 1); + y = conf::add_conv_bias(ctx, y, fe.cn_pw2_b); + x = ggml_add(ctx, res, y); + } + + // Flatten [W=15, H=T_enc, C=64, B] -> [W=15, C=64, T_enc, B] -> [C*W=960, T_enc, B]. + x = ggml_cont(ctx, ggml_permute(ctx, x, 0, 2, 1, 3)); + x = ggml_reshape_3d(ctx, x, x->ne[0] * x->ne[1], x->ne[2], x->ne[3]); + + // Output linear -> [d_model, T_enc, B]. + x = ggml_add(ctx, ggml_mul_mat(ctx, fe.out_w, x), fe.out_b); + return x; +} + +ggml_tensor * build_zapformer_attn(ggml_context * ctx, + ggml_tensor * x_qk, + ggml_tensor * x_vg, + ggml_tensor * positions, + const ZapformerLayerWeights & lw, + const ZapformerStageHParams & shp, + float rope_base, + bool use_flash, + ggml_tensor * attn_mask) { + const int H = shp.n_heads; + const int qdim = shp.qdim; + const int vdim = shp.vdim; + const int dq = H * qdim; + const int dv = H * vdim; + const int64_t T_s = x_qk->ne[1]; + const int64_t B = x_qk->ne[2]; + const float scale = 1.0f / std::sqrt(static_cast(qdim)); + + ggml_tensor * qk_norm = zap_rms_norm(ctx, x_qk, lw.attn_in_norm_w); + ggml_tensor * qk = ggml_add(ctx, ggml_mul_mat(ctx, lw.attn_qk_in_w, qk_norm), lw.attn_qk_in_b); + ggml_tensor * q = ggml_cont(ctx, ggml_view_3d(ctx, qk, dq, T_s, B, qk->nb[1], qk->nb[2], 0)); + ggml_tensor * k = ggml_cont(ctx, ggml_view_3d(ctx, qk, dq, T_s, B, qk->nb[1], qk->nb[2], dq * qk->nb[0])); + + // Standard interleaved RoPE (GGML_ROPE_TYPE_NORMAL = 0) on [qdim, H, T_s, B]. + q = ggml_reshape_4d(ctx, q, qdim, H, T_s, B); + k = ggml_reshape_4d(ctx, k, qdim, H, T_s, B); + q = ggml_rope_ext(ctx, q, positions, nullptr, qdim, GGML_ROPE_TYPE_NORMAL, 0, rope_base, 1.0f, 0.0f, 1.0f, 32.0f, + 1.0f); + k = ggml_rope_ext(ctx, k, positions, nullptr, qdim, GGML_ROPE_TYPE_NORMAL, 0, rope_base, 1.0f, 0.0f, 1.0f, 32.0f, + 1.0f); + + ggml_tensor * vg = ggml_add(ctx, ggml_mul_mat(ctx, lw.attn_vg_in_w, x_vg), lw.attn_vg_in_b); + ggml_tensor * v_raw = ggml_cont(ctx, ggml_view_3d(ctx, vg, dv, T_s, B, vg->nb[1], vg->nb[2], 0)); + ggml_tensor * g_in = ggml_cont(ctx, ggml_view_3d(ctx, vg, dv, T_s, B, vg->nb[1], vg->nb[2], dv * vg->nb[0])); + ggml_tensor * g_out = ggml_cont(ctx, ggml_view_3d(ctx, vg, dv, T_s, B, vg->nb[1], vg->nb[2], 2 * dv * vg->nb[0])); + + ggml_tensor * v = ggml_mul(ctx, v_raw, ggml_sigmoid(ctx, g_in)); + v = ggml_reshape_4d(ctx, v, vdim, H, T_s, B); + + // Permute to [head_dim, T_s, H, B] for SDPA. + q = ggml_cont(ctx, ggml_permute(ctx, q, 0, 2, 1, 3)); + k = ggml_cont(ctx, ggml_permute(ctx, k, 0, 2, 1, 3)); + v = ggml_cont(ctx, ggml_permute(ctx, v, 0, 2, 1, 3)); + + const bool flash = use_flash && (attn_mask == nullptr) && (qdim == vdim); + ggml_tensor * o = nullptr; + if (flash) { + o = ggml_flash_attn_ext(ctx, q, k, v, nullptr, scale, 0.0f, 0.0f); + } else { + ggml_tensor * kq = ggml_mul_mat(ctx, k, q); // [T_s, T_s, H, B] + if (attn_mask != nullptr) { + kq = ggml_add(ctx, kq, attn_mask); + } + ggml_tensor * probs = ggml_soft_max_ext(ctx, kq, nullptr, scale, 0.0f); + ggml_tensor * v_t = ggml_cont(ctx, ggml_permute(ctx, v, 1, 0, 2, 3)); + o = ggml_mul_mat(ctx, v_t, probs); + o = ggml_cont(ctx, ggml_permute(ctx, o, 0, 2, 1, 3)); + } + + o = ggml_reshape_3d(ctx, o, dv, T_s, B); + o = ggml_mul(ctx, o, ggml_sigmoid(ctx, g_out)); + o = ggml_add(ctx, ggml_mul_mat(ctx, lw.attn_out_w, o), lw.attn_out_b); + return o; +} + +ggml_tensor * build_zapformer_conv(ggml_context * ctx, + ggml_tensor * x, + const ZapformerLayerWeights & lw, + int kernel, + ggml_tensor * valid_mask, + int64_t T_valid) { + const int64_t D = x->ne[0]; + const int64_t T_s = x->ne[1]; + const int64_t B = x->ne[2]; + + ggml_tensor * cg = ggml_add(ctx, ggml_mul_mat(ctx, lw.conv_in_w, x), lw.conv_in_b); + ggml_tensor * cx = ggml_cont(ctx, ggml_view_3d(ctx, cg, D, T_s, B, cg->nb[1], cg->nb[2], 0)); + ggml_tensor * gate = ggml_cont(ctx, ggml_view_3d(ctx, cg, D, T_s, B, cg->nb[1], cg->nb[2], D * cg->nb[0])); + + if (valid_mask != nullptr) { + cx = ggml_mul(ctx, cx, valid_mask); + } + + // Transpose [D, T_s, B] -> [T_s, D, B] for both global mean and 1D depthwise conv. + ggml_tensor * cx_t = ggml_cont(ctx, ggml_permute(ctx, cx, 1, 0, 2, 3)); + + // Global mean over valid frames: sum_rows([T_s, D, B]) -> [1, D, B] / T_valid. + ggml_tensor * mean = ggml_sum_rows(ctx, cx_t); + mean = ggml_scale(ctx, mean, 1.0f / static_cast(T_valid > 0 ? T_valid : 1)); + mean = ggml_reshape_3d(ctx, mean, D, 1, B); + mean = ggml_mul(ctx, mean, lw.conv_weighted_mean_w); + + // Depthwise 1D conv with symmetric padding (kernel-1)/2. + ggml_tensor * y = conf::conv_1d_dw_f32(ctx, lw.conv_dw_w, cx_t, /*stride=*/1, /*padding=*/(kernel - 1) / 2, 1); + y = ggml_add(ctx, y, ggml_reshape_3d(ctx, lw.conv_dw_b, 1, D, 1)); + y = ggml_cont(ctx, ggml_permute(ctx, y, 1, 0, 2, 3)); // [D, T_s, B] + + // ActivationAndLinear: linear(silu((y + mean) * sigmoid(gate))). + y = ggml_add(ctx, y, mean); + y = ggml_mul(ctx, y, ggml_sigmoid(ctx, gate)); + y = ggml_silu(ctx, y); + y = ggml_add(ctx, ggml_mul_mat(ctx, lw.conv_out_w, y), lw.conv_out_b); + return y; +} + +ggml_tensor * build_zapformer_layer(ggml_context * ctx, + ggml_tensor * x, + ggml_tensor * positions, + const ZapformerLayerWeights & lw, + const ZapformerStageHParams & shp, + float rope_base, + bool use_flash, + ggml_tensor * valid_mask, + ggml_tensor * attn_mask, + int64_t T_valid) { + ggml_tensor * residual = x; + ggml_tensor * qk = x; + + x = ggml_add(ctx, x, conf::feed_forward(ctx, x, lw.ff1_in_w, lw.ff1_in_b, lw.ff1_out_w, lw.ff1_out_b)); + x = ggml_add(ctx, x, build_zapformer_attn(ctx, qk, x, positions, lw, shp, rope_base, use_flash, attn_mask)); + if (shp.conv_kernel > 0) { + x = ggml_add(ctx, x, build_zapformer_conv(ctx, x, lw, shp.conv_kernel, valid_mask, T_valid)); + x = ggml_add(ctx, x, conf::feed_forward(ctx, x, lw.ff2_in_w, lw.ff2_in_b, lw.ff2_out_w, lw.ff2_out_b)); + } + + ggml_tensor * blended = ggml_add(ctx, residual, ggml_scale(ctx, ggml_sub(ctx, x, residual), 0.25f)); + return zap_rms_norm(ctx, blended, lw.out_norm_w); +} + +EncoderBuild build_zapformer_encoder_graph(ggml_context * ctx, + const GigaamWeights & w, + const GigaamHParams & hp, + int n_mel_frames, + const char * backend_name) { + EncoderBuild eb{}; + eb.mel_in = ggml_new_tensor_3d(ctx, GGML_TYPE_F32, n_mel_frames, hp.fe_num_mels, 1); + if (eb.mel_in == nullptr) { + return eb; + } + ggml_set_name(eb.mel_in, "mel.in"); + ggml_set_input(eb.mel_in); + + ggml_tensor * x = build_zapformer_frontend(ctx, w.zapformer.frontend, eb.mel_in, hp.zap_causal_frontend); + ggml_set_name(x, "enc.subsample.out"); + eb.dumps.pre_encode_out = x; + transcribe::debug::mark_tensor_for_dump(x); + + const int64_t d_model = x->ne[0]; + const int64_t T_orig = x->ne[1]; + eb.zap_T_orig = static_cast(T_orig); + + int max_ds = 1; + for (const auto & shp : hp.zap_stages) { + if (shp.downsampling > max_ds) { + max_ds = shp.downsampling; + } + } + const int64_t pad_t = (T_orig % max_ds == 0) ? 0 : (max_ds - (T_orig % max_ds)); + const int64_t T_pad = T_orig + pad_t; + + if (pad_t > 0) { + ggml_tensor * pad = ggml_fill(ctx, ggml_new_tensor_3d(ctx, GGML_TYPE_F32, d_model, pad_t, 1), 0.0f); + x = ggml_concat(ctx, x, pad, /*dim=*/1); + + eb.zap_valid_mask_in = ggml_new_tensor_3d(ctx, GGML_TYPE_F32, 1, T_pad, 1); + eb.zap_attn_mask_in = ggml_new_tensor_4d(ctx, GGML_TYPE_F32, T_pad, 1, 1, 1); + ggml_set_name(eb.zap_valid_mask_in, "zap.valid_mask"); + ggml_set_name(eb.zap_attn_mask_in, "zap.attn_mask"); + ggml_set_input(eb.zap_valid_mask_in); + ggml_set_input(eb.zap_attn_mask_in); + } + + ggml_tensor * positions = ggml_new_tensor_1d(ctx, GGML_TYPE_I32, T_pad); + ggml_set_name(positions, "enc.positions"); + ggml_set_input(positions); + eb.dumps.pos_emb = positions; + + const bool use_flash = (backend_name != nullptr && std::string(backend_name).find("CPU") == std::string::npos); + + for (size_t s = 0; s < hp.zap_stages.size(); ++s) { + const auto & shp = hp.zap_stages[s]; + const auto & sw = w.zapformer.stages[s]; + const int64_t ds = shp.downsampling; + const int64_t T_s = T_pad / ds; + + if (ds > 1 && eb.zap_valid_mask_in != nullptr) { + x = ggml_mul(ctx, x, eb.zap_valid_mask_in); + } + if (ds > 1) { + x = ggml_reshape_3d(ctx, x, d_model * ds, T_s, 1); + } + + ggml_tensor * pos_s = (ds == 1) ? positions : ggml_view_1d(ctx, positions, T_s, 0); + ggml_tensor * valid_s = (ds == 1) ? eb.zap_valid_mask_in : nullptr; + ggml_tensor * attn_mask_s = (ds == 1) ? eb.zap_attn_mask_in : nullptr; + const int64_t T_valid_s = (ds == 1) ? T_orig : T_s; + + ggml_tensor * stack_res = x; + x = ggml_mul_mat(ctx, sw.proj_w, x); + ggml_tensor * bypass = ggml_scale(ctx, x, shp.residual_scales[0]); + x = ggml_scale(ctx, x, shp.input_scale); + + for (int l = 0; l < shp.n_layers; ++l) { + x = build_zapformer_layer(ctx, x, pos_s, sw.layers[l], shp, hp.zap_rope_base, use_flash, valid_s, + attn_mask_s, T_valid_s); + bypass = ggml_add(ctx, bypass, ggml_scale(ctx, x, shp.residual_scales[l + 1])); + } + + x = ggml_add(ctx, stack_res, ggml_mul_mat(ctx, sw.proj_out_w, bypass)); + if (ds > 1) { + x = ggml_reshape_3d(ctx, x, d_model, T_pad, 1); + } + } + + if (pad_t > 0) { + x = ggml_cont(ctx, ggml_view_3d(ctx, x, d_model, T_orig, 1, x->nb[1], x->nb[2], 0)); + } + + // Final RmsNorm: x * (scale / sqrt(mean(x^2) + eps^2)). + x = ggml_rms_norm(ctx, x, hp.zap_out_norm_eps * hp.zap_out_norm_eps); + x = ggml_scale(ctx, x, hp.zap_out_norm_scale); + + ggml_set_name(x, "rnnt.encoded"); + ggml_set_output(x); + eb.dumps.rnnt_encoded = x; + eb.out = x; + + if (transcribe::debug::enabled()) { + ggml_tensor * enc_out_t = ggml_cont(ctx, ggml_permute(ctx, x, 1, 0, 2, 3)); + ggml_set_name(enc_out_t, "enc.out"); + eb.out = enc_out_t; + eb.dumps.final_out = enc_out_t; + transcribe::debug::mark_tensor_for_dump(enc_out_t); + } + + eb.graph = ggml_new_graph_custom(ctx, /*size=*/8192, /*grads=*/false); + ggml_build_forward_expand(eb.graph, eb.out); + return eb; +} + } // namespace // One stride-2 conv with symmetric (k-1)/2 padding: floor((in-1)/2)+1. @@ -299,6 +611,10 @@ EncoderBuild build_encoder_graph(ggml_context * ctx, static_cast(ctx), n_mel_frames); return eb; } + if (hp.encoder_kind == EncoderKind::Zapformer) { + return build_zapformer_encoder_graph(ctx, w, hp, n_mel_frames, backend_name); + } + if (n_batch < 1) { n_batch = 1; } diff --git a/src/arch/gigaam/encoder.h b/src/arch/gigaam/encoder.h index e6197e5d6..4a1c7670d 100644 --- a/src/arch/gigaam/encoder.h +++ b/src/arch/gigaam/encoder.h @@ -65,6 +65,12 @@ struct EncoderBuild { ggml_tensor * pre_encode_mask_s1_in = nullptr; // after conv0 relu ggml_tensor * pre_encode_mask_s2_in = nullptr; // after conv2 relu + // Zapformer odd-length tail masks (non-null only when T_orig is not + // divisible by max downsampling factor). + ggml_tensor * zap_valid_mask_in = nullptr; // [1, T_pad, 1] f32: 1 real / 0 pad + ggml_tensor * zap_attn_mask_in = nullptr; // [T_pad, 1, 1, 1] f32: 0 real / -INF pad + int zap_T_orig = 0; + EncoderDumps dumps{}; ggml_cgraph * graph = nullptr; }; diff --git a/src/arch/gigaam/model.cpp b/src/arch/gigaam/model.cpp index 31195055f..543a1e298 100644 --- a/src/arch/gigaam/model.cpp +++ b/src/arch/gigaam/model.cpp @@ -238,7 +238,7 @@ transcribe_status reset_compute_ctx(GigaamSession * gc) { gc->encoder_out = nullptr; ggml_init_params ip{}; - ip.mem_size = 4 * 1024 * 1024; + ip.mem_size = 8 * 1024 * 1024; ip.mem_buffer = nullptr; ip.no_alloc = true; gc->compute_ctx = ggml_init(ip); @@ -349,6 +349,24 @@ transcribe_status encode_mel_slice(GigaamSession * gc, ggml_backend_tensor_set(eb.dumps.pos_emb, pos.data(), 0, pos.size() * sizeof(int32_t)); } + // Zapformer odd-length tail masks (when T_orig was padded to T_pad). + if (eb.zap_valid_mask_in != nullptr) { + const int64_t T_pad = eb.zap_valid_mask_in->ne[1]; + std::vector vm(static_cast(T_pad), 0.0f); + for (int i = 0; i < eb.zap_T_orig && i < T_pad; ++i) { + vm[static_cast(i)] = 1.0f; + } + ggml_backend_tensor_set(eb.zap_valid_mask_in, vm.data(), 0, vm.size() * sizeof(float)); + } + if (eb.zap_attn_mask_in != nullptr) { + const int64_t T_pad = eb.zap_attn_mask_in->ne[0]; + std::vector am(static_cast(T_pad), -std::numeric_limits::infinity()); + for (int i = 0; i < eb.zap_T_orig && i < T_pad; ++i) { + am[static_cast(i)] = 0.0f; + } + ggml_backend_tensor_set(eb.zap_attn_mask_in, am.data(), 0, am.size() * sizeof(float)); + } + const int64_t t_enc_start = ggml_time_us(); if (ggml_backend_sched_graph_compute(gc->sched, eb.graph) != GGML_STATUS_SUCCESS) { log_msg(TRANSCRIBE_LOG_LEVEL_ERROR, "gigaam: graph_compute failed"); @@ -804,7 +822,9 @@ transcribe_status run_batch(transcribe_session * session, // A batch whose longest clip needs more than one encoder window takes // the per-utterance path below, which windows each clip, so the // batched workspace stays bounded by n x one window. - if (plan_windows(enc_frames_for_mel(T_max)).n_windows() <= 1) { + // shortcut: Zapformer run_batch uses per-utterance loop instead of packed batching, upgrade when multi-utterance throughput matters. + if (gm->hparams.encoder_kind == EncoderKind::Conformer && + plan_windows(enc_frames_for_mel(T_max)).n_windows() <= 1) { return run_batch_encode(gc, gm, mels, nf, n_mels, T_max, total_mel_us); } } diff --git a/src/arch/gigaam/weights.cpp b/src/arch/gigaam/weights.cpp index 14dc7e904..388c4a10b 100644 --- a/src/arch/gigaam/weights.cpp +++ b/src/arch/gigaam/weights.cpp @@ -45,70 +45,197 @@ transcribe_status read_gigaam_hparams(const gguf_context * gguf, GigaamHParams & } } - // Encoder. - if (auto st = read_required_u32_kv(gguf, "stt.gigaam.encoder.n_layers", kFamilyTag, hp.enc_n_layers); - st != TRANSCRIBE_OK) { - return st; - } - if (auto st = read_required_u32_kv(gguf, "stt.gigaam.encoder.d_model", kFamilyTag, hp.enc_d_model); - st != TRANSCRIBE_OK) { - return st; - } - if (auto st = read_required_u32_kv(gguf, "stt.gigaam.encoder.n_heads", kFamilyTag, hp.enc_n_heads); - st != TRANSCRIBE_OK) { - return st; - } - if (auto st = read_required_u32_kv(gguf, "stt.gigaam.encoder.d_ff", kFamilyTag, hp.enc_d_ff); st != TRANSCRIBE_OK) { - return st; - } - if (auto st = read_required_u32_kv(gguf, "stt.gigaam.encoder.conv_kernel", kFamilyTag, hp.enc_conv_kernel); - st != TRANSCRIBE_OK) { - return st; - } - if (auto st = - read_required_u32_kv(gguf, "stt.gigaam.encoder.subsampling_factor", kFamilyTag, hp.enc_subsampling_factor); - st != TRANSCRIBE_OK) { - return st; - } - if (auto st = - read_required_u32_kv(gguf, "stt.gigaam.encoder.subs_kernel_size", kFamilyTag, hp.enc_subs_kernel_size); - st != TRANSCRIBE_OK) { - return st; - } - if (auto st = read_required_u32_kv(gguf, "stt.gigaam.encoder.pos_emb_max_len", kFamilyTag, hp.enc_pos_emb_max_len); - st != TRANSCRIBE_OK) { - return st; - } - if (auto st = read_required_u32_kv(gguf, "stt.gigaam.encoder.feat_in", kFamilyTag, hp.enc_feat_in); - st != TRANSCRIBE_OK) { - return st; - } - if (auto st = read_required_string_kv(gguf, "stt.gigaam.encoder.self_attention_model", kFamilyTag, - hp.enc_self_attention_model); - st != TRANSCRIBE_OK) { - return st; - } - if (auto st = read_required_string_kv(gguf, "stt.gigaam.encoder.conv_norm_type", kFamilyTag, hp.enc_conv_norm_type); - st != TRANSCRIBE_OK) { - return st; + // Encoder family discriminator (absent -> Conformer for v3/Multilingual). + { + std::string enc_type; + if (auto st = read_optional_string_kv(gguf, "stt.gigaam.encoder.type", kFamilyTag, "conformer", enc_type); + st != TRANSCRIBE_OK) { + return st; + } + if (enc_type == "conformer") { + hp.encoder_kind = EncoderKind::Conformer; + } else if (enc_type == "zapformer") { + hp.encoder_kind = EncoderKind::Zapformer; + } else { + log_msg(TRANSCRIBE_LOG_LEVEL_ERROR, "gigaam: unsupported stt.gigaam.encoder.type=%s", enc_type.c_str()); + return TRANSCRIBE_ERR_GGUF; + } } - if (hp.enc_n_heads <= 0 || hp.enc_d_model % hp.enc_n_heads != 0) { - log_msg(TRANSCRIBE_LOG_LEVEL_ERROR, - "gigaam: invariant d_model %% n_heads != 0 " - "(d_model=%d, n_heads=%d)", - hp.enc_d_model, hp.enc_n_heads); - return TRANSCRIBE_ERR_GGUF; - } - if (hp.enc_self_attention_model != "rotary") { - log_msg(TRANSCRIBE_LOG_LEVEL_ERROR, "gigaam: unsupported self_attention_model=%s (expected rotary)", - hp.enc_self_attention_model.c_str()); - return TRANSCRIBE_ERR_GGUF; - } - if (hp.enc_conv_norm_type != "layer_norm") { - log_msg(TRANSCRIBE_LOG_LEVEL_ERROR, "gigaam: unsupported conv_norm_type=%s (expected layer_norm)", - hp.enc_conv_norm_type.c_str()); - return TRANSCRIBE_ERR_GGUF; + // Encoder. + if (hp.encoder_kind == EncoderKind::Conformer) { + if (auto st = read_required_u32_kv(gguf, "stt.gigaam.encoder.n_layers", kFamilyTag, hp.enc_n_layers); + st != TRANSCRIBE_OK) { + return st; + } + if (auto st = read_required_u32_kv(gguf, "stt.gigaam.encoder.d_model", kFamilyTag, hp.enc_d_model); + st != TRANSCRIBE_OK) { + return st; + } + if (auto st = read_required_u32_kv(gguf, "stt.gigaam.encoder.n_heads", kFamilyTag, hp.enc_n_heads); + st != TRANSCRIBE_OK) { + return st; + } + if (auto st = read_required_u32_kv(gguf, "stt.gigaam.encoder.d_ff", kFamilyTag, hp.enc_d_ff); + st != TRANSCRIBE_OK) { + return st; + } + if (auto st = read_required_u32_kv(gguf, "stt.gigaam.encoder.conv_kernel", kFamilyTag, hp.enc_conv_kernel); + st != TRANSCRIBE_OK) { + return st; + } + if (auto st = read_required_u32_kv(gguf, "stt.gigaam.encoder.subsampling_factor", kFamilyTag, + hp.enc_subsampling_factor); + st != TRANSCRIBE_OK) { + return st; + } + if (auto st = read_required_u32_kv(gguf, "stt.gigaam.encoder.subs_kernel_size", kFamilyTag, + hp.enc_subs_kernel_size); + st != TRANSCRIBE_OK) { + return st; + } + if (auto st = read_required_u32_kv(gguf, "stt.gigaam.encoder.pos_emb_max_len", kFamilyTag, + hp.enc_pos_emb_max_len); + st != TRANSCRIBE_OK) { + return st; + } + if (auto st = read_required_u32_kv(gguf, "stt.gigaam.encoder.feat_in", kFamilyTag, hp.enc_feat_in); + st != TRANSCRIBE_OK) { + return st; + } + if (auto st = read_required_string_kv(gguf, "stt.gigaam.encoder.self_attention_model", kFamilyTag, + hp.enc_self_attention_model); + st != TRANSCRIBE_OK) { + return st; + } + if (auto st = + read_required_string_kv(gguf, "stt.gigaam.encoder.conv_norm_type", kFamilyTag, hp.enc_conv_norm_type); + st != TRANSCRIBE_OK) { + return st; + } + + if (hp.enc_n_heads <= 0 || hp.enc_d_model % hp.enc_n_heads != 0) { + log_msg(TRANSCRIBE_LOG_LEVEL_ERROR, + "gigaam: invariant d_model %% n_heads != 0 " + "(d_model=%d, n_heads=%d)", + hp.enc_d_model, hp.enc_n_heads); + return TRANSCRIBE_ERR_GGUF; + } + if (hp.enc_self_attention_model != "rotary") { + log_msg(TRANSCRIBE_LOG_LEVEL_ERROR, "gigaam: unsupported self_attention_model=%s (expected rotary)", + hp.enc_self_attention_model.c_str()); + return TRANSCRIBE_ERR_GGUF; + } + if (hp.enc_conv_norm_type != "layer_norm") { + log_msg(TRANSCRIBE_LOG_LEVEL_ERROR, "gigaam: unsupported conv_norm_type=%s (expected layer_norm)", + hp.enc_conv_norm_type.c_str()); + return TRANSCRIBE_ERR_GGUF; + } + } else { + // Zapformer (GigaAM-v4). + if (auto st = read_required_u32_kv(gguf, "stt.gigaam.encoder.n_layers", kFamilyTag, hp.enc_n_layers); + st != TRANSCRIBE_OK) { + return st; + } + if (auto st = read_required_u32_kv(gguf, "stt.gigaam.encoder.d_model", kFamilyTag, hp.enc_d_model); + st != TRANSCRIBE_OK) { + return st; + } + if (auto st = read_required_u32_kv(gguf, "stt.gigaam.encoder.feat_in", kFamilyTag, hp.enc_feat_in); + st != TRANSCRIBE_OK) { + return st; + } + if (auto st = read_required_u32_kv(gguf, "stt.gigaam.encoder.subsampling_factor", kFamilyTag, + hp.enc_subsampling_factor); + st != TRANSCRIBE_OK) { + return st; + } + if (auto st = read_optional_bool_kv(gguf, "stt.gigaam.encoder.causal_frontend", kFamilyTag, true, + hp.zap_causal_frontend); + st != TRANSCRIBE_OK) { + return st; + } + if (auto st = read_required_f32_kv(gguf, "stt.gigaam.encoder.out_norm.scale", kFamilyTag, hp.zap_out_norm_scale); + st != TRANSCRIBE_OK) { + return st; + } + if (auto st = read_required_f32_kv(gguf, "stt.gigaam.encoder.out_norm.eps", kFamilyTag, hp.zap_out_norm_eps); + st != TRANSCRIBE_OK) { + return st; + } + if (auto st = read_required_f32_kv(gguf, "stt.gigaam.encoder.rope_base", kFamilyTag, hp.zap_rope_base); + st != TRANSCRIBE_OK) { + return st; + } + + auto req_i32_arr = [&](const char * key, std::vector & out) -> transcribe_status { + if (read_int32_array_kv(gguf, key, out) != KvResult::Ok || out.empty()) { + log_msg(TRANSCRIBE_LOG_LEVEL_ERROR, "gigaam: required i32 array KV \"%s\" missing or empty", key); + return TRANSCRIBE_ERR_GGUF; + } + return TRANSCRIBE_OK; + }; + auto req_f32_arr = [&](const char * key, std::vector & out) -> transcribe_status { + if (read_float32_array_kv(gguf, key, out) != KvResult::Ok || out.empty()) { + log_msg(TRANSCRIBE_LOG_LEVEL_ERROR, "gigaam: required f32 array KV \"%s\" missing or empty", key); + return TRANSCRIBE_ERR_GGUF; + } + return TRANSCRIBE_OK; + }; + + std::vector fe_ch, st_layers, st_dims, st_heads, st_qdim, st_vdim, st_ff, st_conv, st_ds; + std::vector st_in_scales; + if (auto st = req_i32_arr("stt.gigaam.encoder.frontend_channels", fe_ch); st != TRANSCRIBE_OK) return st; + if (fe_ch.size() != 3) { + log_msg(TRANSCRIBE_LOG_LEVEL_ERROR, "gigaam: expected 3 frontend_channels, got %zu", fe_ch.size()); + return TRANSCRIBE_ERR_GGUF; + } + for (int i = 0; i < 3; ++i) { + hp.zap_fe_channels[i] = fe_ch[i]; + } + if (auto st = req_i32_arr("stt.gigaam.encoder.stage_layers", st_layers); st != TRANSCRIBE_OK) return st; + if (auto st = req_i32_arr("stt.gigaam.encoder.stage_dims", st_dims); st != TRANSCRIBE_OK) return st; + if (auto st = req_i32_arr("stt.gigaam.encoder.stage_heads", st_heads); st != TRANSCRIBE_OK) return st; + if (auto st = req_i32_arr("stt.gigaam.encoder.stage_qdim", st_qdim); st != TRANSCRIBE_OK) return st; + if (auto st = req_i32_arr("stt.gigaam.encoder.stage_vdim", st_vdim); st != TRANSCRIBE_OK) return st; + if (auto st = req_i32_arr("stt.gigaam.encoder.stage_ff_mult", st_ff); st != TRANSCRIBE_OK) return st; + if (auto st = req_i32_arr("stt.gigaam.encoder.stage_conv_kernel", st_conv); st != TRANSCRIBE_OK) return st; + if (auto st = req_i32_arr("stt.gigaam.encoder.stage_downsampling", st_ds); st != TRANSCRIBE_OK) return st; + if (auto st = req_f32_arr("stt.gigaam.encoder.stage_input_scales", st_in_scales); st != TRANSCRIBE_OK) { + return st; + } + + const size_t n_stages = st_layers.size(); + if (st_dims.size() != n_stages || st_heads.size() != n_stages || st_qdim.size() != n_stages || + st_vdim.size() != n_stages || st_ff.size() != n_stages || st_conv.size() != n_stages || + st_ds.size() != n_stages || st_in_scales.size() != n_stages) { + log_msg(TRANSCRIBE_LOG_LEVEL_ERROR, "gigaam: zapformer stage array length mismatch"); + return TRANSCRIBE_ERR_GGUF; + } + + hp.zap_stages.resize(n_stages); + for (size_t s = 0; s < n_stages; ++s) { + auto & st = hp.zap_stages[s]; + st.n_layers = st_layers[s]; + st.dim = st_dims[s]; + st.n_heads = st_heads[s]; + st.qdim = st_qdim[s]; + st.vdim = st_vdim[s]; + st.ff_mult = st_ff[s]; + st.conv_kernel = st_conv[s]; + st.downsampling = st_ds[s]; + st.input_scale = st_in_scales[s]; + char key[96]; + std::snprintf(key, sizeof(key), "stt.gigaam.encoder.stage_%zu.residual_scales", s); + if (auto r = req_f32_arr(key, st.residual_scales); r != TRANSCRIBE_OK) { + return r; + } + if (static_cast(st.residual_scales.size()) != st.n_layers + 1) { + log_msg(TRANSCRIBE_LOG_LEVEL_ERROR, "gigaam: stage %zu residual_scales len %zu != %d", s, + st.residual_scales.size(), st.n_layers + 1); + return TRANSCRIBE_ERR_GGUF; + } + } } if (hp.head_kind == HeadKind::RNNT) { @@ -260,6 +387,15 @@ transcribe_status read_gigaam_hparams(const gguf_context * gguf, GigaamHParams & (slot) = _t; \ } while (0) +#define GET_CONV2D_W(slot, name, kw, kh, in_dim, out_dim) \ + do { \ + ggml_tensor * _t = transcribe::weights::find_tensor(ctx_meta, (name), { TRANSCRIBE_QUANT_CONV_TYPES }, \ + { (kw), (kh), (in_dim), (out_dim) }, kFamilyTag); \ + if (_t == nullptr) \ + return TRANSCRIBE_ERR_GGUF; \ + (slot) = _t; \ + } while (0) + #define GET_F32_1D(slot, name, n) \ do { \ ggml_tensor * _t = transcribe::weights::find_tensor(ctx_meta, (name), { GGML_TYPE_F32 }, { (n) }, kFamilyTag); \ @@ -345,17 +481,102 @@ transcribe_status build_gigaam_weights(ggml_context * ctx_meta, const GigaamHPar GET_F32_2D(weights.frontend_mel_filterbank, "frontend.mel_filterbank", n_freq, hp.fe_num_mels); GET_F32_1D(weights.frontend_window, "frontend.window", hp.fe_win_length); - // Pre-encode (2 stride-2 conv1d). - GET_CONV_W(weights.pre_encode.conv0_w, "enc.pre_encode.conv.0.weight", sub_k, feat_in, d); - GET_LIN_B(weights.pre_encode.conv0_b, "enc.pre_encode.conv.0.bias", d); - GET_CONV_W(weights.pre_encode.conv2_w, "enc.pre_encode.conv.2.weight", sub_k, d, d); - GET_LIN_B(weights.pre_encode.conv2_b, "enc.pre_encode.conv.2.bias", d); - - // Conformer blocks. - weights.blocks.resize(hp.enc_n_layers); - for (int i = 0; i < hp.enc_n_layers; ++i) { - if (auto st = build_block(ctx_meta, hp, i, weights.blocks[i]); st != TRANSCRIBE_OK) { - return st; + if (hp.encoder_kind == EncoderKind::Conformer) { + // Pre-encode (2 stride-2 conv1d). + GET_CONV_W(weights.pre_encode.conv0_w, "enc.pre_encode.conv.0.weight", sub_k, feat_in, d); + GET_LIN_B(weights.pre_encode.conv0_b, "enc.pre_encode.conv.0.bias", d); + GET_CONV_W(weights.pre_encode.conv2_w, "enc.pre_encode.conv.2.weight", sub_k, d, d); + GET_LIN_B(weights.pre_encode.conv2_b, "enc.pre_encode.conv.2.bias", d); + + // Conformer blocks. + weights.blocks.resize(hp.enc_n_layers); + for (int i = 0; i < hp.enc_n_layers; ++i) { + if (auto st = build_block(ctx_meta, hp, i, weights.blocks[i]); st != TRANSCRIBE_OK) { + return st; + } + } + } else { + // Zapformer frontend. + auto & fe = weights.zapformer.frontend; + const int c0 = hp.zap_fe_channels[0]; + const int c1 = hp.zap_fe_channels[1]; + const int c2 = hp.zap_fe_channels[2]; + const int cn_k = hp.zap_causal_frontend ? 3 : 7; + const int f_out = (((feat_in - 1) / 2) - 1) / 2; + GET_CONV2D_W(fe.conv0_w, "enc.frontend.conv.0.weight", 3, 3, 1, c0); + GET_LIN_B(fe.conv0_b, "enc.frontend.conv.0.bias", c0); + GET_CONV2D_W(fe.conv1_w, "enc.frontend.conv.1.weight", 3, 3, c0, c1); + GET_LIN_B(fe.conv1_b, "enc.frontend.conv.1.bias", c1); + GET_CONV2D_W(fe.conv2_w, "enc.frontend.conv.2.weight", 3, 3, c1, c2); + GET_LIN_B(fe.conv2_b, "enc.frontend.conv.2.bias", c2); + + GET_CONV2D_W(fe.cn_dw_w, "enc.frontend.convnext.conv.dw.weight", cn_k, cn_k, 1, c2); + GET_LIN_B(fe.cn_dw_b, "enc.frontend.convnext.conv.dw.bias", c2); + GET_CONV2D_W(fe.cn_pw1_w, "enc.frontend.convnext.conv.pw1.weight", 1, 1, c2, c2 * 3); + GET_LIN_B(fe.cn_pw1_b, "enc.frontend.convnext.conv.pw1.bias", c2 * 3); + GET_CONV2D_W(fe.cn_pw2_w, "enc.frontend.convnext.conv.pw2.weight", 1, 1, c2 * 3, c2); + GET_LIN_B(fe.cn_pw2_b, "enc.frontend.convnext.conv.pw2.bias", c2); + + GET_LIN_W(fe.out_w, "enc.frontend.out.weight", c2 * f_out, d); + GET_LIN_B(fe.out_b, "enc.frontend.out.bias", d); + + // Zapformer stages. + weights.zapformer.stages.resize(hp.zap_stages.size()); + for (size_t s = 0; s < hp.zap_stages.size(); ++s) { + const auto & shp = hp.zap_stages[s]; + auto & sw = weights.zapformer.stages[s]; + const int in_dim = shp.downsampling * d; + const int sd = shp.dim; + const int dff = sd * shp.ff_mult; + const int dq = shp.n_heads * shp.qdim; + const int dv = shp.n_heads * shp.vdim; + + char nm[128]; + auto mk = [&](const char * fmt, int l = -1) -> const char * { + if (l < 0) { + std::snprintf(nm, sizeof(nm), fmt, static_cast(s)); + } else { + std::snprintf(nm, sizeof(nm), fmt, static_cast(s), l); + } + return nm; + }; + + GET_LIN_W(sw.proj_w, mk("enc.stages.%d.proj.weight"), in_dim, sd); + GET_LIN_W(sw.proj_out_w, mk("enc.stages.%d.proj_out.weight"), sd, in_dim); + + sw.layers.resize(shp.n_layers); + for (int l = 0; l < shp.n_layers; ++l) { + auto & lw = sw.layers[l]; + GET_LIN_W(lw.ff1_in_w, mk("enc.stages.%d.layers.%d.ff1.in.weight", l), sd, dff); + GET_LIN_B(lw.ff1_in_b, mk("enc.stages.%d.layers.%d.ff1.in.bias", l), dff); + GET_LIN_W(lw.ff1_out_w, mk("enc.stages.%d.layers.%d.ff1.out.weight", l), dff, sd); + GET_LIN_B(lw.ff1_out_b, mk("enc.stages.%d.layers.%d.ff1.out.bias", l), sd); + + GET_F32_1D(lw.attn_in_norm_w, mk("enc.stages.%d.layers.%d.attn.in_norm.weight", l), sd); + GET_LIN_W(lw.attn_qk_in_w, mk("enc.stages.%d.layers.%d.attn.qk_in.weight", l), sd, 2 * dq); + GET_LIN_B(lw.attn_qk_in_b, mk("enc.stages.%d.layers.%d.attn.qk_in.bias", l), 2 * dq); + GET_LIN_W(lw.attn_vg_in_w, mk("enc.stages.%d.layers.%d.attn.vg_in.weight", l), sd, 3 * dv); + GET_LIN_B(lw.attn_vg_in_b, mk("enc.stages.%d.layers.%d.attn.vg_in.bias", l), 3 * dv); + GET_LIN_W(lw.attn_out_w, mk("enc.stages.%d.layers.%d.attn.out.weight", l), dv, sd); + GET_LIN_B(lw.attn_out_b, mk("enc.stages.%d.layers.%d.attn.out.bias", l), sd); + + if (shp.conv_kernel > 0) { + GET_LIN_W(lw.conv_in_w, mk("enc.stages.%d.layers.%d.conv_in.weight", l), sd, 2 * sd); + GET_LIN_B(lw.conv_in_b, mk("enc.stages.%d.layers.%d.conv_in.bias", l), 2 * sd); + GET_CONV_W(lw.conv_dw_w, mk("enc.stages.%d.layers.%d.conv.dw.weight", l), shp.conv_kernel, 1, sd); + GET_LIN_B(lw.conv_dw_b, mk("enc.stages.%d.layers.%d.conv.dw.bias", l), sd); + GET_F32_1D(lw.conv_weighted_mean_w, mk("enc.stages.%d.layers.%d.conv.weighted_mean.weight", l), sd); + GET_LIN_W(lw.conv_out_w, mk("enc.stages.%d.layers.%d.conv_out.weight", l), sd, sd); + GET_LIN_B(lw.conv_out_b, mk("enc.stages.%d.layers.%d.conv_out.bias", l), sd); + + GET_LIN_W(lw.ff2_in_w, mk("enc.stages.%d.layers.%d.ff2.in.weight", l), sd, dff); + GET_LIN_B(lw.ff2_in_b, mk("enc.stages.%d.layers.%d.ff2.in.bias", l), dff); + GET_LIN_W(lw.ff2_out_w, mk("enc.stages.%d.layers.%d.ff2.out.weight", l), dff, sd); + GET_LIN_B(lw.ff2_out_b, mk("enc.stages.%d.layers.%d.ff2.out.bias", l), sd); + } + + GET_F32_1D(lw.out_norm_w, mk("enc.stages.%d.layers.%d.out_norm.weight", l), sd); + } } } diff --git a/src/arch/gigaam/weights.h b/src/arch/gigaam/weights.h index 373463501..e4332b2e4 100644 --- a/src/arch/gigaam/weights.h +++ b/src/arch/gigaam/weights.h @@ -40,9 +40,24 @@ namespace transcribe::gigaam { // --------------------------------------------------------------------------- enum class HeadKind { RNNT, CTC }; +enum class EncoderKind { Conformer, Zapformer }; + +struct ZapformerStageHParams { + int32_t n_layers = 0; + int32_t dim = 0; + int32_t n_heads = 0; + int32_t qdim = 0; + int32_t vdim = 0; + int32_t ff_mult = 0; + int32_t conv_kernel = 0; + int32_t downsampling = 1; + float input_scale = 1.0f; + std::vector residual_scales; // length n_layers + 1 +}; struct GigaamHParams { - HeadKind head_kind = HeadKind::RNNT; + HeadKind head_kind = HeadKind::RNNT; + EncoderKind encoder_kind = EncoderKind::Conformer; // Encoder (Conformer). int32_t enc_n_layers = 0; @@ -60,6 +75,14 @@ struct GigaamHParams { // we read the KV so a future variant change is loud, not silent. std::string enc_conv_norm_type; + // Encoder (Zapformer, GigaAM-v4). + bool zap_causal_frontend = true; + int32_t zap_fe_channels[3] = { 16, 32, 64 }; + std::vector zap_stages; + float zap_out_norm_scale = 0.2f; + float zap_out_norm_eps = 0.1f; + float zap_rope_base = 10000.0f; + // RNN-T predictor + joint (HeadKind::RNNT only). int32_t pred_hidden = 0; int32_t pred_n_layers = 0; @@ -185,6 +208,67 @@ struct GigaamCtcHead { ggml_tensor * bias = nullptr; // [n_classes] }; +struct ZapformerFrontendWeights { + ggml_tensor * conv0_w = nullptr; // [3, 3, 1, c0] + ggml_tensor * conv0_b = nullptr; // [c0] + ggml_tensor * conv1_w = nullptr; // [3, 3, c0, c1] + ggml_tensor * conv1_b = nullptr; // [c1] + ggml_tensor * conv2_w = nullptr; // [3, 3, c1, c2] + ggml_tensor * conv2_b = nullptr; // [c2] + + ggml_tensor * cn_dw_w = nullptr; // [k, k, 1, c2] + ggml_tensor * cn_dw_b = nullptr; // [c2] + ggml_tensor * cn_pw1_w = nullptr; // [1, 1, c2, 3*c2] + ggml_tensor * cn_pw1_b = nullptr; // [3*c2] + ggml_tensor * cn_pw2_w = nullptr; // [1, 1, 3*c2, c2] + ggml_tensor * cn_pw2_b = nullptr; // [c2] + + ggml_tensor * out_w = nullptr; // [c2 * freq_out, d_model] + ggml_tensor * out_b = nullptr; // [d_model] +}; + +struct ZapformerLayerWeights { + ggml_tensor * ff1_in_w = nullptr; + ggml_tensor * ff1_in_b = nullptr; + ggml_tensor * ff1_out_w = nullptr; + ggml_tensor * ff1_out_b = nullptr; + + ggml_tensor * attn_in_norm_w = nullptr; + ggml_tensor * attn_qk_in_w = nullptr; + ggml_tensor * attn_qk_in_b = nullptr; + ggml_tensor * attn_vg_in_w = nullptr; + ggml_tensor * attn_vg_in_b = nullptr; + ggml_tensor * attn_out_w = nullptr; + ggml_tensor * attn_out_b = nullptr; + + // Populated only when stage conv_kernel > 0. + ggml_tensor * conv_in_w = nullptr; + ggml_tensor * conv_in_b = nullptr; + ggml_tensor * conv_dw_w = nullptr; + ggml_tensor * conv_dw_b = nullptr; + ggml_tensor * conv_weighted_mean_w = nullptr; + ggml_tensor * conv_out_w = nullptr; + ggml_tensor * conv_out_b = nullptr; + + ggml_tensor * ff2_in_w = nullptr; + ggml_tensor * ff2_in_b = nullptr; + ggml_tensor * ff2_out_w = nullptr; + ggml_tensor * ff2_out_b = nullptr; + + ggml_tensor * out_norm_w = nullptr; +}; + +struct ZapformerStageWeights { + ggml_tensor * proj_w = nullptr; // [ds * d_model, dim] (scale baked) + ggml_tensor * proj_out_w = nullptr; // [dim, ds * d_model] (transposed) + std::vector layers; +}; + +struct ZapformerWeights { + ZapformerFrontendWeights frontend; + std::vector stages; +}; + struct GigaamWeights { // Baked frontend buffers (always present). ggml_tensor * frontend_mel_filterbank = nullptr; // [n_freq_bins, n_mels] @@ -192,6 +276,7 @@ struct GigaamWeights { GigaamPreEncode pre_encode; std::vector blocks; + ZapformerWeights zapformer; GigaamPredictor predictor; GigaamJoint joint; GigaamCtcHead ctc_head; diff --git a/src/transcribe-meta.cpp b/src/transcribe-meta.cpp index 9db7bb861..3362e89aa 100644 --- a/src/transcribe-meta.cpp +++ b/src/transcribe-meta.cpp @@ -168,6 +168,30 @@ KvResult read_int32_array_kv(const gguf_context * ctx, const char * key, std::ve return KvResult::Ok; } +KvResult read_float32_array_kv(const gguf_context * ctx, const char * key, std::vector & out) { + const int64_t key_id = gguf_find_key(ctx, key); + if (key_id < 0) { + return KvResult::Absent; + } + if (gguf_get_kv_type(ctx, key_id) != GGUF_TYPE_ARRAY) { + return KvResult::BadType; + } + if (gguf_get_arr_type(ctx, key_id) != GGUF_TYPE_FLOAT32) { + return KvResult::BadType; + } + const size_t n = gguf_get_arr_n(ctx, key_id); + const void * data = gguf_get_arr_data(ctx, key_id); + if (data == nullptr && n > 0) { + return KvResult::BadType; + } + std::vector tmp(n); + if (n > 0) { + std::memcpy(tmp.data(), data, n * sizeof(float)); + } + out = std::move(tmp); + return KvResult::Ok; +} + // --------------------------------------------------------------------------- // Higher-level required / optional KV helpers // --------------------------------------------------------------------------- diff --git a/src/transcribe-meta.h b/src/transcribe-meta.h index 4d490db81..30092a1b8 100644 --- a/src/transcribe-meta.h +++ b/src/transcribe-meta.h @@ -74,6 +74,7 @@ KvResult read_string_array_kv(const gguf_context * ctx, const char * key, std::v // Parakeet TDT durations KV (`stt.parakeet.tdt.durations`); generic // enough to live alongside the other low-level readers. KvResult read_int32_array_kv(const gguf_context * ctx, const char * key, std::vector & out); +KvResult read_float32_array_kv(const gguf_context * ctx, const char * key, std::vector & out); // --------------------------------------------------------------------------- // Higher-level required / optional KV helpers From b12d7d5f83944f6826409ac7b2124a89af586a7b Mon Sep 17 00:00:00 2001 From: Nikita Ashikhmin Date: Sun, 29 Nov 2026 10:49:51 +0400 Subject: [PATCH 02/13] gigaam: validation package for GigaAM-v4 (golden, tolerances, smoke) The Zapformer port had no way to be checked against its reference inside the repo's own gates. The family's gigaam package pin has no Zapformer, so v4 gets its reference from the modeling_gigaam.py the HF repo ships, in a separate env, leaving the v3 reference untouched. - scripts/lib/gigaam_v4_hf.py pins ai-sage/GigaAM-v4 at 180301a1 and builds GigaAMDualASR from the snapshot without trust_remote_code; the converter and the new reference dumper read the pin - golden manifest (ru, odd T_enc; fleurs-en) and tolerances at 1.5x the observed drift; C++ dumps enc.stage..out for each Zapformer stack - real-model public-ABI smoke, single and batched - intake, porting log, family doc section - reference WER runner (scripts/wer/run_reference_gigaam_v4_hf.py) - long-form windows start on a multiple of the largest downsampling factor, so the half-rate stack pairs the same frames as whole-clip inference; the loader rejects stage geometry the graph cannot run; Zapformer batches skip the unused packed-batch mel pass - clang-format the Zapformer sources Co-Authored-By: Claude Opus 5.5 --- docs/environment-variables.md | 1 + docs/porting/families/gigaam.md | 134 ++ .../gigaam/gigaam-v4-e2e-rnnt/_porting-log.md | 73 + .../gigaam/gigaam-v4-e2e-rnnt/intake.json | 209 +++ scripts/convert-gigaam-v4.py | 33 +- scripts/dump_reference_gigaam_v4_hf.py | 213 +++ scripts/envs/gigaam-v4/pyproject.toml | 24 + scripts/envs/gigaam-v4/uv.lock | 1514 +++++++++++++++++ scripts/lib/gigaam_v4_hf.py | 117 ++ scripts/test_convert_gigaam.py | 16 + scripts/wer/run_reference_gigaam_v4_hf.py | 154 ++ src/arch/gigaam/encoder.cpp | 30 +- src/arch/gigaam/encoder.h | 4 + src/arch/gigaam/model.cpp | 75 +- src/arch/gigaam/weights.cpp | 110 +- src/arch/gigaam/weights.h | 22 +- tests/CMakeLists.txt | 17 + tests/gigaam_v4_e2e_smoke.cpp | 170 ++ .../gigaam/gigaam-v4-e2e-rnnt.manifest.json | 62 + tests/tolerances/gigaam-v4.json | 73 + 20 files changed, 2971 insertions(+), 80 deletions(-) create mode 100644 reports/porting/gigaam/gigaam-v4-e2e-rnnt/_porting-log.md create mode 100644 reports/porting/gigaam/gigaam-v4-e2e-rnnt/intake.json create mode 100644 scripts/dump_reference_gigaam_v4_hf.py create mode 100644 scripts/envs/gigaam-v4/pyproject.toml create mode 100644 scripts/envs/gigaam-v4/uv.lock create mode 100644 scripts/lib/gigaam_v4_hf.py create mode 100644 scripts/wer/run_reference_gigaam_v4_hf.py create mode 100644 tests/gigaam_v4_e2e_smoke.cpp create mode 100644 tests/golden/gigaam/gigaam-v4-e2e-rnnt.manifest.json create mode 100644 tests/tolerances/gigaam-v4.json diff --git a/docs/environment-variables.md b/docs/environment-variables.md index 9fa946e6a..fc22b9895 100644 --- a/docs/environment-variables.md +++ b/docs/environment-variables.md @@ -88,6 +88,7 @@ its var is unset. Convention: `TRANSCRIBE__GGUF`. | `TRANSCRIBE_PARAKEET_GGUF` | `parakeet_real_smoke`, `decoder_smoke` | | `TRANSCRIBE_PARAKEET_UNIFIED_GGUF` | `parakeet_buffered_stream_eos_smoke`, `stream_offline_interleave_smoke` | | `TRANSCRIBE_GIGAAM_GGUF` | `gigaam_workspace_release_smoke` | +| `TRANSCRIBE_GIGAAM_V4_GGUF` | `gigaam_v4_e2e_smoke` | | `TRANSCRIBE_MULTITALKER_BUNDLE_GGUF` | `parakeet_multitalker_e2e_smoke` | | `TRANSCRIBE_SORTFORMER_GGUF` | `sortformer_diarize_unit`, `cli_diarize_smoke` | | `TRANSCRIBE_ECAPA_TDNN_GGUF` | `ecapa_tdnn_real_smoke`, `cli_langid_smoke` (its real-model check) | diff --git a/docs/porting/families/gigaam.md b/docs/porting/families/gigaam.md index b15f18e26..19d38c46a 100644 --- a/docs/porting/families/gigaam.md +++ b/docs/porting/families/gigaam.md @@ -11,12 +11,18 @@ pretraining checkpoint) intentionally out of scope. C++ change; WER, benchmarks, and publication are not done. See [GigaAM Multilingual Large CTC](#gigaam-multilingual-large-ctc). +`gigaam-v4-e2e-rnnt` (ai-sage/GigaAM-v4) adds the Zapformer encoder to the +runtime. It converts and validates at F32, and its quants match the +reference on the checked samples; publication is not done. See +[GigaAM-v4 E2E RNN-T](#gigaam-v4-e2e-rnnt). + ## Identity - Family key: `gigaam` - Upstream architecture string: `gigaam` (HF `model_type`); paper name "GigaAM" (Sber/ai-sage, InterSpeech 2025, arXiv:2506.01192) - Hugging Face repo: `ai-sage/GigaAM-v3` (five sibling branches upstream; four ported) - Also converted, not yet published: `gigaam-multilingual-large-ctc` from `ai-sage/GigaAM-Multilingual`, see [GigaAM Multilingual Large CTC](#gigaam-multilingual-large-ctc) +- Also converted, not yet published: `gigaam-v4-e2e-rnnt` from `ai-sage/GigaAM-v4`, see [GigaAM-v4 E2E RNN-T](#gigaam-v4-e2e-rnnt) - License: MIT - v3 variants in scope (one HF branch each): @@ -324,3 +330,131 @@ runs the reference side. `TRANSCRIBE_GIGAAM_GGUF= ctest --test-dir build -R gigaam` passes with the F32, F16, and Q8_0 GGUFs of this variant. + +## GigaAM-v4 E2E RNN-T + +Variant `gigaam-v4-e2e-rnnt` is the `e2e` head of +[`ai-sage/GigaAM-v4`](https://huggingface.co/ai-sage/GigaAM-v4), pinned at +commit `180301a192bb45bc2b2ca122e0d4aab24ffe7a96` (`main`; the `rnnt` +branch holds the same files). Languages: ru, en. Output is cased and +punctuated. Offline only. + +v4 replaces the v3 Conformer with a Zapformer encoder: a 2D conv frontend +with a ConvNeXt block (4x subsampling), then three stacks of 4, 11 and 4 +layers at 768, 1024 and 768 dims. The middle stack runs at half the frame +rate on pairs of frames stacked into a 1536-wide input. Each layer is +feed-forward, RoPE attention with separate query/key and value/gate +inputs, an optional convolution module (none in the middle stack), a +second feed-forward, and an RmsNorm; each stack mixes its layers' outputs +through learned `residual_scales`. The RNN-T head (320-wide LSTM +predictor and joint, 1024 SentencePiece pieces + blank) has the v3 shape, +and the mel frontend has the v3 values. The checkpoint also has a `raw` +head (lowercase, no punctuation) on the same encoder; +`convert-gigaam-v4.py --head raw` writes it, but it has no golden manifest +and has not been validated. + +| Item | Path | +|---|---| +| Intake | `reports/porting/gigaam/gigaam-v4-e2e-rnnt/intake.json` | +| Porting log | `reports/porting/gigaam/gigaam-v4-e2e-rnnt/_porting-log.md` | +| Golden manifest | `tests/golden/gigaam/gigaam-v4-e2e-rnnt.manifest.json` | +| Tolerances | `tests/tolerances/gigaam-v4.json` | +| Pin and reference loader | `scripts/lib/gigaam_v4_hf.py` | +| Converter | `scripts/convert-gigaam-v4.py` | +| Reference dumper | `scripts/dump_reference_gigaam_v4_hf.py` | +| Python env | `scripts/envs/gigaam-v4/` | +| C++ | `src/arch/gigaam/encoder.cpp` (`build_zapformer_encoder_graph`), `weights.cpp` (`EncoderKind::Zapformer`) | +| Smoke test | `tests/gigaam_v4_e2e_smoke.cpp` (`TRANSCRIBE_GIGAAM_V4_GGUF`) | + +### Commands + +Conversion (writes `models/gigaam-v4-e2e-rnnt/gigaam-v4-e2e-rnnt-F32.gguf`, +956411456 bytes, 348 tensors): + +```bash +uv run --project scripts/envs/gigaam-v4 scripts/convert-gigaam-v4.py ai-sage/GigaAM-v4 +uv run scripts/quantize-all.py models/gigaam-v4-e2e-rnnt/gigaam-v4-e2e-rnnt-F32.gguf +``` + +The converter downloads `config.json`, `model.safetensors`, +`modeling_gigaam.py` and both tokenizers at the pinned commit into +`$TRANSCRIBE_MODELS_DIR/GigaAM-v4@/` or the Hugging Face cache. A +local directory is accepted too, for a snapshot downloaded by hand. + +Validation: + +```bash +uv run scripts/preflight.py --family gigaam --variant gigaam-v4-e2e-rnnt --gate B +uv run scripts/validate.py all --family gigaam --variant gigaam-v4-e2e-rnnt +TRANSCRIBE_GIGAAM_V4_GGUF=$PWD/models/gigaam-v4-e2e-rnnt/gigaam-v4-e2e-rnnt-Q8_0.gguf \ + ctest --test-dir build -R gigaam_v4 +``` + +### Reference + +The family's `gigaam` package pin (6e4b027c) has no Zapformer, so v4 does +not use it. The repo ships the author implementation as +`modeling_gigaam.py` (the transformers remote-code module). +`scripts/lib/gigaam_v4_hf.py` imports that file from the pinned snapshot +and builds `GigaAMDualASR` from `config.json` and `model.safetensors` +with the `model.` key prefix removed, in F32 on CPU, without +`trust_remote_code`. It runs in its own env, `scripts/envs/gigaam-v4` +(torch, torchaudio, `transformers<5`, omegaconf, sentencepiece), so the v3 +env does not change. The dumper reads the WAV with soundfile; the +module's `load_audio` calls ffmpeg. + +The checkpoint stores the encoder in F16 (including the stage scalars and +the output RmsNorm's learned scale and eps) and the heads in F32. The F32 +GGUF holds exact upcasts of those values, except the stage `proj` / +`proj_out` weights: the converter multiplies them by the OrthogonalLinear +`weight_scale` (`in_channels^-0.5 / 0.3`). F16 re-rounds those and the +heads. + +C++ dumps `enc.stage..out` for each stack, before frames are +unstacked, so the shapes are `[T_pad / ds, ds * D]` on both sides. + +### Capability Validation + +| Capability | Mode | Command / test | Expected observable | Status | +|------------|------|----------------|---------------------|--------| +| Transcribe (ru, en) | no language hint | `build/bin/transcribe-cli -m ` | transcript equal to the reference's | PASS on `samples/ru.wav`, `fleurs-ru.wav`, `ru-short.wav`, `fleurs-en.wav`, `jfk.wav`: exact for F32, F16, Q8_0, Q6_K and Q5_K_M on CPU and Metal; Q4_K_M differs by one comma on `ru-short` and one on `fleurs-en`. | +| Long-form (> 25 s, windowed) | no language hint | same on `samples/ru-long.wav` (33.8 s), and on 12 concatenated FLEURS ru/en clips (34-98 s) whose windows start on an odd frame | transcript equal to the reference's whole-clip decode (`ru-long`); equal to the reference run with the C++ windows (FLEURS clips) | PASS (`ru-long` Q8_0 Metal; FLEURS clips F32 Metal, 12/12). Window starts are rounded down to an even frame so the half-rate stack pairs the same frames as whole-clip inference. | +| Batch | `transcribe_run_batch` | `transcribe_gigaam_v4_e2e_smoke` | each batch result equal to its single run | PASS. Zapformer takes the per-utterance loop, not the packed batch encode. | +| Raw head, streaming, translate, language detection | n/a | n/a | n/a | SKIP (not converted / not exposed). | +| Word timestamps | n/a | n/a | n/a | ACCEPTED GAP, as for v3: token timestamps only. | + +Numerical validation at F32 on CPU, one thread, on `ru` (113 encoder +frames, odd, so the padded tail is masked) and `fleurs-en` (264 frames) +is within the tolerances with exact transcripts; the observed drift is in +the `_comment` of the tolerance file. The largest drift is at `enc.out`, +5.7e-4 on `ru` and 9.6e-4 on `fleurs-en`. + +Reference WER baseline: the PyTorch reference (the module the dumper +builds, F32, CPU, whole-clip greedy decode) over the same FLEURS test +manifests, scored by `scripts/wer/score.py` like the C++ reports: + +```bash +uv run --project scripts/envs/gigaam-v4 scripts/wer/run_reference_gigaam_v4_hf.py \ + --variant v4_e2e_rnnt \ + --manifest samples/wer/fleurs-ru.manifest.jsonl \ + --out reports/wer/gigaam-v4-e2e-rnnt-REF.fleurs-ru.jsonl +uv run scripts/wer/score.py reports/wer/gigaam-v4-e2e-rnnt-REF.fleurs-ru.jsonl --language ru +``` + +FLEURS test WER. C++ rows: Metal, `scripts/wer/run.py --batch-size 8`, +timestamps none (not a publication-profile run): + +| Run | ru (775 utts) | en (647 utts) | +|---|---:|---:| +| `gigaam-v4-e2e-rnnt` PyTorch reference | 4.34% [3.92, 4.82] | 4.92% [4.49, 5.41] | +| `gigaam-v4-e2e-rnnt` F32 | 4.35% [3.92, 4.83] | 4.92% [4.48, 5.42] | +| `gigaam-v4-e2e-rnnt` Q8_0 | 4.36% [3.93, 4.84] | 4.92% [4.47, 5.42] | +| `gigaam-v3-e2e-rnnt` Q8_0 | 5.38% [4.89, 5.91] | n/a | + +The F32 row passes the family's `C++ <= reference + 0.01pp` gate: ru +4.3501% vs 4.3435% (+0.0066pp, one more substitution), en equal (712 +errors on both). The F32 hypotheses equal the reference's on 766 of 775 +ru and 639 of 647 en utterances; the rest are near ties (a comma, a +plural ending, a transliterated name). + +The other quants and benchmarks have not been run. diff --git a/reports/porting/gigaam/gigaam-v4-e2e-rnnt/_porting-log.md b/reports/porting/gigaam/gigaam-v4-e2e-rnnt/_porting-log.md new file mode 100644 index 000000000..989693714 --- /dev/null +++ b/reports/porting/gigaam/gigaam-v4-e2e-rnnt/_porting-log.md @@ -0,0 +1,73 @@ +# gigaam / gigaam-v4-e2e-rnnt porting log + +Surprises worth feeding back into the docs and tooling. + +- **The family reference package cannot build v4.** `gigaam` at 6e4b027c + has no `ZapformerEncoder`, and the v4 config is a different schema + (`cfg.encoder` / `cfg.heads` / `cfg.decodings` at the top level, two + heads) from the v3 one (`cfg.model.cfg`). The reference is the + `modeling_gigaam.py` the repo ships, imported from the pinned snapshot + by `scripts/lib/gigaam_v4_hf.py`, in its own env + (`scripts/envs/gigaam-v4`), so the v3 env, pin and reference do not move. +- **A separate converter, not a `VARIANT_PROFILES` entry.** The weights + are `model.safetensors` (v3 and Multilingual: `pytorch_model.bin` or the + package download), the tensor names have nothing in common with the + Conformer's, and the scalar stage parameters (`input_scale`, + `residual_scales`, the output RmsNorm scale and eps) go to GGUF KVs + instead of tensors, so they stay exact under quantization. + `scripts/test_convert_gigaam.py` compared every gigaam golden manifest + with `convert-gigaam.py`'s profiles; it now skips manifests whose + reference is not `dump_reference_gigaam_author.py`, and a new case + checks the v4 manifest against the pin. +- **The converter output is byte-identical to the GGUFs published by the + author of the Zapformer port** (https://huggingface.co/70sh1/gigaam-v4-e2e-rnnt-gguf): + F32 sha256 `6cd32ae7…cd745`, Q8_0 `debd6179…e3e29`. +- **`main` and `rnnt` are different commits with the same files.** The + model card says `main` is the rnnt revision; `rnnt` (9fe3ebf5) re-applies + the same commit message on top of `main` (180301a1), and every file's + blob / LFS id is equal. The pin is `main`. +- **The encoder is F16 in the checkpoint**, 349 of 373 tensors, including + the stage scalars and the output RmsNorm's learned scale (0.9951) and eps + (7.7e-6); the module's constructor defaults, 0.2 and 0.1, are not what + the checkpoint holds. The 24 F32 tensors are the two heads and the mel + buffers. The converter bakes the OrthogonalLinear weight_scale into the + stage proj / proj_out weights, so those are not exact upcasts in the F32 + GGUF, and the F16 GGUF re-rounds them along with the heads. +- **The Conformer's per-block dumps do not map onto Zapformer.** C++ now + dumps `enc.stage..out` for each stack, taken before the frame + unstacking so the shape matches the PyTorch `ZapformerStack` output + without a reshape on either side. +- **Odd frame counts take a padded path.** The middle stack stacks frame + pairs, so an odd `T_enc` is padded by one frame, masked in the + full-rate stacks' attention and convolution, and dropped before the + final norm. `samples/ru.wav` has `T_enc = 113`, so the `ru` golden case + covers it; `fleurs-en` (264) covers the even path. +- **No fixture smoke.** The gigaam family has no synthetic-GGUF smoke test + for v3 either; v4 adds the real-model public-ABI smoke + (`transcribe_gigaam_v4_e2e_smoke`), which also runs both clips through + `transcribe_run_batch`. +- **`uv run scripts/wer/ingest.py fleurs` failed under Python 3.14** + (`Pickler._batch_setitems() takes 2 positional arguments but 3 were + given` from `datasets`); uv picked a 3.14 interpreter from the PATH. + `uv run --python 3.12` works. +- **Batching.** `run_batch` keeps the per-utterance loop for Zapformer + instead of the packed batch encode; batch results equal single runs. +- **Reference WER baseline.** `scripts/wer/run_reference_gigaam_v4_hf.py` + runs the dumper's forward and greedy decode over a WER manifest. FLEURS + test: reference 4.34% ru / 4.92% en, C++ F32 (Metal, batch 8) 4.35% / + 4.92%. ru is +0.0066pp, inside the family's +0.01pp gate; the F32 + hypotheses differ from the reference's on 9 of 775 ru and 8 of 647 en + utterances, all near ties. +- **Long-form windows start on an even frame.** Audio past 25 s is + encoded in overlapping windows whose start (`a - 50`) can be odd, and the + half-rate stack pairs frames from the window's first frame, so the pairs + inside the window were shifted against whole-clip inference. Window + starts are now rounded down to the largest downsampling factor. Checked + on 12 concatenated FLEURS clips (34-98 s, each with an odd window start): + C++ F32 equals PyTorch run with the same windows on all 12 (before the + change, 22 word edits against it). WER against the FLEURS text did not + move measurably (ru equal; en within 6 words on 6 clips). +- **Loader checks for stage geometry.** A GGUF with an odd `qdim`, an even + conv kernel, a zero downsampling factor or one that does not divide the + largest, now fails to load with `TRANSCRIBE_ERR_GGUF` instead of asserting + inside ggml. diff --git a/reports/porting/gigaam/gigaam-v4-e2e-rnnt/intake.json b/reports/porting/gigaam/gigaam-v4-e2e-rnnt/intake.json new file mode 100644 index 000000000..8a0e00a28 --- /dev/null +++ b/reports/porting/gigaam/gigaam-v4-e2e-rnnt/intake.json @@ -0,0 +1,209 @@ +{ + "schema_version": "transcribe-intake-v1", + "family": "gigaam", + "hf_repo": "ai-sage/GigaAM-v4", + "hf_revision": "180301a192bb45bc2b2ca122e0d4aab24ffe7a96", + "sources": { + "config": { + "kind": "hf_file", + "path": "config.json", + "status": "found", + "detail": "Branch main (the model card says main is the rnnt revision; the rnnt branch, 9fe3ebf5, holds byte-identical files). Hydra-style config under cfg: encoder=gigaam.encoder.ZapformerEncoder (frontend_channels 16,32,64; num_encoder_layers 4,11,4; encoder_dim 768,1024,768; num_heads 12,16,12; query/value_head_dim 32; feedforward_multiple 4; conv_params 5,0,5; downsampling_factor 1,2,1; activation SiLU; causal_frontend true; dual_mode true with chunk_size [-1,4,8,16]). Two RNN-T heads, e2e and raw, each pred_hidden=320, 1 LSTM layer, joint_hidden=320, num_classes=1025. No language_conditioning section." + }, + "preprocessor": { + "kind": "hf_file", + "path": "preprocessor_config.json|feature_extractor_config.json", + "status": "missing", + "detail": "Frontend declared inside config.json under cfg.preprocessor: features=64, n_fft=320, win_length=320, hop_length=160, center=false, mel_scale=htk, mel_norm=null, lowfreq=0, highfreq=8000. Same values as gigaam-v3." + }, + "tokenizer_config": { + "kind": "hf_file", + "path": "tokenizer_config.json", + "status": "missing", + "detail": "Not used; decodings name the SentencePiece files directly." + }, + "tokenizer_model": { + "kind": "hf_file", + "path": "e2e_tokenizer.model|raw_tokenizer.model", + "status": "found", + "detail": "Two SentencePiece models, 1024 pieces each; blank = 1024 appended after the vocabulary. e2e (LFS sha256 f547bcb3...) emits cased, punctuated text; raw (dcbe2598...) emits lowercase text without punctuation. This variant is e2e; the converter also writes raw (--head raw), which is not validated." + }, + "tokenizer_json": { + "kind": "hf_file", + "path": "tokenizer.json", + "status": "missing", + "detail": "Not used." + }, + "generation_config": { + "kind": "hf_file", + "path": "generation_config.json", + "status": "missing", + "detail": "Greedy RNN-T decoding (max_symbols_per_step=10); no HF generation_config." + }, + "model_weights": { + "kind": "hf_file", + "path": "model.safetensors", + "status": "found", + "detail": "486,276,070 bytes, LFS sha256 2c38690c38edbd9dfc2190f1a2dacdcfbea2a692078457fc145a6034c031840a. 373 tensors: 349 F16 (the encoder, including the stage input_scale / residual_scales and the output RmsNorm scale and eps) and 24 F32 (the 22 tensors of the two RNN-T heads, plus the mel filterbank and window buffers). Every key is prefixed `model.` by the HF wrapper. The repo also ships vad.safetensors for long-form segmentation, which is not used." + }, + "safetensors_metadata": { + "kind": "hf_api", + "path": "HfApi.get_safetensors_metadata", + "status": "found", + "detail": "Header metadata {format: pt}; dtype split as in model_weights." + }, + "model_card": { + "kind": "hf_api", + "path": "https://huggingface.co/ai-sage/GigaAM-v4", + "status": "found", + "detail": "Russian WER table (Golos, Russian LibriSpeech, Common Voice 27, in-house sets) and English Open ASR public-subset table; full-context and streaming (160/320/640 ms) modes; ssl, ctc and rnnt branches." + }, + "reference_modeling_code": { + "kind": "reference_code", + "path": "modeling_gigaam.py in ai-sage/GigaAM-v4 @ 180301a1 (built locally by scripts/lib/gigaam_v4_hf.py)", + "status": "found", + "detail": "Author code, MIT, the transformers remote-code module for this repo. Defines ZapformerEncoder, GigaAMDualASR, RNNTHead and RNNTGreedyDecoding. The gigaam package pinned for v3 (salute-developers/GigaAM 6e4b027c) has no Zapformer." + } + }, + "variants": [ + { + "name": "gigaam-v4-e2e-rnnt", + "memory_gb": 0.49, + "files": [ + "config.json", + "modeling_gigaam.py", + "model.safetensors", + "e2e_tokenizer.model", + "raw_tokenizer.model" + ] + } + ], + "config": { + "architecture_candidates": [ + "encoder-transducer" + ], + "key_fields": { + "model_type": "gigaam", + "model_name": "rnnt", + "encoder.type": "ZapformerEncoder", + "encoder.in_channels": 64, + "encoder.frontend_channels": [16, 32, 64], + "encoder.num_encoder_layers": [4, 11, 4], + "encoder.encoder_dim": [768, 1024, 768], + "encoder.num_heads": [12, 16, 12], + "encoder.query_head_dim": 32, + "encoder.value_head_dim": 32, + "encoder.feedforward_multiple": 4, + "encoder.conv_kernel": [5, 0, 5], + "encoder.downsampling_factor": [1, 2, 1], + "encoder.activation": "SiLU", + "encoder.causal_frontend": true, + "encoder.dual_mode": true, + "encoder.subsampling_factor": 4, + "head.type": "RNNTHead", + "head.pred_hidden": 320, + "head.pred_rnn_layers": 1, + "head.joint_hidden": 320, + "head.num_classes": 1025, + "decoding": "RNNTGreedyDecoding", + "tokenizer.kind": "sentencepiece", + "tokenizer.vocab_size_plus_blank": 1025 + }, + "varying_across_variants": [ + "head (e2e vs raw tokenizer and joint weights)" + ] + }, + "dtype": { + "expected": "float32", + "source": "manual", + "evidence": "The checkpoint stores the encoder in F16 and the heads in F32. modeling_gigaam.py computes in F32 on CPU (autocast only on CUDA with an F16 encoder), and the reference upcasts with .float(). The F32 GGUF holds exact upcasts of the checkpoint values, except the stage proj / proj_out weights, which the converter multiplies by the OrthogonalLinear weight_scale (in_channels^-0.5 / 0.3) in F32. The F16 GGUF re-rounds those projections and the head tensors.", + "details": { + "config_declared": "float32", + "header_distribution": { + "F16": 349, + "F32": 24 + } + }, + "expected_f32_tensors": [] + }, + "frontend": { + "sample_rate": 16000, + "n_mels": 64, + "hop_length": 160, + "fft_size": 320, + "window": "hann_periodic", + "normalization": "none", + "preemphasis": null, + "dither": null, + "center": false, + "padding_mode": null, + "mel_filterbank_norm": "htk" + }, + "tokenizer": { + "type": "sentencepiece", + "vocab_size": 1024, + "special_tokens": { + "blank": 1024 + }, + "has_language_tokens": false, + "vocab_sha256": null + }, + "capabilities": { + "languages": ["ru", "en"], + "language_detection": false, + "translation": false, + "timestamps": [], + "streaming": false, + "speaker_diarization": false + }, + "upstream_benchmarks": [ + { + "dataset": "Russian LibriSpeech", + "language": "ru", + "metric": "wer", + "score": 3.69, + "score_unit": "percent", + "source": "https://huggingface.co/ai-sage/GigaAM-v4", + "notes": "GigaAM-v4 RNN-T column, full-context e2e output. The card does not report FLEURS." + }, + { + "dataset": "Mozilla Common Voice 27", + "language": "ru", + "metric": "wer", + "score": 2.29, + "score_unit": "percent", + "source": "https://huggingface.co/ai-sage/GigaAM-v4", + "notes": "Same column." + }, + { + "dataset": "Open ASR public subset (average of 7 sets)", + "language": "en", + "metric": "wer", + "score": 7.28, + "score_unit": "percent", + "source": "https://huggingface.co/ai-sage/GigaAM-v4", + "notes": "GigaAM-v4 RNN-T column, full-context e2e output." + } + ], + "reference_framework": "author_repo_gigaam", + "reference_rationale": "The family's reference package (salute-developers/GigaAM 6e4b027c) has no Zapformer, and the variant's own repo ships the author implementation as modeling_gigaam.py. scripts/lib/gigaam_v4_hf.py imports that file from the pinned snapshot and builds GigaAMDualASR from config.json and model.safetensors on CPU in F32, without trust_remote_code or transformers' download path. It runs in its own env, scripts/envs/gigaam-v4, so the v3 env and its reference stay as they are.", + "architecture_pattern": "encoder-transducer", + "known_risks": [ + "New encoder: Zapformer (2D conv frontend + ConvNeXt, then three stacks with OrthogonalLinear in/out projections, learned residual_scales and input_scale, RoPE attention with separate qk / vg inputs, a convolution module with a weighted-mean gate, an output RmsNorm with a learned scale and eps, 0.9951 and 7.7e-6 in this checkpoint). Nothing is shared with the v3 Conformer graph except the mel frontend and the RNN-T head.", + "Stage 1 runs at half the frame rate by stacking pairs of frames into a 1536-wide input; an odd frame count is padded to the largest downsampling factor, and the padded frame must be masked in attention and in the convolution module of the full-rate stages.", + "dual_mode checkpoints carry chunked/windowed attention rules for streaming; the offline path uses chunk_size=-1 (full context), which is the only mode ported.", + "The dual checkpoint has two heads on one encoder. Only e2e is validated; `convert-gigaam-v4.py --head raw` writes a raw GGUF (same encoder tensors, different head and tokenizer) that has no golden manifest or reference variant.", + "Encoder weights are F16 in the checkpoint; F32 GGUF values are exact upcasts except the stage projections, which carry the baked OrthogonalLinear scale.", + "The C++ batch path runs Zapformer utterances one by one instead of packing them into one encoder graph." + ], + "intake_gaps": [ + { + "field": "upstream_benchmarks", + "reason": "Published scores are context only and are not on FLEURS. The FLEURS ru / en reference WER baseline was measured with the PyTorch module (scripts/wer/run_reference_gigaam_v4_hf.py): 4.34% / 4.92%; C++ F32 4.35% / 4.92% (see the porting log)." + }, + { + "field": "variants", + "reason": "The raw head (convertible but not validated) and the ctc branch (5b81216a) are not part of this port." + } + ] +} diff --git a/scripts/convert-gigaam-v4.py b/scripts/convert-gigaam-v4.py index 9874b2a12..84131c745 100644 --- a/scripts/convert-gigaam-v4.py +++ b/scripts/convert-gigaam-v4.py @@ -30,6 +30,7 @@ gguf_writer, safe_id, ) +from lib.gigaam_v4_hf import HEADS, REPO_ID, REVISION, snapshot_dir # noqa: E402 def parse_int_list(value) -> list[int]: @@ -367,13 +368,33 @@ def add(src_name: str, dst_name: str) -> None: def main(argv: list[str]) -> int: - p = argparse.ArgumentParser(description="Convert ai-sage/GigaAM-v4 directory to GGUF.") - p.add_argument("model_dir", type=Path, help="Directory with model.safetensors, config.json, *_tokenizer.model") - p.add_argument("out_path", type=Path, help="Output .gguf path") - p.add_argument("--head", choices=("e2e", "raw"), default="e2e", help="RNN-T head to export (default: e2e)") - p.add_argument("--repo-id", default="ai-sage/GigaAM-v4", help="Upstream HF repo id for metadata") + p = argparse.ArgumentParser(description="Convert ai-sage/GigaAM-v4 to GGUF.") + p.add_argument( + "model", + help=f"{REPO_ID}, fetched at the commit pinned in scripts/lib/gigaam_v4_hf.py " + f"({REVISION[:12]}), or a local directory with model.safetensors, " + "config.json and *_tokenizer.model from that commit", + ) + p.add_argument("out_path", type=Path, nargs="?", + help="Output .gguf path (default: models/gigaam-v4--rnnt/gigaam-v4--rnnt-F32.gguf)") + p.add_argument("--head", choices=HEADS, default="e2e", help="RNN-T head to export (default: e2e)") args = p.parse_args(argv[1:]) - convert(args.model_dir, args.out_path, args.head, args.repo_id) + + local = Path(args.model).expanduser() + if local.is_dir(): + model_dir = local.resolve() + print(f"Converting local directory {model_dir}; make sure it holds {REPO_ID}@{REVISION}") + elif args.model == REPO_ID: + model_dir = snapshot_dir() + else: + print(f"error: expected {REPO_ID} or a local directory, got {args.model!r}", file=sys.stderr) + return 2 + + out_path = args.out_path + if out_path is None: + slug = f"gigaam-v4-{args.head}-rnnt" + out_path = Path(__file__).resolve().parent.parent / "models" / slug / f"{slug}-F32.gguf" + convert(model_dir, out_path, args.head, REPO_ID) return 0 diff --git a/scripts/dump_reference_gigaam_v4_hf.py b/scripts/dump_reference_gigaam_v4_hf.py new file mode 100644 index 000000000..94021a49c --- /dev/null +++ b/scripts/dump_reference_gigaam_v4_hf.py @@ -0,0 +1,213 @@ +#!/usr/bin/env python3 +""" +dump_reference_gigaam_v4_hf.py - generate GigaAM-v4 reference tensors with +the `modeling_gigaam.py` that ai-sage/GigaAM-v4 ships, at the commit pinned +in scripts/lib/gigaam_v4_hf.py. + +The v3 dumper (dump_reference_gigaam_author.py) goes through the pinned +`gigaam` package, which has no Zapformer encoder; v4 has its own env +(scripts/envs/gigaam-v4) and this dumper. + +Usage: + + uv run --project scripts/envs/gigaam-v4 \\ + scripts/dump_reference_gigaam_v4_hf.py decode \\ + --variant v4_e2e_rnnt \\ + --audio samples/ru.wav \\ + --out build/validate/gigaam/gigaam-v4-e2e-rnnt/ru/decode/ref + +Dump points (match tests/tolerances/gigaam-v4.json): + + frontend.mel.out log-mel features after FeatureExtractor, [n_mels, T_mel] + enc.subsample.out ZapformerFrontend output (4x conv subsampling), [T, D] + enc.stage.{s}.out ZapformerStack s output before frame unstacking, + [T_pad / ds, ds * D] (T_pad = T rounded up to the + largest downsampling factor) + enc.out encoder output after the final RmsNorm, [D, T] + rnnt.encoded enc.out transposed as fed to the joint, [T, D] + transcript.json greedy RNN-T decode of the selected head +""" + +from __future__ import annotations + +import argparse +import sys +from pathlib import Path +from typing import Any + +import numpy as np + +_THIS_DIR = Path(__file__).resolve().parent +sys.path.insert(0, str(_THIS_DIR)) +from lib.gigaam_v4_hf import REPO_ID, REVISION, check_revision, load_model, snapshot_dir # noqa: E402 +from lib.ref_dump import write_tensor, write_transcript # noqa: E402 + +# variant key -> RNN-T head of the dual checkpoint. +VARIANT_HEADS = {"v4_e2e_rnnt": "e2e"} + + +def configure_torch(threads: int) -> None: + import torch + + torch.manual_seed(0) + if threads > 0: + torch.set_num_threads(threads) + torch.set_num_interop_threads(1) + torch.use_deterministic_algorithms(True, warn_only=True) + + +def to_np(t) -> np.ndarray: + import torch + + if isinstance(t, torch.Tensor): + a = t.detach().to(dtype=torch.float32, device="cpu").numpy() + else: + a = np.asarray(t, dtype=np.float32) + while a.ndim > 1 and a.shape[0] == 1: + a = a[0] + return np.ascontiguousarray(a, dtype=np.float32) + + +class CaptureHook: + """Record the first output tensor a module emits during forward.""" + + def __init__(self) -> None: + self.value = None + + def __call__(self, module, inputs, output) -> None: + if self.value is None: + self.value = output[0] if isinstance(output, tuple) else output + + +def cmd_decode(args: argparse.Namespace) -> int: + try: + check_revision(args.revision) + except ValueError as e: + raise SystemExit(f"error: {e}") from None + if args.model not in (None, REPO_ID): + raise SystemExit( + f"error: {args.variant} loads from the Hugging Face repo {REPO_ID} at " + f"{REVISION}, got --model {args.model!r}" + ) + head_name = VARIANT_HEADS[args.variant] + + import soundfile as sf + import torch + + configure_torch(args.torch_threads) + model, _ = load_model(snapshot_dir(), args.device) + + audio_path = Path(args.audio).expanduser().resolve() + out_dir = Path(args.out).expanduser().resolve() + out_dir.mkdir(parents=True, exist_ok=True) + + # Read the WAV directly (the module's load_audio shells out to ffmpeg); + # samples/*.wav are 16 kHz mono, which is what the C++ side reads too. + pcm, sr = sf.read(str(audio_path), dtype="float32", always_2d=False) + if sr != 16000 or pcm.ndim != 1: + raise SystemExit(f"error: {audio_path} must be 16 kHz mono (got sr={sr}, shape={pcm.shape})") + print(f"audio: {audio_path.name} samples={pcm.size} sr={sr}") + + device = torch.device(args.device) + wav = torch.from_numpy(pcm).to(device).unsqueeze(0) + length = torch.full([1], wav.shape[-1], dtype=torch.long, device=device) + + source: dict[str, Any] = { + "kind": "gigaam-v4-hf", + "framework": "author_repo_gigaam", + "hf_repo": REPO_ID, + "hf_revision": REVISION, + "variant": args.variant, + "head": head_name, + "device": args.device, + "torch_threads": args.torch_threads, + "model_dtype": "f32", + "audio": audio_path.name, + "n_samples": int(pcm.size), + "sample_rate": sr, + } + + def dump(name: str, t, stage: str) -> None: + a = to_np(t) + print(f" {name}: shape={a.shape} min={a.min():.4e} max={a.max():.4e} mean={a.mean():.6e}") + write_tensor(name, a, stage=stage, source=source, out_dir=out_dir) + + with torch.inference_mode(): + feats, feat_lengths = model.preprocessor(wav, length) + print(f"frontend: feats.shape={tuple(feats.shape)} feat_lengths={feat_lengths.tolist()}") + dump("frontend.mel.out", feats, "frontend.mel") + + encoder = model.encoder + frontend_hook = CaptureHook() + encoder.encoder_embed.register_forward_hook(frontend_hook) + stage_hooks = [] + for stack in encoder.encoder.encoders: + h = CaptureHook() + stack.register_forward_hook(h) + stage_hooks.append(h) + + # GigaAM.forward without language conditioning (the checkpoint has none) + # and without autocast (CPU, F32): preprocessor + offline encoder. + with torch.inference_mode(): + encoded, encoded_len = encoder(feats, feat_lengths) + print(f"encoder: encoded.shape={tuple(encoded.shape)} encoded_len={encoded_len.tolist()}") + + dump("enc.subsample.out", frontend_hook.value, "encoder.subsample") + for s, h in enumerate(stage_hooks): + dump(f"enc.stage.{s}.out", h.value, f"encoder.stage.{s}") + dump("enc.out", encoded, "encoder.out") + dump("rnnt.encoded", encoded.transpose(1, 2).contiguous(), "decoder.rnnt.encoded") + + head = model.heads[head_name] + decoding = model.decodings[head_name] + with torch.inference_mode(): + text, token_ids, token_frames = decoding.decode(head, encoded, encoded_len)[0] + print(f"transcript: {text!r}") + print(f"tokens: {len(token_ids)} ids, first few = {token_ids[:10]}") + write_transcript( + out_dir, + text, + source={ + **source, + "decoder": "RNNTGreedyDecoding", + "blank_id": int(decoding.blank_id), + "token_frames": [int(f) for f in token_frames], + }, + tokens=[int(t) for t in token_ids], + ) + return 0 + + +def add_common_args(p: argparse.ArgumentParser) -> None: + p.add_argument("--variant", required=True, choices=sorted(VARIANT_HEADS), + help="GigaAM-v4 variant key") + p.add_argument("--audio", required=True, help="16 kHz mono WAV path") + p.add_argument("--out", required=True, help="Output directory for dumps") + p.add_argument("--device", default="cpu", help="torch device (default: cpu)") + p.add_argument("--torch-threads", type=int, default=1, + help="torch.set_num_threads (0 = unchanged)") + # Standard dumper CLI shape (validate.py passes --model, --language and, + # for gigaam, --revision). + p.add_argument("--model", default=None, + help=f"HF repo id; only {REPO_ID} is accepted (default: it)") + p.add_argument("--language", default=None, + help="Language hint (no-op; the v4 RNN-T heads take no language input)") + p.add_argument("--revision", default=None, + help="Commit the caller expects, e.g. the golden manifest's " + "hf_revision; refused when it differs from the pin.") + + +def main(argv: list[str] | None = None) -> int: + p = argparse.ArgumentParser(description="GigaAM-v4 reference dumper (HF modeling_gigaam.py).") + sub = p.add_subparsers(dest="cmd", required=True) + for name, help_text in (("decode", "Full forward pass: frontend + encoder + RNN-T decode"), + ("encoder", "Alias for decode (single-pass dumper)")): + sp = sub.add_parser(name, help=help_text) + add_common_args(sp) + sp.set_defaults(func=cmd_decode) + args = p.parse_args(argv) + return args.func(args) + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/scripts/envs/gigaam-v4/pyproject.toml b/scripts/envs/gigaam-v4/pyproject.toml new file mode 100644 index 000000000..df4c61c86 --- /dev/null +++ b/scripts/envs/gigaam-v4/pyproject.toml @@ -0,0 +1,24 @@ +[project] +name = "transcribe-gigaam-v4-env" +version = "0.1.0" +description = "Python env for GigaAM-v4 reference dumps and conversion (HF modeling_gigaam.py)" +requires-python = ">=3.10,<3.13" +dependencies = [ + # GigaAM-v4's reference is the modeling_gigaam.py shipped in + # ai-sage/GigaAM-v4 at the commit pinned in scripts/lib/gigaam_v4_hf.py, + # not the gigaam package pinned in scripts/envs/gigaam (it has no + # Zapformer). The model card installs: numpy "transformers<5" omegaconf + # sentencepiece tqdm (+ onnx/hydra for export paths we do not use). + "torch>=2.6", + "torchaudio>=2.6", + "transformers>=4.57,<5", + "omegaconf>=2.3", + "sentencepiece>=0.2", + "tqdm", + "safetensors>=0.4", + "soundfile>=0.12", + "numpy>=1.26,<3", + "huggingface-hub>=0.30", + # Conversion-side helpers. + "gguf>=0.10", +] diff --git a/scripts/envs/gigaam-v4/uv.lock b/scripts/envs/gigaam-v4/uv.lock new file mode 100644 index 000000000..c6e8f80f8 --- /dev/null +++ b/scripts/envs/gigaam-v4/uv.lock @@ -0,0 +1,1514 @@ +version = 1 +revision = 5 +requires-python = ">=3.10, <3.13" +resolution-markers = [ + "python_full_version >= '3.12'", + "python_full_version == '3.11.*'", + "python_full_version < '3.11'", +] + +[[package]] +name = "certifi" +version = "2026.11.20" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/51/33/4cd27639502f010084bcef7a2036391dd637439901341ce1a530f36f6e51/certifi-2026.11.20.tar.gz", hash = "sha256:af1cb240a8133f105aa52684a3a3258339d7f2fd0bd4e2812698ff5cf5588c4e", size = 128901, upload-time = "2026-11-20T23:37:49.522Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/6d/39/5eec3296860b94ac20bb8ed807725b88f6adfab3f343df592afd975f5f86/certifi-2026.11.20-py3-none-any.whl", hash = "sha256:7422df25243767b9877031a2248cb14d09ddac9beee846f4cef3d5c9191d488f", size = 127913, upload-time = "2026-11-20T23:37:48.117Z" }, +] + +[[package]] +name = "cffi" +version = "2.1.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pycparser", version = "3.11", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11' and implementation_name != 'PyPy'" }, + { name = "pycparser", version = "3.12", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11' and implementation_name != 'PyPy'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/9e/ef/008a1939e372c06329a3fce4279c02f328488f3526744906eeec3da7ad5f/cffi-2.1.1.tar.gz", hash = "sha256:dd31f52ea1086513bb9df30f8fcee9b8918323ae067a3d5b78bc826a000712be", size = 530807, upload-time = "2026-08-03T21:21:18.939Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b6/d2/2cde336b375f55c76ca670f0be3978cc048e31e24f3b4d7ce8473150a388/cffi-2.1.1-cp310-cp310-macosx_10_15_x86_64.whl", hash = "sha256:baed1e86cc735622097354b9d1281406caf42ff42a886d29faa8e8d1630333be", size = 183779, upload-time = "2026-08-03T21:19:15.602Z" }, + { url = "https://files.pythonhosted.org/packages/94/1a/4b2f7c92293ba05cbd4a9a1b28faaf0326272d9488e6354657571c48a7aa/cffi-2.1.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ca82be1a1d406ecfe1d25dc16cb33488e5a16bf4438c9fb590484ea29d92478b", size = 184178, upload-time = "2026-08-03T21:19:16.67Z" }, + { url = "https://files.pythonhosted.org/packages/17/0b/ba385d8ccedf926c3cd06e8e2f327027da5afe5f0eb30f1f7bc43ac55125/cffi-2.1.1-cp310-cp310-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:42e2f76b9455f5a9a844f770bf3e200ed3da0e15f5df3db9c31fe80b04b3d004", size = 211037, upload-time = "2026-08-03T21:19:17.705Z" }, + { url = "https://files.pythonhosted.org/packages/a3/b9/0f2e58b2cefa33255bff36935d42b13180fe559bba82596540eb404bde7d/cffi-2.1.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:5a59cc1c4442bc3d5c703bf720b51138d0bfc173618807c9ee2490a7541dd3d9", size = 218652, upload-time = "2026-08-03T21:19:18.735Z" }, + { url = "https://files.pythonhosted.org/packages/37/15/180e0dab27b9312c7479003d14c9e547634b7dcb934e2cc4650e1b131a7a/cffi-2.1.1-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:9f8d177621de5cb38ee3e731eda45d421db093ec0739f46a5594babda7987a98", size = 205422, upload-time = "2026-08-03T21:19:19.96Z" }, + { url = "https://files.pythonhosted.org/packages/18/d4/03026f0c850cbbaa9030750490225b4a7f4d524ea4df72c3cc740a90f4ef/cffi-2.1.1-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:75f80557d1389eddbd0de2681f6a390a0c5338c31ddaa821381c203fc3fd50d9", size = 205444, upload-time = "2026-08-03T21:19:21.246Z" }, + { url = "https://files.pythonhosted.org/packages/75/77/60bebf6f818bec84210ac5b6979ce4eeadce6fbbaabc9c7ab23e506d1ce5/cffi-2.1.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:194cffa889098ced9976c3fc6340305e43f6303657d298da55366907c05c22d6", size = 218742, upload-time = "2026-08-03T21:19:22.523Z" }, + { url = "https://files.pythonhosted.org/packages/b0/ae/679bf47e73fd77b352171727f07de559a003f14de5d02b904a6ec1fa73ca/cffi-2.1.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:5bb4e7ea95dcd6a014a6fef62e62467d67d8e582326443f3d68e71d6320a9fcf", size = 221054, upload-time = "2026-08-03T21:19:23.694Z" }, + { url = "https://files.pythonhosted.org/packages/09/b8/eefc0e06913b70aa153bf74c946094a18f58fd4aff11b7f372bfdfdca050/cffi-2.1.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:3d22a20b1fb1632cc72c22f95f7b0d2961c3e1c235f245ba4c606c4771035659", size = 213489, upload-time = "2026-08-03T21:19:24.922Z" }, + { url = "https://files.pythonhosted.org/packages/6f/13/4e56852824a03cdf68523a35686f1c28eacd4bd30a7b0a78e682e6e6e1d3/cffi-2.1.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:1dea0e4d7d4f11f619fe8c1d76caf49e24405b4b5743c0e3be16a500ecd930c9", size = 220241, upload-time = "2026-08-03T21:19:26.214Z" }, + { url = "https://files.pythonhosted.org/packages/99/7f/040f9e163e4acac3ee3d85b02d00b2576e7ca980d8785f0a3a5f1a9bf7f5/cffi-2.1.1-cp310-cp310-win32.whl", hash = "sha256:7ce713ace7c0e4520535b42b77eaa742c16dab813978064913e5a3cf82973b41", size = 174578, upload-time = "2026-08-03T21:19:27.338Z" }, + { url = "https://files.pythonhosted.org/packages/ba/0b/644a2ec1a4eaba49c2939410bb1eb1d25b09d6d0582f5d2f95c537043725/cffi-2.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:a48d62ab9d6f4f98c983223a547af44be6ca3691074c31cecced6facd3ba2dc1", size = 185082, upload-time = "2026-08-03T21:19:28.409Z" }, + { url = "https://files.pythonhosted.org/packages/70/d2/16d99a0c4948febc0ebd133a13b2f688ff7f8cb04da971e1128872ce0c03/cffi-2.1.1-cp311-cp311-macosx_10_15_x86_64.whl", hash = "sha256:c8d2c9fd1f2d16f780d15127abb050d13d1a76c03a4bd87d7e4980e45e511e12", size = 183838, upload-time = "2026-08-03T21:19:29.637Z" }, + { url = "https://files.pythonhosted.org/packages/cd/95/31b535a9f0220ae9f357de4a08d57ce89cb417653c2fd9f075f50822a388/cffi-2.1.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:398aff33cee2767e3e781d2554c54bd0dff386bb437581e0d8011fde1a942ec1", size = 184168, upload-time = "2026-08-03T21:19:30.764Z" }, + { url = "https://files.pythonhosted.org/packages/ad/5a/4707a0dc1f203f5dde5a907b0d4e3c25d71120241048bd5bc6f1bb9d4e71/cffi-2.1.1-cp311-cp311-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:154852545011f779917b11c78db2358d095da62a9a172b78ad0a583ee5adc0d0", size = 211805, upload-time = "2026-08-03T21:19:31.867Z" }, + { url = "https://files.pythonhosted.org/packages/ad/66/c19feabb28485b6e0bbaaafa90837a1ef5d302e90f2178bd33f17a49879b/cffi-2.1.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:3311ed60d36f83378794e1009ac6258bafbf81f7888b4caa7b35a521e3f95813", size = 218716, upload-time = "2026-08-03T21:19:32.896Z" }, + { url = "https://files.pythonhosted.org/packages/a7/92/500760486c8baab49a7a8a58ba7fc3355ec3974b454b8a09e528efde9e1d/cffi-2.1.1-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:6e192623c49c94421616a5778fba35cf0d5a8d000650c1967ef4448ee5cdd990", size = 205569, upload-time = "2026-08-03T21:19:34.142Z" }, + { url = "https://files.pythonhosted.org/packages/a5/a7/a67c733254d6e7373f7822f8082d8d6beade791e0cf12a7611f376fa61c7/cffi-2.1.1-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:a6e721d4b0e45d5b65e87534470e67b18dcd092c83f68fba09f152b9cbc061af", size = 204907, upload-time = "2026-08-03T21:19:35.174Z" }, + { url = "https://files.pythonhosted.org/packages/f7/a4/4399daaf8f7dfee9d7c3327fdb0426ee041cc63edc358b93911ceb2bfc7a/cffi-2.1.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:34e261f78cb6ceaaa36f42f2613f4380d94d9c759a9c73c769ee6e0247364632", size = 217807, upload-time = "2026-08-03T21:19:36.286Z" }, + { url = "https://files.pythonhosted.org/packages/28/f7/dabe6da2466ecbd82dc62e7342dc6b1065dad990c06f00f0ede9ebf2a0ed/cffi-2.1.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:7225e4514edb64eb6740324353e0da0711954fd8d7da4576755b1c6e09b697cd", size = 221252, upload-time = "2026-08-03T21:19:37.416Z" }, + { url = "https://files.pythonhosted.org/packages/ce/87/616202d8e51342c07d2534c510111c4cc37201775ce8f60802c9335d1edd/cffi-2.1.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:df913725b79db7bcf03448f36b7bf8815363417d5b58deecf9305e3e30f0f21a", size = 214214, upload-time = "2026-08-03T21:19:38.507Z" }, + { url = "https://files.pythonhosted.org/packages/b4/c6/ab025d75d2c26c19b087c0124e75ee31cb65032f4fe345d356d8c507ab97/cffi-2.1.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f5cfbc5fe74540d335175b656c725d74d90e3730c626d92575eea35029d9afaa", size = 219408, upload-time = "2026-08-03T21:19:39.809Z" }, + { url = "https://files.pythonhosted.org/packages/db/e2/7e8109f65445bdc673a7b54f02c677de462db75674220fd1335efc8eb598/cffi-2.1.1-cp311-cp311-win32.whl", hash = "sha256:f8ec5e643a9a937f64e1999eb9f75d072263751912dc5cd06d3c85f8f44be7c3", size = 174470, upload-time = "2026-08-03T21:19:41.246Z" }, + { url = "https://files.pythonhosted.org/packages/73/c0/77ba02423c2f7d7091143c45cd49e0e6575c4c1967394bb542bd923a9b74/cffi-2.1.1-cp311-cp311-win_amd64.whl", hash = "sha256:42f6930c31dc7f50732c9ae793c2786c7b6b044195967bbdde40bb9be81c4cc0", size = 185096, upload-time = "2026-08-03T21:19:42.615Z" }, + { url = "https://files.pythonhosted.org/packages/7c/47/9f1f85f9672ceda4984dc6c4f8824e8558992a2972c3d3c81fb8eb28d4ba/cffi-2.1.1-cp311-cp311-win_arm64.whl", hash = "sha256:c7659f22557c5a0bc4855cd635f55edec690cc008a40768527762cb9fb263455", size = 179941, upload-time = "2026-08-03T21:19:43.747Z" }, + { url = "https://files.pythonhosted.org/packages/10/69/43965eccfdead3b9220015fd1320e117be8c6ed01a62ffab76eeb752f5d5/cffi-2.1.1-cp312-cp312-macosx_10_15_x86_64.whl", hash = "sha256:c8c69575568085ba0b1b10c0249d779a214aea6f6522e949a0fc9fb0fcb449d0", size = 184821, upload-time = "2026-08-03T21:19:44.887Z" }, + { url = "https://files.pythonhosted.org/packages/54/7d/16e5a096677b5e313ca80cd5e5170efa3ea44624a82bb111925522da64b1/cffi-2.1.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f81b3b8f3d4e343550fa4baa0e479bba9f2d29ce9c2e9b51d1ce1718d7442fcf", size = 184719, upload-time = "2026-08-03T21:19:46.129Z" }, + { url = "https://files.pythonhosted.org/packages/56/e6/8941622732edec876dd17d0453dce07317ae96db34f2ec1436c9d3785986/cffi-2.1.1-cp312-cp312-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:811bd1e21d32de12efca32393a0ab3f5133b54fce9bd44b8bd77ab07da14bf6a", size = 214799, upload-time = "2026-08-03T21:19:47.218Z" }, + { url = "https://files.pythonhosted.org/packages/44/de/f98430906df1545ffde0d543dd124a7a439bc2cd32b36b9c53f805df7333/cffi-2.1.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:68e62fe11f30d5ca8289242866f0a5291402d8529ca2178ab8afc5c9694ae890", size = 222389, upload-time = "2026-08-03T21:19:48.331Z" }, + { url = "https://files.pythonhosted.org/packages/6a/5b/717f1526b9957b34456313c31645c5b82b8fb5c3fe9e4752999be7128bfc/cffi-2.1.1-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:4a7c934f7360e8cd64fe9efadcbd10c7c6364f531e432b9a4bf5ccbc9e0e8b50", size = 210249, upload-time = "2026-08-03T21:19:49.543Z" }, + { url = "https://files.pythonhosted.org/packages/64/b3/f8aa4f3e34986c7e4ec45072d1b1b9dd295b6b18007b45518d79726dd725/cffi-2.1.1-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:3143d81e29e1e20a9ce10901ec369012947876596f75a222235965f2b7ae832e", size = 208775, upload-time = "2026-08-03T21:19:50.918Z" }, + { url = "https://files.pythonhosted.org/packages/b1/db/dceb9dd5b231e1da801793f8acc9f3c52a7e1afe40bb1aae37e02b0faad5/cffi-2.1.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:c1453022f490d2459a11819d83ad1d586e9ff65a12ac3e705ffebd46d3685dcf", size = 221822, upload-time = "2026-08-03T21:19:52.054Z" }, + { url = "https://files.pythonhosted.org/packages/a0/d2/6cd24ae3be000a634109c247d1475d62e5616d0dc78c82770942ec384248/cffi-2.1.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:208f941bb9d18e768138677f0a6d2ce01f590df56043dda1df1535ac57c88517", size = 225232, upload-time = "2026-08-03T21:19:53.109Z" }, + { url = "https://files.pythonhosted.org/packages/cb/52/3fa190537004dd7f0ab860a6dc7c0175b8667f68d1e618a46f5498d30250/cffi-2.1.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:210019b6c7cf07f081b4c54635c8cf744377001350e29cc0f81c4377b4797735", size = 223597, upload-time = "2026-08-03T21:19:54.515Z" }, + { url = "https://files.pythonhosted.org/packages/80/fb/0bb75b7039588c074b37ae99f40d9bfddf990ecb2fbc346ebccd2e56b9be/cffi-2.1.1-cp312-cp312-win32.whl", hash = "sha256:046bfc24911b37851ee1b51aab8bffe713d89c68c6a057b09484ce9fd5f69b4e", size = 175292, upload-time = "2026-08-03T21:19:55.566Z" }, + { url = "https://files.pythonhosted.org/packages/d9/79/615cc094e2fb508cade7de88d3b4f6c4ec2bab695c97bce9153dc65aadf5/cffi-2.1.1-cp312-cp312-win_amd64.whl", hash = "sha256:f53e442b08449d42821fa4a4fba000095af9f62742a500f978a9f557ec44339a", size = 185919, upload-time = "2026-08-03T21:19:56.89Z" }, + { url = "https://files.pythonhosted.org/packages/70/c6/d0ea84713fe46b243a436a18fcd47d639732747e21635c8a27191b06dc30/cffi-2.1.1-cp312-cp312-win_arm64.whl", hash = "sha256:7bde5e4cc5c10140859842b9d383af292b22639a4dffb725314baf45968cef80", size = 180093, upload-time = "2026-08-03T21:19:58.155Z" }, +] + +[[package]] +name = "charset-normalizer" +version = "3.5.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/c2/c3/cae6d3bdefd96a941ffc247c714ac4babc488a69012e11c058f6c17c6c47/charset_normalizer-3.5.3.tar.gz", hash = "sha256:a250888753faa289e2997962fbb17c4960cbdb58575533ca6fceee68c224bdff", size = 189359, upload-time = "2026-11-23T02:46:51.755Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/82/60/b6b70cc6e45cf77ac0a743f47f199080eb18e824f4c28e53dd63edbd8039/charset_normalizer-3.5.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:885f202d6e4e2298bea9802ffc6d8c7dc45394199a8dd9e1492f05fe32dce311", size = 411630, upload-time = "2026-11-23T02:43:14.895Z" }, + { url = "https://files.pythonhosted.org/packages/78/60/6a73c07dfefc15b909895383e1d01ea98ebb064d57621f6b9d8d4e606e4e/charset_normalizer-3.5.3-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:b6dad86d938104f9d43404029e5fc8392f82762d171933be4f192a6008bffa53", size = 263930, upload-time = "2026-11-23T02:43:16.539Z" }, + { url = "https://files.pythonhosted.org/packages/03/40/9e6333fbb8e6237ebfbf9f0f8bc8db0de43d40c5373853d189cd4b16679e/charset_normalizer-3.5.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:92ddc32b6a1508ea145f4f7995e00666db454b8fd3e2cae6c2ecbde4f4d44616", size = 246432, upload-time = "2026-11-23T02:43:17.787Z" }, + { url = "https://files.pythonhosted.org/packages/83/58/75783a43672907e938223c5b5a217284261de73404261da579ee0cd38df5/charset_normalizer-3.5.3-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:fc540d1618c5638fcf5aea97060cf011467918b010bf682a84ecc0c9474e6cd0", size = 249817, upload-time = "2026-11-23T02:43:18.973Z" }, + { url = "https://files.pythonhosted.org/packages/39/55/615f134c354fd90f47ffe6c6a884c1eb2587f25113651f603ec7034443fd/charset_normalizer-3.5.3-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:9510da88bdebc903be7844f31523ac8d7b3f63e167db54b6045104a2354afa6a", size = 293095, upload-time = "2026-11-23T02:43:20.417Z" }, + { url = "https://files.pythonhosted.org/packages/c6/24/d70b990089fe54839cae31ce5ef267614039a62cb0ed8dd7949e9c696b81/charset_normalizer-3.5.3-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f5a5c311e5de6954c36230a37863b5ca58ce232589bd637ad2881c4056897b12", size = 290128, upload-time = "2026-11-23T02:43:21.626Z" }, + { url = "https://files.pythonhosted.org/packages/1e/a6/e3f17fb7fc63db3647b3e2ba5a9aa678893d178da9038dfda864bf0dd3b6/charset_normalizer-3.5.3-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:4a991dbd7aec868fe10802b02bddbf898173a47ba236f2d6afb4ab1f98243534", size = 272037, upload-time = "2026-11-23T02:43:23.318Z" }, + { url = "https://files.pythonhosted.org/packages/c6/d0/770f8e143ff0a6b2b1256af515e585d83b454d75cfb8dda484aac5d92484/charset_normalizer-3.5.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:256b434b2860ef9da1cb6a5fd4ebb5d600936668e50e2035858948b96b068ecd", size = 248179, upload-time = "2026-11-23T02:43:24.712Z" }, + { url = "https://files.pythonhosted.org/packages/0f/56/cae2c9f8584eae51da90da38170d48ccf4cfe9d429f0ce5f85a06900b501/charset_normalizer-3.5.3-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:806e72ebaeef54d7faa03414be9e8409eb3dcae49fba089d62063a60c0b5a4e5", size = 252278, upload-time = "2026-11-23T02:43:25.996Z" }, + { url = "https://files.pythonhosted.org/packages/a6/e3/14aca06dae6d429401214c61157d23f2526b20b39cea4d8c170fd67e7469/charset_normalizer-3.5.3-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:326a7a0e3715c3ac24c21e7a3b831d6799cc795bff260aa49c23b69025852f99", size = 292581, upload-time = "2026-11-23T02:43:27.311Z" }, + { url = "https://files.pythonhosted.org/packages/93/ad/150c0142f8da5cda0a42238f48f2cdd903389b54131c7939756bcdc9a223/charset_normalizer-3.5.3-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:d57f1b6affc3581fbf0bc6d783cc60e7c9957adfd9c7b89f8a9f3573ad1cd49a", size = 271620, upload-time = "2026-11-23T02:43:28.543Z" }, + { url = "https://files.pythonhosted.org/packages/a4/7d/523a40378a79d61746340f4392866f7e67174fe9e344d8c389718789741e/charset_normalizer-3.5.3-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:73b4ddf1230df56c9e7017a16e3f5171b6ef0e4ff554a418a370d7ac7245bd84", size = 289557, upload-time = "2026-11-23T02:43:29.931Z" }, + { url = "https://files.pythonhosted.org/packages/cc/71/513af750987adfe3478dd0a9a3dd33a2f665c6c77e8ad74f81c907eeae87/charset_normalizer-3.5.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:2b7797a5b0cb197f118fd13b41c14c5a3c38dd625a87c1da58a3066cf53254fd", size = 265756, upload-time = "2026-11-23T02:43:31.084Z" }, + { url = "https://files.pythonhosted.org/packages/b4/73/90912621bb04d36f7df20ebc0bc6edd7d05ad57a8ca9313a37525d657e45/charset_normalizer-3.5.3-cp310-cp310-win32.whl", hash = "sha256:277b72183b96879887f0c3aa0bdac1fee08a6c7e67bad53145c4fd416d99dfd3", size = 191223, upload-time = "2026-11-23T02:43:32.66Z" }, + { url = "https://files.pythonhosted.org/packages/0c/06/ce199f4ecf05475e3a900e0083c0037e966c8234edae29d6d1b850e45597/charset_normalizer-3.5.3-cp310-cp310-win_amd64.whl", hash = "sha256:2246873913d7db43ed5a3d98ace398b989b2ae20b77c8d761a7bef5fdb9bed42", size = 213382, upload-time = "2026-11-23T02:43:33.898Z" }, + { url = "https://files.pythonhosted.org/packages/db/7b/14d6f8ea93d6a44875a13234d34ad74e562a6caae981c50f8cdc392fb15d/charset_normalizer-3.5.3-cp310-cp310-win_arm64.whl", hash = "sha256:5970d148182b6b7c22b8290a81f02fb521c4e7aee6747743b3e645db58d5001a", size = 198702, upload-time = "2026-11-23T02:43:35.089Z" }, + { url = "https://files.pythonhosted.org/packages/20/f2/fe2bc8a01ed1f3ede348d8afb8e416e81abe801a4ad789a8c5276d95b370/charset_normalizer-3.5.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:01b35bec964b92b89bdf94adf931d2e80a15f1c7b93bf850b4430cca23f7a2a2", size = 409498, upload-time = "2026-11-23T02:43:36.288Z" }, + { url = "https://files.pythonhosted.org/packages/98/ff/6b85c4ee2809f4dbfcee89d128f64d2e5141f2d4c3191cb00048bb93b150/charset_normalizer-3.5.3-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:2a6f937e0b70133d1f826d0a253331b6fe1a4c874808cc12e16f2fb8177042f4", size = 263382, upload-time = "2026-11-23T02:43:37.485Z" }, + { url = "https://files.pythonhosted.org/packages/45/16/fcd396b14758f491a8dcb6c81373f0d2e3ba8a28d3cec4c1dea24ec0bea0/charset_normalizer-3.5.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:90b1ff6cb9c7a204a3b79b1b0ed6ac8a1d8fed3b6dc69e50ae5de0f358ee81d4", size = 245172, upload-time = "2026-11-23T02:43:38.714Z" }, + { url = "https://files.pythonhosted.org/packages/b7/49/7fb9fba79adf9b29c19f9d0ff5cc9633a5f59b5f4ed0af2eab6be1fdbbf7/charset_normalizer-3.5.3-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:139aeb8ca63946dc79364c37f2c9cfe5c1b7f3882f2c47484d0e54bf14b921b0", size = 248633, upload-time = "2026-11-23T02:43:40.119Z" }, + { url = "https://files.pythonhosted.org/packages/b9/58/4c7e8cb06d3a158f0d3f5d9c83b9048db30077b078dd7b13b49a412ad0dc/charset_normalizer-3.5.3-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f7a841170fde40b0e1345884bee09ceca7db49a9291fa340089bec66a366c243", size = 291866, upload-time = "2026-11-23T02:43:41.34Z" }, + { url = "https://files.pythonhosted.org/packages/f9/6a/ea6c3a53861c624ade21df448f28091f1f809bb87c56359e27f78eba680a/charset_normalizer-3.5.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:56405211fa124c393eea14b3aeacf5b90de72b1f69b0a60c9bc40b01dfe71a42", size = 289387, upload-time = "2026-11-23T02:43:42.746Z" }, + { url = "https://files.pythonhosted.org/packages/3f/6b/8b76a30025bb27f32eb1d6684fda8ae95789848e02cc94e25d058a72b883/charset_normalizer-3.5.3-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0cf4cb8d75090a8da3bd30c0963b2c6c6114e791c6fc060c3cef8971497b1f04", size = 270972, upload-time = "2026-11-23T02:43:43.969Z" }, + { url = "https://files.pythonhosted.org/packages/3f/6f/95e3df1908c796c8ddb02302b48d49b91d9a1791c32eaf04425239154abd/charset_normalizer-3.5.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0ca2da4a505fae7ef95922f8d48235b2e49ff8f10f4edcc0481e5f6526ba3841", size = 247844, upload-time = "2026-11-23T02:43:45.264Z" }, + { url = "https://files.pythonhosted.org/packages/c5/b7/e72956933c09a72e2ae0c6aa75ec2689aa3f8297625a037772146bc6433e/charset_normalizer-3.5.3-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:09833ba78c91f0d1fd06387c69dae9f079428b77ea05eaaf1553eecead31fb68", size = 251932, upload-time = "2026-11-23T02:43:46.573Z" }, + { url = "https://files.pythonhosted.org/packages/30/b2/78a30d82ac9c712c2cf64ad95983c2ff7ebcf05830ff319d9f77827c4969/charset_normalizer-3.5.3-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:28d954a437bfa5fcdfe7ad8902cf4347a8486f34a86c5f39003bc1288eb67d72", size = 292201, upload-time = "2026-11-23T02:43:47.878Z" }, + { url = "https://files.pythonhosted.org/packages/ff/3f/49bb7c3f23ae35cbc3d419721cbf65505c3f8a69edd3b56dfdc4c67d9363/charset_normalizer-3.5.3-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:00edb7682962c596f774bfa126e6b6f885b7af2319f448d327591c284a482de8", size = 270702, upload-time = "2026-11-23T02:43:49.02Z" }, + { url = "https://files.pythonhosted.org/packages/3d/5e/dbae2c2caf099dfcd5cb4b62800e9c39ce39f6595fae5fc7a34077e66fbd/charset_normalizer-3.5.3-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:a43831574e14423103d69fb1357e76e4f2347041c98e8357ab88ef21812e80d9", size = 290015, upload-time = "2026-11-23T02:43:50.243Z" }, + { url = "https://files.pythonhosted.org/packages/f0/99/2f765df40b47605479c3d38a0ccb093e9e3b56baece1f0fbe2ebe37b8ac8/charset_normalizer-3.5.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:96387278c3b17bc1170f80693398d0babac7b41df128ced8e27588a7155d95b2", size = 265450, upload-time = "2026-11-23T02:43:51.459Z" }, + { url = "https://files.pythonhosted.org/packages/fa/f5/000bc674f132ea23e06ea8eee6b9b4fdad020774b242cda32eb2dbe70026/charset_normalizer-3.5.3-cp311-cp311-win32.whl", hash = "sha256:6eea31136fd924ecbb4e7c4f3df4b18230409629a22b3896f38a6754d5857794", size = 190318, upload-time = "2026-11-23T02:43:52.686Z" }, + { url = "https://files.pythonhosted.org/packages/50/92/529dd4a3af41874d0cac3c495ec9622c1457cbe7b8276fa8b767235ab8d2/charset_normalizer-3.5.3-cp311-cp311-win_amd64.whl", hash = "sha256:cd5422fd4f8a7859846c9289e310dd95c0d1890c31819667942753e510f88f69", size = 212879, upload-time = "2026-11-23T02:43:53.855Z" }, + { url = "https://files.pythonhosted.org/packages/78/9d/2a2cb4843dc8b2a84b1a97e0a8423d00d41b4bf065c8bf0f7549c572a226/charset_normalizer-3.5.3-cp311-cp311-win_arm64.whl", hash = "sha256:d3c9d5284d64f4c1015d95b751577b260fd6d14e3f8edf21710f4436e7ac4c49", size = 198117, upload-time = "2026-11-23T02:43:55.058Z" }, + { url = "https://files.pythonhosted.org/packages/c6/3b/df144a2ee54de30605fb046b80c5948dca47499383e5efecfbca3c46c2f7/charset_normalizer-3.5.3-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:92bf85ecec3ad6374ae50d870bd1deb34de12bc1158b5fd09036d4c435c6f58c", size = 388675, upload-time = "2026-11-23T02:43:56.285Z" }, + { url = "https://files.pythonhosted.org/packages/67/92/6db11254f4009dd980e17473a0ee4a4b54945df4d8346af4bef8999ab85a/charset_normalizer-3.5.3-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:e5e4785d8a0adeadfbdf75f4efc357911842674651cbafd7e97f69b11ec3cbc6", size = 257134, upload-time = "2026-11-23T02:43:57.512Z" }, + { url = "https://files.pythonhosted.org/packages/12/9b/2e28514323a452c444c0c0f27a6aae1d6d74a5b255e2cb6d09dbea3c06c5/charset_normalizer-3.5.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:70f65dd0c2ed79ea2d9776096e9c7d25e398c2c03eb31877753598d201d91784", size = 239885, upload-time = "2026-11-23T02:43:58.827Z" }, + { url = "https://files.pythonhosted.org/packages/a7/02/9133fb797235f0e46fd0e13792e1cf2dda23ddc7fc58ff55b4a1556b98d6/charset_normalizer-3.5.3-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:6b702d36c565f6c650f4b479488f475b2982132ab8d0840d42b1442462c21056", size = 240385, upload-time = "2026-11-23T02:44:00.268Z" }, + { url = "https://files.pythonhosted.org/packages/d4/0f/190e230562c2d6bdbd86d1f310fd2f0ac6989c0a80ce42b71dd97f27a661/charset_normalizer-3.5.3-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:dbdd407104ebf2360464ce02c7933c6ffac58bd5b64cdf6ef7dc0e787e782aaf", size = 275901, upload-time = "2026-11-23T02:44:01.527Z" }, + { url = "https://files.pythonhosted.org/packages/39/a4/d0994111d32d5b0b91284aca5c63d0f5c718811a79827c1d55a230d16e37/charset_normalizer-3.5.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:61f3258f700412c68fde407e7c749ed6930e795ea8f5ead9a40afddefbec12c4", size = 273855, upload-time = "2026-11-23T02:44:02.939Z" }, + { url = "https://files.pythonhosted.org/packages/e0/0a/099a0cc4078c2411e4d7f6d9bd71289d69e3095e157c301dc4cf4b2e92bc/charset_normalizer-3.5.3-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:aa2476abf8669be493689634bdb79f468a6fe57b005a5126db7e9f61d1954fe2", size = 256145, upload-time = "2026-11-23T02:44:04.216Z" }, + { url = "https://files.pythonhosted.org/packages/f3/8b/9db93b3aca912fe1ca5babf4b68376b74940dc23bec67e80f1b4c9ec3886/charset_normalizer-3.5.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:1b2704f4651539eab50ba104a975b96c3cd5246011aa0755d2dd71ac12546644", size = 241112, upload-time = "2026-11-23T02:44:05.412Z" }, + { url = "https://files.pythonhosted.org/packages/bc/9b/cb69867d3ad8c6d177b65cbd716c006dbfeebb09890bf48eb77e162799c6/charset_normalizer-3.5.3-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:2c4e0050b732ee3dca3676a5f5cf7fbd0c131761c194f1bb1d24c055fad071cf", size = 244503, upload-time = "2026-11-23T02:44:06.677Z" }, + { url = "https://files.pythonhosted.org/packages/54/e1/706d79ce618c4731068ae958c43cf2123ed80b41e378f2dd2fed0956e497/charset_normalizer-3.5.3-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:f06e257ee0cc85a7e4ec44f171ae2595fd901c34212f3c9e7ab8fd8621401e99", size = 276842, upload-time = "2026-11-23T02:44:08.076Z" }, + { url = "https://files.pythonhosted.org/packages/ac/fb/1f42f866d6f9e15817017c1495bbd90a3ca99e5af7057828d5c07cb98f69/charset_normalizer-3.5.3-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:396fdf2d4367674531a7c8d54ecabbc8e5131e3a1a06270285eb99f3140143df", size = 255982, upload-time = "2026-11-23T02:44:09.328Z" }, + { url = "https://files.pythonhosted.org/packages/3f/b0/a145cebd7a3b787638e64e12a15d2b227f6830a65294d137c70ea4b51482/charset_normalizer-3.5.3-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:b6ea5bf7e3c39f6e56957d82274ac7cfab469590085883fdbc86e754cde76b11", size = 274691, upload-time = "2026-11-23T02:44:10.546Z" }, + { url = "https://files.pythonhosted.org/packages/fe/a1/172b880e2666371817666fff6b9e43cf0e50e8be91e38158fab8c83c29ba/charset_normalizer-3.5.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:366f5efe95a6149ecbcebf779c2594a6a4ff6fc116402826c72ed0eccd6aabe9", size = 259298, upload-time = "2026-11-23T02:44:11.73Z" }, + { url = "https://files.pythonhosted.org/packages/2a/66/ac0ae9f9bdd82fd619c61763115c6aad5cc537234923bb4fc131749545ca/charset_normalizer-3.5.3-cp312-cp312-win32.whl", hash = "sha256:020cabbb90926b2d8b022a5e057ab349f28844b61f34117323fc08c2971915e3", size = 185505, upload-time = "2026-11-23T02:44:12.862Z" }, + { url = "https://files.pythonhosted.org/packages/82/78/7913aa5816c1606298274f47caf208efdd4245a0da1e309a13e518cc007b/charset_normalizer-3.5.3-cp312-cp312-win_amd64.whl", hash = "sha256:40b2ba91f0851aa864994b3c7022e4d96d09026717e6a72e44410d6fb3a74a13", size = 214472, upload-time = "2026-11-23T02:44:14.041Z" }, + { url = "https://files.pythonhosted.org/packages/67/bd/59a418223401d7e85ac15d4a0ae978d2fe802f8acdef50d6b55724edc75f/charset_normalizer-3.5.3-cp312-cp312-win_arm64.whl", hash = "sha256:948fb3649416a70bcdbb267d79c7048e8aa16e989ab9da09f416e67cdd3d6b8c", size = 201366, upload-time = "2026-11-23T02:44:15.264Z" }, + { url = "https://files.pythonhosted.org/packages/64/57/146cbf75a34eb50a27ca6daf4841a4a13a0726fa05db6f7fe97c8f14f383/charset_normalizer-3.5.3-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:84356c7b7ddf090e3e4692cb99fc820e6189b5f6662ca7e8589f41095cc8efca", size = 376114, upload-time = "2026-11-23T02:46:09.155Z" }, + { url = "https://files.pythonhosted.org/packages/5f/02/b01868added37f27a6b0fd29e7fa19d0ae52b3fdbfc6fde6b9c98ef377ec/charset_normalizer-3.5.3-cp37-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:26c6ad87bb79628954b52f8f7b9e18ab5cd9667546712ded9689fb7677e630d6", size = 234407, upload-time = "2026-11-23T02:46:10.528Z" }, + { url = "https://files.pythonhosted.org/packages/9b/9c/a8dddbe4ca722fac44bcbb17c08670bd9f1e9d26a481f7129aa2215eff80/charset_normalizer-3.5.3-cp37-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d4e7ecaa25f0dae672ac783c2e5aa9054a62e011749d64ff47b887af360a3e82", size = 222474, upload-time = "2026-11-23T02:46:11.939Z" }, + { url = "https://files.pythonhosted.org/packages/3f/28/b9d955132ca12845bf4d498cac4cad731d88f7dffcfe9ab26182ba19b9b9/charset_normalizer-3.5.3-cp37-abi3-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:ba26e4d073a4f7f2594676f2ff20ab80a7f03332b81c3f9964e9e53bf2305329", size = 234588, upload-time = "2026-11-23T02:46:13.175Z" }, + { url = "https://files.pythonhosted.org/packages/75/87/5c957d23953540fd53f8bf99f25aca4a73ffaa2621e0c199fa33bea68670/charset_normalizer-3.5.3-cp37-abi3-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:4831fb33e98e92140fa17d4d673a9f49f9c0ddd056115b722858793e4b86b0c5", size = 264230, upload-time = "2026-11-23T02:46:14.634Z" }, + { url = "https://files.pythonhosted.org/packages/2e/33/94e72d80177dfc1c68d4250bcfc0ac81c7fffb6fb7692eaba1050839c822/charset_normalizer-3.5.3-cp37-abi3-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:1714ff1ba001da5241a585fbd17a7742a61ad34efb4be8404aca5679f51e53ea", size = 259027, upload-time = "2026-11-23T02:46:15.803Z" }, + { url = "https://files.pythonhosted.org/packages/22/52/2c903fb577eb4fecd1c6e0f426daa4f0af5ae2e2b453985e1995317deeb6/charset_normalizer-3.5.3-cp37-abi3-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:8c4dfcd3269f13dff7f29f9c332d54a4a21f17be818b49e769e111befd4d39e6", size = 252786, upload-time = "2026-11-23T02:46:17.024Z" }, + { url = "https://files.pythonhosted.org/packages/a9/6b/f8c6680edbaa937982c3f0e9a9cbc7634135bed7a6633cbccbdefd8e64b7/charset_normalizer-3.5.3-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:87f7d6c595465a25d33fa3d5215a571a98c4cad00ead3ad18ebfb62adb3d3e6e", size = 223576, upload-time = "2026-11-23T02:46:18.245Z" }, + { url = "https://files.pythonhosted.org/packages/37/24/5ca15b50e452d0b689c152b27ff525b417dde009f0daea1805767a683a3f/charset_normalizer-3.5.3-cp37-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:7c313b46730b4a68bb31450973467313b2c496fefa42ae316b86c186cba74613", size = 235893, upload-time = "2026-11-23T02:46:19.448Z" }, + { url = "https://files.pythonhosted.org/packages/e1/c7/4857928626613d6991d3cc045de5d101ebf04dad1b5786facd5bd9d843e3/charset_normalizer-3.5.3-cp37-abi3-musllinux_1_2_ppc64le.whl", hash = "sha256:d313494077f849d8199f36166947785da1eeb36335fda15fde2e8f801ef271b6", size = 263887, upload-time = "2026-11-23T02:46:20.811Z" }, + { url = "https://files.pythonhosted.org/packages/4b/25/c6ddeafc6301f7675089d093219f923db0311bd99c7c6e21cd6f10e97884/charset_normalizer-3.5.3-cp37-abi3-musllinux_1_2_riscv64.whl", hash = "sha256:c08e06fc69750827d7ccebba63ebc97a85e479cd5c9dbdb80f5e08a77b774fdb", size = 250628, upload-time = "2026-11-23T02:46:22.044Z" }, + { url = "https://files.pythonhosted.org/packages/f3/1e/2536f55939d911bd638982aba11a2a26d8b5a49926d2d93e3d6cd236e180/charset_normalizer-3.5.3-cp37-abi3-musllinux_1_2_s390x.whl", hash = "sha256:29ac44f5878142128ffe4fa7e041ddc4cc5fafe43983245b9a141908c40b515d", size = 261092, upload-time = "2026-11-23T02:46:23.382Z" }, + { url = "https://files.pythonhosted.org/packages/3a/fe/aa2706988f2e4e46e79a488383dfd2f4d166728e046d8ae29cf8466d38e2/charset_normalizer-3.5.3-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:3e8da696ef1935a019c10ec16555a062183ddf6d5901e296edeca4b2a8f84e1d", size = 236268, upload-time = "2026-11-23T02:46:24.607Z" }, + { url = "https://files.pythonhosted.org/packages/6a/79/9264b6a1411dcaf0daa0d58e6915545ddc8b056b53ece56375bcf9776c88/charset_normalizer-3.5.3-cp37-abi3-win32.whl", hash = "sha256:4ff5e27478681ef1b13b036baaf9beaf9b4c6990e903c752ad3b8764692c6d6c", size = 177808, upload-time = "2026-11-23T02:46:26.059Z" }, + { url = "https://files.pythonhosted.org/packages/a3/a5/cc188879ab8e8a36d295f888335f0a2875e39bcdacc6fe3207427c14036f/charset_normalizer-3.5.3-cp37-abi3-win_amd64.whl", hash = "sha256:a5a7e0326566759f9a7bc44f4b9a179cc40a297e09e759b0bc7c848c06347527", size = 200667, upload-time = "2026-11-23T02:46:27.221Z" }, + { url = "https://files.pythonhosted.org/packages/d5/a3/4a6047c40414f170ad09a6d44c1a0663914924619304817c2e33d19fae75/charset_normalizer-3.5.3-cp37-abi3-win_arm64.whl", hash = "sha256:e4f85c34f9be32ec5568a0668fb8bc029d3e729285fb8fccc38695e185379a9b", size = 290628, upload-time = "2026-11-23T02:46:29.06Z" }, + { url = "https://files.pythonhosted.org/packages/d2/0d/07ab8eb9b7015274353eac2add4067bde1ab1b51912bbae505392905eedd/charset_normalizer-3.5.3-py3-none-any.whl", hash = "sha256:96e268b0cbda016ac519513294fcd17032264085b600abaac58b93049477e132", size = 68878, upload-time = "2026-11-23T02:46:50.665Z" }, +] + +[[package]] +name = "colorama" +version = "0.4.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload-time = "2022-10-25T02:36:22.414Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" }, +] + +[[package]] +name = "cuda-bindings" +version = "13.4.4" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version < '3.11'", +] +dependencies = [ + { name = "cuda-pathfinder", version = "1.8.3", source = { registry = "https://pypi.org/simple" } }, +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/9b/1e/d90a8af3d589776c70e92d43d7a0234260709a1d552d105f4dd3bdf48fa3/cuda_bindings-13.4.4-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:90f85a00fc89dd4a8f7c4beb0a2f3f788b845c8496fe84adc1217830206db9e0", size = 6512106, upload-time = "2026-10-14T12:35:04.07Z" }, + { url = "https://files.pythonhosted.org/packages/70/62/8c23958012acc7558cdc3d453b3078742c3e6051cc8be2860e6bfbdf00fd/cuda_bindings-13.4.4-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:85d961133658fff3167cfcf69de1beac8e46453c15fd4bcaa4a96d3ef1110c69", size = 7160770, upload-time = "2026-10-14T12:35:06.501Z" }, + { url = "https://files.pythonhosted.org/packages/a1/15/0277326dd1a2d619ea8a85b790fc9e43cb67897d3a3377eb783f5bc2a33a/cuda_bindings-13.4.4-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b8b2e4235b552edb42cdbe39de7a9259ceec631e21c7344b76177db9cc6c58b4", size = 6494096, upload-time = "2026-10-14T12:35:11.314Z" }, + { url = "https://files.pythonhosted.org/packages/97/36/3bfb7b74817a0a78f80340fae742a27d166e8fcdffa459b79d5be66e077a/cuda_bindings-13.4.4-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e1cef1eaf5a08cc3bf3675ca9d3f97f3fc7085998556c848b4053e74ba4ba392", size = 7160763, upload-time = "2026-10-14T12:35:13.773Z" }, + { url = "https://files.pythonhosted.org/packages/d7/38/87909f62598d02d9e5c536326aed1755f6bfa190285507b962bb601e0005/cuda_bindings-13.4.4-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b346bfe1dda49537537c06cc4727b2210d949d8aee883cb591bca46581629d00", size = 6488222, upload-time = "2026-10-14T12:35:20.703Z" }, + { url = "https://files.pythonhosted.org/packages/c2/f8/332443cf969734551891cdbd93657eaeaf747ac2b7dd73feb3422701b02b/cuda_bindings-13.4.4-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:433efa31e33c2868621b5f6036bd3bf5de9c45c5546cb1361a5f6ff3415b8bb5", size = 7172184, upload-time = "2026-10-14T12:35:22.817Z" }, +] + +[[package]] +name = "cuda-bindings" +version = "13.5.0" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.12'", + "python_full_version == '3.11.*'", +] +dependencies = [ + { name = "cuda-pathfinder", version = "1.9.1", source = { registry = "https://pypi.org/simple" } }, +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/12/09/74e159fbe67b081cca842871addce6d2b493f9bb48ce85124f023eb5f1c9/cuda_bindings-13.5.0-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:71c15ed97099a8ef416515d80ddd10770e0f6339234e16855a526d2896516631", size = 7434875, upload-time = "2026-11-05T12:05:50.666Z" }, + { url = "https://files.pythonhosted.org/packages/f6/0d/ca24317a31118b90fd60126aec5c0a92a191a7fdd39524032d43328b49b5/cuda_bindings-13.5.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:08b7e8d674c3266facb00453a7e34ea7d3ea965c2f594bb728f269f45f39fbe2", size = 8390178, upload-time = "2026-11-05T12:05:52.653Z" }, + { url = "https://files.pythonhosted.org/packages/b9/a6/13d14600381bdbfe55dfc35564e4bf4a208f169ee9f6cbeb356564268aff/cuda_bindings-13.5.0-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:40eadfad6ae1554f8c1aa456620a85a49a275fc902f2c6dd93ee8c488b2c5e9f", size = 7354398, upload-time = "2026-11-05T12:06:03.542Z" }, + { url = "https://files.pythonhosted.org/packages/27/68/14bf44f386672b03fcc0799be8d18df3e1c45847ee23b95721f6022abbaf/cuda_bindings-13.5.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a46a8cc84112d769d0f57bf3ae3fedc115cf09348f14da85a1a8200968b6f262", size = 8378158, upload-time = "2026-11-05T12:06:05.253Z" }, +] + +[[package]] +name = "cuda-pathfinder" +version = "1.8.3" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version < '3.11'", +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/b9/fb/f8e1890428f9f590b4beebd63b068aac1ce32a3331510c847b9f9a78f261/cuda_pathfinder-1.8.3-py3-none-any.whl", hash = "sha256:e29e59829c297a7a5233bd9cc71094fc5bddbd076951482670178f9eade39b1f", size = 62561, upload-time = "2026-10-02T03:20:23.712Z" }, +] + +[[package]] +name = "cuda-pathfinder" +version = "1.9.1" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.12'", + "python_full_version == '3.11.*'", +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/62/8e/e6101ff068e7e78b362879ffc0c7cbfe68c9742943c9b034f009fe19f88f/cuda_pathfinder-1.9.1-py3-none-any.whl", hash = "sha256:b743c132f90ad2d1e71d43fd28f31ebcde518f943e50fd44aca62b2a80d5230d", size = 63462, upload-time = "2026-11-19T04:26:29.241Z" }, +] + +[[package]] +name = "cuda-toolkit" +version = "13.0.3.0" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version < '3.11'", +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/d1/c7/a79086a62c98befcdb8349656c6f114e2db3b8b2422f6e25c97a7f2a9a3c/cuda_toolkit-13.0.3.0-py2.py3-none-any.whl", hash = "sha256:d693caaa261214ddd7dbb60d68e71cbed884e68c2be7509778f3051da0b91c3f", size = 2512, upload-time = "2026-04-14T00:50:08.173Z" }, +] + +[package.optional-dependencies] +cublas = [ + { name = "nvidia-cublas", version = "13.1.1.3", source = { registry = "https://pypi.org/simple" }, marker = "platform_machine == 'aarch64' or platform_machine == 'x86_64'" }, + { name = "nvidia-cuda-nvrtc", version = "13.0.88", source = { registry = "https://pypi.org/simple" }, marker = "platform_machine == 'aarch64' or platform_machine == 'x86_64'" }, +] +cudart = [ + { name = "nvidia-cuda-runtime", version = "13.0.96", source = { registry = "https://pypi.org/simple" }, marker = "platform_machine == 'aarch64' or platform_machine == 'x86_64'" }, +] +cufft = [ + { name = "nvidia-cufft", version = "12.0.0.61", source = { registry = "https://pypi.org/simple" }, marker = "platform_machine == 'aarch64' or platform_machine == 'x86_64'" }, + { name = "nvidia-nvjitlink", marker = "platform_machine == 'aarch64' or platform_machine == 'x86_64'" }, +] +cufile = [ + { name = "nvidia-cufile", version = "1.15.1.6", source = { registry = "https://pypi.org/simple" }, marker = "platform_machine == 'aarch64' or platform_machine == 'x86_64'" }, +] +cupti = [ + { name = "nvidia-cuda-cupti", version = "13.0.85", source = { registry = "https://pypi.org/simple" }, marker = "platform_machine == 'aarch64' or platform_machine == 'x86_64'" }, +] +curand = [ + { name = "nvidia-curand", marker = "platform_machine == 'aarch64' or platform_machine == 'x86_64'" }, +] +cusolver = [ + { name = "nvidia-cublas", version = "13.1.1.3", source = { registry = "https://pypi.org/simple" }, marker = "platform_machine == 'aarch64' or platform_machine == 'x86_64'" }, + { name = "nvidia-cusolver", version = "12.0.4.66", source = { registry = "https://pypi.org/simple" }, marker = "platform_machine == 'aarch64' or platform_machine == 'x86_64'" }, + { name = "nvidia-cusparse", version = "12.6.3.3", source = { registry = "https://pypi.org/simple" }, marker = "platform_machine == 'aarch64' or platform_machine == 'x86_64'" }, + { name = "nvidia-nvjitlink", marker = "platform_machine == 'aarch64' or platform_machine == 'x86_64'" }, +] +cusparse = [ + { name = "nvidia-cusparse", version = "12.6.3.3", source = { registry = "https://pypi.org/simple" }, marker = "platform_machine == 'aarch64' or platform_machine == 'x86_64'" }, + { name = "nvidia-nvjitlink", marker = "platform_machine == 'aarch64' or platform_machine == 'x86_64'" }, +] +nvjitlink = [ + { name = "nvidia-nvjitlink", marker = "platform_machine == 'aarch64' or platform_machine == 'x86_64'" }, +] +nvrtc = [ + { name = "nvidia-cuda-nvrtc", version = "13.0.88", source = { registry = "https://pypi.org/simple" }, marker = "platform_machine == 'aarch64' or platform_machine == 'x86_64'" }, +] +nvtx = [ + { name = "nvidia-nvtx", version = "13.0.85", source = { registry = "https://pypi.org/simple" }, marker = "platform_machine == 'aarch64' or platform_machine == 'x86_64'" }, +] + +[[package]] +name = "cuda-toolkit" +version = "13.2.2" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.12'", + "python_full_version == '3.11.*'", +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/3d/62/854e4a141f5e87e5425513bad2a742a6260acfe06ef148001b5362148f31/cuda_toolkit-13.2.2-py2.py3-none-any.whl", hash = "sha256:d12edc1aad1356236a2ee10c0d794b1aff5d3e79bfeca54867c3bb8e5afd87b0", size = 2607, upload-time = "2026-07-16T10:13:01.07Z" }, +] + +[package.optional-dependencies] +cublas = [ + { name = "nvidia-cublas", version = "13.4.1.3", source = { registry = "https://pypi.org/simple" }, marker = "platform_machine == 'aarch64' or platform_machine == 'x86_64'" }, + { name = "nvidia-cuda-nvrtc", version = "13.2.86", source = { registry = "https://pypi.org/simple" }, marker = "platform_machine == 'aarch64' or platform_machine == 'x86_64'" }, +] +cudart = [ + { name = "nvidia-cuda-runtime", version = "13.2.86", source = { registry = "https://pypi.org/simple" }, marker = "platform_machine == 'aarch64' or platform_machine == 'x86_64'" }, +] +cufft = [ + { name = "nvidia-cufft", version = "12.2.0.57", source = { registry = "https://pypi.org/simple" }, marker = "platform_machine == 'aarch64' or platform_machine == 'x86_64'" }, + { name = "nvidia-nvjitlink", marker = "platform_machine == 'aarch64' or platform_machine == 'x86_64'" }, +] +cufile = [ + { name = "nvidia-cufile", version = "1.17.1.22", source = { registry = "https://pypi.org/simple" }, marker = "platform_machine == 'aarch64' or platform_machine == 'x86_64'" }, +] +cupti = [ + { name = "nvidia-cuda-cupti", version = "13.2.86", source = { registry = "https://pypi.org/simple" }, marker = "platform_machine == 'aarch64' or platform_machine == 'x86_64'" }, +] +cusolver = [ + { name = "nvidia-cublas", version = "13.4.1.3", source = { registry = "https://pypi.org/simple" }, marker = "platform_machine == 'aarch64' or platform_machine == 'x86_64'" }, + { name = "nvidia-cusolver", version = "12.2.0.11", source = { registry = "https://pypi.org/simple" }, marker = "platform_machine == 'aarch64' or platform_machine == 'x86_64'" }, + { name = "nvidia-cusparse", version = "12.7.10.12", source = { registry = "https://pypi.org/simple" }, marker = "platform_machine == 'aarch64' or platform_machine == 'x86_64'" }, + { name = "nvidia-nvjitlink", marker = "platform_machine == 'aarch64' or platform_machine == 'x86_64'" }, +] +cusparse = [ + { name = "nvidia-cusparse", version = "12.7.10.12", source = { registry = "https://pypi.org/simple" }, marker = "platform_machine == 'aarch64' or platform_machine == 'x86_64'" }, + { name = "nvidia-nvjitlink", marker = "platform_machine == 'aarch64' or platform_machine == 'x86_64'" }, +] +nvjitlink = [ + { name = "nvidia-nvjitlink", marker = "platform_machine == 'aarch64' or platform_machine == 'x86_64'" }, +] +nvrtc = [ + { name = "nvidia-cuda-nvrtc", version = "13.2.86", source = { registry = "https://pypi.org/simple" }, marker = "platform_machine == 'aarch64' or platform_machine == 'x86_64'" }, +] +nvtx = [ + { name = "nvidia-nvtx", version = "13.2.86", source = { registry = "https://pypi.org/simple" }, marker = "platform_machine == 'aarch64' or platform_machine == 'x86_64'" }, +] + +[[package]] +name = "filelock" +version = "4.1.0" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version < '3.11'", +] +sdist = { url = "https://files.pythonhosted.org/packages/4c/58/6fd434bec86eff7c38a3168454cb132b762b2bea9b3ac094101a2f7bc32a/filelock-4.1.0.tar.gz", hash = "sha256:ad7f724afef953e731b1cc39bcd3a09166d72ed7fcdf29e6e88b1c3235c6715d", size = 561277, upload-time = "2026-10-09T19:57:20.34Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ee/86/032133892a5de43b5a98200b01aadcad68cc255e274a762f08b8a76d2912/filelock-4.1.0-py3-none-any.whl", hash = "sha256:2ce9818e3e2d8f284c1a964414447ef148d42a5fd5e2a477a7118e574b293ec1", size = 133003, upload-time = "2026-10-09T19:57:18.716Z" }, +] + +[[package]] +name = "filelock" +version = "4.3.2" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.12'", + "python_full_version == '3.11.*'", +] +sdist = { url = "https://files.pythonhosted.org/packages/b2/de/99f4266dc2b97503fe35af46d4bf54ea4d434bc322992103145c9de7da95/filelock-4.3.2.tar.gz", hash = "sha256:4f0a21c70447782453c06bb20a9863ee385ead1abaef22049af79289496851b3", size = 744182, upload-time = "2026-11-27T22:58:32.45Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d7/4f/6429bb372197194e65bb33885cd112c7008c2b9cf7496285874aa274e506/filelock-4.3.2-py3-none-any.whl", hash = "sha256:02a8801bc6b2a80921bf3d7895c63084d53bae2a3c86783adce5ae2b89a1825b", size = 244905, upload-time = "2026-11-27T22:58:31.01Z" }, +] + +[[package]] +name = "fsspec" +version = "2026.9.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/77/cd/9be253869fc42e764de7f3dedd6969af7d44ff9c3375214a3442a6f3fc08/fsspec-2026.9.0.tar.gz", hash = "sha256:0f08147951c8cb31d844c3547d631053b127863b60be04cf06e121333ee0e2fe", size = 333545, upload-time = "2026-09-18T17:50:42.825Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/6c/c0/a98505f18594f1bce828bb159cec0fcf9860562f1a2c85913409fc8f3d9e/fsspec-2026.9.0-py3-none-any.whl", hash = "sha256:8dd6e646e99ea382bd85f97a45e6b526a442d79423a7dc673f1e2756d05fcb5f", size = 221738, upload-time = "2026-09-18T17:50:41.341Z" }, +] + +[[package]] +name = "gguf" +version = "0.19.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, + { name = "numpy", version = "2.4.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version == '3.11.*'" }, + { name = "numpy", version = "2.5.5", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.12'" }, + { name = "pyyaml" }, + { name = "requests" }, + { name = "tqdm" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/48/ae/17f1308ae45cd7b08ebb521747d5b23f4efc4d172038a4e228dd5106c3ff/gguf-0.19.0.tar.gz", hash = "sha256:dbadcd6cc7ccd44256f2229fe7c2dff5e8aa5cf0612ab987fd2b1a57e428923f", size = 111220, upload-time = "2026-05-06T13:04:03.667Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b3/bb/d71d6da82763528c2c2ed6b59a9d6142c6595545a4c448e2085d155e88c2/gguf-0.19.0-py3-none-any.whl", hash = "sha256:70bcd10edfe697fb2dad6e40af2234b9d8ece9a41a99761405121ebda1c3c1cd", size = 118475, upload-time = "2026-05-06T13:04:02.588Z" }, +] + +[[package]] +name = "hf-xet" +version = "1.8.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/2f/18/d91c20f815df6cc496a5d0ad8db6d274dad5c0cfcd59babfa2440a9aba44/hf_xet-1.8.0.tar.gz", hash = "sha256:10ed23b51dacf7917d64f335c25048deb470efa755e9989b218fc0531386138e", size = 1013014, upload-time = "2026-10-30T10:04:33.741Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/97/74/d89d5235524bc14d8519e12ca8bc5204f45009ae83d63a410f52c29eb4a8/hf_xet-1.8.0-cp38-abi3-macosx_10_12_x86_64.whl", hash = "sha256:e00d8f60170cd3dd55d98306e41dbaf28b27ff1bcfefbfa84279d197221be83e", size = 3875002, upload-time = "2026-10-30T10:04:18.958Z" }, + { url = "https://files.pythonhosted.org/packages/d4/f2/ef25e2085e92dcaeaa675331e443923aed2006f6fe2d984e15d8b8d40766/hf_xet-1.8.0-cp38-abi3-macosx_11_0_arm64.whl", hash = "sha256:3e8934784425781f0f779b91044df441f3a7af4dab47375d7e3aeaecbb8eecb4", size = 3600947, upload-time = "2026-10-30T10:04:20.906Z" }, + { url = "https://files.pythonhosted.org/packages/f8/1e/1e8ecc05ef034e9a95c18ed32d2ec07905a7cd2ca611a9d88e25ee1f4850/hf_xet-1.8.0-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:29dab7c904cd1914a0439c6e1306c12c7497c8bd32290fbe563ebf51ca4b6d6d", size = 4292483, upload-time = "2026-10-30T10:04:22.875Z" }, + { url = "https://files.pythonhosted.org/packages/35/c4/127a1548df019ea4c80f06e685f263e146075143335a02e78a3c41dbc4eb/hf_xet-1.8.0-cp38-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:8800e3444770f2c630b361bc6d5c6ebb770b7830646cf632fbb79d0e5bbc9e7f", size = 4069340, upload-time = "2026-10-30T10:04:24.664Z" }, + { url = "https://files.pythonhosted.org/packages/a5/d5/281cd82736c3e181e597588589d2204d3a5c388a464d4a2a8c546995bae9/hf_xet-1.8.0-cp38-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:a584a7b3268da62f23c3187cc7201ca01f7b610985a36b1b6119c66bccb0383c", size = 4272344, upload-time = "2026-10-30T10:04:26.519Z" }, + { url = "https://files.pythonhosted.org/packages/48/77/886f09e91a5eadb054ce03b8855323cd2a72f20db76ab4119e0ecda65eef/hf_xet-1.8.0-cp38-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:1ebaf248c9bef8bb0c9d1d8d71db1fdf0cac14f922cc7a936a81adbf12eb5f01", size = 4500689, upload-time = "2026-10-30T10:04:28.394Z" }, + { url = "https://files.pythonhosted.org/packages/97/4d/2c76a992b370ff77d0b5219275779f8c9a7dabb8ee649deb265dfed84d0f/hf_xet-1.8.0-cp38-abi3-win_amd64.whl", hash = "sha256:92188598dedc1e1f5609bd718d4db8687a6c89915553912571e2f587892eecec", size = 3911559, upload-time = "2026-10-30T10:04:30.165Z" }, + { url = "https://files.pythonhosted.org/packages/87/91/fdb1454a43eff8011047d176ada2f0fb4926cf3d74b87357ff35793f6d98/hf_xet-1.8.0-cp38-abi3-win_arm64.whl", hash = "sha256:42b66fdc688eaa4ff3eb77dc9275e5a0f1258ecc9fdd083ddaf43bb49bec925b", size = 3738458, upload-time = "2026-10-30T10:04:31.882Z" }, +] + +[[package]] +name = "huggingface-hub" +version = "0.36.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "filelock", version = "4.1.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, + { name = "filelock", version = "4.3.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, + { name = "fsspec" }, + { name = "hf-xet", marker = "platform_machine == 'aarch64' or platform_machine == 'amd64' or platform_machine == 'arm64' or platform_machine == 'x86_64'" }, + { name = "packaging" }, + { name = "pyyaml" }, + { name = "requests" }, + { name = "tqdm" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/7c/b7/8cb61d2eece5fb05a83271da168186721c450eb74e3c31f7ef3169fa475b/huggingface_hub-0.36.2.tar.gz", hash = "sha256:1934304d2fb224f8afa3b87007d58501acfda9215b334eed53072dd5e815ff7a", size = 649782, upload-time = "2026-02-06T09:24:13.098Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a8/af/48ac8483240de756d2438c380746e7130d1c6f75802ef22f3c6d49982787/huggingface_hub-0.36.2-py3-none-any.whl", hash = "sha256:48f0c8eac16145dfce371e9d2d7772854a4f591bcb56c9cf548accf531d54270", size = 566395, upload-time = "2026-02-06T09:24:11.133Z" }, +] + +[[package]] +name = "idna" +version = "3.20" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f5/08/8eea9d4b8302028f3abb2c0813953f7aec26d33b7a8960ed760e65ff29fa/idna-3.20.tar.gz", hash = "sha256:a7db850025b95ded1eae8a46181a1a6c56c92c96f0e2b005d9ff8dc0210cab44", size = 216463, upload-time = "2026-09-17T14:11:04.752Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/58/a2/bb081bab032533a855d44de1d56f8e8426114ff1ba5d1f07a438a0a654f8/idna-3.20-py3-none-any.whl", hash = "sha256:ab7ae7122974553370f0bdb919e1a960b2cd1bc1ef0276416d896db81c14582c", size = 69583, upload-time = "2026-09-17T14:11:03.168Z" }, +] + +[[package]] +name = "jinja2" +version = "3.1.6" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "markupsafe" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz", hash = "sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d", size = 245115, upload-time = "2025-03-05T20:05:02.478Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/62/a1/3d680cbfd5f4b8f15abc1d571870c5fc3e594bb582bc3b64ea099db13e56/jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67", size = 134899, upload-time = "2025-03-05T20:05:00.369Z" }, +] + +[[package]] +name = "markupsafe" +version = "3.0.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/38/9b/e422a865e1d5d57d0e509b4e0bf1c1a70a7f6382c29a5aa428df994c8bc8/markupsafe-3.0.4.tar.gz", hash = "sha256:2e9ad7dd851bf45fab9f75cbff4cb493fee9979e8d8c7c9c3ee119022518edd6", size = 153777, upload-time = "2026-10-02T23:07:22.29Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/41/aa/9a65962e364bf19745f6bec7bde398fb1f5ca53ad2e734258e6198cc32ba/markupsafe-3.0.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:dd8ea6ebee7aedbf7c749fa80521d9ccf1ba473e0d1e14805caafbaad281c889", size = 11521, upload-time = "2026-10-02T23:04:20.141Z" }, + { url = "https://files.pythonhosted.org/packages/14/36/927999a34b7d1def6957de89153d327fedc4030061940b5a468584e6c5a8/markupsafe-3.0.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:dff05cb7016dff1e9fd68f4122c127b65dfc59de5306cfb7ad92f956f230bee2", size = 12066, upload-time = "2026-10-02T23:04:21.275Z" }, + { url = "https://files.pythonhosted.org/packages/17/54/69e7b0db9bd687bfd83451eed5666384d67cfed3be062bfc59a06a15474e/markupsafe-3.0.4-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:cf63c214fe879a65e69a386f915e36104fc84254ab141240f8854602d8e0be2a", size = 22081, upload-time = "2026-10-02T23:04:22.221Z" }, + { url = "https://files.pythonhosted.org/packages/bd/14/f6f5c97903f7d2db76bbfaced31509a47d360a103b3aaf4849f6536591ec/markupsafe-3.0.4-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:2a6ef68ae94aed8721934072b27a3b654ea2100b97e4ab864cf1489c90926fbc", size = 26079, upload-time = "2026-10-02T23:04:23.346Z" }, + { url = "https://files.pythonhosted.org/packages/d0/04/c3cc9b75f94f8b54d7e503c44cebd4b4a115ec1d6f1b996b999807daba99/markupsafe-3.0.4-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:fd9f8797427910198f95bced71ddfed61130d7e349213bfb8466c9c99e2c46a8", size = 22611, upload-time = "2026-10-02T23:04:24.401Z" }, + { url = "https://files.pythonhosted.org/packages/00/26/c4708ed3b0f08e8e6d7cbce3314ac130cb5352d1f62951b6fef7878f2b1e/markupsafe-3.0.4-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d1aca03ede943eb80ab3d63bb082c84b7aab85ea83bd0fd0c200260945fb49d9", size = 20712, upload-time = "2026-10-02T23:04:25.386Z" }, + { url = "https://files.pythonhosted.org/packages/d9/b9/f3894d6aae3d7a52c9363317f4baf2fcadc052163d6dbc871266e32639ed/markupsafe-3.0.4-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0764a13d34cae40db7bbf3a09b7e9b491bf4603e20b263a7a9d6b8e324975d0a", size = 20742, upload-time = "2026-10-02T23:04:26.403Z" }, + { url = "https://files.pythonhosted.org/packages/59/7c/8e248ddbfe286ab6bddb462bdac0851cbb1510d2cbbb815a415fcb0511af/markupsafe-3.0.4-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:9388003072b95f2f1e3fd908604194d653ba21330d811961a78b7da1a77e9e36", size = 21560, upload-time = "2026-10-02T23:04:27.522Z" }, + { url = "https://files.pythonhosted.org/packages/df/26/2353fef7d4bcf2b18e16bad81979fcecff2915156ca6882447917205b8e2/markupsafe-3.0.4-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:8698d70a8081ee8c090dbb394768b5789a1da8b131b5499f89d071dd3cfaf6be", size = 20973, upload-time = "2026-10-02T23:04:28.573Z" }, + { url = "https://files.pythonhosted.org/packages/67/6f/a9561d98d9a6ee3494b0b970a1c766e58bab128cc84841d56ec009456dbd/markupsafe-3.0.4-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:bf053da3c97a4bc5ecfbb218cdd2983febd91c617be8367d139882aa11e490aa", size = 22036, upload-time = "2026-10-02T23:04:29.568Z" }, + { url = "https://files.pythonhosted.org/packages/55/83/6217df9192eca95af3ff0cad955c9854a93fa43b288cf7411ae24713eb52/markupsafe-3.0.4-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:9438a2648b2195980cb2dd8e53ed7b8df91319e2d0b70ae61a9e1d1bc8d3bec9", size = 20314, upload-time = "2026-10-02T23:04:30.881Z" }, + { url = "https://files.pythonhosted.org/packages/35/7c/9cd8081dae70e17fdab3558121fa618d459c7950c8abd8fc10fc024486d7/markupsafe-3.0.4-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:88d59b473bfb03259722600839af9bbd7fa13a2eb514beefeedb95997882f69a", size = 20780, upload-time = "2026-10-02T23:04:31.975Z" }, + { url = "https://files.pythonhosted.org/packages/44/37/c5f2f45f4d8f0c24e4af7b9dc711640c888044cbf5f7e2ba2c0bb74cbb55/markupsafe-3.0.4-cp310-cp310-win32.whl", hash = "sha256:4a540e2d3192792fc84eced57bef37851ccb2b41f73291bb17408eea77bcd278", size = 14096, upload-time = "2026-10-02T23:04:33.129Z" }, + { url = "https://files.pythonhosted.org/packages/50/50/394a1c61c9b9972cb4f76875c332af7109bd39bdad09d3a0ec5327a339dc/markupsafe-3.0.4-cp310-cp310-win_amd64.whl", hash = "sha256:5c22873ad1f0532ba40fa1727f3c0fc1bbbaab6d373d4cbe3f0dc74b2e2521c7", size = 14329, upload-time = "2026-10-02T23:04:34.168Z" }, + { url = "https://files.pythonhosted.org/packages/d1/9a/86d03d2f32ba41a57baa124a7bcb76d0a6d39b1622e9bd4d550074e8b61a/markupsafe-3.0.4-cp310-cp310-win_arm64.whl", hash = "sha256:3d23795802fc8bd72534836d64489bbf0f67c088959091bdb22e10735a5107bf", size = 14196, upload-time = "2026-10-02T23:04:35.201Z" }, + { url = "https://files.pythonhosted.org/packages/32/55/18dbb4778b30ada5ce071608503cc3edc9e14e13d868c17a6d178fc30f7a/markupsafe-3.0.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:9e25feb9e330b63edb0278a0acdf85e50d0cb0fbf49c3084abbe4e24ae195346", size = 11520, upload-time = "2026-10-02T23:04:36.299Z" }, + { url = "https://files.pythonhosted.org/packages/6c/14/0b05f79b4733e264a18d08fe08fa1df7347630ff32a6cb82180d9dccec55/markupsafe-3.0.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7d3391b2188d18737cb2fa147028b1096236eaa7e156446c650a489fa2cadc91", size = 12063, upload-time = "2026-10-02T23:04:37.291Z" }, + { url = "https://files.pythonhosted.org/packages/ca/3a/63ba10b6c1463216b3e4df669a9f0e5a3b0c3071557d2e8229e3968c79fb/markupsafe-3.0.4-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:849dd2bb0e5e4ab2b71c7191726a4a8d5aa8a610daa584728cbee0b710ddc4ef", size = 24321, upload-time = "2026-10-02T23:04:38.262Z" }, + { url = "https://files.pythonhosted.org/packages/1a/2e/5f015261b76ad633d187ef6f388b413aedd64a8773c4df59e530a0be5525/markupsafe-3.0.4-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:befb4158af32106b9a93db8d6d1d1cbbd418c0d5aca0cabb7b1780abf0c89169", size = 28845, upload-time = "2026-10-02T23:04:39.295Z" }, + { url = "https://files.pythonhosted.org/packages/33/cf/26e594b26be40c2f1fec63ccf8a8b99d0335a5b2cbe84835c7d82a994375/markupsafe-3.0.4-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:71f88e749ea29f67f21f3b36433c1dc54c7729ed2a6d9e2da2e0d9e0d7b224eb", size = 24701, upload-time = "2026-10-02T23:04:40.348Z" }, + { url = "https://files.pythonhosted.org/packages/81/a5/a513b76c139a3915b43404324e55c0b7979ae4f0d39eb6f075b0282e90a8/markupsafe-3.0.4-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6da83a088f8ef93b2d483a8232a4dbf4d69d3d8496b568a03c56becac43e1808", size = 22961, upload-time = "2026-10-02T23:04:41.372Z" }, + { url = "https://files.pythonhosted.org/packages/46/cf/4c66192c100b4542bcbe392ae06696b670f66927be3ac38a213234778ff9/markupsafe-3.0.4-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:8f0fac8b13d14bb06c68195f849371924ae53dd7b1c00fed24650f704383b692", size = 21920, upload-time = "2026-10-02T23:04:42.429Z" }, + { url = "https://files.pythonhosted.org/packages/cb/17/ac3662678bfbad649893117ada2ba44dc30bf56884e84f13154a792b10f1/markupsafe-3.0.4-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:4a7cdc2a420ca01058182da4253329764d4bfa055564d1eced90e6ba1e8b1d3d", size = 23726, upload-time = "2026-10-02T23:04:43.531Z" }, + { url = "https://files.pythonhosted.org/packages/f7/af/fe47cee339180a69ebca3c57fb3483d0f5cbd1e8337d1871fb1d9c1aebee/markupsafe-3.0.4-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:83b3944fea42a8400edf92fd1770fb8d0d4f7de651353bd2d8525a92dba69a21", size = 22539, upload-time = "2026-10-02T23:04:44.618Z" }, + { url = "https://files.pythonhosted.org/packages/12/32/d55440ba140442800e02d799c9cb5ab597bf6ebdb1177b5ea39a11f797bd/markupsafe-3.0.4-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:8138eb83940ec7299024d92d4dee45f601b9e6c5ffde9d25f4e35e326203c707", size = 23963, upload-time = "2026-10-02T23:04:45.656Z" }, + { url = "https://files.pythonhosted.org/packages/50/9d/9c86042cb364c2ad4c971e6d1247929effd25f714cd7ee11b05e6316445b/markupsafe-3.0.4-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:811d02d5122171c1941357efd8f9bf4ffe907b7f0a1a4e729a880e4be3f46e3e", size = 21506, upload-time = "2026-10-02T23:04:46.671Z" }, + { url = "https://files.pythonhosted.org/packages/75/ef/5b824f03ba40c3b3652b6272d083d2fc4fcdd440de519a3a39ba2c3e7262/markupsafe-3.0.4-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:50b5bedc9ed8a94fc8857a42ef4f84a81ea88f8d4f05dc8705fb23ee6d8dcca7", size = 22955, upload-time = "2026-10-02T23:04:47.698Z" }, + { url = "https://files.pythonhosted.org/packages/1e/e8/44cfcb5ea40e5e43cec7793ef90704ed0c475280839076c4345757eb8e59/markupsafe-3.0.4-cp311-cp311-win32.whl", hash = "sha256:2e5a7cd7fdd14fcb1ae5d7d8bf23d24fbd1daefd1fbca2580132e1ea75f098b5", size = 14094, upload-time = "2026-10-02T23:04:48.788Z" }, + { url = "https://files.pythonhosted.org/packages/91/89/f2b509f7bf79352e40117824c1070dbeafd4df67031d3fa98165a3134228/markupsafe-3.0.4-cp311-cp311-win_amd64.whl", hash = "sha256:fdb4ca07ab75ffadab4a8b135ad59cdbb3156b99310f3d565370da74a15d6bd3", size = 14328, upload-time = "2026-10-02T23:04:49.801Z" }, + { url = "https://files.pythonhosted.org/packages/2b/5a/ccf22672a0f64dc682306e288f0dabcb06c7a201f3bb6e6cbf86d9e8ad03/markupsafe-3.0.4-cp311-cp311-win_arm64.whl", hash = "sha256:569d65055d367e3dcdf30c3f41119467b73d9ee9faf332bdf40402644f5ac08e", size = 14188, upload-time = "2026-10-02T23:04:50.847Z" }, + { url = "https://files.pythonhosted.org/packages/81/09/4c59d56b8461ae8eb0d8ba34bb25b7e618547044679d58a82ef9b2479fc1/markupsafe-3.0.4-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:61631e08084be9e21a8967ec3139c7616ed7c5e9368e05c86d1b39562c8a57b6", size = 11658, upload-time = "2026-10-02T23:04:51.876Z" }, + { url = "https://files.pythonhosted.org/packages/a2/f0/d6613774d86fbf6d145751d43c59875e47a6f9f17daee0aef173bd36d90e/markupsafe-3.0.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0930db9bdc62d22944e10b066448bb65dc9abe9112880c7cab8da54db4284d5f", size = 12050, upload-time = "2026-10-02T23:04:52.931Z" }, + { url = "https://files.pythonhosted.org/packages/0d/f2/8f18e0b806eb13c1f8d07d917a720831ead54253a6dec011fbc78098a6f8/markupsafe-3.0.4-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6a45c3d514f2436064db00d7fc8778d888f0236ebfed649b53d13a59e69ad51b", size = 24363, upload-time = "2026-10-02T23:04:53.895Z" }, + { url = "https://files.pythonhosted.org/packages/60/ce/fa07dbe8a5675558fa36dea033e19995bc783de2dec5f540ccb9030b06aa/markupsafe-3.0.4-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:1e1451fab512d1bcc3dc26988ec1edb0b82c2db909132872cd9356070a6b63df", size = 28525, upload-time = "2026-10-02T23:04:54.905Z" }, + { url = "https://files.pythonhosted.org/packages/85/40/be87c01f3868ec217f8a2015089d71c22c8c5a75324822e5ed1cdd87210d/markupsafe-3.0.4-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:bd3ce56ae2cbae3ba82b683bc425cd7e48d2ed8b10f3e818186b6f5646d9271c", size = 24733, upload-time = "2026-10-02T23:04:56.229Z" }, + { url = "https://files.pythonhosted.org/packages/4f/a7/aeedb5140afa41fc74c225e9184ab96723a6e873b6ee1c9fede7283456d8/markupsafe-3.0.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8e124f974786f831d6043728e38296969d3579db8896fe004682f5758e613581", size = 22985, upload-time = "2026-10-02T23:04:57.521Z" }, + { url = "https://files.pythonhosted.org/packages/c3/fc/e91352bb08c6a59da3ef0909d457bf95a5f5908fbf151b30a06d9dbcfbb4/markupsafe-3.0.4-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c02e8f18bdedba082cef725942ac823b9b60656db07f7e265cb31618dfd00d77", size = 22001, upload-time = "2026-10-02T23:04:58.597Z" }, + { url = "https://files.pythonhosted.org/packages/5d/f8/bffee5e7d2a3deb59748a797650a48af7e672025cf641a79344a771ad106/markupsafe-3.0.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:9f098115c247e11d138ab83a28fa0323c77015007ea2df73ba5fd714dfefd67c", size = 23793, upload-time = "2026-10-02T23:04:59.686Z" }, + { url = "https://files.pythonhosted.org/packages/ed/59/b853d6628ecb4d658e1d637224846d5e9bb4adf4f8df97f3be9f29dce2ec/markupsafe-3.0.4-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:d5f93ebbeb8032d47e349328ec8662d973d9b05a70b3c35df1f91fe419b84749", size = 22640, upload-time = "2026-10-02T23:05:00.768Z" }, + { url = "https://files.pythonhosted.org/packages/09/b2/1506df394f0f075797c418d0301498f49e43be194e3ffcb49e6fe6ccf022/markupsafe-3.0.4-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:64511c54db4e4987aef4c41923235927428729e8174c5dba488429be70a998ed", size = 24074, upload-time = "2026-10-02T23:05:01.813Z" }, + { url = "https://files.pythonhosted.org/packages/c7/81/5ed69cda630ac69ef60d06c09ba5a7f84ff66a2e28cf986fd5614ab3c6e6/markupsafe-3.0.4-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:e1a622f13970d81f95d0c72f9dc090dce9085fccfa4c9f2174377ee32bd15786", size = 21563, upload-time = "2026-10-02T23:05:03.239Z" }, + { url = "https://files.pythonhosted.org/packages/0c/fe/fb1e79be0fea60aa32602ebefc9c35a82bb42b4df157285ab7dfec12341a/markupsafe-3.0.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:c9a7f43c0b202b334cc9184af09bb8f21d3a209e038efaf106936fb69e6b026e", size = 23048, upload-time = "2026-10-02T23:05:04.479Z" }, + { url = "https://files.pythonhosted.org/packages/c8/52/7632a53360671a9b750cdbabaf9cdd89f18b42248b8e4cb42c0b0296e459/markupsafe-3.0.4-cp312-cp312-win32.whl", hash = "sha256:f0ec3b750b59375eab5b0fb2b9254810c00a3375be6d789899f1055a1d556237", size = 14108, upload-time = "2026-10-02T23:05:05.513Z" }, + { url = "https://files.pythonhosted.org/packages/3f/bf/62495e180b7000aaf30000fff849e933f74264638057176cf46852500adc/markupsafe-3.0.4-cp312-cp312-win_amd64.whl", hash = "sha256:11935df9bf455ed0c04eb87bcd720f02b1fe5e02128a9430f23aed6f93336fc7", size = 14303, upload-time = "2026-10-02T23:05:06.538Z" }, + { url = "https://files.pythonhosted.org/packages/c5/8e/4c24208776a65878d656996945aacfbfe010d3720d1a98fc0eb8491fc03b/markupsafe-3.0.4-cp312-cp312-win_arm64.whl", hash = "sha256:a4bbd2d87dd233b9fc5812160c3d0ffbe42edc22a26ce0469f58479ede633fe9", size = 14174, upload-time = "2026-10-02T23:05:07.617Z" }, +] + +[[package]] +name = "mpmath" +version = "1.3.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e0/47/dd32fa426cc72114383ac549964eecb20ecfd886d1e5ccf5340b55b02f57/mpmath-1.3.0.tar.gz", hash = "sha256:7a28eb2a9774d00c7bc92411c19a89209d5da7c4c9a9e227be8330a23a25b91f", size = 508106, upload-time = "2023-03-07T16:47:11.061Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/43/e3/7d92a15f894aa0c9c4b49b8ee9ac9850d6e63b03c9c32c0367a13ae62209/mpmath-1.3.0-py3-none-any.whl", hash = "sha256:a0b2b9fe80bbcd81a6647ff13108738cfb482d481d826cc0e02f5b35e5c88d2c", size = 536198, upload-time = "2023-03-07T16:47:09.197Z" }, +] + +[[package]] +name = "networkx" +version = "3.4.2" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version < '3.11'", +] +sdist = { url = "https://files.pythonhosted.org/packages/fd/1d/06475e1cd5264c0b870ea2cc6fdb3e37177c1e565c43f56ff17a10e3937f/networkx-3.4.2.tar.gz", hash = "sha256:307c3669428c5362aab27c8a1260aa8f47c4e91d3891f48be0141738d8d053e1", size = 2151368, upload-time = "2024-10-21T12:39:38.695Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b9/54/dd730b32ea14ea797530a4479b2ed46a6fb250f682a9cfb997e968bf0261/networkx-3.4.2-py3-none-any.whl", hash = "sha256:df5d4365b724cf81b8c6a7312509d0c22386097011ad1abe274afd5e9d3bbc5f", size = 1723263, upload-time = "2024-10-21T12:39:36.247Z" }, +] + +[[package]] +name = "networkx" +version = "3.6.1" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version == '3.11.*'", +] +sdist = { url = "https://files.pythonhosted.org/packages/6a/51/63fe664f3908c97be9d2e4f1158eb633317598cfa6e1fc14af5383f17512/networkx-3.6.1.tar.gz", hash = "sha256:26b7c357accc0c8cde558ad486283728b65b6a95d85ee1cd66bafab4c8168509", size = 2517025, upload-time = "2025-12-08T17:02:39.908Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9e/c9/b2622292ea83fbb4ec318f5b9ab867d0a28ab43c5717bb85b0a5f6b3b0a4/networkx-3.6.1-py3-none-any.whl", hash = "sha256:d47fbf302e7d9cbbb9e2555a0d267983d2aa476bac30e90dfbe5669bd57f3762", size = 2068504, upload-time = "2025-12-08T17:02:38.159Z" }, +] + +[[package]] +name = "networkx" +version = "3.7" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.12'", +] +sdist = { url = "https://files.pythonhosted.org/packages/dc/76/3af777226b63a5e64a6b36b1ec5855c14e2b94a37096d4760e595fc43511/networkx-3.7.tar.gz", hash = "sha256:fd77a511bd90f39f3d016351345b52cf5319b813bdca01de3f755d3cca62e96a", size = 1866482, upload-time = "2026-09-21T16:45:16.974Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7e/cd/fe58041e9011f307c490e3e17dd48cc516448f7c698a3f2d9d9d65d7e6a8/networkx-3.7-py3-none-any.whl", hash = "sha256:e3fd2c13a7814cee3746340d8d7f8598a67f16a58bf47fb7f8793fab6efca1b0", size = 2142205, upload-time = "2026-09-21T16:45:14.609Z" }, +] + +[[package]] +name = "numpy" +version = "2.2.6" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version < '3.11'", +] +sdist = { url = "https://files.pythonhosted.org/packages/76/21/7d2a95e4bba9dc13d043ee156a356c0a8f0c6309dff6b21b4d71a073b8a8/numpy-2.2.6.tar.gz", hash = "sha256:e29554e2bef54a90aa5cc07da6ce955accb83f21ab5de01a62c8478897b264fd", size = 20276440, upload-time = "2025-05-17T22:38:04.611Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9a/3e/ed6db5be21ce87955c0cbd3009f2803f59fa08df21b5df06862e2d8e2bdd/numpy-2.2.6-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b412caa66f72040e6d268491a59f2c43bf03eb6c96dd8f0307829feb7fa2b6fb", size = 21165245, upload-time = "2025-05-17T21:27:58.555Z" }, + { url = "https://files.pythonhosted.org/packages/22/c2/4b9221495b2a132cc9d2eb862e21d42a009f5a60e45fc44b00118c174bff/numpy-2.2.6-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8e41fd67c52b86603a91c1a505ebaef50b3314de0213461c7a6e99c9a3beff90", size = 14360048, upload-time = "2025-05-17T21:28:21.406Z" }, + { url = "https://files.pythonhosted.org/packages/fd/77/dc2fcfc66943c6410e2bf598062f5959372735ffda175b39906d54f02349/numpy-2.2.6-cp310-cp310-macosx_14_0_arm64.whl", hash = "sha256:37e990a01ae6ec7fe7fa1c26c55ecb672dd98b19c3d0e1d1f326fa13cb38d163", size = 5340542, upload-time = "2025-05-17T21:28:30.931Z" }, + { url = "https://files.pythonhosted.org/packages/7a/4f/1cb5fdc353a5f5cc7feb692db9b8ec2c3d6405453f982435efc52561df58/numpy-2.2.6-cp310-cp310-macosx_14_0_x86_64.whl", hash = "sha256:5a6429d4be8ca66d889b7cf70f536a397dc45ba6faeb5f8c5427935d9592e9cf", size = 6878301, upload-time = "2025-05-17T21:28:41.613Z" }, + { url = "https://files.pythonhosted.org/packages/eb/17/96a3acd228cec142fcb8723bd3cc39c2a474f7dcf0a5d16731980bcafa95/numpy-2.2.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:efd28d4e9cd7d7a8d39074a4d44c63eda73401580c5c76acda2ce969e0a38e83", size = 14297320, upload-time = "2025-05-17T21:29:02.78Z" }, + { url = "https://files.pythonhosted.org/packages/b4/63/3de6a34ad7ad6646ac7d2f55ebc6ad439dbbf9c4370017c50cf403fb19b5/numpy-2.2.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fc7b73d02efb0e18c000e9ad8b83480dfcd5dfd11065997ed4c6747470ae8915", size = 16801050, upload-time = "2025-05-17T21:29:27.675Z" }, + { url = "https://files.pythonhosted.org/packages/07/b6/89d837eddef52b3d0cec5c6ba0456c1bf1b9ef6a6672fc2b7873c3ec4e2e/numpy-2.2.6-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:74d4531beb257d2c3f4b261bfb0fc09e0f9ebb8842d82a7b4209415896adc680", size = 15807034, upload-time = "2025-05-17T21:29:51.102Z" }, + { url = "https://files.pythonhosted.org/packages/01/c8/dc6ae86e3c61cfec1f178e5c9f7858584049b6093f843bca541f94120920/numpy-2.2.6-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:8fc377d995680230e83241d8a96def29f204b5782f371c532579b4f20607a289", size = 18614185, upload-time = "2025-05-17T21:30:18.703Z" }, + { url = "https://files.pythonhosted.org/packages/5b/c5/0064b1b7e7c89137b471ccec1fd2282fceaae0ab3a9550f2568782d80357/numpy-2.2.6-cp310-cp310-win32.whl", hash = "sha256:b093dd74e50a8cba3e873868d9e93a85b78e0daf2e98c6797566ad8044e8363d", size = 6527149, upload-time = "2025-05-17T21:30:29.788Z" }, + { url = "https://files.pythonhosted.org/packages/a3/dd/4b822569d6b96c39d1215dbae0582fd99954dcbcf0c1a13c61783feaca3f/numpy-2.2.6-cp310-cp310-win_amd64.whl", hash = "sha256:f0fd6321b839904e15c46e0d257fdd101dd7f530fe03fd6359c1ea63738703f3", size = 12904620, upload-time = "2025-05-17T21:30:48.994Z" }, + { url = "https://files.pythonhosted.org/packages/da/a8/4f83e2aa666a9fbf56d6118faaaf5f1974d456b1823fda0a176eff722839/numpy-2.2.6-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f9f1adb22318e121c5c69a09142811a201ef17ab257a1e66ca3025065b7f53ae", size = 21176963, upload-time = "2025-05-17T21:31:19.36Z" }, + { url = "https://files.pythonhosted.org/packages/b3/2b/64e1affc7972decb74c9e29e5649fac940514910960ba25cd9af4488b66c/numpy-2.2.6-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c820a93b0255bc360f53eca31a0e676fd1101f673dda8da93454a12e23fc5f7a", size = 14406743, upload-time = "2025-05-17T21:31:41.087Z" }, + { url = "https://files.pythonhosted.org/packages/4a/9f/0121e375000b5e50ffdd8b25bf78d8e1a5aa4cca3f185d41265198c7b834/numpy-2.2.6-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:3d70692235e759f260c3d837193090014aebdf026dfd167834bcba43e30c2a42", size = 5352616, upload-time = "2025-05-17T21:31:50.072Z" }, + { url = "https://files.pythonhosted.org/packages/31/0d/b48c405c91693635fbe2dcd7bc84a33a602add5f63286e024d3b6741411c/numpy-2.2.6-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:481b49095335f8eed42e39e8041327c05b0f6f4780488f61286ed3c01368d491", size = 6889579, upload-time = "2025-05-17T21:32:01.712Z" }, + { url = "https://files.pythonhosted.org/packages/52/b8/7f0554d49b565d0171eab6e99001846882000883998e7b7d9f0d98b1f934/numpy-2.2.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b64d8d4d17135e00c8e346e0a738deb17e754230d7e0810ac5012750bbd85a5a", size = 14312005, upload-time = "2025-05-17T21:32:23.332Z" }, + { url = "https://files.pythonhosted.org/packages/b3/dd/2238b898e51bd6d389b7389ffb20d7f4c10066d80351187ec8e303a5a475/numpy-2.2.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba10f8411898fc418a521833e014a77d3ca01c15b0c6cdcce6a0d2897e6dbbdf", size = 16821570, upload-time = "2025-05-17T21:32:47.991Z" }, + { url = "https://files.pythonhosted.org/packages/83/6c/44d0325722cf644f191042bf47eedad61c1e6df2432ed65cbe28509d404e/numpy-2.2.6-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:bd48227a919f1bafbdda0583705e547892342c26fb127219d60a5c36882609d1", size = 15818548, upload-time = "2025-05-17T21:33:11.728Z" }, + { url = "https://files.pythonhosted.org/packages/ae/9d/81e8216030ce66be25279098789b665d49ff19eef08bfa8cb96d4957f422/numpy-2.2.6-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:9551a499bf125c1d4f9e250377c1ee2eddd02e01eac6644c080162c0c51778ab", size = 18620521, upload-time = "2025-05-17T21:33:39.139Z" }, + { url = "https://files.pythonhosted.org/packages/6a/fd/e19617b9530b031db51b0926eed5345ce8ddc669bb3bc0044b23e275ebe8/numpy-2.2.6-cp311-cp311-win32.whl", hash = "sha256:0678000bb9ac1475cd454c6b8c799206af8107e310843532b04d49649c717a47", size = 6525866, upload-time = "2025-05-17T21:33:50.273Z" }, + { url = "https://files.pythonhosted.org/packages/31/0a/f354fb7176b81747d870f7991dc763e157a934c717b67b58456bc63da3df/numpy-2.2.6-cp311-cp311-win_amd64.whl", hash = "sha256:e8213002e427c69c45a52bbd94163084025f533a55a59d6f9c5b820774ef3303", size = 12907455, upload-time = "2025-05-17T21:34:09.135Z" }, + { url = "https://files.pythonhosted.org/packages/82/5d/c00588b6cf18e1da539b45d3598d3557084990dcc4331960c15ee776ee41/numpy-2.2.6-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:41c5a21f4a04fa86436124d388f6ed60a9343a6f767fced1a8a71c3fbca038ff", size = 20875348, upload-time = "2025-05-17T21:34:39.648Z" }, + { url = "https://files.pythonhosted.org/packages/66/ee/560deadcdde6c2f90200450d5938f63a34b37e27ebff162810f716f6a230/numpy-2.2.6-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:de749064336d37e340f640b05f24e9e3dd678c57318c7289d222a8a2f543e90c", size = 14119362, upload-time = "2025-05-17T21:35:01.241Z" }, + { url = "https://files.pythonhosted.org/packages/3c/65/4baa99f1c53b30adf0acd9a5519078871ddde8d2339dc5a7fde80d9d87da/numpy-2.2.6-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:894b3a42502226a1cac872f840030665f33326fc3dac8e57c607905773cdcde3", size = 5084103, upload-time = "2025-05-17T21:35:10.622Z" }, + { url = "https://files.pythonhosted.org/packages/cc/89/e5a34c071a0570cc40c9a54eb472d113eea6d002e9ae12bb3a8407fb912e/numpy-2.2.6-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:71594f7c51a18e728451bb50cc60a3ce4e6538822731b2933209a1f3614e9282", size = 6625382, upload-time = "2025-05-17T21:35:21.414Z" }, + { url = "https://files.pythonhosted.org/packages/f8/35/8c80729f1ff76b3921d5c9487c7ac3de9b2a103b1cd05e905b3090513510/numpy-2.2.6-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f2618db89be1b4e05f7a1a847a9c1c0abd63e63a1607d892dd54668dd92faf87", size = 14018462, upload-time = "2025-05-17T21:35:42.174Z" }, + { url = "https://files.pythonhosted.org/packages/8c/3d/1e1db36cfd41f895d266b103df00ca5b3cbe965184df824dec5c08c6b803/numpy-2.2.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd83c01228a688733f1ded5201c678f0c53ecc1006ffbc404db9f7a899ac6249", size = 16527618, upload-time = "2025-05-17T21:36:06.711Z" }, + { url = "https://files.pythonhosted.org/packages/61/c6/03ed30992602c85aa3cd95b9070a514f8b3c33e31124694438d88809ae36/numpy-2.2.6-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:37c0ca431f82cd5fa716eca9506aefcabc247fb27ba69c5062a6d3ade8cf8f49", size = 15505511, upload-time = "2025-05-17T21:36:29.965Z" }, + { url = "https://files.pythonhosted.org/packages/b7/25/5761d832a81df431e260719ec45de696414266613c9ee268394dd5ad8236/numpy-2.2.6-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:fe27749d33bb772c80dcd84ae7e8df2adc920ae8297400dabec45f0dedb3f6de", size = 18313783, upload-time = "2025-05-17T21:36:56.883Z" }, + { url = "https://files.pythonhosted.org/packages/57/0a/72d5a3527c5ebffcd47bde9162c39fae1f90138c961e5296491ce778e682/numpy-2.2.6-cp312-cp312-win32.whl", hash = "sha256:4eeaae00d789f66c7a25ac5f34b71a7035bb474e679f410e5e1a94deb24cf2d4", size = 6246506, upload-time = "2025-05-17T21:37:07.368Z" }, + { url = "https://files.pythonhosted.org/packages/36/fa/8c9210162ca1b88529ab76b41ba02d433fd54fecaf6feb70ef9f124683f1/numpy-2.2.6-cp312-cp312-win_amd64.whl", hash = "sha256:c1f9540be57940698ed329904db803cf7a402f3fc200bfe599334c9bd84a40b2", size = 12614190, upload-time = "2025-05-17T21:37:26.213Z" }, + { url = "https://files.pythonhosted.org/packages/9e/3b/d94a75f4dbf1ef5d321523ecac21ef23a3cd2ac8b78ae2aac40873590229/numpy-2.2.6-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:0b605b275d7bd0c640cad4e5d30fa701a8d59302e127e5f79138ad62762c3e3d", size = 21040391, upload-time = "2025-05-17T21:44:35.948Z" }, + { url = "https://files.pythonhosted.org/packages/17/f4/09b2fa1b58f0fb4f7c7963a1649c64c4d315752240377ed74d9cd878f7b5/numpy-2.2.6-pp310-pypy310_pp73-macosx_14_0_x86_64.whl", hash = "sha256:7befc596a7dc9da8a337f79802ee8adb30a552a94f792b9c9d18c840055907db", size = 6786754, upload-time = "2025-05-17T21:44:47.446Z" }, + { url = "https://files.pythonhosted.org/packages/af/30/feba75f143bdc868a1cc3f44ccfa6c4b9ec522b36458e738cd00f67b573f/numpy-2.2.6-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ce47521a4754c8f4593837384bd3424880629f718d87c5d44f8ed763edd63543", size = 16643476, upload-time = "2025-05-17T21:45:11.871Z" }, + { url = "https://files.pythonhosted.org/packages/37/48/ac2a9584402fb6c0cd5b5d1a91dcf176b15760130dd386bbafdbfe3640bf/numpy-2.2.6-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:d042d24c90c41b54fd506da306759e06e568864df8ec17ccc17e9e884634fd00", size = 12812666, upload-time = "2025-05-17T21:45:31.426Z" }, +] + +[[package]] +name = "numpy" +version = "2.4.6" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version == '3.11.*'", +] +sdist = { url = "https://files.pythonhosted.org/packages/d0/ad/fed0499ce6a338d2a03ebae59cd15093910c8875328855781952abf6c2fe/numpy-2.4.6.tar.gz", hash = "sha256:f3a3570c4a2a16746ac2c31a7c7c7b0c186b95ce902e33db6f28094ed7387dda", size = 20735807, upload-time = "2026-05-18T23:37:14.07Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b3/49/ec46835a70be8fa6446c495126ac84fdb28cb2558e1620ffb87a10c8b64c/numpy-2.4.6-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:0280e0356c0829a18d9de1cb7eee50ec22ca639878d7240307ca0943d73cd2c4", size = 16969194, upload-time = "2026-05-18T23:33:13.503Z" }, + { url = "https://files.pythonhosted.org/packages/0e/0d/f5957185c0ee2f3e12f78715aa9e3b353fd83633316c8532b38faa37e3f6/numpy-2.4.6-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:110f8b71aacb688ec69062bb7f6938a0f8acb01b7c1c4beb453c65b6d234584d", size = 14964111, upload-time = "2026-05-18T23:33:17.795Z" }, + { url = "https://files.pythonhosted.org/packages/ad/40/40a40ee0ddf7ceb782c49af278894b686e586d65d8c1889c8b5da01a3d7d/numpy-2.4.6-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:4cfe66903cc32a9921a6733d96b19bb6abf310397581bbad89c228f5abaf0ee8", size = 5469159, upload-time = "2026-05-18T23:33:20.654Z" }, + { url = "https://files.pythonhosted.org/packages/63/13/f9a8046535cb21deae82f8d03de9617e08882d274fad2539630761888228/numpy-2.4.6-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:8155154c7c691289fe18f510b5d4657c68c67989f293f0535a91360392ff6538", size = 6798936, upload-time = "2026-05-18T23:33:22.987Z" }, + { url = "https://files.pythonhosted.org/packages/33/a8/6fa8c1a345a8c85dbb21932c447bee07c30a2c2a3f31e369c0a84b300147/numpy-2.4.6-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0ab0a9c4ffb1a6d95ef519fe4247dba8eb6b18ad93999f76b7f657039acabd47", size = 15966692, upload-time = "2026-05-18T23:33:26.62Z" }, + { url = "https://files.pythonhosted.org/packages/02/03/74fe2a4cb3817d94d86402f2506554130a2f01414e299b5a843e5a8a957f/numpy-2.4.6-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:89cd468399cfd2504718f0ba50e410dca55a170b61a02ad92bb18c8a65186e93", size = 16918164, upload-time = "2026-05-18T23:33:29.955Z" }, + { url = "https://files.pythonhosted.org/packages/c5/80/3615be3313f7e7696609bc194b9f0101da809df79e859bdb84e0cd043f46/numpy-2.4.6-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c2d37ab77531417474168eb79d6d80b14f821a966818505d03013d0833edb7a8", size = 17322877, upload-time = "2026-05-18T23:33:34.724Z" }, + { url = "https://files.pythonhosted.org/packages/ca/ac/a691e0fe2675e370d0e08ff905adc49a1c8830e8cae03efe4477e92cd55d/numpy-2.4.6-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f407cb6b8e9d6d8c626bc73c945db1706035af8fd632295547bf1c9e46d092d6", size = 18651487, upload-time = "2026-05-18T23:33:38.217Z" }, + { url = "https://files.pythonhosted.org/packages/15/a7/9bc1cd626d7bf6869bfedf27b91b6ab5dd607758bf8e959d6fa80c6a59cb/numpy-2.4.6-cp311-cp311-win32.whl", hash = "sha256:ddea102b48f9e339f3948bf22040944184627a30fdf7f858667673b9c5f033c8", size = 6233945, upload-time = "2026-05-18T23:33:41.331Z" }, + { url = "https://files.pythonhosted.org/packages/c5/31/7fc6239c12bce7e931463251cca4426c465e1876ba3cc785402ef4dd8f4e/numpy-2.4.6-cp311-cp311-win_amd64.whl", hash = "sha256:1e254a00cdf42b1e4d5b3d68d33af63268d41340d8885df2ab6470f2e1500147", size = 12608406, upload-time = "2026-05-18T23:33:44.131Z" }, + { url = "https://files.pythonhosted.org/packages/27/83/140f85a466595a16382996a1bf06b2b54bcd597488921b0c9daaeeda72af/numpy-2.4.6-cp311-cp311-win_arm64.whl", hash = "sha256:ed9749eef4cbd126da3dc1d6bcb3a57f5eb7ac6a6484146bdbf743f552dfc577", size = 10479528, upload-time = "2026-05-18T23:33:50.725Z" }, + { url = "https://files.pythonhosted.org/packages/95/2a/3d7b5ac8aac24feaf9ad7ed58f45b0bbc06d37e4338ae84c9f2298b570f9/numpy-2.4.6-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:001fbb8e08d942dd57599e781f2472269ee7f2755fae407b4f67b2f0b17da3f1", size = 16689119, upload-time = "2026-05-18T23:33:54.065Z" }, + { url = "https://files.pythonhosted.org/packages/ea/12/92c4c131527599e8288d6918e888d88726f84d805d784b771f32408aeaef/numpy-2.4.6-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ebfb099f8dcf083deef3ac1ca4c1503f387cf76296fcb3816b66f5ecb5f54fdb", size = 14699246, upload-time = "2026-05-18T23:33:57.621Z" }, + { url = "https://files.pythonhosted.org/packages/ad/fe/c0a6b7b2ca128a8fb228575147073b660656734b8ebe4d76c8fd748dcc79/numpy-2.4.6-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:3213d622a0283a39a93d188f3cf72b26862df52fbb4ca3697f51705016523d41", size = 5204410, upload-time = "2026-05-18T23:34:00.302Z" }, + { url = "https://files.pythonhosted.org/packages/f3/d4/9770d14ba719432bb90a421bfd443872ed0f70f7264b64bec12ea363d5fd/numpy-2.4.6-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:357cc07a6d7b0b182ff02249616a03742827ebb1277546b5c7cd7f7620a45698", size = 6551240, upload-time = "2026-05-18T23:34:02.852Z" }, + { url = "https://files.pythonhosted.org/packages/c9/c6/50a46a6205feba2343f1d6d17438107c5dc491ed1c736e6ea68689fd906b/numpy-2.4.6-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5f9fb9157b4ce2971008323afe46053787b526ef624fea915b261468a8421a0f", size = 15671012, upload-time = "2026-05-18T23:34:05.485Z" }, + { url = "https://files.pythonhosted.org/packages/99/60/14115e6364fa676c5397c2ad3004e527e9aa487abf5d0706ec81bbd08529/numpy-2.4.6-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:90f9849678c75fe7afa2d348ac842c168b0a4d3d61919687216dfc547976d853", size = 16645538, upload-time = "2026-05-18T23:34:09.265Z" }, + { url = "https://files.pythonhosted.org/packages/ae/c5/693cbe59e57db94d2231fa519ca3978dc9e19da5a8f088588f5c6e947ff2/numpy-2.4.6-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:c1a2af6c6ef86344a6b0db6b97834208bf598db514f2b155042439b62605601a", size = 17020706, upload-time = "2026-05-18T23:34:13.053Z" }, + { url = "https://files.pythonhosted.org/packages/ef/fc/85b7c4eff9b4966ade25c2273cf7e7012e92366c032058653934b37de044/numpy-2.4.6-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:e5805d5a22fd19c8ccff10a9561f9df94436b0545619ea579db2d3c35294bce2", size = 18368541, upload-time = "2026-05-18T23:34:17.024Z" }, + { url = "https://files.pythonhosted.org/packages/f6/81/e1b27545deedce7f4a0b348618c6b62d74e36a4dc9ccd42f3eb2f85eee32/numpy-2.4.6-cp312-cp312-win32.whl", hash = "sha256:e3eeb0aabd6bd5ce64faae67e9935203a6991b4bc2a485a767fbafb2c5125f45", size = 5962825, upload-time = "2026-05-18T23:34:20.3Z" }, + { url = "https://files.pythonhosted.org/packages/ab/ca/feab00bd44aa5fe1ad2c18f08b4d3bb92e26484b0b1d1443897809ed528c/numpy-2.4.6-cp312-cp312-win_amd64.whl", hash = "sha256:d8e8286dd7cea7895157318d1b91cdacac64c479f3cbc8dce548331728484751", size = 12321687, upload-time = "2026-05-18T23:34:23.095Z" }, + { url = "https://files.pythonhosted.org/packages/63/cf/5a6d34850a39d1093558564f77ee8e8e0bee5061151b8f05a55711001ec7/numpy-2.4.6-cp312-cp312-win_arm64.whl", hash = "sha256:4081eb135ac24158bd51cdfbef16f1c64df7063b1143f24731387137c092bec8", size = 10221482, upload-time = "2026-05-18T23:34:25.876Z" }, + { url = "https://files.pythonhosted.org/packages/de/12/b422cc84439adc0d00de605bf4a308890ae5c26f2c71fbd73e5d08fbb0dd/numpy-2.4.6-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:55cced7c52e981362f708ad635198e97a752dfba412cc03c23bbf3bd8d5cd662", size = 16847511, upload-time = "2026-05-18T23:36:50.673Z" }, + { url = "https://files.pythonhosted.org/packages/44/53/f481bef68011740f8849418d82db07230e825013f31f4eef5ba5b805316a/numpy-2.4.6-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:d6da64deb6b8ed903e7560180a92f2d804ee1ba5eeb849ac2748b8c1aba1f6d7", size = 14889064, upload-time = "2026-05-18T23:36:53.879Z" }, + { url = "https://files.pythonhosted.org/packages/7f/57/42ed575c10ced8af951d426bc4e1f8aff16fd851db33f067036215a7f860/numpy-2.4.6-pp311-pypy311_pp73-macosx_14_0_arm64.whl", hash = "sha256:68a5124b13fa6cc2086764a20005d30bc0548146f7f5322f02fce212ca14317f", size = 5394157, upload-time = "2026-05-18T23:36:57.194Z" }, + { url = "https://files.pythonhosted.org/packages/6a/ef/f66cc724fcc36c1e364c67f51ae9146090b8b584f27d58b97fdae3edd737/numpy-2.4.6-pp311-pypy311_pp73-macosx_14_0_x86_64.whl", hash = "sha256:948424b06129ce883307e8cff868c31396d8dc7630a59c61d70d98dbe70f222c", size = 6708728, upload-time = "2026-05-18T23:36:59.575Z" }, + { url = "https://files.pythonhosted.org/packages/1a/9c/c531f2293b91265d8b48e9b329f54fdd7ffae73cb4134ea10cca4237e9cc/numpy-2.4.6-pp311-pypy311_pp73-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5dbbdb29840ca3d91ee0fece42fc29278886d908280bfec0a5846c6f901a3eb0", size = 15798374, upload-time = "2026-05-18T23:37:02.674Z" }, + { url = "https://files.pythonhosted.org/packages/1a/b0/413077f6b1153ed3cba361401c6783bbad6114804a000cc22eb71c13e190/numpy-2.4.6-pp311-pypy311_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8ad03c0965fb3c692200e74d458ca28c1dbb4ce96f9a479a8aa041ad5fabca02", size = 16747286, upload-time = "2026-05-18T23:37:06.327Z" }, + { url = "https://files.pythonhosted.org/packages/15/ce/e5ec180bc41812edcd8daeb8639d205622c0e8c02259d8ab25a0201b3c2a/numpy-2.4.6-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:2803abfebfc990042cd494d8ce2d5f82e9d847af6d35ec486923aa19dbad5e73", size = 12504263, upload-time = "2026-05-18T23:37:09.715Z" }, +] + +[[package]] +name = "numpy" +version = "2.5.5" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.12'", +] +sdist = { url = "https://files.pythonhosted.org/packages/4e/3a/8770c288c47f0b5c2a786d3c20e79f66fd245f2d42cd232d7cd5e00e83e5/numpy-2.5.5.tar.gz", hash = "sha256:5cddc243c75114ba845f01b1f87aca1572dbf7b6c2d88636ed3e1d2bccd7f1bf", size = 20873892, upload-time = "2026-11-15T21:32:28.607Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/20/74/5b99f425938870958d43dc9f7b17c684e793ce47ec46b7885cdc7acea285/numpy-2.5.5-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7da9a248f149cfbb220c6da964a59c8d051d516704f7758acfb81eb382a05d97", size = 14750374, upload-time = "2026-11-15T21:30:10.113Z" }, + { url = "https://files.pythonhosted.org/packages/5c/f4/06db317e93dd6d618786004c1761214b113832bb77294c8513776956702a/numpy-2.5.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:b96e9ee49ccbdb5676359f852a4497f7a9c5df6c377d8877f5330d6fd3ff42e4", size = 10749920, upload-time = "2026-11-15T21:30:13.092Z" }, + { url = "https://files.pythonhosted.org/packages/8a/92/6de34324a266b73c04ba977db5864b9016500076b26f09078a565f527d34/numpy-2.5.5-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:a3856a97e48ed8371c680fb04120b99fbcc29f2076ebe6dc3deb34f77947c5ca", size = 5513680, upload-time = "2026-11-15T21:30:15.201Z" }, + { url = "https://files.pythonhosted.org/packages/1e/a1/6563b74cd67e3873f9897afebb3244529b1494d4c0df30f3201329a7e316/numpy-2.5.5-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:f5e8603f0892d1b848e12124863b5b29af72383ee9b25ddc6fe4967d4c1ee6ef", size = 6797540, upload-time = "2026-11-15T21:30:17.172Z" }, + { url = "https://files.pythonhosted.org/packages/c2/22/82184e9a5b50a4a298e9f8fe0bd8cfc483672dbfea8a3b57c78e2376b139/numpy-2.5.5-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a0750f2156d53446caca85663d0b65d67214e1664b9050454a731ea1418d176a", size = 15284117, upload-time = "2026-11-15T21:30:19.167Z" }, + { url = "https://files.pythonhosted.org/packages/99/61/522b973ba38987b22a4a71beaed2ea6ac9fd4f687baaa2bc9a45100625e0/numpy-2.5.5-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:704d819265e5d1064d932968e9ee85fff2103ccc78c05b878c06943ba27b8507", size = 15720599, upload-time = "2026-11-15T21:30:21.273Z" }, + { url = "https://files.pythonhosted.org/packages/25/cd/182cf60bd9c34e617c516f138f2f68988760062fa65fca8fcc97875cf7cf/numpy-2.5.5-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:86868185bf4b6c4e5a8628ac42cfa165cd9530266c731f7dd1d11b4ad7e7cd1c", size = 16503566, upload-time = "2026-11-15T21:30:24.023Z" }, + { url = "https://files.pythonhosted.org/packages/f3/57/4fa4723e80be805f68af552731ed483974b2a11e511284a9ef6aafbcb3cf/numpy-2.5.5-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:7fb87c4bcc73850ef433a0c42f096b010d3d3d284e9d00028bb030b43df3d078", size = 17082560, upload-time = "2026-11-15T21:30:26.224Z" }, + { url = "https://files.pythonhosted.org/packages/d5/0b/73d2bd5be85d3178a862e8354e2d6441b4040fadf1e7d999e01b0bdfa5c6/numpy-2.5.5-cp312-cp312-win32.whl", hash = "sha256:263b2aa236d752b18f90c5107137d24b2e3856d7db37725609f0ab5bcdb58881", size = 6146378, upload-time = "2026-11-15T21:30:28.328Z" }, + { url = "https://files.pythonhosted.org/packages/d1/71/b1ce51834c21020d189332979d38ba7350eb6cd7ca8c8ec424a663b0ca6f/numpy-2.5.5-cp312-cp312-win_amd64.whl", hash = "sha256:919eb420662b0b4ba34889df503f3d5329775b0c1d5f7e5f5af4fba8315b1e30", size = 12580189, upload-time = "2026-11-15T21:30:30.025Z" }, + { url = "https://files.pythonhosted.org/packages/c2/5e/09ae9d0d02fbfe6b160043349bbe73e6bbbbfb2565bb46146dd943687271/numpy-2.5.5-cp312-cp312-win_arm64.whl", hash = "sha256:f6622e32cb46c60bee3b2c7dd7f5c22bdc86fcb8630336b4822ec81c3986111a", size = 10535386, upload-time = "2026-11-15T21:30:32.112Z" }, +] + +[[package]] +name = "nvidia-cublas" +version = "13.1.1.3" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version < '3.11'", +] +dependencies = [ + { name = "nvidia-cuda-nvrtc", version = "13.0.88", source = { registry = "https://pypi.org/simple" } }, +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/a7/a1/0bd24ee8c8d03adac032fd2909426a00c88f8c57961b1277ded97f91119f/nvidia_cublas-13.1.1.3-py3-none-manylinux_2_27_aarch64.whl", hash = "sha256:b7a210458267ac818974c53038fbec2e969d5c99f305ab15c72522fa9f001dd5", size = 542848918, upload-time = "2026-04-08T18:46:22.985Z" }, + { url = "https://files.pythonhosted.org/packages/3b/cd/154ca20c38269e05eff77c1464e6c1da89f50a6390b565e9d82e06bc11e1/nvidia_cublas-13.1.1.3-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:37936a16db8fe4ac1f065c2139360608a543a09275cb1a1af612e08cfa065436", size = 423138758, upload-time = "2026-04-08T18:46:58.655Z" }, +] + +[[package]] +name = "nvidia-cublas" +version = "13.4.1.3" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.12'", + "python_full_version == '3.11.*'", +] +dependencies = [ + { name = "nvidia-cuda-nvrtc", version = "13.2.86", source = { registry = "https://pypi.org/simple" } }, +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/d0/a0/5cd9d4b08a8320f7ca150ee0d66c97e98092922e338336cb4b62da7500c3/nvidia_cublas-13.4.1.3-py3-none-manylinux_2_27_aarch64.whl", hash = "sha256:4eb1472bf92b741e7cf24da7978dde251b58ddec2092d9f6a04f3623eb4e9a15", size = 513048232, upload-time = "2026-07-16T09:45:07.751Z" }, + { url = "https://files.pythonhosted.org/packages/e1/97/d483a41da34df5c88727c57319576967f6d7befba5028d70928d2999635e/nvidia_cublas-13.4.1.3-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:a5917cb642cfb07f4a0231ee16aec7e2e0357d8cb8b1b78a0c9c68dba3e6afc7", size = 404870805, upload-time = "2026-07-16T09:46:05.62Z" }, +] + +[[package]] +name = "nvidia-cuda-cccl" +version = "13.3.5.0.6" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/81/dc/9a056ef9bd05c55ddaed3afce160702e4ce8303b9ec1b38066044c18dcd2/nvidia_cuda_cccl-13.3.5.0.6-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:6f30b8076b3e69951c459c94ae190bde51924b320076ebaec376d36848b4c76e", size = 4113650, upload-time = "2026-11-04T23:21:46.803Z" }, + { url = "https://files.pythonhosted.org/packages/a7/7e/4aa67cca14e0558b5a151a692f5ffe609930cdfc20d16c7a584de68424d4/nvidia_cuda_cccl-13.3.5.0.6-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:d5230098fa2df5021e1a00c0c4eee41797671a91119d31e892463e5ccf3ee326", size = 4113651, upload-time = "2026-11-04T23:21:54.262Z" }, +] + +[[package]] +name = "nvidia-cuda-cupti" +version = "13.0.85" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version < '3.11'", +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/2a/2a/80353b103fc20ce05ef51e928daed4b6015db4aaa9162ed0997090fe2250/nvidia_cuda_cupti-13.0.85-py3-none-manylinux_2_25_aarch64.whl", hash = "sha256:796bd679890ee55fb14a94629b698b6db54bcfd833d391d5e94017dd9d7d3151", size = 10310827, upload-time = "2025-09-04T08:26:42.012Z" }, + { url = "https://files.pythonhosted.org/packages/33/6d/737d164b4837a9bbd202f5ae3078975f0525a55730fe871d8ed4e3b952b0/nvidia_cuda_cupti-13.0.85-py3-none-manylinux_2_25_x86_64.whl", hash = "sha256:4eb01c08e859bf924d222250d2e8f8b8ff6d3db4721288cf35d14252a4d933c8", size = 10715597, upload-time = "2025-09-04T08:26:51.312Z" }, +] + +[[package]] +name = "nvidia-cuda-cupti" +version = "13.2.86" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.12'", + "python_full_version == '3.11.*'", +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/e1/ab/52414925ea803a5f86b994ae97d951e5943ed27a6f1da4a5c4ac09e308af/nvidia_cuda_cupti-13.2.86-py3-none-manylinux_2_25_aarch64.whl", hash = "sha256:d9a5c133f73fcb9013f3ada0da6fb54d4117618d81f3f5a0419417ea6ee829d4", size = 11760263, upload-time = "2026-07-16T09:35:34.643Z" }, + { url = "https://files.pythonhosted.org/packages/b4/76/a10d9fb5d9a0e46d5f95e5520bd1b2d8ad22a9c0a09d2f8c20c5ee842a96/nvidia_cuda_cupti-13.2.86-py3-none-manylinux_2_25_x86_64.whl", hash = "sha256:8fa29f15dd8336181f961764d9d95236fc6b931dd0c8fcf8cd70aab0c310b586", size = 11988600, upload-time = "2026-07-16T09:36:06.061Z" }, +] + +[[package]] +name = "nvidia-cuda-nvrtc" +version = "13.0.88" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version < '3.11'", +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/c3/68/483a78f5e8f31b08fb1bb671559968c0ca3a065ac7acabfc7cee55214fd6/nvidia_cuda_nvrtc-13.0.88-py3-none-manylinux2010_x86_64.manylinux_2_12_x86_64.whl", hash = "sha256:ad9b6d2ead2435f11cbb6868809d2adeeee302e9bb94bcf0539c7a40d80e8575", size = 90215200, upload-time = "2025-09-04T08:28:44.204Z" }, + { url = "https://files.pythonhosted.org/packages/b7/dc/6bb80850e0b7edd6588d560758f17e0550893a1feaf436807d64d2da040f/nvidia_cuda_nvrtc-13.0.88-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d27f20a0ca67a4bb34268a5e951033496c5b74870b868bacd046b1b8e0c3267b", size = 43015449, upload-time = "2025-09-04T08:28:20.239Z" }, +] + +[[package]] +name = "nvidia-cuda-nvrtc" +version = "13.2.86" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.12'", + "python_full_version == '3.11.*'", +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/1e/39/c58835ec8392a91b8d7bad83760eafc3085f64788b722ec2b44a27b3ca3e/nvidia_cuda_nvrtc-13.2.86-py3-none-manylinux2010_x86_64.manylinux_2_12_x86_64.whl", hash = "sha256:8111c5130e967b78222ea2124145f8efe9ce201b752b2579a2513100a53be1c5", size = 47018468, upload-time = "2026-07-16T09:40:35.085Z" }, + { url = "https://files.pythonhosted.org/packages/13/95/029e91026e1d378cba9fb2cdb62394bb15d06de7586bab73d76397df6b7f/nvidia_cuda_nvrtc-13.2.86-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:1e5d7b411a2eb83f5c71c98d58133a763fc9fa86a4241ee320c5c4782d9ad1fd", size = 44755454, upload-time = "2026-07-16T09:39:59.909Z" }, +] + +[[package]] +name = "nvidia-cuda-runtime" +version = "13.0.96" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version < '3.11'", +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/87/4f/17d7b9b8e285199c58ce28e31b5c5bbaa4d8271af06a89b6405258245de2/nvidia_cuda_runtime-13.0.96-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:ef9bcbe90493a2b9d810e43d249adb3d02e98dd30200d86607d8d02687c43f55", size = 2261060, upload-time = "2025-10-09T08:55:15.78Z" }, + { url = "https://files.pythonhosted.org/packages/2e/24/d1558f3b68b1d26e706813b1d10aa1d785e4698c425af8db8edc3dced472/nvidia_cuda_runtime-13.0.96-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:7f82250d7782aa23b6cfe765ecc7db554bd3c2870c43f3d1821f1d18aebf0548", size = 2243632, upload-time = "2025-10-09T08:55:36.117Z" }, +] + +[[package]] +name = "nvidia-cuda-runtime" +version = "13.2.86" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.12'", + "python_full_version == '3.11.*'", +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/89/d4/fa981071e3d9f29158ca16c69ee617831cd6df4dd47024149c16eec717f8/nvidia_cuda_runtime-13.2.86-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:37844957894bfdecf90243568d21a2cb251b66106915b71459a23c8e6ef2da69", size = 2341433, upload-time = "2026-07-16T09:33:00.116Z" }, + { url = "https://files.pythonhosted.org/packages/70/c6/8f8c5e893d183082ea78f973aebc7ebc845ee219d68bddac73b0f62490fe/nvidia_cuda_runtime-13.2.86-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:3498247680dfddce31bad102af7e3e26fc795342a3cac64722bb0fa95e7f60f0", size = 2323576, upload-time = "2026-07-16T09:33:28.652Z" }, +] + +[[package]] +name = "nvidia-cudnn-cu13" +version = "9.24.0.43" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version < '3.11'", +] +dependencies = [ + { name = "nvidia-cublas", version = "13.1.1.3", source = { registry = "https://pypi.org/simple" } }, +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/ca/30/7c257e3d5cb4fecb147b93895c66e29c93f8e76d74b45bb418ff0587c4ec/nvidia_cudnn_cu13-9.24.0.43-py3-none-manylinux_2_27_aarch64.whl", hash = "sha256:a6812a554a1ff0413e9c52b84c26c050380649ab9615f9c16bded368ce9f421f", size = 650976863, upload-time = "2026-07-02T16:23:39.248Z" }, + { url = "https://files.pythonhosted.org/packages/5c/ba/791cffd048fe5b044e620df55267e3e95c0e6e07d50b41e377c03dfc910f/nvidia_cudnn_cu13-9.24.0.43-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:71f181cd810e90f9b6023b01186fe82d13d65f0ec098581ee201d39fad769e4b", size = 553099438, upload-time = "2026-07-02T16:27:42.58Z" }, +] + +[[package]] +name = "nvidia-cudnn-cu13" +version = "9.26.0.51" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.12'", + "python_full_version == '3.11.*'", +] +dependencies = [ + { name = "nvidia-cublas", version = "13.4.1.3", source = { registry = "https://pypi.org/simple" } }, +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/c5/1c/01e1dd3dec6ffe0baaff7e722b8946d867353d05a01301f128f1730fde0b/nvidia_cudnn_cu13-9.26.0.51-py3-none-manylinux_2_27_aarch64.whl", hash = "sha256:8e5b4f5eccff721416f70ecf4353172fc4d5cdd8ca869fe6f983a4a5b0147b20", size = 595329497, upload-time = "2026-09-10T16:45:39.945Z" }, + { url = "https://files.pythonhosted.org/packages/ac/1b/ea72dd62f26ce3e0a7870b85148b75a5987507629b712deebeb87f7cce9a/nvidia_cudnn_cu13-9.26.0.51-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:9c976d539786698c71d6bcdbe2053b7485fae062ff7e1215d2f2ff67b1a2149a", size = 519150073, upload-time = "2026-09-10T16:47:58.332Z" }, +] + +[[package]] +name = "nvidia-cufft" +version = "12.0.0.61" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version < '3.11'", +] +dependencies = [ + { name = "nvidia-nvjitlink" }, +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/8b/ae/f417a75c0259e85c1d2f83ca4e960289a5f814ed0cea74d18c353d3e989d/nvidia_cufft-12.0.0.61-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:2708c852ef8cd89d1d2068bdbece0aa188813a0c934db3779b9b1faa8442e5f5", size = 214053554, upload-time = "2025-09-04T08:31:38.196Z" }, + { url = "https://files.pythonhosted.org/packages/a8/2f/7b57e29836ea8714f81e9898409196f47d772d5ddedddf1592eadb8ab743/nvidia_cufft-12.0.0.61-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:6c44f692dce8fd5ffd3e3df134b6cdb9c2f72d99cf40b62c32dde45eea9ddad3", size = 214085489, upload-time = "2025-09-04T08:31:56.044Z" }, +] + +[[package]] +name = "nvidia-cufft" +version = "12.2.0.57" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.12'", + "python_full_version == '3.11.*'", +] +dependencies = [ + { name = "nvidia-nvjitlink" }, +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/07/8d/f650e6d527f9d22b5ded906c000eaebb037721c06d4ecd906df62f300979/nvidia_cufft-12.2.0.57-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:1ed438568ae1088ba2c25789d10205d4104b8b140b7bd942e39a787947a0fb74", size = 218244742, upload-time = "2026-07-16T09:47:08.76Z" }, + { url = "https://files.pythonhosted.org/packages/41/28/868ed0c6ade5e6a75b25166b3cf191f4a2ff58ad618c1e40befb776c97c5/nvidia_cufft-12.2.0.57-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:34da27fadf3979b0b042c43823f0530be8408b86df31ee0108e1ca0b621d4ef6", size = 218258101, upload-time = "2026-07-16T09:47:50.978Z" }, +] + +[[package]] +name = "nvidia-cufile" +version = "1.15.1.6" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version < '3.11'", +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/3f/70/4f193de89a48b71714e74602ee14d04e4019ad36a5a9f20c425776e72cd6/nvidia_cufile-1.15.1.6-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:08a3ecefae5a01c7f5117351c64f17c7c62efa5fffdbe24fc7d298da19cd0b44", size = 1223672, upload-time = "2025-09-04T08:32:22.779Z" }, + { url = "https://files.pythonhosted.org/packages/ab/73/cc4a14c9813a8a0d509417cf5f4bdaba76e924d58beb9864f5a7baceefbf/nvidia_cufile-1.15.1.6-py3-none-manylinux_2_27_aarch64.whl", hash = "sha256:bdc0deedc61f548bddf7733bdc216456c2fdb101d020e1ab4b88d232d5e2f6d1", size = 1136992, upload-time = "2025-09-04T08:32:14.119Z" }, +] + +[[package]] +name = "nvidia-cufile" +version = "1.17.1.22" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.12'", + "python_full_version == '3.11.*'", +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/fe/fd/4b4157512a131a51e1514d40d0199b1c5b7b10c6856db274ff22e5fe15be/nvidia_cufile-1.17.1.22-py3-none-manylinux_2_27_aarch64.whl", hash = "sha256:bec33d7f1f12691dce330275246587569c2ed90b1ce43b0f94b3e1ce9268744b", size = 1226736, upload-time = "2026-04-13T09:52:40.142Z" }, + { url = "https://files.pythonhosted.org/packages/23/c5/661a73a9042fc5f81cdd5fe6e89f4170b3b33f7962e709987e2b5e5f1381/nvidia_cufile-1.17.1.22-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:87feaf8c3ad20d3d03a01933181801ff6892bace5c8f0b1e4b48f319d3e62d36", size = 1387670, upload-time = "2026-04-13T09:52:57.783Z" }, +] + +[[package]] +name = "nvidia-curand" +version = "10.4.0.35" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/1e/72/7c2ae24fb6b63a32e6ae5d241cc65263ea18d08802aaae087d9f013335a2/nvidia_curand-10.4.0.35-py3-none-manylinux_2_27_aarch64.whl", hash = "sha256:133df5a7509c3e292aaa2b477afd0194f06ce4ea24d714d616ff36439cee349a", size = 61962106, upload-time = "2025-08-04T10:21:41.128Z" }, + { url = "https://files.pythonhosted.org/packages/a5/9f/be0a41ca4a4917abf5cb9ae0daff1a6060cc5de950aec0396de9f3b52bc5/nvidia_curand-10.4.0.35-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:1aee33a5da6e1db083fe2b90082def8915f30f3248d5896bcec36a579d941bfc", size = 59544258, upload-time = "2025-08-04T10:22:03.992Z" }, +] + +[[package]] +name = "nvidia-cusolver" +version = "12.0.4.66" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version < '3.11'", +] +dependencies = [ + { name = "nvidia-cublas", version = "13.1.1.3", source = { registry = "https://pypi.org/simple" } }, + { name = "nvidia-cusparse", version = "12.6.3.3", source = { registry = "https://pypi.org/simple" } }, + { name = "nvidia-nvjitlink" }, +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/c8/c3/b30c9e935fc01e3da443ec0116ed1b2a009bb867f5324d3f2d7e533e776b/nvidia_cusolver-12.0.4.66-py3-none-manylinux_2_27_aarch64.whl", hash = "sha256:02c2457eaa9e39de20f880f4bd8820e6a1cfb9f9a34f820eb12a155aa5bc92d2", size = 223467760, upload-time = "2025-09-04T08:33:04.222Z" }, + { url = "https://files.pythonhosted.org/packages/5f/67/cba3777620cdacb99102da4042883709c41c709f4b6323c10781a9c3aa34/nvidia_cusolver-12.0.4.66-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:0a759da5dea5c0ea10fd307de75cdeb59e7ea4fcb8add0924859b944babf1112", size = 200941980, upload-time = "2025-09-04T08:33:22.767Z" }, +] + +[[package]] +name = "nvidia-cusolver" +version = "12.2.0.11" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.12'", + "python_full_version == '3.11.*'", +] +dependencies = [ + { name = "nvidia-cublas", version = "13.4.1.3", source = { registry = "https://pypi.org/simple" } }, + { name = "nvidia-cusparse", version = "12.7.10.12", source = { registry = "https://pypi.org/simple" } }, + { name = "nvidia-nvjitlink" }, +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/60/df/9e6b603f1d64040ce3e076e9bce1b78e2d588d0aabc9783f351cecd861ab/nvidia_cusolver-12.2.0.11-py3-none-manylinux_2_27_aarch64.whl", hash = "sha256:8be097fca28de6be0990ab216ee9b804dd51077e1d1d83acf6c9850650bdc64d", size = 250383075, upload-time = "2026-07-16T09:50:16.355Z" }, + { url = "https://files.pythonhosted.org/packages/e4/a4/90f7ade9992190788658c3c285f196fdb9bcc3a5bb93a325c245121d22fd/nvidia_cusolver-12.2.0.11-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:fab5778f6769947389a1a6abc07e635576825a08c0ffc68c3ae7f1392c794b42", size = 227913465, upload-time = "2026-07-16T09:50:56.976Z" }, +] + +[[package]] +name = "nvidia-cusparse" +version = "12.6.3.3" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version < '3.11'", +] +dependencies = [ + { name = "nvidia-nvjitlink" }, +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/f8/94/5c26f33738ae35276672f12615a64bd008ed5be6d1ebcb23579285d960a9/nvidia_cusparse-12.6.3.3-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:80bcc4662f23f1054ee334a15c72b8940402975e0eab63178fc7e670aa59472c", size = 162155568, upload-time = "2025-09-04T08:33:42.864Z" }, + { url = "https://files.pythonhosted.org/packages/fa/18/623c77619c31d62efd55302939756966f3ecc8d724a14dab2b75f1508850/nvidia_cusparse-12.6.3.3-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:2b3c89c88d01ee0e477cb7f82ef60a11a4bcd57b6b87c33f789350b59759360b", size = 145942937, upload-time = "2025-09-04T08:33:58.029Z" }, +] + +[[package]] +name = "nvidia-cusparse" +version = "12.7.10.12" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.12'", + "python_full_version == '3.11.*'", +] +dependencies = [ + { name = "nvidia-nvjitlink" }, +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/60/35/abbd278fb6d039fcfb5175efa10a21007a11878bec59920d84854b47d766/nvidia_cusparse-12.7.10.12-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:597eff2cd83e3ab1d1e3a0dce9c9c879d77cf64ec2659bfdb5af6a5d02e7aaa9", size = 169043093, upload-time = "2026-07-16T09:51:37.058Z" }, + { url = "https://files.pythonhosted.org/packages/bc/46/3a9700cc13f30c9279af9a862363535c814fa27597199b21fd93cad66237/nvidia_cusparse-12.7.10.12-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:25907c75e4db1581685f06f61cc6cdecc04611765516a52373e0a18ebd69fa00", size = 150999307, upload-time = "2026-07-16T09:52:17.727Z" }, +] + +[[package]] +name = "nvidia-cusparselt-cu13" +version = "0.8.1" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/46/e1/cdc1797eadf82d3a9a575a19b33fdc871a97edbec42c00b5b5e914f4aff4/nvidia_cusparselt_cu13-0.8.1-py3-none-manylinux2014_aarch64.whl", hash = "sha256:4dca476c50bf4780d46cd0bfbd82e2bc10a08e4fef7950917ce8d7578d22a23f", size = 221051344, upload-time = "2025-09-05T18:49:51.289Z" }, + { url = "https://files.pythonhosted.org/packages/34/7d/2661f2fb3ac4302f3a246f5fc030213ac60c1fe0bce84f9783dbd831dbb7/nvidia_cusparselt_cu13-0.8.1-py3-none-manylinux2014_x86_64.whl", hash = "sha256:786ce87568c303fadb5afcc7102d454cd3040d75f6f8626f5db460d1871f4dd0", size = 170148586, upload-time = "2025-09-05T18:50:50.248Z" }, +] + +[[package]] +name = "nvidia-nccl-cu13" +version = "2.30.7" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d1/21/a73174c6157101bdf1ffc22b517f76ff0082613989dd9bc8f43e8034caac/nvidia_nccl_cu13-2.30.7-py3-none-manylinux_2_18_aarch64.whl", hash = "sha256:ca786ffa5a647c75d4d1f5cc72a6c4f537947e2ba8823d7c8aaf768e7a7b9f77", size = 215983881, upload-time = "2026-06-09T03:23:15.633Z" }, + { url = "https://files.pythonhosted.org/packages/3f/34/c500f90c7ae641b8e0f98965b36b8a7ac79cc8b296e8d251fe3eb592ee54/nvidia_nccl_cu13-2.30.7-py3-none-manylinux_2_18_x86_64.whl", hash = "sha256:cefa7fdb9710efd0f39c5f1be1d61ff6fc9a996c451265bd7fbdcf9455ed4b50", size = 215965170, upload-time = "2026-06-09T03:23:39.73Z" }, +] + +[[package]] +name = "nvidia-nvjitlink" +version = "13.5.37" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/cc/1f/2321702b8d60b4b4dd18b957f61612dbac9cb1c07e940cf6582106b7c8b8/nvidia_nvjitlink-13.5.37-py3-none-manylinux2010_x86_64.manylinux_2_12_x86_64.whl", hash = "sha256:280d7cb9649704145f074b8dbde500de04ce02d0872e066e20a83c17bcaa93eb", size = 46642491, upload-time = "2026-11-04T23:33:31.696Z" }, + { url = "https://files.pythonhosted.org/packages/24/15/dd228f798cd01d7aeaf19d872b2b20f9aeafc1a7d8b6bfaa878b30b8d6f7/nvidia_nvjitlink-13.5.37-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:893f6f9a55b2720ed94913b5ba3332e972da8c78dfa2863d0244403dbd528ffc", size = 45253761, upload-time = "2026-11-04T23:33:22.854Z" }, +] + +[[package]] +name = "nvidia-nvshmem-cu13" +version = "3.4.5" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version < '3.11'", +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/dc/0f/05cc9c720236dcd2db9c1ab97fff629e96821be2e63103569da0c9b72f19/nvidia_nvshmem_cu13-3.4.5-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:6dc2a197f38e5d0376ad52cd1a2a3617d3cdc150fd5966f4aee9bcebb1d68fe9", size = 60215947, upload-time = "2025-09-06T00:32:20.022Z" }, + { url = "https://files.pythonhosted.org/packages/3c/35/a9bf80a609e74e3b000fef598933235c908fcefcef9026042b8e6dfde2a9/nvidia_nvshmem_cu13-3.4.5-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:290f0a2ee94c9f3687a02502f3b9299a9f9fe826e6d0287ee18482e78d495b80", size = 60412546, upload-time = "2025-09-06T00:32:41.564Z" }, +] + +[[package]] +name = "nvidia-nvshmem-cu13" +version = "3.7.2" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.12'", + "python_full_version == '3.11.*'", +] +dependencies = [ + { name = "nvidia-cuda-cccl" }, +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/81/11/1767ef120299972822a43aceffbc81ac813aad2089d817e36e4e12aa4c9c/nvidia_nvshmem_cu13-3.7.2-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:0e748308b9e0a8a8d81859353f3e6c98fbe85a85f652a915a2ba60149a0bd124", size = 135174619, upload-time = "2026-07-17T19:24:15.404Z" }, + { url = "https://files.pythonhosted.org/packages/4f/4a/037dfbbafc96ad1828ef62326f27970cae2c0eb271cf5b8e6922f32a7427/nvidia_nvshmem_cu13-3.7.2-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:b9a4f843c62b5dded8ad33fd6d220e007dcd39f06cee549292f5ba14ce4c235c", size = 135397797, upload-time = "2026-07-17T19:25:26.4Z" }, +] + +[[package]] +name = "nvidia-nvtx" +version = "13.0.85" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version < '3.11'", +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/c2/f3/d86c845465a2723ad7e1e5c36dcd75ddb82898b3f53be47ebd429fb2fa5d/nvidia_nvtx-13.0.85-py3-none-manylinux1_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:4936d1d6780fbe68db454f5e72a42ff64d1fd6397df9f363ae786930fd5c1cd4", size = 148047, upload-time = "2025-09-04T08:29:01.761Z" }, + { url = "https://files.pythonhosted.org/packages/a8/64/3708a90d1ebe202ffdeb7185f878a3c84d15c2b2c31858da2ce0583e2def/nvidia_nvtx-13.0.85-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:cb7780edb6b14107373c835bf8b72e7a178bac7367e23da7acb108f973f157a6", size = 148878, upload-time = "2025-09-04T08:28:53.627Z" }, +] + +[[package]] +name = "nvidia-nvtx" +version = "13.2.86" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.12'", + "python_full_version == '3.11.*'", +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/49/ee/16bde09927e7ffacd50b117cd7d1dc764d145f03249fc41fdf6dfba3301f/nvidia_nvtx-13.2.86-py3-none-manylinux1_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:968ce72baee2a01791c7d3254000eac81f24677b0b91c62d21b449a1f309c245", size = 153463, upload-time = "2026-07-16T09:41:23.242Z" }, + { url = "https://files.pythonhosted.org/packages/52/5f/74e2d29240de30a971d59ca20f4a3c4f2720cd49752809eeb4177d385c2c/nvidia_nvtx-13.2.86-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:1c6ae1be92fba569dd271f7b9b3056f99f5642726dc6c53d1b93ae4110c398fb", size = 154292, upload-time = "2026-07-16T09:40:53.791Z" }, +] + +[[package]] +name = "omegaconf" +version = "2.4.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pyyaml" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/cc/10/1cabf3188a4d9684a06568c7fd76f9536eede625733c8399cf1f5337b83e/omegaconf-2.4.0.tar.gz", hash = "sha256:7e219a70bea371da250285b9c01c7db027bc421722799c2cc4ff14bc4a2a753b", size = 3544508, upload-time = "2026-10-09T12:44:02.326Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/4f/bd/0d9f8247b0819385213d09564eda5c52d3673313c2414d51f72883ec24cd/omegaconf-2.4.0-py3-none-any.whl", hash = "sha256:f141a664c777582405e3cc6e0545ecc79429e79f844995b1a6e71c35946a025c", size = 254152, upload-time = "2026-10-09T12:43:59.764Z" }, +] + +[[package]] +name = "packaging" +version = "26.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/c3/75/ffb1dc0ed12352139fb4ca0e3fde4325a23e3d0f3f40efe89717bc4f557b/packaging-26.4.tar.gz", hash = "sha256:c4b671c41ddb9bf26e543c37723610d28fb6bf7affc4da17cf048d419d2c062a", size = 355877, upload-time = "2026-11-23T21:44:11.152Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ba/7b/5504f91c9c2733f693d7759e50ede5d27119d4da7e5836c46d3b5ff81d56/packaging-26.4-py3-none-any.whl", hash = "sha256:81383611a09c1bc0b08b76e0fd5829d7c6824c65b27a6aee339da133f4233ea2", size = 140049, upload-time = "2026-11-23T21:44:09.531Z" }, +] + +[[package]] +name = "pycparser" +version = "3.11" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version < '3.11'", +] +sdist = { url = "https://files.pythonhosted.org/packages/da/a8/c5fdbeee588bb8ada9458774f43adf1bdd30bd59157055142183e769a024/pycparser-3.11.tar.gz", hash = "sha256:d875f09c3507d00e1aba0eecc6dcadc1352f30fff09dc6bff2f1c2935e97c2bc", size = 113796, upload-time = "2026-10-09T12:56:59.539Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/90/11/0e6f11117525ff0eec40ebac3d313376f102df93ca44ad9e893ee85e4f89/pycparser-3.11-py3-none-any.whl", hash = "sha256:51d5a8ba2be0bbe440b99d2112604c95bbbc3c2748a64260186c541e1729cd80", size = 51178, upload-time = "2026-10-09T12:56:58.131Z" }, +] + +[[package]] +name = "pycparser" +version = "3.12" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.12'", + "python_full_version == '3.11.*'", +] +sdist = { url = "https://files.pythonhosted.org/packages/cb/27/eeb9f307bf07060f3d9f9aa0fb8c15b01bdfded0a941e4b2719c7f94cacd/pycparser-3.12.tar.gz", hash = "sha256:f03387877eab82ce01bbdfd0ba7252ee55a90b1c708d5129e2ce915475cf1db6", size = 158785, upload-time = "2026-10-22T13:40:03.56Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b6/ae/315bbeee126a769cbde43cf4908acb4b40408d8bf8bbf334dd7368d8dadf/pycparser-3.12-py3-none-any.whl", hash = "sha256:a076f3f489b39b43ed13563a1dafe42447445bec2e294154ec5c57fcdda4c85e", size = 62600, upload-time = "2026-10-22T13:40:02.021Z" }, +] + +[[package]] +name = "pyyaml" +version = "6.0.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/76/b8/c0b780928e2fb1c87e9e375818c6f121da2398b071012d1747be300b83f4/pyyaml-6.0.4.tar.gz", hash = "sha256:e24bf71af8a432d7808fabff134d38dfe16d3cbb41f2873bb4b1e42422de0a1a", size = 136336, upload-time = "2026-11-20T23:37:05.977Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b4/d6/10c1227ed099bde0d79f826e919495100a6f6052a1f38090181cbf83f863/pyyaml-6.0.4-cp310-cp310-macosx_10_15_x86_64.whl", hash = "sha256:78be5a1b05a5d1fd46d0290393e5deeb581fa617585462c1b84f7c6b0cb1e489", size = 191158, upload-time = "2026-11-20T23:34:39.807Z" }, + { url = "https://files.pythonhosted.org/packages/87/dd/56bd01e126bec3c669ab1203d3b62337de98419bd776fcea6118a19c0321/pyyaml-6.0.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e39017e1cef43d03b2ba427f60213e4b36dbc6fb092235fa3de3a510ce064d3c", size = 181299, upload-time = "2026-11-20T23:34:41.003Z" }, + { url = "https://files.pythonhosted.org/packages/c9/10/05ad3d0fce05c0c4838c0f7770e92ce44762684b9b40274d34d08d70385b/pyyaml-6.0.4-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:54c23934cf166bb2090d73d82b1388aadb1cead5e73885223dcfa4a459a22d43", size = 782161, upload-time = "2026-11-20T23:34:42.3Z" }, + { url = "https://files.pythonhosted.org/packages/3f/4f/b908ce0fbb258a168245c1f45fc5f049a2d900daed8ca685466d125d83cb/pyyaml-6.0.4-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d58fe9fa2056fed24f055b74d5dc808fa1f5d084c22e4118f0a08253fe677ffd", size = 881030, upload-time = "2026-11-20T23:34:43.419Z" }, + { url = "https://files.pythonhosted.org/packages/e8/d8/4e4b17fa9eafeaf6402e8f2ec46e76fd64930cf02be909a67310b222f217/pyyaml-6.0.4-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:88a089e6424a8a256321270620d5a4328ad5227fb2061b07d33f596894336914", size = 798866, upload-time = "2026-11-20T23:34:44.454Z" }, + { url = "https://files.pythonhosted.org/packages/f5/73/fbb7833d3f0219ee437a347710e5fae2116fb5addaabb4c7e01dd528f4bd/pyyaml-6.0.4-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:52460c6dd874b22d49fda228fac59da74d7a7b06175ffcc80bfa3ba5389d7f73", size = 771033, upload-time = "2026-11-20T23:34:45.858Z" }, + { url = "https://files.pythonhosted.org/packages/cb/5e/f37cf6924d5cf5d9804edb438f12876c5aceae0c51f7786afea2bfce0559/pyyaml-6.0.4-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:c24097c0462f66358c99dc83d3e1850e005f6293cfa1df1edb243428da1668bf", size = 806497, upload-time = "2026-11-20T23:34:46.966Z" }, + { url = "https://files.pythonhosted.org/packages/3d/99/bb13a9895b5392149f784901221f96b0a0b0527b46afe09fb88e64722233/pyyaml-6.0.4-cp310-cp310-win32.whl", hash = "sha256:34edca7ab64b705ee7c80bf3f9ac609240677db11e83d9317191f483a4b5a433", size = 146258, upload-time = "2026-11-20T23:34:48.053Z" }, + { url = "https://files.pythonhosted.org/packages/57/73/825597bf3616276767117c6fdc13572231e0b5123d91a493080330362f80/pyyaml-6.0.4-cp310-cp310-win_amd64.whl", hash = "sha256:5246a0feaaac497b09c9462aa926280ae02fc8791b0099c0a925ebd7c7f249a6", size = 161774, upload-time = "2026-11-20T23:34:49.357Z" }, + { url = "https://files.pythonhosted.org/packages/e1/ba/fb2aad330bc4f31041f989630ceae5f32e307d3ba9819573d35b71e078fa/pyyaml-6.0.4-cp311-cp311-macosx_10_15_x86_64.whl", hash = "sha256:180ac792c958c2173f6e4467c55ae5f73ab1a9a624ee29fc7095c56d5e3a4055", size = 190856, upload-time = "2026-11-20T23:34:50.753Z" }, + { url = "https://files.pythonhosted.org/packages/16/da/1b8397614250ec63bb7ef1cbb0aa5878367ff729ef35a4abf2accbf48a18/pyyaml-6.0.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:730788375056c43d3ac15bd894c9cd2fb7a931a38b302f408620c64b3ef176ed", size = 180950, upload-time = "2026-11-20T23:34:51.629Z" }, + { url = "https://files.pythonhosted.org/packages/fa/88/d99fc8f2cfb33ab7786fb3f6da90eddc1ed9709196bffcb4a487d7f53844/pyyaml-6.0.4-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:71bb5b87465d88d1dfc577115af6d435bff9b26f2512936f610c26aa55966028", size = 810905, upload-time = "2026-11-20T23:34:52.77Z" }, + { url = "https://files.pythonhosted.org/packages/d7/7f/500e5ec119990d1784c72b64197cee8a4f2982f6bc76c572af7f8df02385/pyyaml-6.0.4-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:b9fe0b8c65a1611053eb7fcaa7c022f655b7eebeb0ea034572615453cae6b843", size = 914779, upload-time = "2026-11-20T23:34:54.086Z" }, + { url = "https://files.pythonhosted.org/packages/9d/3e/c1c307b6c03e4ea7d86f166f14920ead07aecc35e88d873814d12aa2da66/pyyaml-6.0.4-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:622aa875fa6533f25fedcffe23079357d65a690d462200afed5d8e9d0e01ebee", size = 828016, upload-time = "2026-11-20T23:34:55.213Z" }, + { url = "https://files.pythonhosted.org/packages/03/49/dc931722d7de757596c1c3b944287e4f7d3f419655cd8f5fae382c6179e6/pyyaml-6.0.4-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:49e38a95e24738908ea852e61df0abc58d1e4d4f974ccdb2386eaee412bedc67", size = 799807, upload-time = "2026-11-20T23:34:56.589Z" }, + { url = "https://files.pythonhosted.org/packages/bf/8b/2b7ad9af1c6c5b147c3c860a31586737034a83693d7ae86f854036c6aeb4/pyyaml-6.0.4-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:4d3bbc5e8a84a5a6775adecac786f489510a7159b1c343d6f31426d888cfdd6e", size = 836213, upload-time = "2026-11-20T23:34:57.655Z" }, + { url = "https://files.pythonhosted.org/packages/8c/d8/ebdc04bbf7c00a3c78ea577322239534556418a958d2242af8c0c6ef9093/pyyaml-6.0.4-cp311-cp311-win32.whl", hash = "sha256:c0d68d972f6f6417b4e85e9522f3d57bb4fbc924379766ccd87254a31009c1cd", size = 146012, upload-time = "2026-11-20T23:34:58.75Z" }, + { url = "https://files.pythonhosted.org/packages/7f/c6/ffe94f3159f3543b1ea1702519e1e0a74a67f3a255c286c1f00d51780b82/pyyaml-6.0.4-cp311-cp311-win_amd64.whl", hash = "sha256:0db75f402e99c25239003a499c214a61947b4ef5312af34711d4c63e5c179318", size = 161819, upload-time = "2026-11-20T23:34:59.853Z" }, + { url = "https://files.pythonhosted.org/packages/86/df/5aec8a8c65e4c11fab31b55d53029d8013e5ccfcf409c20f8175e3e267c7/pyyaml-6.0.4-cp312-cp312-macosx_10_15_x86_64.whl", hash = "sha256:1088ad740f50c13178dad16fbc2fa1f634c791d42c7009fdb390e38e5b90b788", size = 187835, upload-time = "2026-11-20T23:35:00.829Z" }, + { url = "https://files.pythonhosted.org/packages/c7/30/efaabf2d135d11f32cbd4752f3b7df0d592894ee3ca252bbba013a7d5891/pyyaml-6.0.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:4d30c2f186612bd2f9f07c08a4c96721af59cfc8da3ec7cb27dfa2834e8bb019", size = 179510, upload-time = "2026-11-20T23:35:01.826Z" }, + { url = "https://files.pythonhosted.org/packages/af/fb/d5ff6957db5c843151ff13196277bb8e20b2d5db2e2db3e8d051038d888b/pyyaml-6.0.4-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:45e37dd647db9d67b757444c74060c064ace5fdaa08f42bf4fda3812275d423e", size = 814700, upload-time = "2026-11-20T23:35:02.923Z" }, + { url = "https://files.pythonhosted.org/packages/c4/de/569b907a281bbc49b934bcdad881486b7a476b011cf733f936ca85a8b37d/pyyaml-6.0.4-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:9e7ec9dc75cadd392fd687cc9b8ccf7dd59ada0a991e0d14ae0fad9ecdba00c3", size = 879806, upload-time = "2026-11-20T23:35:04.34Z" }, + { url = "https://files.pythonhosted.org/packages/94/80/1d27f7084b983b7cfd1fb35e65a38276d9eddfdcdabc0922bb26cf9521bc/pyyaml-6.0.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:93bfb2459195406a518e2f487a9bbf01df240175f31e06f5a252ac6734c7bbf0", size = 849249, upload-time = "2026-11-20T23:35:05.457Z" }, + { url = "https://files.pythonhosted.org/packages/53/37/9b49dff68570bedf27a05ff447e9a281d75bbdfa4d08dc1ee100a844c612/pyyaml-6.0.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:84e97378010f3da8daf673b82d39ed638098d236a1b760d61c0c1348a642bd70", size = 799796, upload-time = "2026-11-20T23:35:06.566Z" }, + { url = "https://files.pythonhosted.org/packages/05/bb/f7df529541b98113bea84129a78f93c3889acb08385ca25f9786823dce67/pyyaml-6.0.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:f5c410f9e2ffc9286279a46f2e8c107edaf3b1123510af59c828a9c15b23c9db", size = 825424, upload-time = "2026-11-20T23:35:07.783Z" }, + { url = "https://files.pythonhosted.org/packages/44/00/fc5d40087cc55bf3d7bb5ef55cc3e6513e6946afe33a188680fe1d846eb0/pyyaml-6.0.4-cp312-cp312-win32.whl", hash = "sha256:60e9da2772e259307650e03c24f50e3bc2d9fa5ed1ba44c47582e13b0e7708d1", size = 140667, upload-time = "2026-11-20T23:35:08.846Z" }, + { url = "https://files.pythonhosted.org/packages/a3/95/307a6ceafbad9a08300743d19329c31726224e583e05c4fe5358522ba283/pyyaml-6.0.4-cp312-cp312-win_amd64.whl", hash = "sha256:131d11bd9b60d705a6388366d77ed67850995a4d2be85fe149785a257c17e531", size = 154452, upload-time = "2026-11-20T23:35:09.792Z" }, + { url = "https://files.pythonhosted.org/packages/62/81/15c300b14cca818cb9ee27d8cb61cc124229d04f4f7f7bc4e3fca8e2e8d8/pyyaml-6.0.4-cp312-cp312-win_arm64.whl", hash = "sha256:69380d4bae12aab2a2c9532deff6a2841bc9fda47c333691bd2368b696301768", size = 147167, upload-time = "2026-11-20T23:35:10.763Z" }, +] + +[[package]] +name = "regex" +version = "2026.9.29" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version < '3.11'", +] +sdist = { url = "https://files.pythonhosted.org/packages/fc/f2/af1da9d3ceed77bfcdce40427d49ba0be94e4fe84245e3bfef68c10e75b6/regex-2026.9.29.tar.gz", hash = "sha256:8b5fcc4771732191b2b7d1dd68d8f0353f47f8d90b6150f6dce58bf1112442cb", size = 419199, upload-time = "2026-09-29T00:49:58.298Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f6/37/404442e7296554792e2de4c0c8f8b95ee491a3c227d6ff90d4cebf2dbde3/regex-2026.9.29-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:9916fda742cd4eede63b286f58c06718324265d727ce0856eb1aac86d0d150d6", size = 495402, upload-time = "2026-09-29T00:45:50.322Z" }, + { url = "https://files.pythonhosted.org/packages/72/6d/116db2946888bd60db8e2033739471be6d80aa47c833afd952c9ed40654c/regex-2026.9.29-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:8873c4a11c50b9989168881aeb3f08859f469d809941866aa1feefd8be5431f6", size = 295139, upload-time = "2026-09-29T00:45:51.826Z" }, + { url = "https://files.pythonhosted.org/packages/9d/1d/aefd12fb5cd62b748aa6ed28725b375c71102853fcbf15fb6481f806a2ba/regex-2026.9.29-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1d9fe8091b2e89d470df68a9331111ed008ae8aae6bf1e8e1fba4086a495c84e", size = 292130, upload-time = "2026-09-29T00:45:53.017Z" }, + { url = "https://files.pythonhosted.org/packages/7c/98/41fe60ae6ccf3e166fe7bc73495aa15e9a1a7fe3a1f9f0f95a3d64a2df0f/regex-2026.9.29-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:fb00027a09a8f9f08028b40dce4c933cf73e4833240ed356583fdc9cfa721566", size = 793080, upload-time = "2026-09-29T00:45:54.331Z" }, + { url = "https://files.pythonhosted.org/packages/45/0d/944b13e8286ecba61a3baeca28b375550821a279800bdb18fac41ade6637/regex-2026.9.29-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:14e953ff3607c92d7675bf79c4d4509ef6782aa8c08509f179f9b3d6d0679e86", size = 865241, upload-time = "2026-09-29T00:45:56.065Z" }, + { url = "https://files.pythonhosted.org/packages/2a/b4/e1c32fdee0462f1373c52a73325cafbde653fac0b0cc1e9badac74154f4a/regex-2026.9.29-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:0476e5bcbe6e1ba3d1c4cc7bbb1c3ba78e3b979b5c8a88d0a6a8cdd4992b8c84", size = 905496, upload-time = "2026-09-29T00:45:57.491Z" }, + { url = "https://files.pythonhosted.org/packages/ec/99/eae371ca63f7ea1f1eac025021527adb57ce3a4b67ff608b896fd31ea447/regex-2026.9.29-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4fb41211d2333eb930a51e0546a65999761cf1f572a4da56ef9b8a62966c06f2", size = 797643, upload-time = "2026-09-29T00:45:58.746Z" }, + { url = "https://files.pythonhosted.org/packages/dc/26/9e4f158459e37e41633c96f49766a465f801c5daba9507260609ed76d783/regex-2026.9.29-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:edf06545875f3efa31560d94121e95c7fd70d98b1dfedc0157097d79b13b52ea", size = 797591, upload-time = "2026-09-29T00:46:00.2Z" }, + { url = "https://files.pythonhosted.org/packages/86/60/5e1c5c6e85132e757ae77bd7693f1809046edb2c8853658c9200f4c8593c/regex-2026.9.29-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:6398d5145689503412cc1748895242598d8846b8967b851133b20dc2ed1e21e8", size = 774874, upload-time = "2026-09-29T00:46:01.491Z" }, + { url = "https://files.pythonhosted.org/packages/e5/13/301b394f32a8db86ae3280533c9186229595fed766376f18e87959f92f96/regex-2026.9.29-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:45010bcfe66df41522d56c9b6114e87ecc597a08970ff6a2ced24415c141ae5f", size = 780168, upload-time = "2026-09-29T00:46:02.817Z" }, + { url = "https://files.pythonhosted.org/packages/f6/27/0c647127db32760b2dfc4c38da9ca509a3c4a8d3d93a586121a10fef2701/regex-2026.9.29-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:a5758353650079898dc1b2b0e95aa51fa23a30d020e06f62c430dd08ee56cdd8", size = 856604, upload-time = "2026-09-29T00:46:04.152Z" }, + { url = "https://files.pythonhosted.org/packages/4f/18/cac15fb2829c33218ececf76333b66869a96e4f973480ec32494921750f0/regex-2026.9.29-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:6f7121a8914ed13fcfe2099f895341bfb789f004d4c5a0bdece8fa667da10849", size = 760602, upload-time = "2026-09-29T00:46:05.794Z" }, + { url = "https://files.pythonhosted.org/packages/b8/55/967676e4089a25d5f54b9d62522f9fe09b87677d1db58f207888d4ccfbe3/regex-2026.9.29-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:b9d74e4eee9ddb64c2e92d5d61472c59c21684c059eb7b68767be9628e977859", size = 846830, upload-time = "2026-09-29T00:46:07.258Z" }, + { url = "https://files.pythonhosted.org/packages/f1/8d/bb4165d61860ed443da5fb0fafe629c1ee9202526394eead7925bdee2be4/regex-2026.9.29-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:143533cc4b6fbc5b95aca0a5b8d541088d374831593def000ec89322c220221d", size = 785445, upload-time = "2026-09-29T00:46:08.89Z" }, + { url = "https://files.pythonhosted.org/packages/86/a6/a5cfc2560e063f8e6871373d3b719f573d7e7fcaa09db43e7c8aaeb51bd5/regex-2026.9.29-cp310-cp310-win32.whl", hash = "sha256:b84f186a7f0536fe4ff9a9fa12d06d007b9b71d4b5352ddcc41f59ad6522a312", size = 268950, upload-time = "2026-09-29T00:46:10.331Z" }, + { url = "https://files.pythonhosted.org/packages/0c/f6/b127312ebc8092357f435c9e4594fd8cf50abb85f8b4b16ab8d262abab2a/regex-2026.9.29-cp310-cp310-win_amd64.whl", hash = "sha256:23ae6fdad9e63e54038f5ef78aba2933faca61e24d432786589e737bc5522ebb", size = 280629, upload-time = "2026-09-29T00:46:11.638Z" }, + { url = "https://files.pythonhosted.org/packages/c6/e4/ab36f3c26f2374d16d525dd5a7fb4997f3c6e6bb7c6722821b84f9ea35b1/regex-2026.9.29-cp310-cp310-win_arm64.whl", hash = "sha256:c0094897d7d01f184b2d7fe8c56c66d64efe01b31f4b7d34205b391387df1111", size = 279407, upload-time = "2026-09-29T00:46:13.248Z" }, + { url = "https://files.pythonhosted.org/packages/e8/6b/6dea87689c3a06a6e79d254bf824e6f3e3d724b5ba027c6112559aa6cd2c/regex-2026.9.29-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:6abb75ab16bc3281714a5b99548a2225db70dba1f995f6d7f7419b76eb5a8fbe", size = 495413, upload-time = "2026-09-29T00:46:14.51Z" }, + { url = "https://files.pythonhosted.org/packages/3a/a5/0c791a0e83ad1013d262c13247c4c77e0f4a8d05bdc167df96aba6681c0d/regex-2026.9.29-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b7b893976e7fe42053da64f2aa27239c24252fd2ec6df471e1be197c0addc3b1", size = 295145, upload-time = "2026-09-29T00:46:16.292Z" }, + { url = "https://files.pythonhosted.org/packages/b1/07/9bf3607d8d13a12e436ab9d63f9791e10706827d535695b23964ad79fd79/regex-2026.9.29-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:066d0e3dbfdd739bce2bf8c2a41dd16f73e3d8adc2eb06dd803a36a307f56075", size = 292123, upload-time = "2026-09-29T00:46:17.646Z" }, + { url = "https://files.pythonhosted.org/packages/64/6b/32c2e6fc617e1d3f247e250fea31a9a35b1265bd32f585968aa13b9999b9/regex-2026.9.29-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7020ed44df30b3aa492c00ee3b52d0548c1f30c2c6c5bb13ae897680900d3413", size = 799537, upload-time = "2026-09-29T00:46:18.976Z" }, + { url = "https://files.pythonhosted.org/packages/bf/72/f041177f3c7a4606f7c81a95fe7eea03e2a0c4e8bff9e439a01432cbc9f2/regex-2026.9.29-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ae4613d7d9dda60fcba95f846cc6f808017f1843f392cf9daad14a6534493d71", size = 873255, upload-time = "2026-09-29T00:46:20.684Z" }, + { url = "https://files.pythonhosted.org/packages/d0/4e/a78948e11dd715e0e46716c2e0f3404b3fe6a44e2a2e9abdc7d965cab2b3/regex-2026.9.29-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:bec37990e3d6121f29ecfb594bd8f1bf009e9f7926daba2e50e3b27d3892a783", size = 914570, upload-time = "2026-09-29T00:46:22.599Z" }, + { url = "https://files.pythonhosted.org/packages/8a/70/aa08d1d2b294894b365e5f8ba5380fe3f8546acdb81f10639dfd74209c37/regex-2026.9.29-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:612b709381c0355b70d89cdb51b7f670591ed5cbbc0e3b5337488019dc667b65", size = 804978, upload-time = "2026-09-29T00:46:23.981Z" }, + { url = "https://files.pythonhosted.org/packages/21/32/1b03534c4715aca3b564416d28d518083ed4dab3bc913267600d2256140d/regex-2026.9.29-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:a760da040b47767b4b873adfb7c3b691e9ba2fc60f113f9d0b88f1a62f323e85", size = 779297, upload-time = "2026-09-29T00:46:25.318Z" }, + { url = "https://files.pythonhosted.org/packages/76/a7/378f6f558d9e4444af315a307c5953565a511d1e3666f1bb7bdc82012b6b/regex-2026.9.29-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:49ee178ca31c94621294bf9b8b676a92a2e6bba8af0529591753719e57edb621", size = 786961, upload-time = "2026-09-29T00:46:26.963Z" }, + { url = "https://files.pythonhosted.org/packages/59/13/79f0b1846f5f342f92ddbd4b27b18bcb86da96d902c1a0be26520bde98d7/regex-2026.9.29-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:5eeb8edc6110d9194a4d0d54610f64c37a31c605b5dbb7e407fc6ec7fa34a4a1", size = 863234, upload-time = "2026-09-29T00:46:28.58Z" }, + { url = "https://files.pythonhosted.org/packages/97/19/05af70dec9f2eed6ba34e08d2dcc6a48e7ae5e307659d5fe4201a5d7bbee/regex-2026.9.29-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:ccb64d887a9db1cd76dbc0f92051a1a478a2a67e7f56c62d915cb881d7734704", size = 766487, upload-time = "2026-09-29T00:46:29.941Z" }, + { url = "https://files.pythonhosted.org/packages/01/e1/9c7486d4afe8fdd1fe0ad60139f8aa91427381f409af6a29b609d8fdcb3a/regex-2026.9.29-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:9e4482589065c8ecd761cff522dcd85f2d39e62f551e37e025d1c7d54772def3", size = 854792, upload-time = "2026-09-29T00:46:31.358Z" }, + { url = "https://files.pythonhosted.org/packages/26/c7/49d008ff5f741d9a9799d7315556f3a12b983ff0fcd2cdfb62904bedafbf/regex-2026.9.29-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:d60030baaa7bfbb02d650c126cdcddcb6e33dbff14d819434c8fa2fdcaeeeba5", size = 793050, upload-time = "2026-09-29T00:46:32.775Z" }, + { url = "https://files.pythonhosted.org/packages/cb/a1/46ba549e65562ca04608b24179b8a7bb6f146ae0e7c6d7f5e70f3339c8ba/regex-2026.9.29-cp311-cp311-win32.whl", hash = "sha256:18ae8eed4526e35bdb754d61562b90bf5c00a67fdcf3cc1380dd59597486631b", size = 268940, upload-time = "2026-09-29T00:46:34.179Z" }, + { url = "https://files.pythonhosted.org/packages/4d/4a/aab232183c70fdcf77bcf0c51819da02ec522e393e6a0bf00bcf2142e21f/regex-2026.9.29-cp311-cp311-win_amd64.whl", hash = "sha256:1043aedf5917caa861bcb25a9c11460049656bdf0017a90a309fa8f255467725", size = 280641, upload-time = "2026-09-29T00:46:35.484Z" }, + { url = "https://files.pythonhosted.org/packages/33/b1/7c05954af0f51de376df2ba97f7f78a8b79334c7e5b3d2d9f2aead1f4d3d/regex-2026.9.29-cp311-cp311-win_arm64.whl", hash = "sha256:352cf115a810b357caa35193ab656ecf5ef41056855e82f292c99e8514f8d954", size = 279411, upload-time = "2026-09-29T00:46:37.193Z" }, + { url = "https://files.pythonhosted.org/packages/84/48/3fdcde9a0baa84d7d25571223265d6e434e114763b438601d54a8028bf3e/regex-2026.9.29-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:dc79d36d0618752265f0d575915bdc5c5130ecb9c9f6b3bcefeae32e4bdfafcf", size = 497903, upload-time = "2026-09-29T00:46:38.938Z" }, + { url = "https://files.pythonhosted.org/packages/2e/1c/4ee3e97c76f53940488dfe7a7e18705e78daac8cd7fb161d246b9e328449/regex-2026.9.29-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:3a21a9509d0ee88e7a70e1ad228cd2f0e0fd1e187458db132e8a8d18c97daf9d", size = 296416, upload-time = "2026-09-29T00:46:40.406Z" }, + { url = "https://files.pythonhosted.org/packages/37/14/f3f0ba083d2094392d5eabf56db5ea6ba469fd6e927afd187042054ea68a/regex-2026.9.29-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f57dc6b8fef170f105d2cf5cdce254f47b137d7755086cf7050f47e16582abba", size = 293633, upload-time = "2026-09-29T00:46:41.959Z" }, + { url = "https://files.pythonhosted.org/packages/c9/72/67e7a8ce17f1aea49df215564048efb49cc8c2b31a0e0fc30f36838f8516/regex-2026.9.29-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f93bc1c3486ef3747e07c9d7c1d0a147b8fbaab975f80e348aed6f71309dfaca", size = 805885, upload-time = "2026-09-29T00:46:43.373Z" }, + { url = "https://files.pythonhosted.org/packages/f6/78/25436bcfd4d2260b4b4090094d55d7ab53ec8a1ab4865a0b8bcb33c7d5c0/regex-2026.9.29-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:9e1d3a4cb7993b708f0ada8d0c84590efd853f169e7147d2202c9da503180242", size = 878344, upload-time = "2026-09-29T00:46:45.328Z" }, + { url = "https://files.pythonhosted.org/packages/97/e6/a09ec3a23ae41d6179880e67f0aace9284b2d95f2d7b326eff203f8eec5e/regex-2026.9.29-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:dabee8f4935e731fb46b2a3091bdda0d3d94b3bbfb907d2b4f12eefce4009619", size = 919181, upload-time = "2026-09-29T00:46:47.041Z" }, + { url = "https://files.pythonhosted.org/packages/26/83/d2fbd2e4e3afb1167daa825187d196f313cbaa1a4768f311fb041bb0e3d2/regex-2026.9.29-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:39ab5894d971f9ac68baa6eca5c50387db579cfcacf36ae8df3feceb1815e6d0", size = 807783, upload-time = "2026-09-29T00:46:48.894Z" }, + { url = "https://files.pythonhosted.org/packages/46/0b/eb429a7016610d44fc89a597163f8c9127505f0d7dc724dc9effbb6a3ac0/regex-2026.9.29-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c1a9a6651197fbed6f0212591418b9def774fc3f8324f78d1bf0e6a63e5f8aa1", size = 783465, upload-time = "2026-09-29T00:46:50.64Z" }, + { url = "https://files.pythonhosted.org/packages/1b/07/58a3c0153c7476898430f6a7cf3d9062a1d17fbea4f43399ecaf411c7b4c/regex-2026.9.29-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:87fb80cbe3557e27e7b28b995c2b2eedf689b8886f941ab93e0e288f0976518a", size = 793519, upload-time = "2026-09-29T00:46:52.396Z" }, + { url = "https://files.pythonhosted.org/packages/2a/e8/161b94d39164520e21a7befe0245569bf7fda4c7cf1fc4e2df2b5def49da/regex-2026.9.29-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:3c5c2ef13797466aa64170cbb66ad98a32351dd4127694cea7199f80f213750d", size = 869293, upload-time = "2026-09-29T00:46:54.128Z" }, + { url = "https://files.pythonhosted.org/packages/8f/07/3b02ed829aa2decdc1955d222bd1e2f99d1c8bb4873bbb9a66b2f0a36bff/regex-2026.9.29-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:59b49507f47479e299a9e1bc41b5cb83a7afda0540625f1dbae886615978acbf", size = 770239, upload-time = "2026-09-29T00:46:56.106Z" }, + { url = "https://files.pythonhosted.org/packages/42/5b/ba61f6fe062eb8562e742367d177bb75370434138ef6c9d2a27114f8d613/regex-2026.9.29-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:0dd8af32e9f7b56b7f95cc1fd79b23054c3bdc172392ae560acc24d57b7ffe71", size = 861973, upload-time = "2026-09-29T00:46:57.665Z" }, + { url = "https://files.pythonhosted.org/packages/cc/27/767259b20e8a842948990f5e99138d6c077248fd42f8b5468b1d9ca4b814/regex-2026.9.29-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:db5e82ba15c142425b8406690032df89e39cca4a2e8afbbb9a3d84edc2373ac3", size = 796470, upload-time = "2026-09-29T00:46:59.236Z" }, + { url = "https://files.pythonhosted.org/packages/a0/05/2566c4ba849b68a8ab81a6bf428fa79d20aae7ddee83979103c0381df254/regex-2026.9.29-cp312-cp312-win32.whl", hash = "sha256:d0c3082bf79bcd6a614d55916590ad4b8f93200e10b97f463ea5d9d07c9b5f23", size = 269327, upload-time = "2026-09-29T00:47:01.135Z" }, + { url = "https://files.pythonhosted.org/packages/93/19/489bc8db91196381c935752df01ba3f607140daece33b78d88573f028e64/regex-2026.9.29-cp312-cp312-win_amd64.whl", hash = "sha256:fdd88ed5e20b1bcdd234421e454962c971aa44b653bdb7f1ea9ef683e90fb649", size = 280334, upload-time = "2026-09-29T00:47:04.436Z" }, + { url = "https://files.pythonhosted.org/packages/0b/47/fb88ba779d0e5e7d4b0ec1aceeb13845948a2cb876bd572a2d1dfdba090b/regex-2026.9.29-cp312-cp312-win_arm64.whl", hash = "sha256:4fe97894d1b306c919b4e50def1e6f6c522f4d03a7283811f4d108f1ce5d3ac2", size = 279614, upload-time = "2026-09-29T00:47:06.541Z" }, +] + +[[package]] +name = "regex" +version = "2026.11.25" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.12'", + "python_full_version == '3.11.*'", +] +sdist = { url = "https://files.pythonhosted.org/packages/fa/b8/61d96601b737305a04161da340499cbb3299029d4ea0f9c717bc35977c2b/regex-2026.11.25.tar.gz", hash = "sha256:d3ea8d9698f13f3fd08c65f9bed0bb07bcfff80b61dfa14d86b8cc398f886588", size = 423456, upload-time = "2026-11-26T01:32:26.082Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/45/a5/dce56e5c38640267c8b3f1a4390ca3d675417a9b1689e823437e2f8359f8/regex-2026.11.25-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:33c7e04ea304141e2eb631d1f6843c5fa8c7f929299fc8c135729f43d5f1bc5d", size = 499429, upload-time = "2026-11-26T01:29:51.041Z" }, + { url = "https://files.pythonhosted.org/packages/4f/04/5de230d9ebd6d18d368d76844a05adb50400f0e66f5ede65bb5abc48f840/regex-2026.11.25-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:0fa194d796d1b566780d110fb9554e024951bc7e32bcfb828e824f43bd363525", size = 298439, upload-time = "2026-11-26T01:29:54.022Z" }, + { url = "https://files.pythonhosted.org/packages/e2/58/40295db4d1657bbee3c1d451ba7cfc3538cd49809878eb65658725d8d9f4/regex-2026.11.25-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f1594d917658492718c0653c6bd418134fb3a380de56a1df9c33e3cae0d25f10", size = 295894, upload-time = "2026-11-26T01:29:55.563Z" }, + { url = "https://files.pythonhosted.org/packages/a6/eb/d60f24a2c60a2d284b221118ea1240c07214dd1657be3702e714046bf74b/regex-2026.11.25-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:28c3ef2d3f01573d6073b120117a2bc913384dd8191c76304148ba35416a0860", size = 810044, upload-time = "2026-11-26T01:29:56.839Z" }, + { url = "https://files.pythonhosted.org/packages/26/2c/e211adfa3715d3ab1d431fbf576813447a1e2c1ddc48c654d295083c328c/regex-2026.11.25-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:9311589de48e9a664588afb43036db8963b475a4e70377139c1502720aa1a40a", size = 883899, upload-time = "2026-11-26T01:29:58.286Z" }, + { url = "https://files.pythonhosted.org/packages/8f/73/ef3ebd9c86cbe3a032d86213375348bd6c179aa236d0b1f937ee07f1c811/regex-2026.11.25-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:3bcee2794059f4837d0fc4efb4f13fec7303c0c3f73ee1e3c80a3f1d6d02ad79", size = 926145, upload-time = "2026-11-26T01:29:59.879Z" }, + { url = "https://files.pythonhosted.org/packages/4d/bc/a67b4ac4cde7cea10df22aafe93ff7ff17fcdd603961cc286703a4464416/regex-2026.11.25-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5ce17b6509a07141ef598e8ccbd321a48ab3705644bc4d1dfb94202d75104cd9", size = 812974, upload-time = "2026-11-26T01:30:01.389Z" }, + { url = "https://files.pythonhosted.org/packages/89/4e/9cf3a52827c8e2dde59af6d56dc5ce89ff42131e7c9f65a94fa26525fa18/regex-2026.11.25-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:78ac899483690c7b5981afd519f0806e5b4303e9e3055f8d40b02dbd5b94cb43", size = 818889, upload-time = "2026-11-26T01:30:02.848Z" }, + { url = "https://files.pythonhosted.org/packages/9f/37/4594feb4290a547250878ce49257415732bccf5d2c57da67ce43fe926109/regex-2026.11.25-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:8c93bf0e876ca19d6d26a81db5a62a416388dc4d92f1ee1d3295476042d05324", size = 791958, upload-time = "2026-11-26T01:30:04.808Z" }, + { url = "https://files.pythonhosted.org/packages/be/28/1a547adde3084ba1f57ad6b88ee8ecc58cfcdcef0cb2bb3d80a4ea4509ec/regex-2026.11.25-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1b2558bd9b7e859b12dc1a9ea42f2a7e7689e44b02bf8cf20cbda099e9b91d22", size = 799466, upload-time = "2026-11-26T01:30:06.501Z" }, + { url = "https://files.pythonhosted.org/packages/83/c2/f3a16462c08b68b7fcb0f69159f76ef2f8c22077a3dce7310259f78e556e/regex-2026.11.25-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:28cc5ed191729f90c9c34a80f10881205f4face5f85bfdabbbb64376fe84bbb4", size = 876086, upload-time = "2026-11-26T01:30:08.294Z" }, + { url = "https://files.pythonhosted.org/packages/29/2f/f378caa695579613b81c52b36eb77cf30d69051902e92b74204fc498e086/regex-2026.11.25-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:9c4daf771f8fe945144cd479c999559c3c0d4c8cb7ade9025ce44562a6b82b69", size = 778530, upload-time = "2026-11-26T01:30:09.566Z" }, + { url = "https://files.pythonhosted.org/packages/39/93/69b124e145061d3050f2309ab6a7c74c485a10b0c0535d065ff5f3d56caf/regex-2026.11.25-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:4dd9412f1f4110a86985d637c4b8188c05bf4c60ce9f3c76f1026d3b4800506f", size = 867729, upload-time = "2026-11-26T01:30:10.765Z" }, + { url = "https://files.pythonhosted.org/packages/0b/63/b266196cd99e04ae727cce6c8343be9a04e22b693a82e014c5c3c6479c72/regex-2026.11.25-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:dbbc36073967d6134bc95ffd75add09fcda784b0d8c1f4d38907091e7fcbf336", size = 799782, upload-time = "2026-11-26T01:30:12.171Z" }, + { url = "https://files.pythonhosted.org/packages/59/4e/3aa083c83bedda06d13e4a48703da3b62016ad868b4061e80d778d77b51e/regex-2026.11.25-cp311-cp311-win32.whl", hash = "sha256:3e3a064fadee3ca0658258f3b94cb3cd39b7d81c2573117f2d467b9e58e8bb27", size = 270868, upload-time = "2026-11-26T01:30:13.474Z" }, + { url = "https://files.pythonhosted.org/packages/6d/9b/7b8e6f625bf156455d6198b90ff67b9e40031d3429a9cc46ca83e68e6255/regex-2026.11.25-cp311-cp311-win_amd64.whl", hash = "sha256:78c3f95a9ef90205d25a65519c282a8b2d23546dc91c257d96a6a620c7c9d1fc", size = 282504, upload-time = "2026-11-26T01:30:14.74Z" }, + { url = "https://files.pythonhosted.org/packages/6d/1b/545edc3798c6917915c909b0354745c722b186a85b3a08ded25ee9e96800/regex-2026.11.25-cp311-cp311-win_arm64.whl", hash = "sha256:0638ad7ea6af26a17292f052a6eb0c883705e6dce257c3acc7a6b2bf035b7262", size = 282381, upload-time = "2026-11-26T01:30:15.773Z" }, + { url = "https://files.pythonhosted.org/packages/50/5d/8d67292bbb872cc70487fc6b49bb556197fc482cac2ae9bee43a80d747ee/regex-2026.11.25-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:f5f083a0d66c129ecbab9ec677ceee7254672f08a7cebda49f172dbb5b96acf4", size = 502237, upload-time = "2026-11-26T01:30:17.215Z" }, + { url = "https://files.pythonhosted.org/packages/84/da/8e19706a7d3f682640d47c9b49d9cd1fae1d14074aa0bdfada62a61ac945/regex-2026.11.25-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:ac0ce45ad2deb12c125762bdad5e489d42e83e29f8fd45eca2f08e3a55c60bcc", size = 300096, upload-time = "2026-11-26T01:30:18.688Z" }, + { url = "https://files.pythonhosted.org/packages/41/81/b47cbd606647371eeb6c05bf7eb4e39badcf29450bea9deb6ca2b17807fb/regex-2026.11.25-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:544c87eb49bdef2069561c678ad7ed81998a4f026f9349db9e1cd09dfbb2968f", size = 297320, upload-time = "2026-11-26T01:30:19.934Z" }, + { url = "https://files.pythonhosted.org/packages/7c/af/0233718c6ab7ad6d8790dc2a00f263c46d1e960d1a5a54c963ac5814b5a7/regex-2026.11.25-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:036ae3dd8d501bd3b4daa47b17a2c1e4450b9707bf8e44b0a9b57d25ddd4c1b0", size = 815488, upload-time = "2026-11-26T01:30:21.482Z" }, + { url = "https://files.pythonhosted.org/packages/12/3b/ef3a3615aa8a25cb3fc363df9920bff8acf8090fe51a9c64e238c5b32ed8/regex-2026.11.25-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a623979964d4623c23f488079e38ceb166faba6892c12c8715435b8c378b727f", size = 887854, upload-time = "2026-11-26T01:30:22.781Z" }, + { url = "https://files.pythonhosted.org/packages/20/56/1d70decc9558c056374c609eba89b99b04fce54b8babb1fa96c6e1906cd1/regex-2026.11.25-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:cc985135d666fb73d0c6d5847d98953e10f78d770882ac48ccac29777abd9cf7", size = 926991, upload-time = "2026-11-26T01:30:24.038Z" }, + { url = "https://files.pythonhosted.org/packages/79/a3/8950bf3b900d347cd205ec3f634d6571b6eb3128ad3f37ea6319f75f68ad/regex-2026.11.25-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d3c40add70ae031f1b4922f30c4ecdc32db3adaa80f4c1ea1129fe1f43e881df", size = 820537, upload-time = "2026-11-26T01:30:25.414Z" }, + { url = "https://files.pythonhosted.org/packages/d9/87/ab9aabb0e1955c223e166eb9727c212a99df9831ebd9c45996b134544f24/regex-2026.11.25-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0df60c883951880070720095b047d276818209c7e2c429a87d147478e7ed7e10", size = 791844, upload-time = "2026-11-26T01:30:26.877Z" }, + { url = "https://files.pythonhosted.org/packages/d4/77/3ca85babd0e816ce918b05c8089fd59317adb9b6f434ba6975487089e0cd/regex-2026.11.25-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:f134964219841ef2f6a0cc262a8afd7ee97539df3d3d54de6859d45b1b47f4bc", size = 805341, upload-time = "2026-11-26T01:30:28.365Z" }, + { url = "https://files.pythonhosted.org/packages/85/a2/ecb428c9d93d7ec5b3f527bca4368144ecb2daf4c60f2b12c8c254a1d350/regex-2026.11.25-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:c38aa91921224ef128e43764983655543d8c6cd11dc1d2c7912b9f5cdbb6e1a6", size = 875250, upload-time = "2026-11-26T01:30:29.603Z" }, + { url = "https://files.pythonhosted.org/packages/20/28/af10a88c8dddfdd9b5da0ca66a0789c52c80eb88031ac4415f6cc1e9cb3f/regex-2026.11.25-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:0cbe655d0760f0c35b3bc96b735958482299e38628c34c7f984e37ee646c0f3b", size = 779896, upload-time = "2026-11-26T01:30:30.835Z" }, + { url = "https://files.pythonhosted.org/packages/35/e8/158e6adf07acad926802d2f0e555cb2d02cec16a293949a33bd0f82e03a3/regex-2026.11.25-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:4a1741e7c48ce011ab9902c56dfe3d22bfe4d157c1ff70809f2191db2330144f", size = 867646, upload-time = "2026-11-26T01:30:32.412Z" }, + { url = "https://files.pythonhosted.org/packages/0b/d9/0152a2e72e12200331be7d75f719e1fce93684934ab176a0cedd58405df5/regex-2026.11.25-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ea59e34dafc84af1747280ea7fd0e8d6ecb6be5cbfd85009cdeead2ae4faa8ee", size = 807636, upload-time = "2026-11-26T01:30:33.574Z" }, + { url = "https://files.pythonhosted.org/packages/a8/68/00356ffee767825152c8962df5e37718f7983cd1c98896b8d0a6d1298155/regex-2026.11.25-cp312-cp312-win32.whl", hash = "sha256:62e262fa38e97bfaab449ff0386988e1b316110ab421345331bcd64df2c5aa4c", size = 271276, upload-time = "2026-11-26T01:30:34.756Z" }, + { url = "https://files.pythonhosted.org/packages/8c/91/2252ad1447a25bececd919d4c58437f485013c3e9fb1a0357a59a8055c6f/regex-2026.11.25-cp312-cp312-win_amd64.whl", hash = "sha256:d9c71646bbdea21925a31a710ea0b0c52d5fe92d18870f59561619e3b118b13c", size = 282134, upload-time = "2026-11-26T01:30:35.884Z" }, + { url = "https://files.pythonhosted.org/packages/d7/9e/bc71006d345461b21fc0f9ca068e32eea3cdb77782510c8e1683083ac03d/regex-2026.11.25-cp312-cp312-win_arm64.whl", hash = "sha256:63657f12028add3eb6424ac46060b67e80e84ee23ff03ff1a169d6bd4be1e0d1", size = 282511, upload-time = "2026-11-26T01:30:36.995Z" }, +] + +[[package]] +name = "requests" +version = "2.34.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "certifi" }, + { name = "charset-normalizer" }, + { name = "idna" }, + { name = "urllib3" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/ac/c3/e2a2b89f2d3e2179abd6d00ebd70bff6273f37fb3e0cc209f48b39d00cbf/requests-2.34.2.tar.gz", hash = "sha256:f288924cae4e29463698d6d60bc6a4da69c89185ad1e0bcc4104f584e960b9ed", size = 142856, upload-time = "2026-05-14T19:25:27.735Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a0/f4/c67b0b3f1b9245e8d266f0f112c500d50e5b4e83cb6f3b71b6528104182a/requests-2.34.2-py3-none-any.whl", hash = "sha256:2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0", size = 73075, upload-time = "2026-05-14T19:25:26.443Z" }, +] + +[[package]] +name = "safetensors" +version = "0.8.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/45/06/f955dbbb1859e3bd23c8ac6141af5106e7ad5fedec4a3a6e3d60f94b7001/safetensors-0.8.0.tar.gz", hash = "sha256:fabaf3e0f18a6618d9b36560682562157f77c2b71fcffc7b432be2baed9d753d", size = 325846, upload-time = "2026-06-09T07:52:25.563Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/39/a0/f718cda65b05407d228f97602cf60dca269c979867aa5beb25410de26cd3/safetensors-0.8.0-cp310-abi3-macosx_10_12_x86_64.whl", hash = "sha256:c554f85858e05226d3c2828e32395e677434685d6d94594a41643361c5e837f0", size = 473568, upload-time = "2026-06-09T07:52:18.829Z" }, + { url = "https://files.pythonhosted.org/packages/f5/b1/fa7c600e7dceae12e9606c7578cbc9ff1e1ed55844883ee5c92205e86226/safetensors-0.8.0-cp310-abi3-macosx_11_0_arm64.whl", hash = "sha256:c80201d22cbf405b80647a60ada77bba06c8fba2da2743ba1e89cdcc39a81f25", size = 484562, upload-time = "2026-06-09T07:52:17.518Z" }, + { url = "https://files.pythonhosted.org/packages/09/7d/65a7de0af421317bb36a067241e4235fff194eed60b961ed6d3f59a3fc60/safetensors-0.8.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7a46e5ff292c356d6991e60942ba7f79817682d3a2cef0702136448cb9c4d235", size = 502844, upload-time = "2026-06-09T07:52:07.624Z" }, + { url = "https://files.pythonhosted.org/packages/91/4f/3175c9d75634e0e0dda0082794193521035edd7c70a6f212bf33ca06ddf4/safetensors-0.8.0-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:4124502b78f03534117c848f87a39b8f31e577b15eff423bf8bfb95f2a8c30d0", size = 511823, upload-time = "2026-06-09T07:52:09.565Z" }, + { url = "https://files.pythonhosted.org/packages/20/87/846c289e7aa2299eff406335717cf43ce8777194ece8aad75772e0411615/safetensors-0.8.0-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7bc0a787ba8a35be368ee3574edfa2b1ad389eebd0a72e482ae275490e3f6c98", size = 633461, upload-time = "2026-06-09T07:52:11.128Z" }, + { url = "https://files.pythonhosted.org/packages/76/22/8d64d9df2c45d5ded401df889d0ad90882804ca172d79ec4f0df8f727fe0/safetensors-0.8.0-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:040070828e36dc8e122178bbbd5830ff9e97920affb84cbe0f46442497bed358", size = 545148, upload-time = "2026-06-09T07:52:13.603Z" }, + { url = "https://files.pythonhosted.org/packages/28/50/f203ff3a3ddfe19308efc83c5a3a29ed02bf786732ec35e68bf9162f3365/safetensors-0.8.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd6f3f93c9a0a7cc2788ee63fb763353d4bd2e89b0751bc78fcf7dda00bea774", size = 516040, upload-time = "2026-06-09T07:52:16.29Z" }, + { url = "https://files.pythonhosted.org/packages/46/fb/cdaed17ceb2948784fd9c36b6fd3e951b608547cea81a48e8ee6f8cfdfcb/safetensors-0.8.0-cp310-abi3-manylinux_2_31_riscv64.whl", hash = "sha256:fcdd41ec4628fee5799f807c73c353629130fbd942aa23d83c623dd6c9d52d78", size = 513832, upload-time = "2026-06-09T07:52:12.37Z" }, + { url = "https://files.pythonhosted.org/packages/0d/49/1e15de264dcc3b77943d2d0c56a95809956883b1c2d6d585c792523f180b/safetensors-0.8.0-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8e9f537aa183a38ace122d27303dcd986b26bd2a7591f9181d7f0c396f4677ca", size = 559930, upload-time = "2026-06-09T07:52:14.743Z" }, + { url = "https://files.pythonhosted.org/packages/2a/43/bf38443278eab4b1be1fce2931e2b012ad9cb7df52ada751d0aab8f7659a/safetensors-0.8.0-cp310-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:87eec7ffed2b809f05a398a8becb7d013f19f7837cd15d9748580d6cf30dbaf4", size = 678670, upload-time = "2026-06-09T07:52:20.032Z" }, + { url = "https://files.pythonhosted.org/packages/72/e3/68cd3fa5b48488e84add63e04cb12f3bc28ae4638c06d4508c6e88823d0e/safetensors-0.8.0-cp310-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:4a95ae2b05d7726d751da4ebf626a2ca782b706e101bd894c95bc2450b1cffcc", size = 786679, upload-time = "2026-06-09T07:52:21.322Z" }, + { url = "https://files.pythonhosted.org/packages/29/4b/1c19c509d56e01f4fbb3d0a2e597450f6cc04d1d56cf52defb0a62dfd715/safetensors-0.8.0-cp310-abi3-musllinux_1_2_i686.whl", hash = "sha256:3ae091f16662658bdc019a4ff6cb4c085bb7d725eb5978b183ffd265863b6d2d", size = 765683, upload-time = "2026-06-09T07:52:22.594Z" }, + { url = "https://files.pythonhosted.org/packages/27/43/41c1621732edd934d868a00d1b891584c892a7b62a9aab82ea5a0a5623ee/safetensors-0.8.0-cp310-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:8e080062fcde23be189565e1c3305d16751a218ecf9412c8601e64204eb6f846", size = 722361, upload-time = "2026-06-09T07:52:23.924Z" }, + { url = "https://files.pythonhosted.org/packages/8e/3f/73ccf82579412b4a71c4ca673f10b5f1f888d7cf5af7fe24f27d30307be4/safetensors-0.8.0-cp310-abi3-win32.whl", hash = "sha256:2ddf52eac562eda224f99acfa7889d02968c1fd59a5b011ae7d8137c37e9c02d", size = 342401, upload-time = "2026-06-09T07:52:28.895Z" }, + { url = "https://files.pythonhosted.org/packages/1b/6d/3fba214c1e5e0f69991677ec3bc17023f0421776975e1de0c682dca475e2/safetensors-0.8.0-cp310-abi3-win_amd64.whl", hash = "sha256:096ec1a98435df7beb08853bb5aa9081a84f23d0adc67ed1a0a10550f608373f", size = 355540, upload-time = "2026-06-09T07:52:27.832Z" }, + { url = "https://files.pythonhosted.org/packages/8d/fc/7eedc3510d97878876e32774eebbeb61c43f148a96e915c84229a3e967aa/safetensors-0.8.0-cp310-abi3-win_arm64.whl", hash = "sha256:f7838e5135a406ad3e02efdcb8cf2e5397d368b0154537c4fec682dbc544d452", size = 340500, upload-time = "2026-06-09T07:52:26.745Z" }, +] + +[[package]] +name = "sentencepiece" +version = "0.2.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/54/83/0664683546ffca8e36653d39d6217c361d931953f40ce28210b56927a9b6/sentencepiece-0.2.3.tar.gz", hash = "sha256:21618ad31f0453a1ebf5ec58defed99758d54af0b670546ecac639ddd8b86fbd", size = 3751846, upload-time = "2026-11-05T05:38:22.108Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/29/ff/2da9d340530f2fdb54449865aeb1eb6b3294a0f88773ac5c856397190594/sentencepiece-0.2.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:51ae35f32ddc832b8ff5f57dd69dae5a814ab6b6e027c83e6f5632335bf21e98", size = 1424612, upload-time = "2026-11-05T05:35:20.926Z" }, + { url = "https://files.pythonhosted.org/packages/9c/1e/1d29b3b0c6d7c924842f75a99a01722e6fb0faf632834b9108941f4ac8e2/sentencepiece-0.2.3-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:dc4d17ad8728f47062496a7c03e000bb37de9c6741f8423b822d51e4f2f86fcf", size = 1625698, upload-time = "2026-11-05T05:35:24.244Z" }, + { url = "https://files.pythonhosted.org/packages/14/06/e0d67a135e58a5999429553732bd0f74df5918047b02d012d1cf806419ba/sentencepiece-0.2.3-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:21cb90585b2d9a1cf78c5e889af0a12b35536dc65e2f0ba2daf540c60d431c87", size = 1712355, upload-time = "2026-11-05T05:35:27Z" }, + { url = "https://files.pythonhosted.org/packages/7a/bb/736b8a6f08294fded810483abfe649ccbf71c2e373548e29913945b7e864/sentencepiece-0.2.3-cp310-cp310-win_amd64.whl", hash = "sha256:901f38530a93e14505bfa3279c8a4705158f30af406bc2721cf3ffd7175170c2", size = 1652913, upload-time = "2026-11-05T05:35:31.454Z" }, + { url = "https://files.pythonhosted.org/packages/c5/6b/c9028d221ee091978d9960f0337a58cee3e2140d8477b00ae2e25a43568b/sentencepiece-0.2.3-cp310-cp310-win_arm64.whl", hash = "sha256:65f26939063414c5f57a46a625789e9b32f952a800490d5cce6d4c4ad0094fff", size = 1864846, upload-time = "2026-11-05T05:35:37.595Z" }, + { url = "https://files.pythonhosted.org/packages/37/fa/02579970d01a0e92619967c7c2401839e3f3806fb1852d3bb8ae0e7013c2/sentencepiece-0.2.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:6b94ccd8554338970e1d73959a7e3ed4d110a60dab95d459990b30a508fa0998", size = 1426225, upload-time = "2026-11-05T05:35:44.624Z" }, + { url = "https://files.pythonhosted.org/packages/c2/4f/6db415ccb1d9508becda7e56092f63f24972dea0605fe94a8c1d9d4b5075/sentencepiece-0.2.3-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:855b047e02fb9c7aae2f673f5c1adbd42a4a0e8ce77e5090d14ff26f9282749d", size = 1626383, upload-time = "2026-11-05T05:35:50.398Z" }, + { url = "https://files.pythonhosted.org/packages/0f/90/7a01161697ff2a6dc1968a735b7ea7fefd7eb09827d90242923ff76e33fd/sentencepiece-0.2.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:141dc0bef1e28a5cf7e41c8354ad6cc14525758278045286dcb5429b9906d39f", size = 1713961, upload-time = "2026-11-05T05:35:54.276Z" }, + { url = "https://files.pythonhosted.org/packages/c1/ed/8c25ed68a0e9380813f880b0bc3d986f232191e0989d035253c8deb8cfbf/sentencepiece-0.2.3-cp311-cp311-win_amd64.whl", hash = "sha256:a01e76cf49a0c1abc527c4e5fd6d3a87a3139a1d3ad2d5761567179a70805cce", size = 1653925, upload-time = "2026-11-05T05:35:59.379Z" }, + { url = "https://files.pythonhosted.org/packages/c8/6b/939dca65c0eee57be23a01c35b0264656dddf3b2fa60b0af8051dd548464/sentencepiece-0.2.3-cp311-cp311-win_arm64.whl", hash = "sha256:ec5c6a53f9f7adfe6e7f62b12696280632c0da2352a696b436ae4152f72ff706", size = 1866592, upload-time = "2026-11-05T05:36:04.684Z" }, + { url = "https://files.pythonhosted.org/packages/f8/a9/8dbb891f51a80f1f47afa3d5336b165e269c4fa87f47b7fba6fc34a4a6a0/sentencepiece-0.2.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:9b39b16b889c9d3be4f00f1a0a4283ee81ad8af745d48023e5ab18c724019c08", size = 1426879, upload-time = "2026-11-05T05:36:08.906Z" }, + { url = "https://files.pythonhosted.org/packages/31/26/fb6572cc96090953051089f8e4260a455b6b0c7378bb06fb87725224ce61/sentencepiece-0.2.3-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a6b735a8027b998c163e540fdde66ac0bb95fc471f6f4165c8df35fb45385116", size = 1627109, upload-time = "2026-11-05T05:36:13.057Z" }, + { url = "https://files.pythonhosted.org/packages/51/72/42952e5b9f254aa2952c04360b38ed614ca4f5600ee2b0cf8e1c0f6661c5/sentencepiece-0.2.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:cc3189b79c1ffda767f71b04238c27ac746f3b7abc263eab9a41c4cf46aee49e", size = 1716727, upload-time = "2026-11-05T05:36:17.199Z" }, + { url = "https://files.pythonhosted.org/packages/b5/78/47be22c27976afed9f88cb9bcdb225abb37991c1ff442a9234e64e7a3d23/sentencepiece-0.2.3-cp312-cp312-win_amd64.whl", hash = "sha256:972af959c63cde446210a8935524806820c253afa4b0a97d83c206b857085f44", size = 1655435, upload-time = "2026-11-05T05:36:21.633Z" }, + { url = "https://files.pythonhosted.org/packages/e4/5c/6f921049ef4136e360437d370396ac36b927ce1be0184ddbeca50581580d/sentencepiece-0.2.3-cp312-cp312-win_arm64.whl", hash = "sha256:ceaf9a73f7e1672990547e8efe5bb79ea61884a8fe24600662d12e3a8aaf1a5b", size = 1860800, upload-time = "2026-11-05T05:36:26.727Z" }, +] + +[[package]] +name = "setuptools" +version = "84.2.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/70/b3/c19426f783614d625699a4b247faf628ea9ab1db228674491767b417f9e1/setuptools-84.2.1.tar.gz", hash = "sha256:3ff8b3b5492a0aa66960f4419365a86b84e013070d4313e4d4a6894f5d64d6bc", size = 1230289, upload-time = "2026-10-20T19:01:37.742Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ef/55/6dc6d6bb953bdfc52519a0059592c52b6e3b8ad51cf8256dffceb55b0610/setuptools-84.2.1-py3-none-any.whl", hash = "sha256:ca140b45d5325a9478f880e351484f62fef15f336462e449ca0c03c873d589c2", size = 876263, upload-time = "2026-10-20T19:01:35.678Z" }, +] + +[[package]] +name = "soundfile" +version = "0.14.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "cffi" }, + { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, + { name = "numpy", version = "2.4.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version == '3.11.*'" }, + { name = "numpy", version = "2.5.5", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.12'" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/d2/db/949331952a6fb1c5b12e9de80fd08747966c2039d1a61db4764fbd3981c2/soundfile-0.14.0.tar.gz", hash = "sha256:ba1c1a2d618bca5c406647c83b89f07cc8810fa506a50622a6993ba130c1de11", size = 47842, upload-time = "2026-06-06T08:58:47.869Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b1/d1/5e338af9ca6ed0786cd5bb03f6d60de1c325728c1189014f3b59aae7403c/soundfile-0.14.0-py2.py3-none-any.whl", hash = "sha256:8ba81ae3a89fd5ab3bef8a8eb481fbbe794e806309675a89b4df48b8d31908a8", size = 26799, upload-time = "2026-06-06T08:58:33.269Z" }, + { url = "https://files.pythonhosted.org/packages/7e/72/c6b21e58d3113596e7e8de0a08d6f1d95173492cfbca0a4db14148cbba2a/soundfile-0.14.0-py2.py3-none-macosx_10_9_x86_64.whl", hash = "sha256:19be05428da76ed61a4cad29b8e4bcf43a3e5c100089d2ec81dc961eed1b0dd4", size = 1144568, upload-time = "2026-06-06T08:58:35.231Z" }, + { url = "https://files.pythonhosted.org/packages/63/7a/dfdd6f8c748988427119f75eb860a3cedd858d1aea1fe28f39ad8559ef22/soundfile-0.14.0-py2.py3-none-macosx_11_0_arm64.whl", hash = "sha256:d828d35a059626da52f1415b5faee610aeab393319cb3fc4a9aef47b619fc14c", size = 1103726, upload-time = "2026-06-06T08:58:37.948Z" }, + { url = "https://files.pythonhosted.org/packages/4a/f8/fc39fad6f879633461d27394cd1ddaf1f769ffa0597dca35872f51b16461/soundfile-0.14.0-py2.py3-none-manylinux_2_28_aarch64.whl", hash = "sha256:e85724a90bc99a6e8062c0b4ddf725f53b2a3b70afd4da875e9d2cfc4e92f377", size = 1238050, upload-time = "2026-06-06T08:58:39.932Z" }, + { url = "https://files.pythonhosted.org/packages/7b/a2/70fd4432b924684c372df8b0a45708c36c057ef3596c9eb53e0a806b980b/soundfile-0.14.0-py2.py3-none-manylinux_2_28_x86_64.whl", hash = "sha256:1e38bac1853412871318e82a1ba69a8be677619b56025bbfcccdb41b6cafe82d", size = 1315963, upload-time = "2026-06-06T08:58:41.716Z" }, + { url = "https://files.pythonhosted.org/packages/d9/34/c9e80783d83eab739a9531fdee03675d53e0bf1b2ccb4bb3af5844675046/soundfile-0.14.0-py2.py3-none-win32.whl", hash = "sha256:0a6ae43c50c71b4e020cc55382925cb89451c1ed1a0c3d0f5d802da269226849", size = 902199, upload-time = "2026-06-06T08:58:43.289Z" }, + { url = "https://files.pythonhosted.org/packages/ed/97/b39c18ac1df45e755ca22b8b00e872929da5d107998a207a5e4ac831bfda/soundfile-0.14.0-py2.py3-none-win_amd64.whl", hash = "sha256:299491d3499460fb1b74bb4bd78b57ffc2d243a5fafa7b6ec1b264875c78453e", size = 1021480, upload-time = "2026-06-06T08:58:45.016Z" }, + { url = "https://files.pythonhosted.org/packages/f4/83/55c65e61cf457805ce2ec157c1c6ae17715d0851aa2374422de0538838ca/soundfile-0.14.0-py2.py3-none-win_arm64.whl", hash = "sha256:e090704718e124e7c844695236f1fce8d18a5e761eaf7c82dfcd124620805f98", size = 888858, upload-time = "2026-06-06T08:58:46.593Z" }, +] + +[[package]] +name = "sympy" +version = "1.14.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "mpmath" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/83/d3/803453b36afefb7c2bb238361cd4ae6125a569b4db67cd9e79846ba2d68c/sympy-1.14.0.tar.gz", hash = "sha256:d3d3fe8df1e5a0b42f0e7bdf50541697dbe7d23746e894990c030e2b05e72517", size = 7793921, upload-time = "2025-04-27T18:05:01.611Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a2/09/77d55d46fd61b4a135c444fc97158ef34a095e5681d0a6c10b75bf356191/sympy-1.14.0-py3-none-any.whl", hash = "sha256:e091cc3e99d2141a0ba2847328f5479b05d94a6635cb96148ccb3f34671bd8f5", size = 6299353, upload-time = "2025-04-27T18:04:59.103Z" }, +] + +[[package]] +name = "tokenizers" +version = "0.22.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "huggingface-hub" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/73/6f/f80cfef4a312e1fb34baf7d85c72d4411afde10978d4657f8cdd811d3ccc/tokenizers-0.22.2.tar.gz", hash = "sha256:473b83b915e547aa366d1eee11806deaf419e17be16310ac0a14077f1e28f917", size = 372115, upload-time = "2026-01-05T10:45:15.988Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/92/97/5dbfabf04c7e348e655e907ed27913e03db0923abb5dfdd120d7b25630e1/tokenizers-0.22.2-cp39-abi3-macosx_10_12_x86_64.whl", hash = "sha256:544dd704ae7238755d790de45ba8da072e9af3eea688f698b137915ae959281c", size = 3100275, upload-time = "2026-01-05T10:41:02.158Z" }, + { url = "https://files.pythonhosted.org/packages/2e/47/174dca0502ef88b28f1c9e06b73ce33500eedfac7a7692108aec220464e7/tokenizers-0.22.2-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:1e418a55456beedca4621dbab65a318981467a2b188e982a23e117f115ce5001", size = 2981472, upload-time = "2026-01-05T10:41:00.276Z" }, + { url = "https://files.pythonhosted.org/packages/d6/84/7990e799f1309a8b87af6b948f31edaa12a3ed22d11b352eaf4f4b2e5753/tokenizers-0.22.2-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2249487018adec45d6e3554c71d46eb39fa8ea67156c640f7513eb26f318cec7", size = 3290736, upload-time = "2026-01-05T10:40:32.165Z" }, + { url = "https://files.pythonhosted.org/packages/78/59/09d0d9ba94dcd5f4f1368d4858d24546b4bdc0231c2354aa31d6199f0399/tokenizers-0.22.2-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:25b85325d0815e86e0bac263506dd114578953b7b53d7de09a6485e4a160a7dd", size = 3168835, upload-time = "2026-01-05T10:40:38.847Z" }, + { url = "https://files.pythonhosted.org/packages/47/50/b3ebb4243e7160bda8d34b731e54dd8ab8b133e50775872e7a434e524c28/tokenizers-0.22.2-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bfb88f22a209ff7b40a576d5324bf8286b519d7358663db21d6246fb17eea2d5", size = 3521673, upload-time = "2026-01-05T10:40:56.614Z" }, + { url = "https://files.pythonhosted.org/packages/e0/fa/89f4cb9e08df770b57adb96f8cbb7e22695a4cb6c2bd5f0c4f0ebcf33b66/tokenizers-0.22.2-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1c774b1276f71e1ef716e5486f21e76333464f47bece56bbd554485982a9e03e", size = 3724818, upload-time = "2026-01-05T10:40:44.507Z" }, + { url = "https://files.pythonhosted.org/packages/64/04/ca2363f0bfbe3b3d36e95bf67e56a4c88c8e3362b658e616d1ac185d47f2/tokenizers-0.22.2-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:df6c4265b289083bf710dff49bc51ef252f9d5be33a45ee2bed151114a56207b", size = 3379195, upload-time = "2026-01-05T10:40:51.139Z" }, + { url = "https://files.pythonhosted.org/packages/2e/76/932be4b50ef6ccedf9d3c6639b056a967a86258c6d9200643f01269211ca/tokenizers-0.22.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:369cc9fc8cc10cb24143873a0d95438bb8ee257bb80c71989e3ee290e8d72c67", size = 3274982, upload-time = "2026-01-05T10:40:58.331Z" }, + { url = "https://files.pythonhosted.org/packages/1d/28/5f9f5a4cc211b69e89420980e483831bcc29dade307955cc9dc858a40f01/tokenizers-0.22.2-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:29c30b83d8dcd061078b05ae0cb94d3c710555fbb44861139f9f83dcca3dc3e4", size = 9478245, upload-time = "2026-01-05T10:41:04.053Z" }, + { url = "https://files.pythonhosted.org/packages/6c/fb/66e2da4704d6aadebf8cb39f1d6d1957df667ab24cff2326b77cda0dcb85/tokenizers-0.22.2-cp39-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:37ae80a28c1d3265bb1f22464c856bd23c02a05bb211e56d0c5301a435be6c1a", size = 9560069, upload-time = "2026-01-05T10:45:10.673Z" }, + { url = "https://files.pythonhosted.org/packages/16/04/fed398b05caa87ce9b1a1bb5166645e38196081b225059a6edaff6440fac/tokenizers-0.22.2-cp39-abi3-musllinux_1_2_i686.whl", hash = "sha256:791135ee325f2336f498590eb2f11dc5c295232f288e75c99a36c5dbce63088a", size = 9899263, upload-time = "2026-01-05T10:45:12.559Z" }, + { url = "https://files.pythonhosted.org/packages/05/a1/d62dfe7376beaaf1394917e0f8e93ee5f67fea8fcf4107501db35996586b/tokenizers-0.22.2-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:38337540fbbddff8e999d59970f3c6f35a82de10053206a7562f1ea02d046fa5", size = 10033429, upload-time = "2026-01-05T10:45:14.333Z" }, + { url = "https://files.pythonhosted.org/packages/fd/18/a545c4ea42af3df6effd7d13d250ba77a0a86fb20393143bbb9a92e434d4/tokenizers-0.22.2-cp39-abi3-win32.whl", hash = "sha256:a6bf3f88c554a2b653af81f3204491c818ae2ac6fbc09e76ef4773351292bc92", size = 2502363, upload-time = "2026-01-05T10:45:20.593Z" }, + { url = "https://files.pythonhosted.org/packages/65/71/0670843133a43d43070abeb1949abfdef12a86d490bea9cd9e18e37c5ff7/tokenizers-0.22.2-cp39-abi3-win_amd64.whl", hash = "sha256:c9ea31edff2968b44a88f97d784c2f16dc0729b8b143ed004699ebca91f05c48", size = 2747786, upload-time = "2026-01-05T10:45:18.411Z" }, + { url = "https://files.pythonhosted.org/packages/72/f4/0de46cfa12cdcbcd464cc59fde36912af405696f687e53a091fb432f694c/tokenizers-0.22.2-cp39-abi3-win_arm64.whl", hash = "sha256:9ce725d22864a1e965217204946f830c37876eee3b2ba6fc6255e8e903d5fcbc", size = 2612133, upload-time = "2026-01-05T10:45:17.232Z" }, + { url = "https://files.pythonhosted.org/packages/84/04/655b79dbcc9b3ac5f1479f18e931a344af67e5b7d3b251d2dcdcd7558592/tokenizers-0.22.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:753d47ebd4542742ef9261d9da92cd545b2cacbb48349a1225466745bb866ec4", size = 3282301, upload-time = "2026-01-05T10:40:34.858Z" }, + { url = "https://files.pythonhosted.org/packages/46/cd/e4851401f3d8f6f45d8480262ab6a5c8cb9c4302a790a35aa14eeed6d2fd/tokenizers-0.22.2-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e10bf9113d209be7cd046d40fbabbaf3278ff6d18eb4da4c500443185dc1896c", size = 3161308, upload-time = "2026-01-05T10:40:40.737Z" }, + { url = "https://files.pythonhosted.org/packages/6f/6e/55553992a89982cd12d4a66dddb5e02126c58677ea3931efcbe601d419db/tokenizers-0.22.2-pp310-pypy310_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:64d94e84f6660764e64e7e0b22baa72f6cd942279fdbb21d46abd70d179f0195", size = 3718964, upload-time = "2026-01-05T10:40:46.56Z" }, + { url = "https://files.pythonhosted.org/packages/59/8c/b1c87148aa15e099243ec9f0cf9d0e970cc2234c3257d558c25a2c5304e6/tokenizers-0.22.2-pp310-pypy310_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f01a9c019878532f98927d2bacb79bbb404b43d3437455522a00a30718cdedb5", size = 3373542, upload-time = "2026-01-05T10:40:52.803Z" }, +] + +[[package]] +name = "torch" +version = "2.14.1" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version < '3.11'", +] +dependencies = [ + { name = "cuda-bindings", version = "13.4.4", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" }, + { name = "cuda-toolkit", version = "13.0.3.0", source = { registry = "https://pypi.org/simple" }, extra = ["cublas", "cudart", "cufft", "cufile", "cupti", "curand", "cusolver", "cusparse", "nvjitlink", "nvrtc", "nvtx"], marker = "sys_platform == 'linux'" }, + { name = "filelock", version = "4.1.0", source = { registry = "https://pypi.org/simple" } }, + { name = "fsspec" }, + { name = "jinja2" }, + { name = "networkx", version = "3.4.2", source = { registry = "https://pypi.org/simple" } }, + { name = "nvidia-cudnn-cu13", version = "9.24.0.43", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" }, + { name = "nvidia-cusparselt-cu13", marker = "sys_platform == 'linux'" }, + { name = "nvidia-nccl-cu13", marker = "sys_platform == 'linux'" }, + { name = "nvidia-nvshmem-cu13", version = "3.4.5", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" }, + { name = "setuptools" }, + { name = "sympy" }, + { name = "triton", version = "3.8.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" }, + { name = "typing-extensions" }, +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/7a/45/b0c389051ed02d77227202caf2c2abb1706ca4362781eb79bd6707359970/torch-2.14.1-cp310-cp310-macosx_14_0_arm64.whl", hash = "sha256:e24b9815001d18e73e76eae1ea25f8ef908c6103e857378ad20f8f6cf5c954f5", size = 127249640, upload-time = "2026-09-30T17:43:48.426Z" }, + { url = "https://files.pythonhosted.org/packages/95/b3/fcbd9ff6ef8a0c318275e613b085d0c49b4fd549fa25bf62496b10a540e8/torch-2.14.1-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:957df236525bcd940ccd9ca59074e9821182171253417c0d98e7b82647254799", size = 453974659, upload-time = "2026-09-30T17:44:21.385Z" }, + { url = "https://files.pythonhosted.org/packages/54/91/365b45c4c8a16c7c398354b341273d15cdbd01c9feeadac16a02ce070b27/torch-2.14.1-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:1fee6b20869a90ccec05e35559a706338ac8aab40a9c4fb58f16667e93af36ae", size = 554550266, upload-time = "2026-09-30T17:44:37.477Z" }, + { url = "https://files.pythonhosted.org/packages/48/88/28360126b07082ce4ab96a1bf8547595d06d6fea5eaffdfc7d2b56459e79/torch-2.14.1-cp310-cp310-win_amd64.whl", hash = "sha256:9ee7d50ec80ae5b4258cafc0ea108711988d961f21d0a68cf685650da2812e5f", size = 124096027, upload-time = "2026-09-30T17:43:53.513Z" }, + { url = "https://files.pythonhosted.org/packages/5d/9b/fd1cd143a7bda5abc1fc352ed7b431f6f52aa3c454293211a33656db2cb5/torch-2.14.1-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:b6074b130fd26bc50f5d171f07dfed70db22dd0c354ab34767729249f9e0f042", size = 127281154, upload-time = "2026-09-30T17:43:58.328Z" }, + { url = "https://files.pythonhosted.org/packages/8d/0e/21281ff4015779255229f487f4481c5bfba53b8c83e01eaa4a8a8f1180c9/torch-2.14.1-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:ef1276fd07adb8d463ac402a24ea7482e45c9a42df8ebdac211aa757779200ba", size = 453982557, upload-time = "2026-09-30T17:44:52.656Z" }, + { url = "https://files.pythonhosted.org/packages/aa/4f/7af6fbada912b3023cc79b6ab30f89234b258a9a373880ea52ed914a2ae9/torch-2.14.1-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:305a61f61f35f128579f299c5bd33d475f6a01c6307336139632e30856c4854d", size = 554581699, upload-time = "2026-09-30T17:49:10.777Z" }, + { url = "https://files.pythonhosted.org/packages/fe/54/4e0a71376b2fb15aaf65ed9e6a4c8043d36f554338c6daabc63059a5e157/torch-2.14.1-cp311-cp311-win_amd64.whl", hash = "sha256:0bd2fb0c4098856bc5af59fe5988bf38bdbcdb6550b44273c12ae425cb8ec17e", size = 124096268, upload-time = "2026-09-30T17:44:04.362Z" }, + { url = "https://files.pythonhosted.org/packages/4b/3c/379349820e9a6e713826de3d0b88f07728541bdcabe2a3afd128871cdc4b/torch-2.14.1-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:420dbf314c180ee4b86e9bc00aee5746a7d6e5bacdd7df925af671ed393f0b2e", size = 127307099, upload-time = "2026-09-30T17:44:10.421Z" }, + { url = "https://files.pythonhosted.org/packages/a4/3e/474930ab971e306957ec763b7df695d659179e15ccab9e7073d47ae14ce8/torch-2.14.1-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:0b13acde294b401509830d85a8906cbf2fc97425a12a66cce1d9fa13c5106a2a", size = 453998918, upload-time = "2026-09-30T17:52:45.134Z" }, + { url = "https://files.pythonhosted.org/packages/ba/fd/c470857d0dfc5d4c94430658b3eed60fd5292b0bf596a8aae7b9fd66d674/torch-2.14.1-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:23011fe29a99b591eabb3a31a25080c62e2c2f0690a3c798744e5489dae50451", size = 554618695, upload-time = "2026-09-30T17:53:06.8Z" }, + { url = "https://files.pythonhosted.org/packages/ad/1a/b9648b0d228e513f69f8453ec3f90a8d436d78ff6d85a2773e539f0c07cf/torch-2.14.1-cp312-cp312-win_amd64.whl", hash = "sha256:38bee9f2a2ccfc6898172a5075e4ba52522fbe143eeb099674fc67ab390e858d", size = 124113906, upload-time = "2026-09-30T17:52:21.377Z" }, +] + +[[package]] +name = "torch" +version = "2.15.0" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.12'", + "python_full_version == '3.11.*'", +] +dependencies = [ + { name = "cuda-bindings", version = "13.5.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" }, + { name = "cuda-toolkit", version = "13.2.2", source = { registry = "https://pypi.org/simple" }, extra = ["cublas", "cudart", "cufft", "cufile", "cupti", "cusolver", "cusparse", "nvjitlink", "nvrtc", "nvtx"], marker = "sys_platform == 'linux'" }, + { name = "filelock", version = "4.3.2", source = { registry = "https://pypi.org/simple" } }, + { name = "fsspec" }, + { name = "jinja2" }, + { name = "networkx", version = "3.6.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.12'" }, + { name = "networkx", version = "3.7", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.12'" }, + { name = "nvidia-cudnn-cu13", version = "9.26.0.51", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" }, + { name = "nvidia-cusparselt-cu13", marker = "sys_platform == 'linux'" }, + { name = "nvidia-nccl-cu13", marker = "sys_platform == 'linux'" }, + { name = "nvidia-nvshmem-cu13", version = "3.7.2", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" }, + { name = "setuptools" }, + { name = "sympy" }, + { name = "triton", version = "3.9.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" }, + { name = "typing-extensions" }, +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/2d/a5/fa947e2bbb072933f8c0ad5e02bd11126bcfc2b624fe234ac29a7b63600c/torch-2.15.0-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:e808b63d616a43b326e1a5677d45a2e5babe7a8ce27edb03ddb48e7dd9b6d663", size = 138527954, upload-time = "2026-10-28T15:16:30.29Z" }, + { url = "https://files.pythonhosted.org/packages/8c/06/439e6434bef959507463fa3fd21c580304f3798ea06ab3e932ef908cff1d/torch-2.15.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:58ce2ebfb3430941353109a85be63ee8e941da22f13daa2c43344eeb51c81e06", size = 483605887, upload-time = "2026-10-28T15:16:55.208Z" }, + { url = "https://files.pythonhosted.org/packages/06/7d/57b7f46934e1148b436889e385693bfcb94ae047b3fe0b6015922e3b66f7/torch-2.15.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:48c2d861134c0b5697c7602cb5ffa68f62a2989fdcd1717e593356f67996ca1e", size = 539136850, upload-time = "2026-10-28T15:17:10.346Z" }, + { url = "https://files.pythonhosted.org/packages/d1/7e/7f1252812e8048bc24f203fc0757a251f26af797b4ff986e19046e2b5f73/torch-2.15.0-cp311-cp311-win_amd64.whl", hash = "sha256:d2c5938f593a47cf6d151a16d130a3cc3f0c105df1b905a571efc00b01e38c1f", size = 126720349, upload-time = "2026-10-28T15:16:25.498Z" }, + { url = "https://files.pythonhosted.org/packages/17/24/7b9b755e8c4dd2395c6a94bab6a4ed8aded1735ff2538bc63cbba8abeddd/torch-2.15.0-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:593e5fd0c204284890d1c3dff643be34e549e1d24523e13402510f960d4da438", size = 138558517, upload-time = "2026-10-28T15:16:35.918Z" }, + { url = "https://files.pythonhosted.org/packages/56/c9/ac253c63f13212393483bfa6c180b684c8e5437960c06ec9292797e09357/torch-2.15.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:9e51cf9460c5441dcd2a4f31ece207e35ea7c3d2535be0f929cca4944e2eeb18", size = 483664949, upload-time = "2026-10-28T15:17:27.418Z" }, + { url = "https://files.pythonhosted.org/packages/42/43/612036bf387d34afff1ec77d3aabe0d16776f1727b00b8bc4540fe5472b1/torch-2.15.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:6d8c86f4e33a9f12a58149bd9b0d64351632b8eb44479be8ff85e5389932dd79", size = 539172785, upload-time = "2026-10-28T15:17:47.95Z" }, + { url = "https://files.pythonhosted.org/packages/74/0b/a57c0b58a64b7a197dc40fc464bb96c0de867f95a2b1cbb3ec9e54414fde/torch-2.15.0-cp312-cp312-win_amd64.whl", hash = "sha256:f2bd0a3709a7493a6ef2ac5a654111242a854439f7558f910b6b653b56f7504d", size = 126738207, upload-time = "2026-10-28T15:16:40.586Z" }, +] + +[[package]] +name = "torchaudio" +version = "2.11.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "torch", version = "2.14.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, + { name = "torch", version = "2.15.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/95/2a/c2b0f44906f8a4e8d90facdf68bc76bb14e72a0cbb9cc0457ca1c2fcd101/torchaudio-2.11.1-py3-none-macosx_14_0_arm64.whl", hash = "sha256:917667ab3e357d286b0e2405a33dc538e4344d554b72e1b2b03382a4352ca857", size = 699189, upload-time = "2026-10-28T15:21:42.129Z" }, + { url = "https://files.pythonhosted.org/packages/90/c7/e352c0a0f34653f3f6a581b580352ab1c83e5d04019826ade4dfc26cf664/torchaudio-2.11.1-py3-none-manylinux_2_28_aarch64.whl", hash = "sha256:ad1175202b5cdb7585a38c1330845430e128c4ed8ceb770639318aa40fc1994b", size = 1678033, upload-time = "2026-10-28T15:21:43.28Z" }, + { url = "https://files.pythonhosted.org/packages/e6/ad/b0bf9bfa9db80acf0ce660e01a67b3b735343ab51ce1410b18d2aaed254c/torchaudio-2.11.1-py3-none-manylinux_2_28_x86_64.whl", hash = "sha256:0173b5b51e1368aa88de3cbe4e98508b5e9df4d8d59356c4e1fbc830c96191ef", size = 1816417, upload-time = "2026-10-28T15:21:45.007Z" }, + { url = "https://files.pythonhosted.org/packages/6b/9e/549c9bb2d139fe78c90c9381f9ffbfc87232336df4537a65ea31d51fcdee/torchaudio-2.11.1-py3-none-win_amd64.whl", hash = "sha256:46ea71634d181f797370f046075ea982043c228b38d674fd7d9fc1c855a37b6a", size = 334360, upload-time = "2026-10-28T15:21:40.715Z" }, +] + +[[package]] +name = "tqdm" +version = "4.70.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama", marker = "sys_platform == 'win32'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/0d/ea/b2a5bd54b28a324dae8211928b2d730b6547500342c7e6c6dea08bd0a485/tqdm-4.70.1.tar.gz", hash = "sha256:cefd0eca11b2a37a3aee776544d4f4ae913f02688135b5556b8788dfa474afc4", size = 171846, upload-time = "2026-09-11T07:25:16.601Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a7/03/921a3d3c75785aca9ebfbfcabfbc3a1be12e2ab5265deb026d55a5a3f83e/tqdm-4.70.1-py3-none-any.whl", hash = "sha256:c293e525e6fef9c20e8728fd4612df02a0aa31bb5fe91ecd93e123b1b7bffa73", size = 80199, upload-time = "2026-09-11T07:25:14.599Z" }, +] + +[[package]] +name = "transcribe-gigaam-v4-env" +version = "0.1.0" +source = { virtual = "." } +dependencies = [ + { name = "gguf" }, + { name = "huggingface-hub" }, + { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, + { name = "numpy", version = "2.4.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version == '3.11.*'" }, + { name = "numpy", version = "2.5.5", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.12'" }, + { name = "omegaconf" }, + { name = "safetensors" }, + { name = "sentencepiece" }, + { name = "soundfile" }, + { name = "torch", version = "2.14.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, + { name = "torch", version = "2.15.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, + { name = "torchaudio" }, + { name = "tqdm" }, + { name = "transformers" }, +] + +[package.metadata] +requires-dist = [ + { name = "gguf", specifier = ">=0.10" }, + { name = "huggingface-hub", specifier = ">=0.30" }, + { name = "numpy", specifier = ">=1.26,<3" }, + { name = "omegaconf", specifier = ">=2.3" }, + { name = "safetensors", specifier = ">=0.4" }, + { name = "sentencepiece", specifier = ">=0.2" }, + { name = "soundfile", specifier = ">=0.12" }, + { name = "torch", specifier = ">=2.6" }, + { name = "torchaudio", specifier = ">=2.6" }, + { name = "tqdm" }, + { name = "transformers", specifier = ">=4.57,<5" }, +] + +[[package]] +name = "transformers" +version = "4.57.6" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "filelock", version = "4.1.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, + { name = "filelock", version = "4.3.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, + { name = "huggingface-hub" }, + { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, + { name = "numpy", version = "2.4.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version == '3.11.*'" }, + { name = "numpy", version = "2.5.5", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.12'" }, + { name = "packaging" }, + { name = "pyyaml" }, + { name = "regex", version = "2026.9.29", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, + { name = "regex", version = "2026.11.25", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, + { name = "requests" }, + { name = "safetensors" }, + { name = "tokenizers" }, + { name = "tqdm" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/c4/35/67252acc1b929dc88b6602e8c4a982e64f31e733b804c14bc24b47da35e6/transformers-4.57.6.tar.gz", hash = "sha256:55e44126ece9dc0a291521b7e5492b572e6ef2766338a610b9ab5afbb70689d3", size = 10134912, upload-time = "2026-01-16T10:38:39.284Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/03/b8/e484ef633af3887baeeb4b6ad12743363af7cce68ae51e938e00aaa0529d/transformers-4.57.6-py3-none-any.whl", hash = "sha256:4c9e9de11333ddfe5114bc872c9f370509198acf0b87a832a0ab9458e2bd0550", size = 11993498, upload-time = "2026-01-16T10:38:31.289Z" }, +] + +[[package]] +name = "triton" +version = "3.8.0" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version < '3.11'", +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/0c/ae/6b01bdd0dc082e190f5b04aa70fa955f968ac3fc70fd71dde71aeb835a8f/triton-3.8.0-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:398f4b009c7ab08ed9aeb1d1282dee822945b53f399a5e12a4fecb643cf2007d", size = 226352592, upload-time = "2026-08-28T16:07:49.055Z" }, + { url = "https://files.pythonhosted.org/packages/65/65/18d0871f353eb170b0b9c562cd65f6ab9619b6e7b8aaecea9709e9ad16a6/triton-3.8.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6d914c52f89dc942b1819db959e7c07a5999f678ec760f677625c706b7e0d743", size = 247838081, upload-time = "2026-08-28T15:55:34.877Z" }, + { url = "https://files.pythonhosted.org/packages/a3/cf/d21c9b1a4d1df9ba3aed218069f24f762a4b9565c5a362bef6f110c08e72/triton-3.8.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:372285307d4c44ee74cee32de0b4f04bd157e071427e38c6f4ee3e3beb2194f4", size = 226467015, upload-time = "2026-08-28T16:08:05.871Z" }, + { url = "https://files.pythonhosted.org/packages/6f/9a/2c3d3823726d5ad5359f7065b02b984925158b74611c1e3987f6a37461fb/triton-3.8.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:68988ac85d5e7086baeda0ddc175af9667db7529b3c5e11a5c0601b8bef2200a", size = 247945226, upload-time = "2026-08-28T15:55:43.795Z" }, + { url = "https://files.pythonhosted.org/packages/87/07/0f8cd8e8db0472334253efdaaab3d0819fea27aa99bf0e7f1aeea4ceb5ae/triton-3.8.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a9c404c69ed4a39e8ec632eaf6b9fe058a060bf98979c177f6ef666f06bb8d50", size = 226474486, upload-time = "2026-08-28T16:08:18.29Z" }, + { url = "https://files.pythonhosted.org/packages/c1/09/b7012e5bfae67640f268aa584caa80fe1674f6b0da949046b679972c33e3/triton-3.8.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e91ffa46d095b252248297292dd22bcbacd53a125a0c2eefbbbf74925a320bc3", size = 247972921, upload-time = "2026-08-28T15:55:53.157Z" }, +] + +[[package]] +name = "triton" +version = "3.9.0" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.12'", + "python_full_version == '3.11.*'", +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/4a/0e/a2176f4ddc2a0c77796d7834cd9bb088cdba4d89e080716b36970dce4ad0/triton-3.9.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:feaaec13578ca84301d561d034cb08b3ae293d7f0b7ab6b8ddbb2d6796363716", size = 263373771, upload-time = "2026-10-27T18:38:49.077Z" }, + { url = "https://files.pythonhosted.org/packages/05/73/51e1466f2941ed36dbe57d1f88f772ba6afe669e5ba1e24eaf148b7ec0e1/triton-3.9.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1622118a038b0c6e16fa4a0305da62c8b3c15904ee1cc4d4e65846a25969e41e", size = 285777556, upload-time = "2026-10-27T18:28:00.919Z" }, + { url = "https://files.pythonhosted.org/packages/c2/7f/79490a3e16cbda1817f00ad6d05694020f1decb1e063f96e83d1cfd2558d/triton-3.9.0-cp312-abi3-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5542f4328472fd827dbb1ec43873364c2894682cc3f5d1c74a643762900e243e", size = 263270508, upload-time = "2026-10-27T18:39:01.187Z" }, + { url = "https://files.pythonhosted.org/packages/3f/c9/af85b25e0d98bd921a7646ad1db1c8746250ee04b8f1595982d29b6283cf/triton-3.9.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5e52ab4e2f1d64f0ac494c9aa723697b793f81a91c4cae4c36608ca0bc4267bf", size = 285674620, upload-time = "2026-10-27T18:28:11.992Z" }, +] + +[[package]] +name = "typing-extensions" +version = "4.16.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f6/cc/6253133b5bb138fc3306cebfbda2c520f545d36b5be2c7255cc528bb45d6/typing_extensions-4.16.0.tar.gz", hash = "sha256:dc983d19a509c94dba722ee6abd33940f7c05a89e243c47e907eb4db6f1a43e5", size = 113555, upload-time = "2026-07-02T08:40:05.92Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/49/d3/b8441a820a491ddfc024b0b0cf0393375b75ea13866d9c66727e54c2fc80/typing_extensions-4.16.0-py3-none-any.whl", hash = "sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8", size = 45571, upload-time = "2026-07-02T08:40:04.659Z" }, +] + +[[package]] +name = "urllib3" +version = "2.8.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e3/05/b17359e1cefb4f909b5e40b1b90a496d987258916dbbf88e842c729f510e/urllib3-2.8.0.tar.gz", hash = "sha256:63bf2ead4c879426ebf22ef2a781eeb4aa3b4ae798a0435506f8687fd5bb9b63", size = 458972, upload-time = "2026-09-15T19:29:36.253Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/92/9d/c4e665119135114480843e7ab388fa94d8480650450e6f8e26b70d323a4c/urllib3-2.8.0-py3-none-any.whl", hash = "sha256:0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3", size = 135717, upload-time = "2026-09-15T19:29:34.577Z" }, +] diff --git a/scripts/lib/gigaam_v4_hf.py b/scripts/lib/gigaam_v4_hf.py new file mode 100644 index 000000000..d27147db9 --- /dev/null +++ b/scripts/lib/gigaam_v4_hf.py @@ -0,0 +1,117 @@ +"""Where GigaAM-v4 comes from, and how to build its PyTorch reference. + +GigaAM-v4 replaces the v3 Conformer with a Zapformer encoder. The `gigaam` +package pinned in scripts/envs/gigaam (salute-developers/GigaAM 6e4b027c) +has no Zapformer, so v4 does not go through scripts/lib/gigaam_hf.py. The +Hugging Face repo ships its own `modeling_gigaam.py` (the transformers +remote-code module), `config.json`, `model.safetensors` and both +SentencePiece tokenizers; the reference is `GigaAMDualASR` from that module +at the pinned commit, built locally without `trust_remote_code` or any +download besides the snapshot itself. + +The converter (scripts/convert-gigaam-v4.py), the reference dumper +(scripts/dump_reference_gigaam_v4_hf.py) and the golden manifest +tests/golden/gigaam/gigaam-v4-e2e-rnnt.manifest.json name the same commit. +""" + +from __future__ import annotations + +import importlib.util +import json +import os +import sys +from pathlib import Path + +REPO_ID = "ai-sage/GigaAM-v4" +# main, "Add GigaAM-v4: ru-en, streaming, onnx" (2026-11-27). +REVISION = "180301a192bb45bc2b2ca122e0d4aab24ffe7a96" + +# Files the converter and the reference read; the snapshot download is +# limited to them so the VAD weights (vad.safetensors) are not fetched. +SNAPSHOT_FILES = [ + "config.json", + "model.safetensors", + "modeling_gigaam.py", + "e2e_tokenizer.model", + "raw_tokenizer.model", +] + +# RNN-T heads in the dual checkpoint. `e2e` emits cased, punctuated text; +# `raw` emits lowercase text without punctuation. +HEADS = ("e2e", "raw") + + +def check_revision(revision: str | None) -> None: + """Raise ValueError when `revision` (e.g. a golden manifest's + `source_model.hf_revision`) differs from the pin.""" + if revision is not None and revision != REVISION: + raise ValueError( + f"revision {revision} differs from the commit pinned in " + f"scripts/lib/gigaam_v4_hf.py, {REVISION}. Change the pin and the " + f"golden manifest together." + ) + + +def snapshot_dir(revision: str | None = None) -> Path: + """Download (or reuse) the pinned snapshot and return its directory.""" + check_revision(revision) + from huggingface_hub import snapshot_download + + from lib.gguf_common import slug_from_repo_id + + models_root = os.environ.get("TRANSCRIBE_MODELS_DIR") + local_dir = None + if models_root: + local_dir = Path(models_root) / f"{slug_from_repo_id(REPO_ID)}@{REVISION}" + local_dir.mkdir(parents=True, exist_ok=True) + print(f"Downloading {REPO_ID}@{REVISION} from Hugging Face...") + return Path(snapshot_download( + repo_id=REPO_ID, + revision=REVISION, + allow_patterns=SNAPSHOT_FILES, + local_dir=str(local_dir) if local_dir is not None else None, + )) + + +def import_modeling(path: Path): + """Import `modeling_gigaam.py` from a snapshot directory as a module.""" + spec = importlib.util.spec_from_file_location("gigaam_v4_modeling", path / "modeling_gigaam.py") + if spec is None or spec.loader is None: + raise ImportError(f"cannot import {path / 'modeling_gigaam.py'}") + module = importlib.util.module_from_spec(spec) + # dataclasses resolve string annotations through sys.modules. + sys.modules[spec.name] = module + spec.loader.exec_module(module) + return module + + +def load_model(path: Path, device: str = "cpu"): + """Build GigaAMDualASR in F32 and eval mode from a snapshot directory. + + Mirrors GigaAMModel.__init__ / from_pretrained in modeling_gigaam.py + without transformers' loader: the tokenizer paths point into `path`, + and the safetensors keys lose the `model.` prefix the wrapper adds. + """ + import torch + from omegaconf import OmegaConf + from safetensors.torch import load_file + + modeling = import_modeling(path) + config = json.loads((path / "config.json").read_text(encoding="utf-8")) + cfg = OmegaConf.create(config["cfg"]) + for decoding in cfg.decodings.values(): + decoding.model_path = str(path / Path(decoding.model_path).name) + model = modeling.GigaAMDualASR(cfg) + + state = load_file(str(path / "model.safetensors")) + state = {k.removeprefix("model."): v for k, v in state.items()} + missing, unexpected = model.load_state_dict(state, strict=False) + # The RoPE tables are computed buffers; anything else unmatched means + # the module and the checkpoint disagree. + missing = [k for k in missing if "rope_bank" not in k] + unexpected = [k for k in unexpected if "rope_bank" not in k] + if missing or unexpected: + raise RuntimeError( + f"state dict mismatch: missing={missing[:8]} unexpected={unexpected[:8]}" + ) + return model.float().to(torch.device(device)).eval(), modeling diff --git a/scripts/test_convert_gigaam.py b/scripts/test_convert_gigaam.py index e0fc92b90..7a3217b79 100644 --- a/scripts/test_convert_gigaam.py +++ b/scripts/test_convert_gigaam.py @@ -30,6 +30,8 @@ _SCRIPTS = Path(__file__).resolve().parent _GOLDEN = _SCRIPTS.parent / "tests" / "golden" / "gigaam" +_AUTHOR_DUMPER = "scripts/dump_reference_gigaam_author.py" + _spec = importlib.util.spec_from_file_location("convert_gigaam", _SCRIPTS / "convert-gigaam.py") convert_gigaam = importlib.util.module_from_spec(_spec) _spec.loader.exec_module(convert_gigaam) @@ -54,6 +56,9 @@ def test_every_profile_matches_the_variant_key_and_languages_of_its_golden_manif manifests = {} for path in sorted(_GOLDEN.glob("*.manifest.json")): m = json.loads(path.read_text(encoding="utf-8")) + # GigaAM-v4 has its own converter and reference (GigaamV4PinTest). + if m["reference"]["entrypoint"] != _AUTHOR_DUMPER: + continue manifests[m["variant"]] = (m["reference"]["variant_key"], m["capabilities"]["languages"]) profiles = { slug: (p["variant_key"], p["languages"]) @@ -62,6 +67,17 @@ def test_every_profile_matches_the_variant_key_and_languages_of_its_golden_manif self.assertEqual(profiles, manifests) +class GigaamV4PinTest(unittest.TestCase): + def test_the_v4_manifest_names_the_pinned_repo_and_commit(self): + from lib.gigaam_v4_hf import REPO_ID, REVISION + + m = json.loads((_GOLDEN / "gigaam-v4-e2e-rnnt.manifest.json").read_text(encoding="utf-8")) + self.assertEqual( + (m["source_model"]["hf_repo"], m["source_model"]["hf_revision"], m["reference"]["revision"]), + (REPO_ID, REVISION, REVISION), + ) + + class MainTest(unittest.TestCase): def run_main(self, model: str, slug: str) -> tuple[int, str, list]: """Run main() with convert() replaced, and return the exit code, diff --git a/scripts/wer/run_reference_gigaam_v4_hf.py b/scripts/wer/run_reference_gigaam_v4_hf.py new file mode 100644 index 000000000..172766c70 --- /dev/null +++ b/scripts/wer/run_reference_gigaam_v4_hf.py @@ -0,0 +1,154 @@ +#!/usr/bin/env python3 +""" +run_reference_gigaam_v4_hf.py — GigaAM-v4 PyTorch batch transcribe. + +Builds GigaAMDualASR once through scripts/lib/gigaam_v4_hf.py, the loader +the reference dumper uses, and runs the same offline forward and greedy +RNN-T decode as scripts/dump_reference_gigaam_v4_hf.py over a WER manifest. +Writes run.py-compatible JSONL so scripts/wer/score.py can score the output +the same way it scores the C++ port's report. + +The model runs in F32 on CPU, as in the reference dumps. Each clip is +decoded whole (no VAD segmentation; FLEURS clips are under 30 s). + +Usage (from repo root): + + uv run --project scripts/envs/gigaam-v4 \\ + scripts/wer/run_reference_gigaam_v4_hf.py \\ + --variant v4_e2e_rnnt \\ + --manifest samples/wer/fleurs-ru.manifest.jsonl \\ + --out reports/wer/gigaam-v4-e2e-rnnt-REF.fleurs-ru.jsonl +""" + +from __future__ import annotations + +import argparse +import json +import sys +import time +from pathlib import Path + +sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) # repo scripts/ +from lib.gigaam_v4_hf import REPO_ID, REVISION, load_model, snapshot_dir # noqa: E402 + +# variant key -> RNN-T head of the dual checkpoint (same as the dumper). +VARIANT_HEADS = {"v4_e2e_rnnt": "e2e"} + + +def main() -> int: + p = argparse.ArgumentParser( + description=__doc__, + formatter_class=argparse.RawDescriptionHelpFormatter, + ) + p.add_argument("--manifest", type=Path, required=True, + help="Input manifest JSONL (id/audio/ref_text).") + p.add_argument("--out", type=Path, required=True, + help="Output JSONL path (run.py-compatible).") + p.add_argument("--variant", required=True, choices=sorted(VARIANT_HEADS), + help="GigaAM-v4 variant key.") + p.add_argument("--torch-threads", type=int, default=1, + help="torch intra-op threads for deterministic runs.") + p.add_argument("--limit", type=int, default=0, + help="Process only the first N utterances (0 = all).") + args = p.parse_args() + + if not args.manifest.exists(): + print(f"error: manifest not found: {args.manifest}", file=sys.stderr) + return 2 + + args.out.parent.mkdir(parents=True, exist_ok=True) + + import soundfile as sf + import torch + if args.torch_threads > 0: + torch.set_num_threads(args.torch_threads) + + head_name = VARIANT_HEADS[args.variant] + t0 = time.monotonic() + model, _ = load_model(snapshot_dir()) + head = model.heads[head_name] + decoding = model.decodings[head_name] + load_ms = (time.monotonic() - t0) * 1000 + + with open(args.manifest) as f: + manifest = [json.loads(line) for line in f if line.strip()] + if args.limit > 0: + manifest = manifest[: args.limit] + total = len(manifest) + print(f"manifest: {args.manifest} ({total} utterances)") + print(f"output: {args.out}") + + n_done = 0 + n_errors = 0 + t_loop = time.monotonic() + + with open(args.out, "w") as fout: + fout.write(json.dumps({ + "type": "batch_header", + "load_ms": round(load_ms, 1), + "framework": "hf_modeling_gigaam", + "model": f"{REPO_ID}:{args.variant}", + "model_revision": REVISION, + "head": head_name, + "torch_threads": args.torch_threads, + }) + "\n") + fout.flush() + + for entry in manifest: + uid = entry["id"] + ref_text = entry.get("ref_text", "") + + t_start = time.monotonic() + err = "" + hyp_text = "" + try: + pcm, sr = sf.read(entry["audio"], dtype="float32", always_2d=False) + if sr != 16000 or pcm.ndim != 1: + raise ValueError(f"expected 16 kHz mono, got sr={sr} shape={pcm.shape}") + wav = torch.from_numpy(pcm).unsqueeze(0) + length = torch.full([1], wav.shape[-1], dtype=torch.long) + with torch.inference_mode(): + feats, feat_lengths = model.preprocessor(wav, length) + encoded, encoded_len = model.encoder(feats, feat_lengths) + hyp_text = decoding.decode(head, encoded, encoded_len)[0][0] + except Exception as e: + err = f"{type(e).__name__}: {e}" + n_errors += 1 + + elapsed_ms = round((time.monotonic() - t_start) * 1000, 1) + rec = { + "id": uid, + "ref_text": ref_text, + "hyp_text": hyp_text.strip(), + "raw_text": hyp_text, + "mel_ms": 0, + "encode_ms": 0, + "decode_ms": elapsed_ms, + "latency_ms": elapsed_ms, + "error": err, + } + fout.write(json.dumps(rec) + "\n") + fout.flush() + n_done += 1 + + if n_done % 25 == 0 or n_done == total: + wall = time.monotonic() - t_loop + rate = n_done / wall if wall > 0 else 0 + eta = (total - n_done) / rate if rate > 0 else 0 + print( + f" [{n_done}/{total}] {rate:.2f} utt/s, " + f"ETA {eta/60:.1f} min, errors={n_errors}", + flush=True, + ) + + wall = time.monotonic() - t_loop + print( + f"\ndone. {n_done} utterances in {wall:.1f}s " + f"({n_done / wall:.2f} utt/s), {n_errors} errors" + ) + print(f"report: {args.out}") + return 0 if n_errors == 0 else 1 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/src/arch/gigaam/encoder.cpp b/src/arch/gigaam/encoder.cpp index 01ccf462c..fb3f0f333 100644 --- a/src/arch/gigaam/encoder.cpp +++ b/src/arch/gigaam/encoder.cpp @@ -286,7 +286,8 @@ ggml_tensor * zap_rms_norm(ggml_context * ctx, ggml_tensor * x, ggml_tensor * w) } ggml_tensor * zap_causal_time_pad(ggml_context * ctx, ggml_tensor * x, int64_t pad_top) { - ggml_tensor * z = ggml_fill(ctx, ggml_new_tensor_4d(ctx, GGML_TYPE_F32, x->ne[0], pad_top, x->ne[2], x->ne[3]), 0.0f); + ggml_tensor * z = + ggml_fill(ctx, ggml_new_tensor_4d(ctx, GGML_TYPE_F32, x->ne[0], pad_top, x->ne[2], x->ne[3]), 0.0f); return ggml_concat(ctx, z, x, /*dim=*/1); } @@ -356,19 +357,19 @@ ggml_tensor * build_zapformer_attn(ggml_context * ctx, float rope_base, bool use_flash, ggml_tensor * attn_mask) { - const int H = shp.n_heads; - const int qdim = shp.qdim; - const int vdim = shp.vdim; - const int dq = H * qdim; - const int dv = H * vdim; - const int64_t T_s = x_qk->ne[1]; - const int64_t B = x_qk->ne[2]; + const int H = shp.n_heads; + const int qdim = shp.qdim; + const int vdim = shp.vdim; + const int dq = H * qdim; + const int dv = H * vdim; + const int64_t T_s = x_qk->ne[1]; + const int64_t B = x_qk->ne[2]; const float scale = 1.0f / std::sqrt(static_cast(qdim)); ggml_tensor * qk_norm = zap_rms_norm(ctx, x_qk, lw.attn_in_norm_w); ggml_tensor * qk = ggml_add(ctx, ggml_mul_mat(ctx, lw.attn_qk_in_w, qk_norm), lw.attn_qk_in_b); - ggml_tensor * q = ggml_cont(ctx, ggml_view_3d(ctx, qk, dq, T_s, B, qk->nb[1], qk->nb[2], 0)); - ggml_tensor * k = ggml_cont(ctx, ggml_view_3d(ctx, qk, dq, T_s, B, qk->nb[1], qk->nb[2], dq * qk->nb[0])); + ggml_tensor * q = ggml_cont(ctx, ggml_view_3d(ctx, qk, dq, T_s, B, qk->nb[1], qk->nb[2], 0)); + ggml_tensor * k = ggml_cont(ctx, ggml_view_3d(ctx, qk, dq, T_s, B, qk->nb[1], qk->nb[2], dq * qk->nb[0])); // Standard interleaved RoPE (GGML_ROPE_TYPE_NORMAL = 0) on [qdim, H, T_s, B]. q = ggml_reshape_4d(ctx, q, qdim, H, T_s, B); @@ -378,7 +379,7 @@ ggml_tensor * build_zapformer_attn(ggml_context * ctx, k = ggml_rope_ext(ctx, k, positions, nullptr, qdim, GGML_ROPE_TYPE_NORMAL, 0, rope_base, 1.0f, 0.0f, 1.0f, 32.0f, 1.0f); - ggml_tensor * vg = ggml_add(ctx, ggml_mul_mat(ctx, lw.attn_vg_in_w, x_vg), lw.attn_vg_in_b); + ggml_tensor * vg = ggml_add(ctx, ggml_mul_mat(ctx, lw.attn_vg_in_w, x_vg), lw.attn_vg_in_b); ggml_tensor * v_raw = ggml_cont(ctx, ggml_view_3d(ctx, vg, dv, T_s, B, vg->nb[1], vg->nb[2], 0)); ggml_tensor * g_in = ggml_cont(ctx, ggml_view_3d(ctx, vg, dv, T_s, B, vg->nb[1], vg->nb[2], dv * vg->nb[0])); ggml_tensor * g_out = ggml_cont(ctx, ggml_view_3d(ctx, vg, dv, T_s, B, vg->nb[1], vg->nb[2], 2 * dv * vg->nb[0])); @@ -556,6 +557,13 @@ EncoderBuild build_zapformer_encoder_graph(ggml_context * ctx, } x = ggml_add(ctx, stack_res, ggml_mul_mat(ctx, sw.proj_out_w, bypass)); + { + char nm[32]; + std::snprintf(nm, sizeof(nm), "enc.stage.%zu.out", s); + ggml_set_name(x, nm); + eb.dumps.zap_stage_outs.push_back(x); + transcribe::debug::mark_tensor_for_dump(x); + } if (ds > 1) { x = ggml_reshape_3d(ctx, x, d_model, T_pad, 1); } diff --git a/src/arch/gigaam/encoder.h b/src/arch/gigaam/encoder.h index 4a1c7670d..6a02b99ee 100644 --- a/src/arch/gigaam/encoder.h +++ b/src/arch/gigaam/encoder.h @@ -37,6 +37,10 @@ struct EncoderDumps { // Block-0 sub-step taps (batch-drift localization). ggml_tensor * block0_after_attn = nullptr; ggml_tensor * block0_after_conv = nullptr; + // Zapformer stage outputs before the frame unstacking, ne=[ds * d_model, + // T_pad / ds, 1] = PyTorch ZapformerStack output (1, T_pad / ds, ds * D). + // Dumped as `enc.stage..out`; empty for the Conformer encoder. + std::vector zap_stage_outs; }; struct EncoderBuild { diff --git a/src/arch/gigaam/model.cpp b/src/arch/gigaam/model.cpp index 543a1e298..91b361b7f 100644 --- a/src/arch/gigaam/model.cpp +++ b/src/arch/gigaam/model.cpp @@ -397,6 +397,11 @@ transcribe_status encode_mel_slice(GigaamSession * gc, std::snprintf(nm, sizeof(nm), "enc.block.%d.out", eb.dumps.last_block_idx); transcribe::debug::dump_tensor(nm, eb.dumps.last_block_out, "encoder.block.last"); } + for (size_t s = 0; s < eb.dumps.zap_stage_outs.size(); ++s) { + char nm[32]; + std::snprintf(nm, sizeof(nm), "enc.stage.%zu.out", s); + transcribe::debug::dump_tensor(nm, eb.dumps.zap_stage_outs[s], "encoder.stage"); + } if (eb.dumps.final_out) { transcribe::debug::dump_tensor("enc.out", eb.dumps.final_out, "encoder.out"); } @@ -569,6 +574,16 @@ transcribe_status run(transcribe_session * session, const float * pcm, int n_sam return decode_and_populate(gc, gm, gc->enc_host.data(), T_enc, D, /*utt_index=*/-1); } + // Zapformer stacks with downsampling > 1 group frames from the start of + // the window, so a window must start on a multiple of the largest factor + // for its frame groups to match whole-clip inference. + int ws_align = 1; + if (gm->hparams.encoder_kind == EncoderKind::Zapformer) { + for (const auto & shp : gm->hparams.zap_stages) { + ws_align = std::max(ws_align, static_cast(shp.downsampling)); + } + } + const int64_t t_enc_start = ggml_time_us(); std::vector win_out; std::vector stitched; @@ -577,10 +592,11 @@ transcribe_status run(transcribe_session * session, const float * pcm, int n_sam return TRANSCRIBE_ERR_ABORTED; } // Kept frames [a, b); encoded frames [ws, we) add context each side. - const int a = wp.bounds[w]; - const int b = wp.bounds[w + 1]; - const int ws = std::max(0, a - k_window_ctx_frames); - const int we = std::min(T_total, b + k_window_ctx_frames); + const int a = wp.bounds[w]; + const int b = wp.bounds[w + 1]; + const int ws_ctx = std::max(0, a - k_window_ctx_frames); + const int ws = ws_ctx - ws_ctx % ws_align; + const int we = std::min(T_total, b + k_window_ctx_frames); // Encoder frame g is centred on mel frame 4g, so a window starting // at encoder frame ws starts at mel frame 4*ws. A window that ends @@ -768,6 +784,31 @@ transcribe_status run_batch_encode(GigaamSession * gc, }); } +// Runs each utterance through run(): clips longer than one encoder window, +// the malformed-input fallback, and every Zapformer batch. +transcribe_status run_batch_per_utterance(transcribe_session * session, + const float * const * pcm, + const int * n_samples, + int n, + const transcribe_run_params * params) { + auto * gc = static_cast(session); + for (int i = 0; i < n; ++i) { + if (gc->poll_abort()) { + return TRANSCRIBE_ERR_ABORTED; + } + if (pcm[i] == nullptr || n_samples[i] <= 0) { + transcribe_session::ResultSet rs; + rs.status = TRANSCRIBE_ERR_INVALID_ARG; + gc->batch_results.push_back(std::move(rs)); + continue; + } + gc->clear_result(); + const transcribe_status st = run(session, pcm[i], n_samples[i], params); + gc->batch_results.push_back(gc->capture_result(st)); + } + return TRANSCRIBE_OK; +} + transcribe_status run_batch(transcribe_session * session, const float * const * pcm, const int * n_samples, @@ -783,6 +824,12 @@ transcribe_status run_batch(transcribe_session * session, } transcribe::debug::init(); + // shortcut: Zapformer run_batch uses per-utterance loop instead of packed batching, upgrade when multi-utterance throughput matters. + // Dispatch it before the batch mel pass, which only the packed path uses. + if (gm->hparams.encoder_kind == EncoderKind::Zapformer) { + return run_batch_per_utterance(session, pcm, n_samples, n, params); + } + // Compute each utterance's mel in parallel (pure host code, no // cross-utterance state). A malformed/failed utterance drops the whole // call to the per-utterance fallback so the batch tensor stays @@ -822,30 +869,14 @@ transcribe_status run_batch(transcribe_session * session, // A batch whose longest clip needs more than one encoder window takes // the per-utterance path below, which windows each clip, so the // batched workspace stays bounded by n x one window. - // shortcut: Zapformer run_batch uses per-utterance loop instead of packed batching, upgrade when multi-utterance throughput matters. - if (gm->hparams.encoder_kind == EncoderKind::Conformer && - plan_windows(enc_frames_for_mel(T_max)).n_windows() <= 1) { + if (plan_windows(enc_frames_for_mel(T_max)).n_windows() <= 1) { return run_batch_encode(gc, gm, mels, nf, n_mels, T_max, total_mel_us); } } // Per-utterance path: clips longer than one encoder window, and the // malformed-input fallback. - for (int i = 0; i < n; ++i) { - if (gc->poll_abort()) { - return TRANSCRIBE_ERR_ABORTED; - } - if (pcm[i] == nullptr || n_samples[i] <= 0) { - transcribe_session::ResultSet rs; - rs.status = TRANSCRIBE_ERR_INVALID_ARG; - gc->batch_results.push_back(std::move(rs)); - continue; - } - gc->clear_result(); - const transcribe_status st = run(session, pcm[i], n_samples[i], params); - gc->batch_results.push_back(gc->capture_result(st)); - } - return TRANSCRIBE_OK; + return run_batch_per_utterance(session, pcm, n_samples, n, params); } } // namespace diff --git a/src/arch/gigaam/weights.cpp b/src/arch/gigaam/weights.cpp index 388c4a10b..63640b9eb 100644 --- a/src/arch/gigaam/weights.cpp +++ b/src/arch/gigaam/weights.cpp @@ -12,6 +12,7 @@ #include "transcribe-meta.h" #include "transcribe-weights-util.h" +#include #include #include @@ -89,13 +90,13 @@ transcribe_status read_gigaam_hparams(const gguf_context * gguf, GigaamHParams & st != TRANSCRIBE_OK) { return st; } - if (auto st = read_required_u32_kv(gguf, "stt.gigaam.encoder.subs_kernel_size", kFamilyTag, - hp.enc_subs_kernel_size); + if (auto st = + read_required_u32_kv(gguf, "stt.gigaam.encoder.subs_kernel_size", kFamilyTag, hp.enc_subs_kernel_size); st != TRANSCRIBE_OK) { return st; } - if (auto st = read_required_u32_kv(gguf, "stt.gigaam.encoder.pos_emb_max_len", kFamilyTag, - hp.enc_pos_emb_max_len); + if (auto st = + read_required_u32_kv(gguf, "stt.gigaam.encoder.pos_emb_max_len", kFamilyTag, hp.enc_pos_emb_max_len); st != TRANSCRIBE_OK) { return st; } @@ -155,7 +156,8 @@ transcribe_status read_gigaam_hparams(const gguf_context * gguf, GigaamHParams & st != TRANSCRIBE_OK) { return st; } - if (auto st = read_required_f32_kv(gguf, "stt.gigaam.encoder.out_norm.scale", kFamilyTag, hp.zap_out_norm_scale); + if (auto st = + read_required_f32_kv(gguf, "stt.gigaam.encoder.out_norm.scale", kFamilyTag, hp.zap_out_norm_scale); st != TRANSCRIBE_OK) { return st; } @@ -185,7 +187,9 @@ transcribe_status read_gigaam_hparams(const gguf_context * gguf, GigaamHParams & std::vector fe_ch, st_layers, st_dims, st_heads, st_qdim, st_vdim, st_ff, st_conv, st_ds; std::vector st_in_scales; - if (auto st = req_i32_arr("stt.gigaam.encoder.frontend_channels", fe_ch); st != TRANSCRIBE_OK) return st; + if (auto st = req_i32_arr("stt.gigaam.encoder.frontend_channels", fe_ch); st != TRANSCRIBE_OK) { + return st; + } if (fe_ch.size() != 3) { log_msg(TRANSCRIBE_LOG_LEVEL_ERROR, "gigaam: expected 3 frontend_channels, got %zu", fe_ch.size()); return TRANSCRIBE_ERR_GGUF; @@ -193,14 +197,30 @@ transcribe_status read_gigaam_hparams(const gguf_context * gguf, GigaamHParams & for (int i = 0; i < 3; ++i) { hp.zap_fe_channels[i] = fe_ch[i]; } - if (auto st = req_i32_arr("stt.gigaam.encoder.stage_layers", st_layers); st != TRANSCRIBE_OK) return st; - if (auto st = req_i32_arr("stt.gigaam.encoder.stage_dims", st_dims); st != TRANSCRIBE_OK) return st; - if (auto st = req_i32_arr("stt.gigaam.encoder.stage_heads", st_heads); st != TRANSCRIBE_OK) return st; - if (auto st = req_i32_arr("stt.gigaam.encoder.stage_qdim", st_qdim); st != TRANSCRIBE_OK) return st; - if (auto st = req_i32_arr("stt.gigaam.encoder.stage_vdim", st_vdim); st != TRANSCRIBE_OK) return st; - if (auto st = req_i32_arr("stt.gigaam.encoder.stage_ff_mult", st_ff); st != TRANSCRIBE_OK) return st; - if (auto st = req_i32_arr("stt.gigaam.encoder.stage_conv_kernel", st_conv); st != TRANSCRIBE_OK) return st; - if (auto st = req_i32_arr("stt.gigaam.encoder.stage_downsampling", st_ds); st != TRANSCRIBE_OK) return st; + if (auto st = req_i32_arr("stt.gigaam.encoder.stage_layers", st_layers); st != TRANSCRIBE_OK) { + return st; + } + if (auto st = req_i32_arr("stt.gigaam.encoder.stage_dims", st_dims); st != TRANSCRIBE_OK) { + return st; + } + if (auto st = req_i32_arr("stt.gigaam.encoder.stage_heads", st_heads); st != TRANSCRIBE_OK) { + return st; + } + if (auto st = req_i32_arr("stt.gigaam.encoder.stage_qdim", st_qdim); st != TRANSCRIBE_OK) { + return st; + } + if (auto st = req_i32_arr("stt.gigaam.encoder.stage_vdim", st_vdim); st != TRANSCRIBE_OK) { + return st; + } + if (auto st = req_i32_arr("stt.gigaam.encoder.stage_ff_mult", st_ff); st != TRANSCRIBE_OK) { + return st; + } + if (auto st = req_i32_arr("stt.gigaam.encoder.stage_conv_kernel", st_conv); st != TRANSCRIBE_OK) { + return st; + } + if (auto st = req_i32_arr("stt.gigaam.encoder.stage_downsampling", st_ds); st != TRANSCRIBE_OK) { + return st; + } if (auto st = req_f32_arr("stt.gigaam.encoder.stage_input_scales", st_in_scales); st != TRANSCRIBE_OK) { return st; } @@ -215,16 +235,16 @@ transcribe_status read_gigaam_hparams(const gguf_context * gguf, GigaamHParams & hp.zap_stages.resize(n_stages); for (size_t s = 0; s < n_stages; ++s) { - auto & st = hp.zap_stages[s]; - st.n_layers = st_layers[s]; - st.dim = st_dims[s]; - st.n_heads = st_heads[s]; - st.qdim = st_qdim[s]; - st.vdim = st_vdim[s]; - st.ff_mult = st_ff[s]; - st.conv_kernel = st_conv[s]; - st.downsampling = st_ds[s]; - st.input_scale = st_in_scales[s]; + auto & st = hp.zap_stages[s]; + st.n_layers = st_layers[s]; + st.dim = st_dims[s]; + st.n_heads = st_heads[s]; + st.qdim = st_qdim[s]; + st.vdim = st_vdim[s]; + st.ff_mult = st_ff[s]; + st.conv_kernel = st_conv[s]; + st.downsampling = st_ds[s]; + st.input_scale = st_in_scales[s]; char key[96]; std::snprintf(key, sizeof(key), "stt.gigaam.encoder.stage_%zu.residual_scales", s); if (auto r = req_f32_arr(key, st.residual_scales); r != TRANSCRIBE_OK) { @@ -235,6 +255,36 @@ transcribe_status read_gigaam_hparams(const gguf_context * gguf, GigaamHParams & st.residual_scales.size(), st.n_layers + 1); return TRANSCRIBE_ERR_GGUF; } + // Geometry the graph relies on: RoPE rotates query/key pairs (even + // qdim), and the depthwise conv pads (k - 1) / 2 per side (odd k, + // or 0 for no conv module). + if (st.n_layers < 0 || st.dim <= 0 || st.n_heads <= 0 || st.qdim <= 0 || st.qdim % 2 != 0 || st.vdim <= 0 || + st.ff_mult <= 0 || st.conv_kernel < 0 || (st.conv_kernel > 0 && st.conv_kernel % 2 == 0) || + st.downsampling < 1) { + log_msg(TRANSCRIBE_LOG_LEVEL_ERROR, + "gigaam: stage %zu has unsupported geometry (layers=%d dim=%d heads=%d qdim=%d vdim=%d " + "ff_mult=%d conv_kernel=%d downsampling=%d)", + s, st.n_layers, st.dim, st.n_heads, st.qdim, st.vdim, st.ff_mult, st.conv_kernel, + st.downsampling); + return TRANSCRIBE_ERR_GGUF; + } + } + // Frames are padded to the largest downsampling factor, so every + // stage's factor must divide it. + int32_t max_ds = 1; + for (const auto & st : hp.zap_stages) { + max_ds = std::max(max_ds, st.downsampling); + } + for (size_t s = 0; s < n_stages; ++s) { + if (max_ds % hp.zap_stages[s].downsampling != 0) { + log_msg(TRANSCRIBE_LOG_LEVEL_ERROR, "gigaam: stage %zu downsampling %d does not divide %d", s, + hp.zap_stages[s].downsampling, max_ds); + return TRANSCRIBE_ERR_GGUF; + } + } + if (n_stages == 0) { + log_msg(TRANSCRIBE_LOG_LEVEL_ERROR, "gigaam: zapformer has no stages"); + return TRANSCRIBE_ERR_GGUF; } } @@ -497,12 +547,12 @@ transcribe_status build_gigaam_weights(ggml_context * ctx_meta, const GigaamHPar } } else { // Zapformer frontend. - auto & fe = weights.zapformer.frontend; - const int c0 = hp.zap_fe_channels[0]; - const int c1 = hp.zap_fe_channels[1]; - const int c2 = hp.zap_fe_channels[2]; - const int cn_k = hp.zap_causal_frontend ? 3 : 7; - const int f_out = (((feat_in - 1) / 2) - 1) / 2; + auto & fe = weights.zapformer.frontend; + const int c0 = hp.zap_fe_channels[0]; + const int c1 = hp.zap_fe_channels[1]; + const int c2 = hp.zap_fe_channels[2]; + const int cn_k = hp.zap_causal_frontend ? 3 : 7; + const int f_out = (((feat_in - 1) / 2) - 1) / 2; GET_CONV2D_W(fe.conv0_w, "enc.frontend.conv.0.weight", 3, 3, 1, c0); GET_LIN_B(fe.conv0_b, "enc.frontend.conv.0.bias", c0); GET_CONV2D_W(fe.conv1_w, "enc.frontend.conv.1.weight", 3, 3, c0, c1); diff --git a/src/arch/gigaam/weights.h b/src/arch/gigaam/weights.h index e4332b2e4..6a3d9aaf4 100644 --- a/src/arch/gigaam/weights.h +++ b/src/arch/gigaam/weights.h @@ -79,9 +79,9 @@ struct GigaamHParams { bool zap_causal_frontend = true; int32_t zap_fe_channels[3] = { 16, 32, 64 }; std::vector zap_stages; - float zap_out_norm_scale = 0.2f; - float zap_out_norm_eps = 0.1f; - float zap_rope_base = 10000.0f; + float zap_out_norm_scale = 0.2f; + float zap_out_norm_eps = 0.1f; + float zap_rope_base = 10000.0f; // RNN-T predictor + joint (HeadKind::RNNT only). int32_t pred_hidden = 0; @@ -209,12 +209,12 @@ struct GigaamCtcHead { }; struct ZapformerFrontendWeights { - ggml_tensor * conv0_w = nullptr; // [3, 3, 1, c0] - ggml_tensor * conv0_b = nullptr; // [c0] - ggml_tensor * conv1_w = nullptr; // [3, 3, c0, c1] - ggml_tensor * conv1_b = nullptr; // [c1] - ggml_tensor * conv2_w = nullptr; // [3, 3, c1, c2] - ggml_tensor * conv2_b = nullptr; // [c2] + ggml_tensor * conv0_w = nullptr; // [3, 3, 1, c0] + ggml_tensor * conv0_b = nullptr; // [c0] + ggml_tensor * conv1_w = nullptr; // [3, 3, c0, c1] + ggml_tensor * conv1_b = nullptr; // [c1] + ggml_tensor * conv2_w = nullptr; // [3, 3, c1, c2] + ggml_tensor * conv2_b = nullptr; // [c2] ggml_tensor * cn_dw_w = nullptr; // [k, k, 1, c2] ggml_tensor * cn_dw_b = nullptr; // [c2] @@ -223,8 +223,8 @@ struct ZapformerFrontendWeights { ggml_tensor * cn_pw2_w = nullptr; // [1, 1, 3*c2, c2] ggml_tensor * cn_pw2_b = nullptr; // [c2] - ggml_tensor * out_w = nullptr; // [c2 * freq_out, d_model] - ggml_tensor * out_b = nullptr; // [d_model] + ggml_tensor * out_w = nullptr; // [c2 * freq_out, d_model] + ggml_tensor * out_b = nullptr; // [d_model] }; struct ZapformerLayerWeights { diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 8cb28e327..23d292459 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -968,6 +968,23 @@ if(TRANSCRIBE_BUILD_REAL_MODEL_TESTS) set_tests_properties(transcribe_granite5_ctc_e2e_smoke PROPERTIES SKIP_RETURN_CODE 77) + # GigaAM-v4 (Zapformer) public-ABI transcript gate, single and batched. + add_executable(transcribe_gigaam_v4_e2e_smoke + gigaam_v4_e2e_smoke.cpp) + + target_link_libraries(transcribe_gigaam_v4_e2e_smoke + PRIVATE transcribe transcribe-common-example) + + target_compile_definitions(transcribe_gigaam_v4_e2e_smoke PRIVATE + "TRANSCRIBE_TEST_SAMPLES_DIR=\"${CMAKE_SOURCE_DIR}/samples\"") + + transcribe_apply_warnings(transcribe_gigaam_v4_e2e_smoke) + + add_test(NAME transcribe_gigaam_v4_e2e_smoke + COMMAND transcribe_gigaam_v4_e2e_smoke) + set_tests_properties(transcribe_gigaam_v4_e2e_smoke PROPERTIES + SKIP_RETURN_CODE 77) + # Real-model GigaAM workspace-retention regression. add_executable(transcribe_gigaam_workspace_release_smoke gigaam_workspace_release_smoke.cpp) diff --git a/tests/gigaam_v4_e2e_smoke.cpp b/tests/gigaam_v4_e2e_smoke.cpp new file mode 100644 index 000000000..6c0da468d --- /dev/null +++ b/tests/gigaam_v4_e2e_smoke.cpp @@ -0,0 +1,170 @@ +// gigaam_v4_e2e_smoke.cpp - real-model, public-C-ABI transcript smoke for +// GigaAM-v4 (Zapformer encoder + RNN-T). +// +// Set TRANSCRIBE_GIGAAM_V4_GGUF to a gigaam-v4-e2e-rnnt GGUF (any quant). +// The test runs CPU inference on samples/ru.wav, whose encoder length is odd +// (T_enc = 113) so the padded-tail masks are exercised, and on +// samples/fleurs-en.wav, then runs both clips as one transcribe_run_batch +// call (the per-utterance Zapformer batch path) and checks that each batch +// result matches its single run. + +#include "transcribe.h" +#include "wav.h" + +#include + +#include +#include +#include +#include +#include +#include +#include + +#ifndef TRANSCRIBE_TEST_SAMPLES_DIR +# define TRANSCRIBE_TEST_SAMPLES_DIR "samples" +#endif + +namespace { + +int g_failures = 0; + +#define CHECK(cond) \ + do { \ + if (!(cond)) { \ + std::fprintf(stderr, "FAIL %s:%d: %s\n", __FILE__, __LINE__, #cond); \ + ++g_failures; \ + } \ + } while (0) + +bool file_exists(const std::string & path) { + struct stat st{}; + return ::stat(path.c_str(), &st) == 0; +} + +// Byte-level edit distance; a Cyrillic letter is two bytes, so the budget +// below allows about one wrong letter in the Russian clip. +int edit_distance(const std::string & a, const std::string & b) { + std::vector prev(b.size() + 1); + std::vector curr(b.size() + 1); + for (size_t j = 0; j <= b.size(); ++j) { + prev[j] = static_cast(j); + } + for (size_t i = 1; i <= a.size(); ++i) { + curr[0] = static_cast(i); + for (size_t j = 1; j <= b.size(); ++j) { + const int cost = a[i - 1] == b[j - 1] ? 0 : 1; + curr[j] = std::min({ prev[j] + 1, curr[j - 1] + 1, prev[j - 1] + cost }); + } + prev.swap(curr); + } + return prev[b.size()]; +} + +struct Case { + const char * wav; + const char * reference; // PyTorch GigaAMDualASR e2e transcript (F32, CPU) +}; + +const Case kCases[] = { + { "ru.wav", "Важно различать глаголы и дополнения." }, + { "fleurs-en.wav", + "However, due to the slow communication channels styles in the West could lag behind by 25 to 30 years." }, +}; + +} // namespace + +int main() { + const char * model_env = std::getenv("TRANSCRIBE_GIGAAM_V4_GGUF"); + if (model_env == nullptr || model_env[0] == '\0' || !file_exists(model_env)) { + std::fprintf(stderr, "gigaam_v4_e2e_smoke: TRANSCRIBE_GIGAAM_V4_GGUF is unset or missing; skipping\n"); + return 77; + } + + const auto start = std::chrono::steady_clock::now(); + transcribe_model_load_params load_params; + transcribe_model_load_params_init(&load_params); + load_params.backend = TRANSCRIBE_BACKEND_CPU; + transcribe_model * model = nullptr; + transcribe_status st = transcribe_model_load_file(model_env, &load_params, &model); + if (st != TRANSCRIBE_OK || model == nullptr) { + std::fprintf(stderr, "FAIL load: %s\n", transcribe_status_string(st)); + return EXIT_FAILURE; + } + + CHECK(std::strcmp(transcribe_model_arch_string(model), "gigaam") == 0); + CHECK(std::strcmp(transcribe_model_variant_string(model), "gigaam-v4-e2e-rnnt") == 0); + + transcribe_session_params session_params; + transcribe_session_params_init(&session_params); + transcribe_session * session = nullptr; + st = transcribe_session_init(model, &session_params, &session); + if (st != TRANSCRIBE_OK || session == nullptr) { + std::fprintf(stderr, "FAIL session init: %s\n", transcribe_status_string(st)); + transcribe_model_free(model); + return EXIT_FAILURE; + } + + transcribe_run_params run_params; + transcribe_run_params_init(&run_params); + run_params.timestamps = TRANSCRIBE_TIMESTAMPS_NONE; + + std::vector> pcms; + std::vector singles; + for (const Case & c : kCases) { + const std::string path = std::string(TRANSCRIBE_TEST_SAMPLES_DIR) + "/" + c.wav; + std::vector pcm; + std::string wav_error; + if (!transcribe_cli::load_wav_mono_16k(path, pcm, wav_error)) { + std::fprintf(stderr, "FAIL audio load %s: %s\n", path.c_str(), wav_error.c_str()); + ++g_failures; + continue; + } + st = transcribe_run(session, pcm.data(), static_cast(pcm.size()), &run_params); + CHECK(st == TRANSCRIBE_OK); + const std::string actual = st == TRANSCRIBE_OK ? transcribe_full_text(session) : ""; + const int distance = edit_distance(actual, c.reference); + std::fprintf(stderr, "gigaam_v4_e2e_smoke: %s text=\"%s\" edit_distance=%d\n", c.wav, actual.c_str(), distance); + CHECK(!actual.empty()); + CHECK(distance <= 2); + CHECK(transcribe_n_tokens(session) > 0); + + transcribe_timings timings; + transcribe_timings_init(&timings); + CHECK(transcribe_get_timings(session, &timings) == TRANSCRIBE_OK); + CHECK(timings.mel_ms > 0.0f); + CHECK(timings.encode_ms > 0.0f); + + pcms.push_back(std::move(pcm)); + singles.push_back(actual); + } + + if (pcms.size() == std::size(kCases)) { + std::vector ptrs; + std::vector lens; + for (const auto & p : pcms) { + ptrs.push_back(p.data()); + lens.push_back(static_cast(p.size())); + } + st = transcribe_run_batch(session, ptrs.data(), lens.data(), static_cast(ptrs.size()), &run_params); + CHECK(st == TRANSCRIBE_OK); + CHECK(transcribe_batch_n_results(session) == static_cast(ptrs.size())); + for (int i = 0; st == TRANSCRIBE_OK && i < static_cast(ptrs.size()); ++i) { + CHECK(transcribe_batch_status(session, i) == TRANSCRIBE_OK); + const char * text = transcribe_batch_full_text(session, i); + CHECK(text != nullptr && singles[static_cast(i)] == text); + } + } + + const double wall_ms = std::chrono::duration(std::chrono::steady_clock::now() - start).count(); + CHECK(wall_ms < 120000.0); + + transcribe_session_free(session); + transcribe_model_free(model); + if (g_failures != 0) { + std::fprintf(stderr, "gigaam_v4_e2e_smoke: %d failures\n", g_failures); + return EXIT_FAILURE; + } + std::fprintf(stdout, "gigaam_v4_e2e_smoke: ok\n"); + return EXIT_SUCCESS; +} diff --git a/tests/golden/gigaam/gigaam-v4-e2e-rnnt.manifest.json b/tests/golden/gigaam/gigaam-v4-e2e-rnnt.manifest.json new file mode 100644 index 000000000..cdd07e408 --- /dev/null +++ b/tests/golden/gigaam/gigaam-v4-e2e-rnnt.manifest.json @@ -0,0 +1,62 @@ +{ + "schema": "transcribe-golden-manifest-v1", + "family": "gigaam", + "variant": "gigaam-v4-e2e-rnnt", + "source_model": { + "hf_repo": "ai-sage/GigaAM-v4", + "hf_revision": "180301a192bb45bc2b2ca122e0d4aab24ffe7a96" + }, + "reference": { + "kind": "author_repo_gigaam", + "source": "https://huggingface.co/ai-sage/GigaAM-v4/blob/180301a192bb45bc2b2ca122e0d4aab24ffe7a96/modeling_gigaam.py", + "revision": "180301a192bb45bc2b2ca122e0d4aab24ffe7a96", + "entrypoint": "scripts/dump_reference_gigaam_v4_hf.py", + "env": "gigaam-v4", + "variant_key": "v4_e2e_rnnt", + "dump_args": ["--variant", "v4_e2e_rnnt"] + }, + "expected_dtype": "float32", + "dtype_source": "manual", + "frontend": { + "sample_rate": 16000, + "n_mels": 64, + "hop_length": 160, + "fft_size": 320, + "win_length": 320, + "window": "hann_periodic", + "normalization": "none", + "center": false, + "mel_filterbank_norm": "htk", + "log_scale": "log(clamp(x, 1e-9, 1e9))" + }, + "tokenizer_summary": { + "type": "sentencepiece", + "vocab_size": 1024, + "special_tokens": { + "blank": 1024 + } + }, + "capabilities": { + "languages": [ + "ru", + "en" + ], + "language_detection": false, + "translation": false, + "timestamps": [], + "streaming": false, + "speaker_diarization": false + }, + "head_type": "rnnt", + "tolerance_file": "tests/tolerances/gigaam-v4.json", + "cases": [ + { + "audio": "ru", + "language": "ru" + }, + { + "audio": "fleurs-en", + "language": "en" + } + ] +} diff --git a/tests/tolerances/gigaam-v4.json b/tests/tolerances/gigaam-v4.json new file mode 100644 index 000000000..b0babc20a --- /dev/null +++ b/tests/tolerances/gigaam-v4.json @@ -0,0 +1,73 @@ +{ + "_comment": [ + "GigaAM-v4 (Zapformer encoder) per-tensor tolerances for compare_tensors.py.", + "", + "CORRECTNESS REGIME", + "- Reference: GigaAMDualASR from modeling_gigaam.py in ai-sage/GigaAM-v4", + " @ 180301a1, built from config.json + model.safetensors in F32 on CPU", + " (scripts/lib/gigaam_v4_hf.py). Dumper: scripts/dump_reference_gigaam_v4_hf.py.", + "- C++: ggml CPU fp32 compute, weights stored as F32 in GGUF.", + "- Mel frontend: same contract as v3 (center=false, htk mel, no slaney", + " norm, log(clamp(x, 1e-9, 1e9))), with the filterbank and periodic Hann", + " window baked into the GGUF by scripts/convert-gigaam-v4.py.", + "- Backend / threading: --backend cpu --threads 1 (deterministic).", + "", + "ENTRY SOURCING", + "- Recipe (same as tests/tolerances/gigaam.json):", + " max_abs = 1.5 × worst_observed_max_abs", + " mean_abs = 1.5 × worst_observed_mean_abs", + " rounded up to two significant digits, where 'worst' is the larger of", + " the two manifest cases: samples/ru.wav (T_enc = 113, odd, so the padded", + " tail and its masks are exercised) and samples/fleurs-en.wav (T_enc = 264).", + "", + "DRIFT SOURCES (named)", + "- frontend.mel.out: same FFT / SGEMM reduction order as v3.", + "- enc.subsample.out: three 2D convs and a ConvNeXt block; small.", + "- enc.stage.{0,1,2}.out: SDPA + feed-forward + convolution module noise", + " over 4/11/4 layers. Stage 1 runs at half the frame rate on a 1536-wide", + " stacked input, so its matmuls reduce over twice as many terms.", + "- enc.out / rnnt.encoded: the final RmsNorm (learned scale 0.9951, eps", + " 7.7e-6) multiplies by scale / RMS of the stage-2 output per frame (median", + " RMS ~0.38 on both cases), so absolute drift here is ~2.5x that of", + " enc.stage.2.out. Per-frame error correlates only moderately with", + " 1/RMS (r = 0.40 ru, 0.47 fleurs-en).", + "", + "Sign-off: 2026-11-29, validate.py all green for gigaam-v4-e2e-rnnt;", + "transcripts exact against the reference on both cases." + ], + "frontend.mel.out": { + "max_abs": 2.5e-04, + "mean_abs": 1.6e-06, + "_seen_in": ["gigaam-v4-e2e-rnnt"] + }, + "enc.subsample.out": { + "max_abs": 1.3e-05, + "mean_abs": 5.8e-07, + "_seen_in": ["gigaam-v4-e2e-rnnt"] + }, + "enc.stage.0.out": { + "max_abs": 9.0e-05, + "mean_abs": 9.6e-06, + "_seen_in": ["gigaam-v4-e2e-rnnt"] + }, + "enc.stage.1.out": { + "max_abs": 4.2e-04, + "mean_abs": 5.0e-05, + "_seen_in": ["gigaam-v4-e2e-rnnt"] + }, + "enc.stage.2.out": { + "max_abs": 5.6e-04, + "mean_abs": 5.5e-05, + "_seen_in": ["gigaam-v4-e2e-rnnt"] + }, + "enc.out": { + "max_abs": 1.5e-03, + "mean_abs": 1.4e-04, + "_seen_in": ["gigaam-v4-e2e-rnnt"] + }, + "rnnt.encoded": { + "max_abs": 1.5e-03, + "mean_abs": 1.4e-04, + "_seen_in": ["gigaam-v4-e2e-rnnt"] + } +} From bd4e92026c560154e76de0d4e9edfa6018d7c013 Mon Sep 17 00:00:00 2001 From: CJ Pais Date: Tue, 1 Dec 2026 20:00:42 +0800 Subject: [PATCH 03/13] gigaam: faster Zapformer encoder graph Direct CONV_2D for the strided and 1x1 frontend convs (conv1 stays on im2col for precision), direct depthwise for the ConvNeXt conv, flash attention with an F16 key mask for odd lengths, no copies of the q/k/v and gate views, and the conv module in the channel-innermost layout (direct depthwise conv, time mean via pool_2d). M1 Metal Q8_0 encode: jfk 113 -> 75 ms, ru-long 406 -> 258 ms. validate.py all gigaam-v4-e2e-rnnt: 9/9 on both cases, drift equal or lower; FLEURS ru/en WER unchanged (F32 4.34% / 4.91%). --- src/arch/gigaam/encoder.cpp | 140 ++++++++++++++++++++++++------------ 1 file changed, 94 insertions(+), 46 deletions(-) diff --git a/src/arch/gigaam/encoder.cpp b/src/arch/gigaam/encoder.cpp index fb3f0f333..0164e2be9 100644 --- a/src/arch/gigaam/encoder.cpp +++ b/src/arch/gigaam/encoder.cpp @@ -291,11 +291,25 @@ ggml_tensor * zap_causal_time_pad(ggml_context * ctx, ggml_tensor * x, int64_t p return ggml_concat(ctx, z, x, /*dim=*/1); } +// Frontend 2D conv. The direct CONV_2D op skips im2col's KW*KH-fold copy of the +// activation and the transpose back from the matmul layout; on Metal (M1) the +// frontend drops from ~20 ms to ~7 ms for 11 s of audio (CPU: neutral). +// Quantized kernels (direct CONV_2D takes F32/F16 only) and backends that +// prefer im2col (conf::detect_direct_pw) keep im2col. +ggml_tensor * +zap_conv_2d(ggml_context * ctx, ggml_tensor * w, ggml_tensor * x, int s0, int s1, int p0, int p1, bool direct) { + if (direct && (w->type == GGML_TYPE_F32 || w->type == GGML_TYPE_F16)) { + return ggml_conv_2d_direct(ctx, w, x, s0, s1, p0, p1, 1, 1); + } + return conf::conv_2d_f32(ctx, w, x, s0, s1, p0, p1, 1, 1); +} + // ZapformerFrontend: mel_in [T_mel, F=64, 1] -> [d_model, T_enc, 1]. ggml_tensor * build_zapformer_frontend(ggml_context * ctx, const ZapformerFrontendWeights & fe, ggml_tensor * mel_in, - bool causal) { + bool causal, + bool direct_conv) { const int64_t T_mel = mel_in->ne[0]; const int64_t F = mel_in->ne[1]; const int64_t B = mel_in->ne[2]; @@ -304,7 +318,10 @@ ggml_tensor * build_zapformer_frontend(ggml_context * ctx, ggml_tensor * x = ggml_cont(ctx, ggml_permute(ctx, mel_in, 1, 0, 2, 3)); x = ggml_reshape_4d(ctx, x, F, T_mel, 1, B); - // Conv1: stride=1, causal pad (W:1,1; H:2,0) or symmetric (1,1). + // Conv1: stride=1, causal pad (W:1,1; H:2,0) or symmetric (1,1). Stays on + // im2col: Metal's direct CONV_2D stages operands in half, and on the raw + // log-mel input that triples the frontend drift (enc.subsample.out mean + // abs 9e-5 -> 3e-4 vs the F32 reference) for ~3 ms. if (causal) { x = zap_causal_time_pad(ctx, x, 2); x = conf::conv_2d_f32(ctx, fe.conv0_w, x, /*s0=*/1, /*s1=*/1, /*p0=*/1, /*p1=*/0, 1, 1); @@ -314,11 +331,11 @@ ggml_tensor * build_zapformer_frontend(ggml_context * ctx, x = ggml_silu(ctx, conf::add_conv_bias(ctx, x, fe.conv0_b)); // Conv2: stride=2, pad=(pH=1, pW=0) -> p0=0 (W/freq), p1=1 (H/time). - x = conf::conv_2d_f32(ctx, fe.conv1_w, x, /*s0=*/2, /*s1=*/2, /*p0=*/0, /*p1=*/1, 1, 1); + x = zap_conv_2d(ctx, fe.conv1_w, x, /*s0=*/2, /*s1=*/2, /*p0=*/0, /*p1=*/1, direct_conv); x = ggml_silu(ctx, conf::add_conv_bias(ctx, x, fe.conv1_b)); // Conv3: stride=2, pad=(pH=1, pW=0). - x = conf::conv_2d_f32(ctx, fe.conv2_w, x, /*s0=*/2, /*s1=*/2, /*p0=*/0, /*p1=*/1, 1, 1); + x = zap_conv_2d(ctx, fe.conv2_w, x, /*s0=*/2, /*s1=*/2, /*p0=*/0, /*p1=*/1, direct_conv); x = ggml_silu(ctx, conf::add_conv_bias(ctx, x, fe.conv2_b)); // ZapformerConvNeXt: residual + pw2(silu(pw1(dw(x)))). @@ -327,14 +344,14 @@ ggml_tensor * build_zapformer_frontend(ggml_context * ctx, ggml_tensor * y = x; if (causal) { y = zap_causal_time_pad(ctx, y, 2); - y = conf::conv_2d_dw_f32(ctx, fe.cn_dw_w, y, 1, 1, /*p0=*/1, /*p1=*/0, 1, 1); + y = conf::conv_2d_dw_direct_f32(ctx, fe.cn_dw_w, y, 1, 1, /*p0=*/1, /*p1=*/0, 1, 1); } else { - y = conf::conv_2d_dw_f32(ctx, fe.cn_dw_w, y, 1, 1, 3, 3, 1, 1); + y = conf::conv_2d_dw_direct_f32(ctx, fe.cn_dw_w, y, 1, 1, 3, 3, 1, 1); } y = conf::add_conv_bias(ctx, y, fe.cn_dw_b); - y = conf::conv_2d_f32(ctx, fe.cn_pw1_w, y, 1, 1, 0, 0, 1, 1); + y = zap_conv_2d(ctx, fe.cn_pw1_w, y, 1, 1, 0, 0, direct_conv); y = ggml_silu(ctx, conf::add_conv_bias(ctx, y, fe.cn_pw1_b)); - y = conf::conv_2d_f32(ctx, fe.cn_pw2_w, y, 1, 1, 0, 0, 1, 1); + y = zap_conv_2d(ctx, fe.cn_pw2_w, y, 1, 1, 0, 0, direct_conv); y = conf::add_conv_bias(ctx, y, fe.cn_pw2_b); x = ggml_add(ctx, res, y); } @@ -356,7 +373,8 @@ ggml_tensor * build_zapformer_attn(ggml_context * ctx, const ZapformerStageHParams & shp, float rope_base, bool use_flash, - ggml_tensor * attn_mask) { + ggml_tensor * attn_mask, + ggml_tensor * attn_mask_f16) { const int H = shp.n_heads; const int qdim = shp.qdim; const int vdim = shp.vdim; @@ -368,35 +386,41 @@ ggml_tensor * build_zapformer_attn(ggml_context * ctx, ggml_tensor * qk_norm = zap_rms_norm(ctx, x_qk, lw.attn_in_norm_w); ggml_tensor * qk = ggml_add(ctx, ggml_mul_mat(ctx, lw.attn_qk_in_w, qk_norm), lw.attn_qk_in_b); - ggml_tensor * q = ggml_cont(ctx, ggml_view_3d(ctx, qk, dq, T_s, B, qk->nb[1], qk->nb[2], 0)); - ggml_tensor * k = ggml_cont(ctx, ggml_view_3d(ctx, qk, dq, T_s, B, qk->nb[1], qk->nb[2], dq * qk->nb[0])); + // q and k are strided [qdim, H, T_s, B] views into qk; rope writes + // contiguous outputs, so no copy is needed before it. // Standard interleaved RoPE (GGML_ROPE_TYPE_NORMAL = 0) on [qdim, H, T_s, B]. - q = ggml_reshape_4d(ctx, q, qdim, H, T_s, B); - k = ggml_reshape_4d(ctx, k, qdim, H, T_s, B); + ggml_tensor * q = ggml_view_4d(ctx, qk, qdim, H, T_s, B, qdim * qk->nb[0], qk->nb[1], qk->nb[2], 0); + ggml_tensor * k = ggml_view_4d(ctx, qk, qdim, H, T_s, B, qdim * qk->nb[0], qk->nb[1], qk->nb[2], dq * qk->nb[0]); q = ggml_rope_ext(ctx, q, positions, nullptr, qdim, GGML_ROPE_TYPE_NORMAL, 0, rope_base, 1.0f, 0.0f, 1.0f, 32.0f, 1.0f); k = ggml_rope_ext(ctx, k, positions, nullptr, qdim, GGML_ROPE_TYPE_NORMAL, 0, rope_base, 1.0f, 0.0f, 1.0f, 32.0f, 1.0f); + // v, gate_in and gate_out are row-strided views into vg; the gating ops + // read them in place. ggml_tensor * vg = ggml_add(ctx, ggml_mul_mat(ctx, lw.attn_vg_in_w, x_vg), lw.attn_vg_in_b); - ggml_tensor * v_raw = ggml_cont(ctx, ggml_view_3d(ctx, vg, dv, T_s, B, vg->nb[1], vg->nb[2], 0)); - ggml_tensor * g_in = ggml_cont(ctx, ggml_view_3d(ctx, vg, dv, T_s, B, vg->nb[1], vg->nb[2], dv * vg->nb[0])); - ggml_tensor * g_out = ggml_cont(ctx, ggml_view_3d(ctx, vg, dv, T_s, B, vg->nb[1], vg->nb[2], 2 * dv * vg->nb[0])); + ggml_tensor * v_raw = ggml_view_3d(ctx, vg, dv, T_s, B, vg->nb[1], vg->nb[2], 0); + ggml_tensor * g_in = ggml_view_3d(ctx, vg, dv, T_s, B, vg->nb[1], vg->nb[2], dv * vg->nb[0]); + ggml_tensor * g_out = ggml_view_3d(ctx, vg, dv, T_s, B, vg->nb[1], vg->nb[2], 2 * dv * vg->nb[0]); ggml_tensor * v = ggml_mul(ctx, v_raw, ggml_sigmoid(ctx, g_in)); v = ggml_reshape_4d(ctx, v, vdim, H, T_s, B); - // Permute to [head_dim, T_s, H, B] for SDPA. - q = ggml_cont(ctx, ggml_permute(ctx, q, 0, 2, 1, 3)); - k = ggml_cont(ctx, ggml_permute(ctx, k, 0, 2, 1, 3)); - v = ggml_cont(ctx, ggml_permute(ctx, v, 0, 2, 1, 3)); - - const bool flash = use_flash && (attn_mask == nullptr) && (qdim == vdim); + // Flash attention reads permuted q/k/v views directly and takes the + // odd-length key mask as an F16 [T_s, T_s] input. + const bool flash = use_flash && (attn_mask == nullptr || attn_mask_f16 != nullptr) && (qdim == vdim); ggml_tensor * o = nullptr; if (flash) { - o = ggml_flash_attn_ext(ctx, q, k, v, nullptr, scale, 0.0f, 0.0f); + q = ggml_permute(ctx, q, 0, 2, 1, 3); + k = ggml_permute(ctx, k, 0, 2, 1, 3); + v = ggml_permute(ctx, v, 0, 2, 1, 3); + o = ggml_flash_attn_ext(ctx, q, k, v, attn_mask != nullptr ? attn_mask_f16 : nullptr, scale, 0.0f, 0.0f); } else { + // Permute to [head_dim, T_s, H, B] for SDPA. + q = ggml_cont(ctx, ggml_permute(ctx, q, 0, 2, 1, 3)); + k = ggml_cont(ctx, ggml_permute(ctx, k, 0, 2, 1, 3)); + v = ggml_cont(ctx, ggml_permute(ctx, v, 0, 2, 1, 3)); ggml_tensor * kq = ggml_mul_mat(ctx, k, q); // [T_s, T_s, H, B] if (attn_mask != nullptr) { kq = ggml_add(ctx, kq, attn_mask); @@ -424,26 +448,39 @@ ggml_tensor * build_zapformer_conv(ggml_context * ctx, const int64_t B = x->ne[2]; ggml_tensor * cg = ggml_add(ctx, ggml_mul_mat(ctx, lw.conv_in_w, x), lw.conv_in_b); - ggml_tensor * cx = ggml_cont(ctx, ggml_view_3d(ctx, cg, D, T_s, B, cg->nb[1], cg->nb[2], 0)); - ggml_tensor * gate = ggml_cont(ctx, ggml_view_3d(ctx, cg, D, T_s, B, cg->nb[1], cg->nb[2], D * cg->nb[0])); - - if (valid_mask != nullptr) { - cx = ggml_mul(ctx, cx, valid_mask); - } - - // Transpose [D, T_s, B] -> [T_s, D, B] for both global mean and 1D depthwise conv. - ggml_tensor * cx_t = ggml_cont(ctx, ggml_permute(ctx, cx, 1, 0, 2, 3)); - - // Global mean over valid frames: sum_rows([T_s, D, B]) -> [1, D, B] / T_valid. - ggml_tensor * mean = ggml_sum_rows(ctx, cx_t); - mean = ggml_scale(ctx, mean, 1.0f / static_cast(T_valid > 0 ? T_valid : 1)); - mean = ggml_reshape_3d(ctx, mean, D, 1, B); - mean = ggml_mul(ctx, mean, lw.conv_weighted_mean_w); - - // Depthwise 1D conv with symmetric padding (kernel-1)/2. - ggml_tensor * y = conf::conv_1d_dw_f32(ctx, lw.conv_dw_w, cx_t, /*stride=*/1, /*padding=*/(kernel - 1) / 2, 1); - y = ggml_add(ctx, y, ggml_reshape_3d(ctx, lw.conv_dw_b, 1, D, 1)); - y = ggml_cont(ctx, ggml_permute(ctx, y, 1, 0, 2, 3)); // [D, T_s, B] + ggml_tensor * cx = ggml_view_3d(ctx, cg, D, T_s, B, cg->nb[1], cg->nb[2], 0); + ggml_tensor * gate = ggml_view_3d(ctx, cg, D, T_s, B, cg->nb[1], cg->nb[2], D * cg->nb[0]); + + // The mask multiply already writes a contiguous [D, T_s, B] copy. + cx = (valid_mask != nullptr) ? ggml_mul(ctx, cx, valid_mask) : ggml_cont(ctx, cx); + + // Everything below stays in the channel-innermost [D, T_s, B] layout: no + // transposes and no im2col. + // Global mean over valid frames: average over all T_s frames (padded + // frames are zero) rescaled by T_s / T_valid. + const float t_valid = static_cast(T_valid > 0 ? T_valid : 1); + ggml_tensor * mean = ggml_pool_2d(ctx, ggml_reshape_4d(ctx, cx, D, T_s, B, 1), GGML_OP_POOL_AVG, 1, + static_cast(T_s), 1, static_cast(T_s), 0, 0); + mean = ggml_scale(ctx, mean, static_cast(T_s) / t_valid); + mean = ggml_reshape_3d(ctx, mean, D, 1, B); + mean = ggml_mul(ctx, mean, lw.conv_weighted_mean_w); + + // Depthwise 1D conv with symmetric padding (kernel-1)/2, as a direct + // depthwise 2D conv on the channel-contiguous (CWHN) layout: the input is + // [D, T_s] viewed as W=T_s, H=1, C=D and the output keeps that layout. The + // CPU CWHN kernel also wants the [K, D] weight channel-innermost; the + // transpose is a [K, D] copy (tiny). + ggml_tensor * knl = lw.conv_dw_w; + if (knl->type != GGML_TYPE_F32) { + knl = ggml_cast(ctx, knl, GGML_TYPE_F32); + } + knl = ggml_cont(ctx, ggml_transpose(ctx, ggml_reshape_2d(ctx, knl, kernel, D))); // ne [D, K] + knl = ggml_permute(ctx, ggml_reshape_4d(ctx, knl, D, 1, 1, kernel), 3, 1, 2, 0); // ne [K, 1, 1, D] + ggml_tensor * xw = ggml_permute(ctx, ggml_reshape_4d(ctx, cx, D, T_s, 1, B), 2, 0, 1, 3); // ne [T_s, 1, D, B] + ggml_tensor * yw = ggml_conv_2d_dw_direct(ctx, knl, xw, /*s0=*/1, /*s1=*/1, /*p0=*/(kernel - 1) / 2, /*p1=*/0, + /*d0=*/1, /*d1=*/1); + ggml_tensor * y = ggml_reshape_3d(ctx, ggml_permute(ctx, yw, 1, 2, 0, 3), D, T_s, B); + y = ggml_add(ctx, y, lw.conv_dw_b); // ActivationAndLinear: linear(silu((y + mean) * sigmoid(gate))). y = ggml_add(ctx, y, mean); @@ -462,12 +499,14 @@ ggml_tensor * build_zapformer_layer(ggml_context * ctx, bool use_flash, ggml_tensor * valid_mask, ggml_tensor * attn_mask, + ggml_tensor * attn_mask_f16, int64_t T_valid) { ggml_tensor * residual = x; ggml_tensor * qk = x; x = ggml_add(ctx, x, conf::feed_forward(ctx, x, lw.ff1_in_w, lw.ff1_in_b, lw.ff1_out_w, lw.ff1_out_b)); - x = ggml_add(ctx, x, build_zapformer_attn(ctx, qk, x, positions, lw, shp, rope_base, use_flash, attn_mask)); + x = ggml_add(ctx, x, + build_zapformer_attn(ctx, qk, x, positions, lw, shp, rope_base, use_flash, attn_mask, attn_mask_f16)); if (shp.conv_kernel > 0) { x = ggml_add(ctx, x, build_zapformer_conv(ctx, x, lw, shp.conv_kernel, valid_mask, T_valid)); x = ggml_add(ctx, x, conf::feed_forward(ctx, x, lw.ff2_in_w, lw.ff2_in_b, lw.ff2_out_w, lw.ff2_out_b)); @@ -490,7 +529,8 @@ EncoderBuild build_zapformer_encoder_graph(ggml_context * ctx, ggml_set_name(eb.mel_in, "mel.in"); ggml_set_input(eb.mel_in); - ggml_tensor * x = build_zapformer_frontend(ctx, w.zapformer.frontend, eb.mel_in, hp.zap_causal_frontend); + ggml_tensor * x = build_zapformer_frontend(ctx, w.zapformer.frontend, eb.mel_in, hp.zap_causal_frontend, + conf::detect_direct_pw(backend_name)); ggml_set_name(x, "enc.subsample.out"); eb.dumps.pre_encode_out = x; transcribe::debug::mark_tensor_for_dump(x); @@ -527,6 +567,13 @@ EncoderBuild build_zapformer_encoder_graph(ggml_context * ctx, const bool use_flash = (backend_name != nullptr && std::string(backend_name).find("CPU") == std::string::npos); + // Flash attention takes the odd-length key mask as F16 [T_pad, T_pad]; + // build it once and share it across the full-rate stages. + ggml_tensor * attn_mask_f16 = nullptr; + if (use_flash && eb.zap_attn_mask_in != nullptr) { + attn_mask_f16 = ggml_cast(ctx, ggml_repeat_4d(ctx, eb.zap_attn_mask_in, T_pad, T_pad, 1, 1), GGML_TYPE_F16); + } + for (size_t s = 0; s < hp.zap_stages.size(); ++s) { const auto & shp = hp.zap_stages[s]; const auto & sw = w.zapformer.stages[s]; @@ -543,6 +590,7 @@ EncoderBuild build_zapformer_encoder_graph(ggml_context * ctx, ggml_tensor * pos_s = (ds == 1) ? positions : ggml_view_1d(ctx, positions, T_s, 0); ggml_tensor * valid_s = (ds == 1) ? eb.zap_valid_mask_in : nullptr; ggml_tensor * attn_mask_s = (ds == 1) ? eb.zap_attn_mask_in : nullptr; + ggml_tensor * attn_f16_s = (ds == 1) ? attn_mask_f16 : nullptr; const int64_t T_valid_s = (ds == 1) ? T_orig : T_s; ggml_tensor * stack_res = x; @@ -552,7 +600,7 @@ EncoderBuild build_zapformer_encoder_graph(ggml_context * ctx, for (int l = 0; l < shp.n_layers; ++l) { x = build_zapformer_layer(ctx, x, pos_s, sw.layers[l], shp, hp.zap_rope_base, use_flash, valid_s, - attn_mask_s, T_valid_s); + attn_mask_s, attn_f16_s, T_valid_s); bypass = ggml_add(ctx, bypass, ggml_scale(ctx, x, shp.residual_scales[l + 1])); } From 2fa8ae70ae88fcfb129cf2c749c2dae04296be06 Mon Sep 17 00:00:00 2001 From: CJ Pais Date: Tue, 1 Dec 2026 20:00:42 +0800 Subject: [PATCH 04/13] gigaam: adaptive RNN-T lookahead span Start the speculative span at 8 frames after a token and double it over blank runs up to 32. Same tokens, about 25% less joint work. FLEURS ru: transcripts identical on v3-e2e-rnnt and v3-rnnt (775/775). --- src/arch/gigaam/decoder.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/arch/gigaam/decoder.cpp b/src/arch/gigaam/decoder.cpp index 58cf4c348..c5425b07b 100644 --- a/src/arch/gigaam/decoder.cpp +++ b/src/arch/gigaam/decoder.cpp @@ -341,9 +341,14 @@ transcribe_status decode_rnnt_greedy(const HostDecoderWeights & host, bool predictor_dirty = true; // Speculate over a short span. Consume all leading blank frames, but stop - // at the first token because it changes the predictor state. - constexpr int lookahead = 32; - int t = 0; + // at the first token because it changes the predictor state. Frames past + // the first token are scored for nothing, so the span starts short after + // a token and doubles over blank runs (8 -> 32): ~25% less joint work + // than a fixed 32 at a token every ~8 frames, identical tokens. + constexpr int lookahead_min = 8; + constexpr int lookahead_max = 32; + int lookahead = lookahead_min; + int t = 0; while (t < T_enc) { if (predictor_dirty) { if (fresh) { @@ -367,8 +372,10 @@ transcribe_status decode_rnnt_greedy(const HostDecoderWeights & host, } if (offset == span) { t += span; + lookahead = std::min(2 * lookahead, lookahead_max); continue; } + lookahead = lookahead_min; // Commit the first token and candidate predictor state at its frame. t += offset; From f0b1e099fdbc6e0a748132a3e59e69099d0610e7 Mon Sep 17 00:00:00 2001 From: CJ Pais Date: Tue, 1 Dec 2026 20:00:42 +0800 Subject: [PATCH 05/13] gigaam: keep the host core warm during GPU encode The calling thread sleeps in the backend synchronize for the whole GPU encode; macOS clocks its core down and the host RNN-T decode right after it runs 4-8x slower. Spin a helper thread during the GPU compute. M1 Metal: decode 30 -> 4 ms on jfk. TRANSCRIBE_GIGAAM_NO_KEEP_WARM=1 turns it off. --- docs/environment-variables.md | 1 + src/arch/gigaam/model.cpp | 51 ++++++++++++++++++++++++++++++++--- 2 files changed, 49 insertions(+), 3 deletions(-) diff --git a/docs/environment-variables.md b/docs/environment-variables.md index fc22b9895..341f4ce95 100644 --- a/docs/environment-variables.md +++ b/docs/environment-variables.md @@ -31,6 +31,7 @@ of tests. | `TRANSCRIBE_FORCE_FLASH` | Force flash attention on. Wins over `TRANSCRIBE_NO_FLASH` if both are set. | | `TRANSCRIBE_CONV_DIRECT_DW` / `TRANSCRIBE_CONV_NO_DIRECT_DW` | Force the depthwise-conv dispatch to the direct `conv_2d_dw` path / the im2col path, overriding the per-family backend default. | | `TRANSCRIBE_CONV_DIRECT_PW` / `TRANSCRIBE_CONV_NO_DIRECT_PW` | Force the pointwise-conv dispatch to direct `mul_mat` / im2col, overriding the backend default. | +| `TRANSCRIBE_GIGAAM_NO_KEEP_WARM` | gigaam: do not spin a host thread while a GPU backend computes the encoder. The spinner keeps the calling core clocked up so the host RNN-T decode right after the encode is not slowed down by a cold core; with it off, one fewer core is busy during the GPU encode. | | `TRANSCRIBE_NO_REPETITION_GUARD` | Turn off the stop for greedy decodes that start repeating themselves, and the trim of a repeating tail at a budget stop (see [`input-limits.md`](input-limits.md)). For byte-exact reference parity; a looping decode then runs to its budget and keeps its repeats. Read once per process. | | `TRANSCRIBE_DUMP_DIR=` | Enable the per-stage tensor dumper; writes `.f32` + `.json` per dumped tensor into ``. The basis for the numerical-comparison harness (`scripts/compare_tensors.py`). | | `TRANSCRIBE_PERF_DEBUG` | Print a per-stage timing breakdown to stderr (DEBUG log) on the families that profile (`cohere`, `granite`, `canary`, `canary_qwen`, `moonshine`, `moonshine_streaming`, `moss`, `qwen3_asr`, `whisper`). For whisper, a value containing `cpu` or `all` additionally prints the CPU sub-section breakdown. | diff --git a/src/arch/gigaam/model.cpp b/src/arch/gigaam/model.cpp index 91b361b7f..9901c9f6e 100644 --- a/src/arch/gigaam/model.cpp +++ b/src/arch/gigaam/model.cpp @@ -23,6 +23,7 @@ #include "weights.h" #include +#include #include #include #include @@ -308,6 +309,44 @@ WindowPlan plan_windows(int T) { return p; } +// Keeps one host core busy while a GPU backend computes the encoder graph. +// The calling thread otherwise sleeps in the backend's synchronize for the +// whole encode, macOS clocks its core down (or moves it to an efficiency +// core), and the host work right after it (RNN-T decode, next call's mel) +// runs 2-6x slower until the clock ramps back up: measured on M1, decode of +// 11 s of audio 25-30 ms instead of 5 ms. TRANSCRIBE_GIGAAM_NO_KEEP_WARM=1 +// disables it (one core spins for the length of the GPU encode). +class HostKeepWarm { + public: + explicit HostKeepWarm(bool enable) { + if (!enable) { + return; + } + try { + thread_ = std::thread([this] { + while (!stop_.load(std::memory_order_relaxed)) { + } + }); + } catch (...) { + // No thread: run without it. + } + } + + ~HostKeepWarm() { + stop_.store(true, std::memory_order_relaxed); + if (thread_.joinable()) { + thread_.join(); + } + } + + HostKeepWarm(const HostKeepWarm &) = delete; + HostKeepWarm & operator=(const HostKeepWarm &) = delete; + + private: + std::atomic stop_{ false }; + std::thread thread_; +}; + // Encode one contiguous mel slice (channel-major [n_mels, n_frames]) and // copy the pre-transpose encoder output (T-major [T_enc * D]) to `out`. // Rebuilds the graph each call; the scheduler is reused, so its allocator @@ -368,9 +407,15 @@ transcribe_status encode_mel_slice(GigaamSession * gc, } const int64_t t_enc_start = ggml_time_us(); - if (ggml_backend_sched_graph_compute(gc->sched, eb.graph) != GGML_STATUS_SUCCESS) { - log_msg(TRANSCRIBE_LOG_LEVEL_ERROR, "gigaam: graph_compute failed"); - return TRANSCRIBE_ERR_BACKEND; + { + const transcribe::BackendKind kind = gm->plan.primary_kind; + const bool on_gpu = kind != transcribe::BackendKind::Cpu && kind != transcribe::BackendKind::Accel && + kind != transcribe::BackendKind::Unknown; + HostKeepWarm keep_warm(on_gpu && !transcribe::env::flag("TRANSCRIBE_GIGAAM_NO_KEEP_WARM")); + if (ggml_backend_sched_graph_compute(gc->sched, eb.graph) != GGML_STATUS_SUCCESS) { + log_msg(TRANSCRIBE_LOG_LEVEL_ERROR, "gigaam: graph_compute failed"); + return TRANSCRIBE_ERR_BACKEND; + } } gc->t_encode_us = ggml_time_us() - t_enc_start; From e84a6071ff36230bcf8f9de380cb0cf60b4c950e Mon Sep 17 00:00:00 2001 From: Nikita Ashikhmin Date: Wed, 2 Dec 2026 02:49:35 +0400 Subject: [PATCH 06/13] gigaam: GigaAM-v4 review fixes (RoPE tables, window bound, refusals, tests) The reference rotates RoPE by the checkpoint's F16 cos/sin tables, and ggml_rope_ext's F32 tables were nearly all of the encoder drift (enc.out 5.7e-4 on ru). The graph now rotates adjacent pairs by tables built at run time and rounded through F16, which equal the checkpoint's up to position 824; enc.out drift is 1.3e-5, and the tolerances are re-derived with the same 1.5x recipe. Encode is ~8% slower on Metal for it. Rounding a long-form window start down could encode 626 frames; plan_windows now reserves the alignment. The smoke test gets samples/ dots.wav, whose second window would start on an odd frame, with the PyTorch transcript of the same windows, and runs again on a GPU backend. The converter and the loader refuse configs the graph does not implement (non-SiLU, non-causal frontend, limited context, intermediate downsampling, mixed qdim, language conditioning, unknown keys, unconverted tensors); a fixture loader smoke covers the loader's refusals. test_gigaam_hf.py no longer fails on the v4 manifest, and scripts/test_gigaam_v4.py tests the pin, the converter and the dumper refusals. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/python-bindings.yml | 8 + docs/models/gigaam.md | 54 +++- docs/porting/families/gigaam.md | 50 +++- .../gigaam/gigaam-v4-e2e-rnnt/_porting-log.md | 53 ++++ scripts/convert-gigaam-v4.py | 114 +++++++- scripts/lib/gigaam_v4_hf.py | 30 +-- scripts/lib/hf_source.py | 7 +- scripts/lib/test_gigaam_hf.py | 5 + scripts/test_convert_gigaam.py | 11 - scripts/test_gigaam_v4.py | 208 ++++++++++++++ src/arch/gigaam/encoder.cpp | 127 ++++++--- src/arch/gigaam/encoder.h | 9 + src/arch/gigaam/model.cpp | 38 +-- src/arch/gigaam/weights.cpp | 137 ++++++---- src/arch/gigaam/weights.h | 12 +- src/transcribe-meta.cpp | 41 ++- tests/CMakeLists.txt | 37 ++- tests/fixtures/make_gguf_fixtures.py | 255 ++++++++++++++++++ tests/gigaam_smoke.cpp | 199 ++++++++++++++ tests/gigaam_v4_e2e_smoke.cpp | 132 +++++++-- tests/tolerances/gigaam-v4.json | 33 +-- 21 files changed, 1332 insertions(+), 228 deletions(-) create mode 100644 scripts/test_gigaam_v4.py create mode 100644 tests/gigaam_smoke.cpp diff --git a/.github/workflows/python-bindings.yml b/.github/workflows/python-bindings.yml index 0706f613a..08e4bbd0b 100644 --- a/.github/workflows/python-bindings.yml +++ b/.github/workflows/python-bindings.yml @@ -29,6 +29,9 @@ on: - "scripts/convert-gigaam.py" - "scripts/dump_reference_gigaam_author.py" - "scripts/test_convert_gigaam.py" + - "scripts/convert-gigaam-v4.py" + - "scripts/dump_reference_gigaam_v4_hf.py" + - "scripts/test_gigaam_v4.py" - "tests/**" - "ggml/**" - "CMakeLists.txt" @@ -44,6 +47,9 @@ on: - "scripts/convert-gigaam.py" - "scripts/dump_reference_gigaam_author.py" - "scripts/test_convert_gigaam.py" + - "scripts/convert-gigaam-v4.py" + - "scripts/dump_reference_gigaam_v4_hf.py" + - "scripts/test_gigaam_v4.py" - "tests/**" - "ggml/**" - "CMakeLists.txt" @@ -94,6 +100,8 @@ jobs: run: uv run scripts/lib/test_gigaam_hf.py - name: GigaAM converter profiles run: uv run scripts/test_convert_gigaam.py + - name: GigaAM-v4 source pin, converter and dumper + run: uv run scripts/test_gigaam_v4.py python-shared: runs-on: blacksmith-2vcpu-ubuntu-2404 diff --git a/docs/models/gigaam.md b/docs/models/gigaam.md index 20f38cb57..f45c30f5e 100644 --- a/docs/models/gigaam.md +++ b/docs/models/gigaam.md @@ -13,6 +13,12 @@ A fifth variant, `gigaam-multilingual-large-ctc`, comes from transcribes five languages, and is not published yet; see [GigaAM Multilingual Large CTC](#gigaam-multilingual-large-ctc). +A sixth, `gigaam-v4-e2e-rnnt`, comes from +[`ai-sage/GigaAM-v4`](https://huggingface.co/ai-sage/GigaAM-v4): Russian and +English, cased and punctuated, with a new encoder (Zapformer). No GGUF is +published under `handy-computer` yet; see +[GigaAM-v4 E2E RNN-T](#gigaam-v4-e2e-rnnt). + For the architecture deep-dive, validation contract, and porting notes, see the family doc at [`docs/porting/families/gigaam.md`](../porting/families/gigaam.md). @@ -31,6 +37,11 @@ see the family doc at output is normalized for downstream ASR scoring pipelines that expect this convention. Higher raw WER than the e2e variants because errors on case/punctuation are no longer absorbed by tokenization. +- **Cased + punctuated Russian and English.** `gigaam-v4-e2e-rnnt` — + GigaAM-v4's Zapformer encoder with the v3 RNN-T head shape; lower WER on + FLEURS Russian than `gigaam-v3-e2e-rnnt` (4.4% vs 5.4% at Q8_0). No + pre-built GGUF; convert it yourself, see + [GigaAM-v4 E2E RNN-T](#gigaam-v4-e2e-rnnt). - **Russian, English, Kazakh, Kyrgyz, or Uzbek.** `gigaam-multilingual-large-ctc` — lowercase charwise output with no punctuation. No pre-built GGUF; convert it yourself, see @@ -99,6 +110,42 @@ with `run: unsupported language`. On the clips checked with Metal, Q5_K_M and larger quantizations match the reference transcript; Q4_K_M changes one letter on one Kazakh clip. +## GigaAM-v4 E2E RNN-T + +`gigaam-v4-e2e-rnnt` is the `e2e` head of +[`ai-sage/GigaAM-v4`](https://huggingface.co/ai-sage/GigaAM-v4). It +transcribes Russian and English into cased, punctuated text. GigaAM-v4 +replaces the v3 Conformer with a Zapformer encoder (three stages of 4, 11 +and 4 layers, the middle one at half the frame rate); the RNN-T head and +the mel frontend have the v3 shape. The checkpoint's second head, `raw` +(lowercase, no punctuation), converts with `--head raw` but has not been +validated. + +The variant is not in the table above: no GGUF is published under +`handy-computer`. Conversion, numerical validation at F32 and the FLEURS +WER gate pass; the [family doc](../porting/families/gigaam.md#gigaam-v4-e2e-rnnt) +has the validation results and WER. + +Convert, quantize, and run: + +```bash +uv run --project scripts/envs/gigaam-v4 \ + scripts/convert-gigaam-v4.py ai-sage/GigaAM-v4 + +build/bin/transcribe-quantize \ + models/gigaam-v4-e2e-rnnt/gigaam-v4-e2e-rnnt-F32.gguf \ + models/gigaam-v4-e2e-rnnt/gigaam-v4-e2e-rnnt-Q8_0.gguf \ + --quant Q8_0 + +build/bin/transcribe-cli \ + -m models/gigaam-v4-e2e-rnnt/gigaam-v4-e2e-rnnt-Q8_0.gguf \ + samples/ru.wav +``` + +The converter downloads the files it reads at the commit pinned in +`scripts/lib/gigaam_v4_hf.py` and writes a 956 MB (956411456 bytes) F32 +GGUF. It also accepts a local directory holding that commit's files. + ## Input limits GigaAM is trained for utterances up to about **25 seconds**. Longer audio is @@ -107,6 +154,10 @@ stitched into one sequence for a single greedy decode. There is no practical length limit, and the encoder workspace does not grow with input length. Audio up to 25 s is encoded in one pass. See the [input-length contract](../input-limits.md). +`gigaam-v4-e2e-rnnt` uses the same windows, each starting on an even +encoder frame so its half-rate stage groups the same frame pairs as one +pass over the whole clip would. + The runtime applies the same 25 s window to `gigaam-multilingual-large-ctc`. The port records no training length for this variant, and no clip longer than 25 s has been compared with the reference. @@ -145,4 +196,5 @@ runtime contract. `gigaam-multilingual-large-ctc` has the same capabilities and gaps, except that it transcribes the five languages listed in -[its section](#gigaam-multilingual-large-ctc). +[its section](#gigaam-multilingual-large-ctc). `gigaam-v4-e2e-rnnt` has +them too, and transcribes Russian and English. diff --git a/docs/porting/families/gigaam.md b/docs/porting/families/gigaam.md index 19d38c46a..a7d738887 100644 --- a/docs/porting/families/gigaam.md +++ b/docs/porting/families/gigaam.md @@ -340,12 +340,15 @@ branch holds the same files). Languages: ru, en. Output is cased and punctuated. Offline only. v4 replaces the v3 Conformer with a Zapformer encoder: a 2D conv frontend -with a ConvNeXt block (4x subsampling), then three stacks of 4, 11 and 4 -layers at 768, 1024 and 768 dims. The middle stack runs at half the frame -rate on pairs of frames stacked into a 1536-wide input. Each layer is +with a ConvNeXt block (4x subsampling), then three stages of 4, 11 and 4 +layers at 768, 1024 and 768 dims. Stage `s` is `encoder.encoders[s]` of +`modeling_gigaam.py`, a `ZapformerStack`; the C++ hparams, the GGUF keys +(`stt.gigaam.encoder.stage_*`) and the dumps (`enc.stage..out`) use +"stage". The middle stage runs at half the frame rate on pairs of frames +stacked into a 1536-wide input. Each layer is feed-forward, RoPE attention with separate query/key and value/gate -inputs, an optional convolution module (none in the middle stack), a -second feed-forward, and an RmsNorm; each stack mixes its layers' outputs +inputs, an optional convolution module (none in the middle stage), a +second feed-forward, and an RmsNorm; each stage mixes its layers' outputs through learned `residual_scales`. The RNN-T head (320-wide LSTM predictor and joint, 1024 SentencePiece pieces + blank) has the v3 shape, and the mel frontend has the v3 values. The checkpoint also has a `raw` @@ -364,7 +367,7 @@ and has not been validated. | Reference dumper | `scripts/dump_reference_gigaam_v4_hf.py` | | Python env | `scripts/envs/gigaam-v4/` | | C++ | `src/arch/gigaam/encoder.cpp` (`build_zapformer_encoder_graph`), `weights.cpp` (`EncoderKind::Zapformer`) | -| Smoke test | `tests/gigaam_v4_e2e_smoke.cpp` (`TRANSCRIBE_GIGAAM_V4_GGUF`) | +| Smoke tests | `tests/gigaam_v4_e2e_smoke.cpp` (real model, `TRANSCRIBE_GIGAAM_V4_GGUF`); `tests/gigaam_smoke.cpp` (fixture loader, default build) | ### Commands @@ -386,10 +389,16 @@ Validation: ```bash uv run scripts/preflight.py --family gigaam --variant gigaam-v4-e2e-rnnt --gate B uv run scripts/validate.py all --family gigaam --variant gigaam-v4-e2e-rnnt +cmake -B build -DTRANSCRIBE_BUILD_REAL_MODEL_TESTS=ON && cmake --build build --target transcribe_gigaam_v4_e2e_smoke TRANSCRIBE_GIGAAM_V4_GGUF=$PWD/models/gigaam-v4-e2e-rnnt/gigaam-v4-e2e-rnnt-Q8_0.gguf \ - ctest --test-dir build -R gigaam_v4 + ctest --test-dir build -R gigaam_v4 --no-tests=error --output-on-failure +uv run scripts/test_gigaam_v4.py ``` +The smoke test is defined only with `-DTRANSCRIBE_BUILD_REAL_MODEL_TESTS=ON`; +`--no-tests=error` makes a build without it fail instead of passing with no +test run. It runs on CPU and, when a GPU backend is available, again on it. + ### Reference The family's `gigaam` package pin (6e4b027c) has no Zapformer, so v4 does @@ -410,15 +419,36 @@ GGUF holds exact upcasts of those values, except the stage `proj` / `weight_scale` (`in_channels^-0.5 / 0.3`). F16 re-rounds those and the heads. -C++ dumps `enc.stage..out` for each stack, before frames are +The checkpoint also stores the RoPE cos/sin tables, in F16, and the +reference rotates by them. C++ does not read them from the GGUF: it builds +the same tables at run time (`fill_zapformer_rope_tables`: the reference's +F32 angles, rounded through F16), which equal the checkpoint's up to +position 824, past the longest window. With `ggml_rope_ext`'s F32 tables +instead, `enc.out` drifted 5.7e-4 from the reference on `ru`, 44x the +drift with the F16 tables. + +C++ dumps `enc.stage..out` for each stage, before frames are unstacked, so the shapes are `[T_pad / ds, ds * D]` on both sides. +What the converter and the loader accept is what the graph implements, and +the rest is refused: the converter refuses an encoder config whose +effective value (the config's, or `ZapformerEncoder`'s default) differs — +activation other than SiLU, a non-causal frontend, limited-context +attention, `embed_dim` other than the first stage dim, a downsampling +factor other than 1 or the largest, stages with different query head dims, +language conditioning, a key `ZapformerEncoder` does not take — and a +checkpoint tensor it does not convert (other than the RoPE tables and the +unselected head). The loader refuses the same geometry in a GGUF with +`TRANSCRIBE_ERR_GGUF`; an unknown `stt.gigaam.encoder.type` fails with +`gigaam: unsupported stt.gigaam.encoder.type= (expected conformer +or zapformer)`. + ### Capability Validation | Capability | Mode | Command / test | Expected observable | Status | |------------|------|----------------|---------------------|--------| | Transcribe (ru, en) | no language hint | `build/bin/transcribe-cli -m ` | transcript equal to the reference's | PASS on `samples/ru.wav`, `fleurs-ru.wav`, `ru-short.wav`, `fleurs-en.wav`, `jfk.wav`: exact for F32, F16, Q8_0, Q6_K and Q5_K_M on CPU and Metal; Q4_K_M differs by one comma on `ru-short` and one on `fleurs-en`. | -| Long-form (> 25 s, windowed) | no language hint | same on `samples/ru-long.wav` (33.8 s), and on 12 concatenated FLEURS ru/en clips (34-98 s) whose windows start on an odd frame | transcript equal to the reference's whole-clip decode (`ru-long`); equal to the reference run with the C++ windows (FLEURS clips) | PASS (`ru-long` Q8_0 Metal; FLEURS clips F32 Metal, 12/12). Window starts are rounded down to an even frame so the half-rate stack pairs the same frames as whole-clip inference. | +| Long-form (> 25 s, windowed) | no language hint | `transcribe_gigaam_v4_e2e_smoke` on `samples/dots.wav` (35.3 s; its second window would start on odd frame 391); by hand on `samples/ru-long.wav` (33.8 s) and on 12 concatenated FLEURS ru/en clips (34-98 s) whose windows start on an odd frame | transcript equal to the reference run with the C++ windows (`dots`, FLEURS clips); equal to the reference's whole-clip decode (`ru-long`) | PASS (`dots` F32, F16, Q8_0 on CPU and Metal, in the smoke test; `ru-long` Q8_0 Metal; FLEURS clips F32 Metal, 12/12). Window starts are rounded down to an even frame so the half-rate stage pairs the same frames as whole-clip inference, and the kept stride gives up that frame so a window still encodes at most 625 frames. Without the rounding `dots` reads "future. You" for "future you". | | Batch | `transcribe_run_batch` | `transcribe_gigaam_v4_e2e_smoke` | each batch result equal to its single run | PASS. Zapformer takes the per-utterance loop, not the packed batch encode. | | Raw head, streaming, translate, language detection | n/a | n/a | n/a | SKIP (not converted / not exposed). | | Word timestamps | n/a | n/a | n/a | ACCEPTED GAP, as for v3: token timestamps only. | @@ -427,7 +457,7 @@ Numerical validation at F32 on CPU, one thread, on `ru` (113 encoder frames, odd, so the padded tail is masked) and `fleurs-en` (264 frames) is within the tolerances with exact transcripts; the observed drift is in the `_comment` of the tolerance file. The largest drift is at `enc.out`, -5.7e-4 on `ru` and 9.6e-4 on `fleurs-en`. +1.3e-5 on `ru` and 1.1e-5 on `fleurs-en`. Reference WER baseline: the PyTorch reference (the module the dumper builds, F32, CPU, whole-clip greedy decode) over the same FLEURS test diff --git a/reports/porting/gigaam/gigaam-v4-e2e-rnnt/_porting-log.md b/reports/porting/gigaam/gigaam-v4-e2e-rnnt/_porting-log.md index 989693714..4ff5fb6ec 100644 --- a/reports/porting/gigaam/gigaam-v4-e2e-rnnt/_porting-log.md +++ b/reports/porting/gigaam/gigaam-v4-e2e-rnnt/_porting-log.md @@ -71,3 +71,56 @@ Surprises worth feeding back into the docs and tooling. conv kernel, a zero downsampling factor or one that does not divide the largest, now fails to load with `TRANSCRIBE_ERR_GGUF` instead of asserting inside ggml. + +## Review fixes (2026-12-02) + +From the review of #285 (vlsi), on top of the maintainer's graph-speed +commits. + +- **RoPE rotates by the reference's F16 tables.** The checkpoint stores the + RoPE cos/sin tables as F16 parameters, and the reference rotates by them; + `ggml_rope_ext` computed them in F32, which accounted for nearly all of + the encoder drift (`enc.out` 5.7e-4 max on `ru`). The graph now rotates + adjacent pairs by tables built at run time, rounded through F16 + (`fill_zapformer_rope_tables`); they equal the checkpoint's bit for bit + up to position 824 (two later entries differ by one F16 ulp), past the + longest window. q and k come out in planar lane order, which the + attention dot product does not see. `enc.out` drift is now 1.3e-5 on + `ru` and 1.1e-5 on `fleurs-en`, and `tests/tolerances/gigaam-v4.json` is + re-derived with the same 1.5x recipe (enc.out 1.5e-3 -> 2.0e-5). +- **Windows stay within 625 frames.** Rounding a window start down could + add a frame past `k_window_frames`; `plan_windows` now takes the + alignment and gives up `align - 1` frames of kept stride. +- **Long-form regression test.** `transcribe_gigaam_v4_e2e_smoke` adds + `samples/dots.wav` (35.3 s, two windows, the second would start on odd + frame 391) with the PyTorch transcript of the same windows. Without the + rounding it fails ("future. You" for "future you"). Exact on F32, F16 + and Q8_0; the K-quants drop a comma, so the check is skipped for them. + The smoke now also runs on a GPU backend when one is available, which + takes the flash-attention branch. +- **Converter and loader refuse what the graph does not implement.** The + converter checks every `ZapformerEncoder` argument's effective value + (config or reference default) and refuses non-SiLU activation, a + non-causal frontend, limited-context attention, `embed_dim` other than + the first stage dim, a downsampling factor other than 1 or the largest, + mixed query head dims, language conditioning, unknown keys, and + checkpoint tensors it does not convert. The loader refuses the same + stage geometry, `causal_frontend=false`, and names the array and lengths + on a stage-array mismatch. The F32 GGUF is byte-identical + (`6cd32ae7…cd745`). +- **Python tests.** `scripts/lib/test_gigaam_hf.py` failed on the v4 + manifest (it expects every manifest in `gigaam_hf.VARIANTS`); it now + checks only author-dumper manifests. `scripts/test_gigaam_v4.py` (in the + python-bindings workflow) tests the pin, the snapshot fetch, the + converter's and the dumper's source refusals, and the config refusals. + The v4 snapshot is fetched through `hf_source.download_snapshot` + (new `allow_patterns`), so an offline miss names the directory. +- **Compute context back to 4 MiB.** The 8 MiB was not needed: the + Zapformer graph builds in 4 MiB, including with dumps on. +- **Fixture loader smoke.** `transcribe_gigaam_smoke` (default build) + loads a toy Zapformer GGUF generated by `tests/fixtures/make_gguf_fixtures.py` + (d_model 8, stages 1,2,1), runs 1 s of silence through it, and checks that + eight one-change mutants (odd qdim, even conv kernel, downsampling 0, an + intermediate factor, mixed qdim, `causal_frontend=false`, a short stage + array, an unknown encoder type) fail with `TRANSCRIBE_ERR_GGUF`. The loader + also refuses `feat_in` differing from `stt.frontend.num_mels`. diff --git a/scripts/convert-gigaam-v4.py b/scripts/convert-gigaam-v4.py index 84131c745..60e96886f 100644 --- a/scripts/convert-gigaam-v4.py +++ b/scripts/convert-gigaam-v4.py @@ -76,6 +76,86 @@ def extract_sp_tokenizer(sp_path: Path, blank_piece: str = "") -> dict: } +# Every argument ZapformerEncoder.__init__ in modeling_gigaam.py takes, with +# its default there. A config key outside this set is one the reference +# would reject or that a newer module reads, so the converter refuses it. +ZAPFORMER_DEFAULTS = { + "in_channels": 64, + "frontend_channels": "8,32,128", + "downsampling_factor": "1,2,4,2", + "embed_dim": None, + "encoder_dim": "320,512,768,512", + "num_encoder_layers": "6,8,14,8", + "query_head_dim": None, + "value_head_dim": "96,96,96,96", + "num_heads": "4,4,4,4", + "feedforward_multiple": "4,4,3,4", + "conv_params": "31,31,15,31", + "causal": False, + "causal_frontend": False, + "chunk_size": -1, + "window_size": (-1, -1), + "chunk_window": (-1, -1), + "max_seq_len": 10000, + "dropout": 0.1, + "dual_mode": False, + "activation": "swish", +} + + +def check_supported_config(cfg: dict) -> None: + """Refuse a config the offline Zapformer graph does not implement. + + The graph is full-context SiLU Zapformer with the causal frontend, no + language conditioning, d_model equal to the first stage dim, each stage + at downsampling 1 or the largest factor, and one query head dim. Each + value is the effective one: the config's, or ZapformerEncoder's default + when the config leaves it out. Raises ValueError naming the key. + """ + enc = cfg["encoder"] + unknown = sorted(k for k in enc if k != "_target_" and k not in ZAPFORMER_DEFAULTS) + if unknown: + raise ValueError(f"cfg.encoder has keys ZapformerEncoder does not take: {', '.join(unknown)}") + + def eff(key): + return enc.get(key, ZAPFORMER_DEFAULTS[key]) + + def refuse(key, value, why): + raise ValueError(f"cfg.encoder.{key} is {value!r}; {why}") + + if str(eff("activation")).lower() != "silu": + refuse("activation", eff("activation"), "only SiLU is implemented (the reference default is swish)") + if eff("causal_frontend") is not True: + refuse("causal_frontend", eff("causal_frontend"), + "only the causal frontend is validated (the reference default is false)") + # Offline inference is full-context when dual_mode resets chunking, or + # when the encoder is not causal; a causal single-mode encoder attends + # within chunks. + if not eff("dual_mode") and eff("causal"): + refuse("causal", eff("causal"), "a causal encoder without dual_mode attends within chunks, which the " + "offline graph does not implement") + dims = parse_int_list(eff("encoder_dim")) + if eff("embed_dim") not in (None, dims[0]): + refuse("embed_dim", eff("embed_dim"), f"the graph needs d_model equal to the first encoder_dim ({dims[0]})") + if dims[-1] != dims[0]: + refuse("encoder_dim", eff("encoder_dim"), + f"the converter needs the last stage dim ({dims[-1]}) to equal the first ({dims[0]}, d_model)") + ds = parse_int_list(eff("downsampling_factor")) + if any(d not in (1, max(ds)) for d in ds): + refuse("downsampling_factor", eff("downsampling_factor"), + f"each stage must use 1 or the largest factor ({max(ds)}); the graph masks the padded tail only " + "at those rates") + heads = parse_int_list(eff("num_heads")) + qdims = (parse_int_list(eff("query_head_dim")) if eff("query_head_dim") is not None + else [d // h for d, h in zip(dims, heads)]) + if len(set(qdims)) != 1: + refuse("query_head_dim", eff("query_head_dim"), "the graph uses one RoPE table, so every stage needs " + "the same query head dim") + if cfg.get("language_conditioning"): + raise ValueError("cfg.language_conditioning is set; language-conditioned Zapformer (FiLM, late fusion) " + "is not implemented") + + def convert(model_dir: Path, out_path: Path, head: str, repo_id: str) -> None: cfg_path = model_dir / "config.json" st_path = model_dir / "model.safetensors" @@ -87,15 +167,19 @@ def convert(model_dir: Path, out_path: Path, head: str, repo_id: str) -> None: head_cfg = cfg["heads"][head] dec_cfg = cfg["decodings"][head] + check_supported_config(cfg) + tok_path = model_dir / dec_cfg["model_path"] tok = extract_sp_tokenizer(tok_path) sd = load_file(str(st_path)) sd_keys = set(sd.keys()) + consumed: set[str] = set() def get_f32(key: str) -> np.ndarray: if key not in sd: raise KeyError(f"missing tensor {key!r}") + consumed.add(key) return np.ascontiguousarray(sd[key].astype(np.float32)) # Encoder structure @@ -103,20 +187,16 @@ def get_f32(key: str) -> np.ndarray: stage_layers = parse_int_list(enc_cfg["num_encoder_layers"]) stage_dims = parse_int_list(enc_cfg["encoder_dim"]) stage_heads = parse_int_list(enc_cfg["num_heads"]) - stage_qdim = parse_int_list(enc_cfg["query_head_dim"]) + stage_qdim = (parse_int_list(enc_cfg["query_head_dim"]) if enc_cfg.get("query_head_dim") is not None + else [d // h for d, h in zip(parse_int_list(enc_cfg["encoder_dim"]), stage_heads)]) stage_vdim = parse_int_list(enc_cfg["value_head_dim"]) stage_ff_mult = parse_int_list(enc_cfg["feedforward_multiple"]) stage_conv_kernel = parse_int_list(enc_cfg["conv_params"]) stage_downsampling = parse_int_list(enc_cfg["downsampling_factor"]) - causal_frontend = bool(enc_cfg.get("causal_frontend", True)) - activation = str(enc_cfg.get("activation", "SiLU")).lower() - if activation != "silu": - raise ValueError(f"unsupported Zapformer activation {activation!r} (only SiLU implemented)") + causal_frontend = True # check_supported_config refuses anything else - feat_in = int(enc_cfg["in_channels"]) + feat_in = int(enc_cfg.get("in_channels", ZAPFORMER_DEFAULTS["in_channels"])) d_model = stage_dims[0] - if stage_dims[-1] != d_model: - raise ValueError(f"expected final stage dim {stage_dims[-1]} == {d_model}") # RNN-T head hparams pred_cfg = head_cfg["decoder"] @@ -128,7 +208,8 @@ def get_f32(key: str) -> np.ndarray: joint_n_classes = int(joint_cfg["num_classes"]) if len(tok["tokens"]) != pred_vocab or tok["blank_id"] != pred_vocab - 1: raise ValueError( - f"tokenizer size {len(tok['tokens'])} / blank {tok['blank_id']} != pred_vocab {pred_vocab}" + f"{tok_path.name} gives {len(tok['tokens'])} tokens (blank id {tok['blank_id']}), but " + f"cfg.heads.{head}.decoder.num_classes is {pred_vocab}; the tokenizer and the RNN-T head must agree" ) # Preprocessor hparams @@ -142,7 +223,7 @@ def get_f32(key: str) -> np.ndarray: mel_norm_raw = pre_cfg.get("mel_norm") fe_mel_norm = mel_scale if mel_norm_raw is None else f"{mel_scale}+{mel_norm_raw}" - # Stage scalar/small-vector parameters stored as KVs (avoids quantizer edge cases) + # Stage scales and the output RmsNorm scale and eps go to KVs, which quantization never rounds n_stages = len(stage_layers) stage_input_scales: list[float] = [] stage_residual_scales: list[list[float]] = [] @@ -359,6 +440,19 @@ def add(src_name: str, dst_name: str) -> None: add(f"{hpfx}.joint.joint_net.1.weight", "joint.out.weight") add(f"{hpfx}.joint.joint_net.1.bias", "joint.out.bias") + # Every checkpoint tensor is either written above or known to be unused: + # the RoPE tables (rebuilt at load, see fill_zapformer_rope_tables) and + # the head not selected. Anything else is a module the graph would drop. + left = sorted( + k for k in sd_keys - consumed + if "rope_bank" not in k and not (k.startswith("model.heads.") and not k.startswith(f"model.heads.{head}.")) + ) + if left: + raise ValueError( + f"{len(left)} checkpoint tensors are not converted, e.g. {', '.join(left[:5])}; the checkpoint has " + "modules the Zapformer graph does not implement" + ) + print(f"Added {n_added} tensors ({bytes_out / (1024 * 1024):.1f} MB)") writer.write_header_to_file() writer.write_kv_data_to_file() diff --git a/scripts/lib/gigaam_v4_hf.py b/scripts/lib/gigaam_v4_hf.py index d27147db9..bc387e4c4 100644 --- a/scripts/lib/gigaam_v4_hf.py +++ b/scripts/lib/gigaam_v4_hf.py @@ -18,7 +18,6 @@ import importlib.util import json -import os import sys from pathlib import Path @@ -53,24 +52,14 @@ def check_revision(revision: str | None) -> None: def snapshot_dir(revision: str | None = None) -> Path: - """Download (or reuse) the pinned snapshot and return its directory.""" - check_revision(revision) - from huggingface_hub import snapshot_download + """Download (or reuse) the pinned snapshot and return its directory. - from lib.gguf_common import slug_from_repo_id + Goes through hf_source.download_snapshot, so the snapshot lands where the + other pinned sources do and an offline miss names the directory.""" + check_revision(revision) + from lib.hf_source import download_snapshot - models_root = os.environ.get("TRANSCRIBE_MODELS_DIR") - local_dir = None - if models_root: - local_dir = Path(models_root) / f"{slug_from_repo_id(REPO_ID)}@{REVISION}" - local_dir.mkdir(parents=True, exist_ok=True) - print(f"Downloading {REPO_ID}@{REVISION} from Hugging Face...") - return Path(snapshot_download( - repo_id=REPO_ID, - revision=REVISION, - allow_patterns=SNAPSHOT_FILES, - local_dir=str(local_dir) if local_dir is not None else None, - )) + return download_snapshot(REPO_ID, REVISION, allow_patterns=SNAPSHOT_FILES) def import_modeling(path: Path): @@ -106,8 +95,11 @@ def load_model(path: Path, device: str = "cpu"): state = load_file(str(path / "model.safetensors")) state = {k.removeprefix("model."): v for k, v in state.items()} missing, unexpected = model.load_state_dict(state, strict=False) - # The RoPE tables are computed buffers; anything else unmatched means - # the module and the checkpoint disagree. + # The checkpoint's RoPE tables (F16 values) load into the module's + # rope_bank parameters, so the reference rotates by F16-rounded cos/sin; a + # rope_bank key the module does not build (the per-stack aliases) is + # tolerated. Anything else unmatched means the module and the checkpoint + # disagree. missing = [k for k in missing if "rope_bank" not in k] unexpected = [k for k in unexpected if "rope_bank" not in k] if missing or unexpected: diff --git a/scripts/lib/hf_source.py b/scripts/lib/hf_source.py index cc9872cde..eae181dce 100644 --- a/scripts/lib/hf_source.py +++ b/scripts/lib/hf_source.py @@ -30,9 +30,13 @@ def looks_like_repo_id(s: str) -> bool: return "/" in s and not Path(s).expanduser().exists() -def download_snapshot(repo_id: str, revision: str | None = None) -> Path: +def download_snapshot(repo_id: str, revision: str | None = None, + allow_patterns: list[str] | None = None) -> Path: """Download an HF snapshot and return its local directory. + `allow_patterns` limits the download to those files (passed through to + `snapshot_download`); None fetches the whole repo. + When `$TRANSCRIBE_MODELS_DIR` is set the snapshot lands in `//`, or in `/@/` when `revision` is a commit hash, full or abbreviated; otherwise @@ -71,6 +75,7 @@ def download_snapshot(repo_id: str, revision: str | None = None) -> Path: resolved = snapshot_download( repo_id=repo_id, revision=revision, + allow_patterns=allow_patterns, local_dir=str(local_dir) if local_dir is not None else None, ) except LocalEntryNotFoundError as e: diff --git a/scripts/lib/test_gigaam_hf.py b/scripts/lib/test_gigaam_hf.py index 74382e2f7..3a314dbe2 100644 --- a/scripts/lib/test_gigaam_hf.py +++ b/scripts/lib/test_gigaam_hf.py @@ -81,6 +81,11 @@ def test_every_golden_manifest_names_the_pinned_source_of_its_variant(self): named = {} for path in manifests: m = json.loads(path.read_text(encoding="utf-8")) + # GigaAM-v4 has its own pin (lib.gigaam_v4_hf) and dumper; its + # manifest is checked by scripts/test_gigaam_v4.py. + if m["reference"]["entrypoint"] != "scripts/dump_reference_gigaam_author.py": + self.assertEqual(m["reference"]["entrypoint"], "scripts/dump_reference_gigaam_v4_hf.py", path.name) + continue key = m["reference"]["variant_key"] src = m["source_model"] named[key] = (src["hf_repo"], src["hf_revision"]) diff --git a/scripts/test_convert_gigaam.py b/scripts/test_convert_gigaam.py index 7a3217b79..39b9e0c23 100644 --- a/scripts/test_convert_gigaam.py +++ b/scripts/test_convert_gigaam.py @@ -67,17 +67,6 @@ def test_every_profile_matches_the_variant_key_and_languages_of_its_golden_manif self.assertEqual(profiles, manifests) -class GigaamV4PinTest(unittest.TestCase): - def test_the_v4_manifest_names_the_pinned_repo_and_commit(self): - from lib.gigaam_v4_hf import REPO_ID, REVISION - - m = json.loads((_GOLDEN / "gigaam-v4-e2e-rnnt.manifest.json").read_text(encoding="utf-8")) - self.assertEqual( - (m["source_model"]["hf_repo"], m["source_model"]["hf_revision"], m["reference"]["revision"]), - (REPO_ID, REVISION, REVISION), - ) - - class MainTest(unittest.TestCase): def run_main(self, model: str, slug: str) -> tuple[int, str, list]: """Run main() with convert() replaced, and return the exit code, diff --git a/scripts/test_gigaam_v4.py b/scripts/test_gigaam_v4.py new file mode 100644 index 000000000..a7e8671a5 --- /dev/null +++ b/scripts/test_gigaam_v4.py @@ -0,0 +1,208 @@ +#!/usr/bin/env -S uv run --script +# /// script +# requires-python = ">=3.11" +# dependencies = [ +# "gguf>=0.10", +# "huggingface-hub>=0.30", +# "numpy", +# "safetensors", +# "sentencepiece", +# ] +# /// +"""Unit tests for the GigaAM-v4 source pin, converter and reference dumper. + +Covers the parts that need neither torch nor the weights: the pin against +the golden manifest, the revision refusal, the snapshot fetch through +hf_source, the converter's and the dumper's refusal of another source, and +the converter's refusal of encoder configs the Zapformer graph does not +implement. + +Run standalone (exit-code driven): uv run scripts/test_gigaam_v4.py +Or under pytest: pytest scripts/test_gigaam_v4.py +""" + +from __future__ import annotations + +import argparse +import copy +import importlib.util +import io +import json +import sys +import tempfile +import unittest +from contextlib import redirect_stderr +from pathlib import Path +from unittest import mock + +_SCRIPTS = Path(__file__).resolve().parent +_GOLDEN = _SCRIPTS.parent / "tests" / "golden" / "gigaam" +sys.path.insert(0, str(_SCRIPTS)) + +from lib import gigaam_v4_hf # noqa: E402 + + +def _load(name: str, file: str): + spec = importlib.util.spec_from_file_location(name, _SCRIPTS / file) + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + return module + + +convert_v4 = _load("convert_gigaam_v4", "convert-gigaam-v4.py") +dumper_v4 = _load("dump_reference_gigaam_v4_hf", "dump_reference_gigaam_v4_hf.py") + +_OTHER = "2f8a57144e6ec3adfd32fe0484d9ea9913305bc8" + +# cfg of ai-sage/GigaAM-v4 config.json at the pin, trimmed to what +# check_supported_config reads. +_V4_CFG = { + "encoder": { + "_target_": "gigaam.encoder.ZapformerEncoder", + "activation": "SiLU", + "causal_frontend": True, + "chunk_size": [-1, 4, 8, 16], + "conv_params": "5,0,5", + "downsampling_factor": "1,2,1", + "dual_mode": True, + "encoder_dim": "768,1024,768", + "feedforward_multiple": "4,4,4", + "frontend_channels": "16,32,64", + "in_channels": 64, + "num_encoder_layers": "4,11,4", + "num_heads": "12,16,12", + "query_head_dim": "32,32,32", + "value_head_dim": "32,32,32", + "window_size": [[-1, -1], [32, 0], [32, 0], [32, 0]], + }, +} + + +class PinTest(unittest.TestCase): + def test_the_v4_manifest_names_the_pinned_repo_and_commit(self): + m = json.loads((_GOLDEN / "gigaam-v4-e2e-rnnt.manifest.json").read_text(encoding="utf-8")) + self.assertEqual( + (m["source_model"]["hf_repo"], m["source_model"]["hf_revision"], m["reference"]["revision"], + m["reference"]["variant_key"]), + (gigaam_v4_hf.REPO_ID, gigaam_v4_hf.REVISION, gigaam_v4_hf.REVISION, "v4_e2e_rnnt"), + ) + self.assertIn(m["reference"]["variant_key"], dumper_v4.VARIANT_HEADS) + + def test_the_pinned_revision_and_none_are_accepted(self): + gigaam_v4_hf.check_revision(gigaam_v4_hf.REVISION) + gigaam_v4_hf.check_revision(None) + + def test_a_revision_other_than_the_pin_is_refused(self): + with self.assertRaisesRegex(ValueError, f"{_OTHER} differs from .* {gigaam_v4_hf.REVISION}"): + gigaam_v4_hf.check_revision(_OTHER) + + def test_the_snapshot_is_fetched_at_the_pin_through_hf_source(self): + with mock.patch("lib.hf_source.download_snapshot", return_value=Path("/snap")) as dl: + self.assertEqual(gigaam_v4_hf.snapshot_dir(), Path("/snap")) + dl.assert_called_once_with(gigaam_v4_hf.REPO_ID, gigaam_v4_hf.REVISION, + allow_patterns=gigaam_v4_hf.SNAPSHOT_FILES) + + def test_another_revision_stops_before_the_download(self): + with mock.patch("lib.hf_source.download_snapshot") as dl, self.assertRaises(ValueError): + gigaam_v4_hf.snapshot_dir(_OTHER) + dl.assert_not_called() + + +class ConverterMainTest(unittest.TestCase): + def run_main(self, model: str) -> tuple[int, str, int]: + err = io.StringIO() + with tempfile.TemporaryDirectory() as d, redirect_stderr(err), \ + mock.patch.object(convert_v4, "convert") as convert, \ + mock.patch.object(convert_v4, "snapshot_dir", return_value=Path(d)): + code = convert_v4.main(["convert-gigaam-v4.py", model, str(Path(d) / "out.gguf")]) + return code, err.getvalue().strip(), convert.call_count + + def test_the_pinned_repo_is_converted(self): + self.assertEqual(self.run_main(gigaam_v4_hf.REPO_ID), (0, "", 1)) + + def test_another_repo_id_is_refused_before_converting(self): + code, err, calls = self.run_main("ai-sage/GigaAM-v3") + self.assertEqual((code, calls), (2, 0)) + self.assertIn(gigaam_v4_hf.REPO_ID, err) + + +class _Loaded(Exception): + pass + + +class DumperSourceTest(unittest.TestCase): + def decode(self, revision=None, model=None) -> None: + """Run cmd_decode with the load replaced; reaching it raises _Loaded.""" + args = argparse.Namespace(variant="v4_e2e_rnnt", revision=revision, model=model, torch_threads=1, + device="cpu") + # cmd_decode imports soundfile and torch before the load; neither is + # needed to reach it. + with mock.patch.dict(sys.modules, {"soundfile": mock.MagicMock(), "torch": mock.MagicMock()}), \ + mock.patch.object(dumper_v4, "load_model", side_effect=_Loaded), \ + mock.patch.object(dumper_v4, "snapshot_dir", return_value=Path("/snap")), \ + mock.patch.object(dumper_v4, "configure_torch"): + dumper_v4.cmd_decode(args) + + def test_the_pinned_source_reaches_the_load(self): + with self.assertRaises(_Loaded): + self.decode(revision=gigaam_v4_hf.REVISION, model=gigaam_v4_hf.REPO_ID) + + def test_another_revision_stops_the_dump_before_loading(self): + with self.assertRaisesRegex(SystemExit, f"{_OTHER} differs"): + self.decode(revision=_OTHER) + + def test_another_model_stops_the_dump_before_loading(self): + with self.assertRaisesRegex(SystemExit, "--model 'ai-sage/GigaAM-v3'"): + self.decode(model="ai-sage/GigaAM-v3") + + +class SupportedConfigTest(unittest.TestCase): + def check(self, edit=None, drop=None, **top): + cfg = copy.deepcopy(_V4_CFG) + cfg["encoder"].update(edit or {}) + for key in drop or (): + del cfg["encoder"][key] + cfg.update(top) + convert_v4.check_supported_config(cfg) + + def test_the_v4_config_is_accepted(self): + self.check() + + def test_a_config_without_activation_takes_the_swish_default_and_is_refused(self): + with self.assertRaisesRegex(ValueError, r"cfg\.encoder\.activation is 'swish'"): + self.check(drop=["activation"]) + + def test_a_config_without_causal_frontend_takes_the_false_default_and_is_refused(self): + with self.assertRaisesRegex(ValueError, r"cfg\.encoder\.causal_frontend is False"): + self.check(drop=["causal_frontend"]) + + def test_a_causal_single_mode_encoder_is_refused(self): + with self.assertRaisesRegex(ValueError, r"cfg\.encoder\.causal is True"): + self.check({"dual_mode": False, "causal": True, "chunk_size": 8}) + + def test_an_embed_dim_other_than_the_first_stage_dim_is_refused(self): + with self.assertRaisesRegex(ValueError, r"cfg\.encoder\.embed_dim is 512"): + self.check({"embed_dim": 512}) + + def test_an_intermediate_downsampling_factor_is_refused(self): + with self.assertRaisesRegex(ValueError, r"cfg\.encoder\.downsampling_factor is '1,2,4,2'"): + self.check({"downsampling_factor": "1,2,4,2", "encoder_dim": "768,1024,1024,768", + "num_encoder_layers": "4,4,4,4", "num_heads": "12,16,16,12", + "query_head_dim": "32,32,32,32", "value_head_dim": "32,32,32,32", + "feedforward_multiple": "4,4,4,4", "conv_params": "5,0,0,5"}) + + def test_stages_with_different_query_head_dims_are_refused(self): + with self.assertRaisesRegex(ValueError, r"cfg\.encoder\.query_head_dim is '32,64,32'"): + self.check({"query_head_dim": "32,64,32"}) + + def test_language_conditioning_is_refused(self): + with self.assertRaisesRegex(ValueError, "language_conditioning"): + self.check(language_conditioning={"languages": ["ru", "en"], "embedding_dim": 128}) + + def test_a_key_zapformer_encoder_does_not_take_is_refused(self): + with self.assertRaisesRegex(ValueError, "does not take: lang_film"): + self.check({"lang_film": True}) + + +if __name__ == "__main__": + unittest.main() diff --git a/src/arch/gigaam/encoder.cpp b/src/arch/gigaam/encoder.cpp index 0164e2be9..38bae126b 100644 --- a/src/arch/gigaam/encoder.cpp +++ b/src/arch/gigaam/encoder.cpp @@ -8,6 +8,7 @@ #include "encoder.h" #include "conformer/conformer.h" +#include "ggml-backend.h" #include "ggml.h" #include "transcribe-debug.h" #include "transcribe-log.h" @@ -365,13 +366,46 @@ ggml_tensor * build_zapformer_frontend(ggml_context * ctx, return x; } +// RoPE on adjacent pairs with the reference's tables. qk is the [2*H*qdim, +// T_s] q|k projection; off_elems selects q (0) or k (H*qdim). cos/sin are +// [qdim/2, 1, 1, T_s]. GigaAM-v4 keeps the rotation tables in the checkpoint +// as F16, so the reference rotates by F16-rounded cos/sin; ggml_rope_ext +// computes them in F32, which moved enc.out by ~6e-4. +// +// Returns [qdim, H, T_s, 1] in planar order per head ([y0 lanes, y1 lanes] +// instead of interleaved pairs). q and k both go through here and attention +// only takes their dot product over the head dim, so the lane order does not +// matter. +ggml_tensor * zap_rope(ggml_context * ctx, + ggml_tensor * qk, + int64_t off_elems, + int64_t qdim, + int64_t H, + ggml_tensor * cos_t, + ggml_tensor * sin_t) { + const int64_t half = qdim / 2; + const int64_t T_s = qk->ne[1]; + const size_t es = ggml_element_size(qk); + + // Interleaved pairs [2, half, H, T_s] viewed in place, then one copy into + // planar [half, 2, H, T_s]. + ggml_tensor * xi = ggml_view_4d(ctx, qk, 2, half, H, T_s, 2 * es, qdim * es, qk->nb[1], off_elems * es); + ggml_tensor * xp = ggml_cont(ctx, ggml_permute(ctx, xi, 1, 0, 2, 3)); + ggml_tensor * x0 = ggml_view_4d(ctx, xp, half, 1, H, T_s, xp->nb[1], xp->nb[2], xp->nb[3], 0); + ggml_tensor * x1 = ggml_view_4d(ctx, xp, half, 1, H, T_s, xp->nb[1], xp->nb[2], xp->nb[3], xp->nb[1]); + + ggml_tensor * y0 = ggml_sub(ctx, ggml_mul(ctx, x0, cos_t), ggml_mul(ctx, x1, sin_t)); + ggml_tensor * y1 = ggml_add(ctx, ggml_mul(ctx, x0, sin_t), ggml_mul(ctx, x1, cos_t)); + return ggml_reshape_4d(ctx, ggml_concat(ctx, y0, y1, /*dim=*/1), qdim, H, T_s, 1); +} + ggml_tensor * build_zapformer_attn(ggml_context * ctx, ggml_tensor * x_qk, ggml_tensor * x_vg, - ggml_tensor * positions, + ggml_tensor * rope_cos, + ggml_tensor * rope_sin, const ZapformerLayerWeights & lw, const ZapformerStageHParams & shp, - float rope_base, bool use_flash, ggml_tensor * attn_mask, ggml_tensor * attn_mask_f16) { @@ -387,15 +421,11 @@ ggml_tensor * build_zapformer_attn(ggml_context * ctx, ggml_tensor * qk_norm = zap_rms_norm(ctx, x_qk, lw.attn_in_norm_w); ggml_tensor * qk = ggml_add(ctx, ggml_mul_mat(ctx, lw.attn_qk_in_w, qk_norm), lw.attn_qk_in_b); - // q and k are strided [qdim, H, T_s, B] views into qk; rope writes - // contiguous outputs, so no copy is needed before it. - // Standard interleaved RoPE (GGML_ROPE_TYPE_NORMAL = 0) on [qdim, H, T_s, B]. - ggml_tensor * q = ggml_view_4d(ctx, qk, qdim, H, T_s, B, qdim * qk->nb[0], qk->nb[1], qk->nb[2], 0); - ggml_tensor * k = ggml_view_4d(ctx, qk, qdim, H, T_s, B, qdim * qk->nb[0], qk->nb[1], qk->nb[2], dq * qk->nb[0]); - q = ggml_rope_ext(ctx, q, positions, nullptr, qdim, GGML_ROPE_TYPE_NORMAL, 0, rope_base, 1.0f, 0.0f, 1.0f, 32.0f, - 1.0f); - k = ggml_rope_ext(ctx, k, positions, nullptr, qdim, GGML_ROPE_TYPE_NORMAL, 0, rope_base, 1.0f, 0.0f, 1.0f, 32.0f, - 1.0f); + // q and k are read in place from qk (B = 1); zap_rope writes contiguous + // [qdim, H, T_s, 1] outputs. + GGML_ASSERT(B == 1); + ggml_tensor * q = zap_rope(ctx, qk, 0, qdim, H, rope_cos, rope_sin); + ggml_tensor * k = zap_rope(ctx, qk, dq, qdim, H, rope_cos, rope_sin); // v, gate_in and gate_out are row-strided views into vg; the gating ops // read them in place. @@ -492,10 +522,10 @@ ggml_tensor * build_zapformer_conv(ggml_context * ctx, ggml_tensor * build_zapformer_layer(ggml_context * ctx, ggml_tensor * x, - ggml_tensor * positions, + ggml_tensor * rope_cos, + ggml_tensor * rope_sin, const ZapformerLayerWeights & lw, const ZapformerStageHParams & shp, - float rope_base, bool use_flash, ggml_tensor * valid_mask, ggml_tensor * attn_mask, @@ -506,7 +536,7 @@ ggml_tensor * build_zapformer_layer(ggml_context * ctx, x = ggml_add(ctx, x, conf::feed_forward(ctx, x, lw.ff1_in_w, lw.ff1_in_b, lw.ff1_out_w, lw.ff1_out_b)); x = ggml_add(ctx, x, - build_zapformer_attn(ctx, qk, x, positions, lw, shp, rope_base, use_flash, attn_mask, attn_mask_f16)); + build_zapformer_attn(ctx, qk, x, rope_cos, rope_sin, lw, shp, use_flash, attn_mask, attn_mask_f16)); if (shp.conv_kernel > 0) { x = ggml_add(ctx, x, build_zapformer_conv(ctx, x, lw, shp.conv_kernel, valid_mask, T_valid)); x = ggml_add(ctx, x, conf::feed_forward(ctx, x, lw.ff2_in_w, lw.ff2_in_b, lw.ff2_out_w, lw.ff2_out_b)); @@ -539,14 +569,9 @@ EncoderBuild build_zapformer_encoder_graph(ggml_context * ctx, const int64_t T_orig = x->ne[1]; eb.zap_T_orig = static_cast(T_orig); - int max_ds = 1; - for (const auto & shp : hp.zap_stages) { - if (shp.downsampling > max_ds) { - max_ds = shp.downsampling; - } - } - const int64_t pad_t = (T_orig % max_ds == 0) ? 0 : (max_ds - (T_orig % max_ds)); - const int64_t T_pad = T_orig + pad_t; + const int max_ds = hp.zap_max_downsampling; + const int64_t pad_t = (T_orig % max_ds == 0) ? 0 : (max_ds - (T_orig % max_ds)); + const int64_t T_pad = T_orig + pad_t; if (pad_t > 0) { ggml_tensor * pad = ggml_fill(ctx, ggml_new_tensor_3d(ctx, GGML_TYPE_F32, d_model, pad_t, 1), 0.0f); @@ -560,10 +585,16 @@ EncoderBuild build_zapformer_encoder_graph(ggml_context * ctx, ggml_set_input(eb.zap_attn_mask_in); } - ggml_tensor * positions = ggml_new_tensor_1d(ctx, GGML_TYPE_I32, T_pad); - ggml_set_name(positions, "enc.positions"); - ggml_set_input(positions); - eb.dumps.pos_emb = positions; + // RoPE tables [qdim/2, 1, 1, T_pad], filled by fill_zapformer_rope_tables. + // Every stage rotates positions 0..T_s-1, a prefix of these rows; the + // loader requires one qdim for all stages. + const int64_t rope_half = hp.zap_stages.front().qdim / 2; + eb.zap_rope_cos_in = ggml_new_tensor_4d(ctx, GGML_TYPE_F32, rope_half, 1, 1, T_pad); + eb.zap_rope_sin_in = ggml_new_tensor_4d(ctx, GGML_TYPE_F32, rope_half, 1, 1, T_pad); + ggml_set_name(eb.zap_rope_cos_in, "zap.rope_cos"); + ggml_set_name(eb.zap_rope_sin_in, "zap.rope_sin"); + ggml_set_input(eb.zap_rope_cos_in); + ggml_set_input(eb.zap_rope_sin_in); const bool use_flash = (backend_name != nullptr && std::string(backend_name).find("CPU") == std::string::npos); @@ -587,8 +618,11 @@ EncoderBuild build_zapformer_encoder_graph(ggml_context * ctx, x = ggml_reshape_3d(ctx, x, d_model * ds, T_s, 1); } - ggml_tensor * pos_s = (ds == 1) ? positions : ggml_view_1d(ctx, positions, T_s, 0); - ggml_tensor * valid_s = (ds == 1) ? eb.zap_valid_mask_in : nullptr; + ggml_tensor * cos_s = ggml_view_4d(ctx, eb.zap_rope_cos_in, rope_half, 1, 1, T_s, eb.zap_rope_cos_in->nb[1], + eb.zap_rope_cos_in->nb[2], eb.zap_rope_cos_in->nb[3], 0); + ggml_tensor * sin_s = ggml_view_4d(ctx, eb.zap_rope_sin_in, rope_half, 1, 1, T_s, eb.zap_rope_sin_in->nb[1], + eb.zap_rope_sin_in->nb[2], eb.zap_rope_sin_in->nb[3], 0); + ggml_tensor * valid_s = (ds == 1) ? eb.zap_valid_mask_in : nullptr; ggml_tensor * attn_mask_s = (ds == 1) ? eb.zap_attn_mask_in : nullptr; ggml_tensor * attn_f16_s = (ds == 1) ? attn_mask_f16 : nullptr; const int64_t T_valid_s = (ds == 1) ? T_orig : T_s; @@ -599,8 +633,8 @@ EncoderBuild build_zapformer_encoder_graph(ggml_context * ctx, x = ggml_scale(ctx, x, shp.input_scale); for (int l = 0; l < shp.n_layers; ++l) { - x = build_zapformer_layer(ctx, x, pos_s, sw.layers[l], shp, hp.zap_rope_base, use_flash, valid_s, - attn_mask_s, attn_f16_s, T_valid_s); + x = build_zapformer_layer(ctx, x, cos_s, sin_s, sw.layers[l], shp, use_flash, valid_s, attn_mask_s, + attn_f16_s, T_valid_s); bypass = ggml_add(ctx, bypass, ggml_scale(ctx, x, shp.residual_scales[l + 1])); } @@ -668,6 +702,13 @@ EncoderBuild build_encoder_graph(ggml_context * ctx, return eb; } if (hp.encoder_kind == EncoderKind::Zapformer) { + if (n_batch > 1) { + log_msg(TRANSCRIBE_LOG_LEVEL_ERROR, + "gigaam encoder: the Zapformer graph encodes one utterance (n_batch=%d); " + "batches go through run_batch_per_utterance", + n_batch); + return eb; + } return build_zapformer_encoder_graph(ctx, w, hp, n_mel_frames, backend_name); } @@ -812,4 +853,30 @@ EncoderBuild build_encoder_graph(ggml_context * ctx, return eb; } +void fill_zapformer_rope_tables(const EncoderBuild & eb, const GigaamHParams & hp) { + if (eb.zap_rope_cos_in == nullptr || eb.zap_rope_sin_in == nullptr) { + return; + } + const int64_t half = eb.zap_rope_cos_in->ne[0]; + const int64_t T = eb.zap_rope_cos_in->ne[3]; + std::vector cos_buf(static_cast(half * T)); + std::vector sin_buf(static_cast(half * T)); + // RoPETable in modeling_gigaam.py, in F32, then rounded through F16 as the + // checkpoint stores it. Up to position 824 this equals the checkpoint's + // tables bit for bit (two later entries differ by one F16 ulp); a window + // encodes at most k_window_frames positions. + for (int64_t i = 0; i < half; ++i) { + const float inv_freq = + 1.0f / std::pow(hp.zap_rope_base, static_cast(2 * i) / static_cast(2 * half)); + for (int64_t t = 0; t < T; ++t) { + const float angle = static_cast(t) * inv_freq; + const size_t at = static_cast(t * half + i); + cos_buf[at] = ggml_fp16_to_fp32(ggml_fp32_to_fp16(std::cos(angle))); + sin_buf[at] = ggml_fp16_to_fp32(ggml_fp32_to_fp16(std::sin(angle))); + } + } + ggml_backend_tensor_set(eb.zap_rope_cos_in, cos_buf.data(), 0, cos_buf.size() * sizeof(float)); + ggml_backend_tensor_set(eb.zap_rope_sin_in, sin_buf.data(), 0, sin_buf.size() * sizeof(float)); +} + } // namespace transcribe::gigaam diff --git a/src/arch/gigaam/encoder.h b/src/arch/gigaam/encoder.h index 6a02b99ee..2f41f6afc 100644 --- a/src/arch/gigaam/encoder.h +++ b/src/arch/gigaam/encoder.h @@ -74,6 +74,10 @@ struct EncoderBuild { ggml_tensor * zap_valid_mask_in = nullptr; // [1, T_pad, 1] f32: 1 real / 0 pad ggml_tensor * zap_attn_mask_in = nullptr; // [T_pad, 1, 1, 1] f32: 0 real / -INF pad int zap_T_orig = 0; + // Zapformer RoPE tables, ne=[qdim/2, 1, 1, T_pad] f32; filled host-side by + // fill_zapformer_rope_tables after the compute buffer is allocated. + ggml_tensor * zap_rope_cos_in = nullptr; + ggml_tensor * zap_rope_sin_in = nullptr; EncoderDumps dumps{}; ggml_cgraph * graph = nullptr; @@ -98,4 +102,9 @@ EncoderBuild build_encoder_graph(ggml_context * compute_ctx, int n_batch = 1, bool batch_var_len = false); +// Fill eb's Zapformer RoPE tables (no-op for Conformer graphs): cos/sin of the +// reference's angles, rounded through F16 as the GigaAM-v4 checkpoint stores +// them. +void fill_zapformer_rope_tables(const EncoderBuild & eb, const GigaamHParams & hp); + } // namespace transcribe::gigaam diff --git a/src/arch/gigaam/model.cpp b/src/arch/gigaam/model.cpp index 9901c9f6e..5188a41c2 100644 --- a/src/arch/gigaam/model.cpp +++ b/src/arch/gigaam/model.cpp @@ -239,7 +239,7 @@ transcribe_status reset_compute_ctx(GigaamSession * gc) { gc->encoder_out = nullptr; ggml_init_params ip{}; - ip.mem_size = 8 * 1024 * 1024; + ip.mem_size = 4 * 1024 * 1024; ip.mem_buffer = nullptr; ip.no_alloc = true; gc->compute_ctx = ggml_init(ip); @@ -295,13 +295,18 @@ struct WindowPlan { constexpr int k_window_frames = static_cast(k_safe_audio_ms / 40); // 625 frames of 40 ms constexpr int k_window_ctx_frames = 50; // 2 s -WindowPlan plan_windows(int T) { +// +// align: windows start on a multiple of it (Zapformer: its largest +// downsampling factor; 1 for Conformer). The run loop rounds a window's +// start down by up to align - 1 frames, so the kept stride gives those +// frames up and a window still encodes at most k_window_frames. +WindowPlan plan_windows(int T, int align) { WindowPlan p; if (T <= k_window_frames) { return p; } // Equal spans (no short tail window), each at most max_stride. - const int max_stride = k_window_frames - 2 * k_window_ctx_frames; + const int max_stride = k_window_frames - 2 * k_window_ctx_frames - (align - 1); const int n = (T + max_stride - 1) / max_stride; for (int i = 0; i <= n; ++i) { p.bounds.push_back(static_cast(static_cast(T) * i / n)); @@ -405,6 +410,7 @@ transcribe_status encode_mel_slice(GigaamSession * gc, } ggml_backend_tensor_set(eb.zap_attn_mask_in, am.data(), 0, am.size() * sizeof(float)); } + fill_zapformer_rope_tables(eb, gm->hparams); const int64_t t_enc_start = ggml_time_us(); { @@ -600,7 +606,11 @@ transcribe_status run(transcribe_session * session, const float * pcm, int n_sam const int T_total = enc_frames_for_mel(mel_n_frames); int D = 0; - const WindowPlan wp = plan_windows(T_total); + // Zapformer stages with downsampling > 1 group frames from the start of + // the window, so a window must start on a multiple of the largest factor + // for its frame groups to match whole-clip inference. + const int ws_align = gm->hparams.zap_max_downsampling; + const WindowPlan wp = plan_windows(T_total, ws_align); if (wp.n_windows() <= 1) { int T_enc = 0; if (auto st = @@ -619,16 +629,6 @@ transcribe_status run(transcribe_session * session, const float * pcm, int n_sam return decode_and_populate(gc, gm, gc->enc_host.data(), T_enc, D, /*utt_index=*/-1); } - // Zapformer stacks with downsampling > 1 group frames from the start of - // the window, so a window must start on a multiple of the largest factor - // for its frame groups to match whole-clip inference. - int ws_align = 1; - if (gm->hparams.encoder_kind == EncoderKind::Zapformer) { - for (const auto & shp : gm->hparams.zap_stages) { - ws_align = std::max(ws_align, static_cast(shp.downsampling)); - } - } - const int64_t t_enc_start = ggml_time_us(); std::vector win_out; std::vector stitched; @@ -829,8 +829,8 @@ transcribe_status run_batch_encode(GigaamSession * gc, }); } -// Runs each utterance through run(): clips longer than one encoder window, -// the malformed-input fallback, and every Zapformer batch. +// Runs each utterance through run() and appends one result per utterance to +// batch_results; an utterance with null PCM or no samples gets TRANSCRIBE_ERR_INVALID_ARG. transcribe_status run_batch_per_utterance(transcribe_session * session, const float * const * pcm, const int * n_samples, @@ -869,8 +869,8 @@ transcribe_status run_batch(transcribe_session * session, } transcribe::debug::init(); - // shortcut: Zapformer run_batch uses per-utterance loop instead of packed batching, upgrade when multi-utterance throughput matters. - // Dispatch it before the batch mel pass, which only the packed path uses. + // Zapformer has no packed batch encode, so its batches run the per-utterance loop. + // Dispatch before the batch mel pass, which only the packed path uses. if (gm->hparams.encoder_kind == EncoderKind::Zapformer) { return run_batch_per_utterance(session, pcm, n_samples, n, params); } @@ -914,7 +914,7 @@ transcribe_status run_batch(transcribe_session * session, // A batch whose longest clip needs more than one encoder window takes // the per-utterance path below, which windows each clip, so the // batched workspace stays bounded by n x one window. - if (plan_windows(enc_frames_for_mel(T_max)).n_windows() <= 1) { + if (plan_windows(enc_frames_for_mel(T_max), gm->hparams.zap_max_downsampling).n_windows() <= 1) { return run_batch_encode(gc, gm, mels, nf, n_mels, T_max, total_mel_us); } } diff --git a/src/arch/gigaam/weights.cpp b/src/arch/gigaam/weights.cpp index 63640b9eb..8b534ee9b 100644 --- a/src/arch/gigaam/weights.cpp +++ b/src/arch/gigaam/weights.cpp @@ -58,21 +58,33 @@ transcribe_status read_gigaam_hparams(const gguf_context * gguf, GigaamHParams & } else if (enc_type == "zapformer") { hp.encoder_kind = EncoderKind::Zapformer; } else { - log_msg(TRANSCRIBE_LOG_LEVEL_ERROR, "gigaam: unsupported stt.gigaam.encoder.type=%s", enc_type.c_str()); + log_msg(TRANSCRIBE_LOG_LEVEL_ERROR, + "gigaam: unsupported stt.gigaam.encoder.type=%s (expected conformer or zapformer)", + enc_type.c_str()); return TRANSCRIBE_ERR_GGUF; } } - // Encoder. + // Encoder. Keys both encoder kinds share. + if (auto st = read_required_u32_kv(gguf, "stt.gigaam.encoder.n_layers", kFamilyTag, hp.enc_n_layers); + st != TRANSCRIBE_OK) { + return st; + } + if (auto st = read_required_u32_kv(gguf, "stt.gigaam.encoder.d_model", kFamilyTag, hp.enc_d_model); + st != TRANSCRIBE_OK) { + return st; + } + if (auto st = + read_required_u32_kv(gguf, "stt.gigaam.encoder.subsampling_factor", kFamilyTag, hp.enc_subsampling_factor); + st != TRANSCRIBE_OK) { + return st; + } + if (auto st = read_required_u32_kv(gguf, "stt.gigaam.encoder.feat_in", kFamilyTag, hp.enc_feat_in); + st != TRANSCRIBE_OK) { + return st; + } + if (hp.encoder_kind == EncoderKind::Conformer) { - if (auto st = read_required_u32_kv(gguf, "stt.gigaam.encoder.n_layers", kFamilyTag, hp.enc_n_layers); - st != TRANSCRIBE_OK) { - return st; - } - if (auto st = read_required_u32_kv(gguf, "stt.gigaam.encoder.d_model", kFamilyTag, hp.enc_d_model); - st != TRANSCRIBE_OK) { - return st; - } if (auto st = read_required_u32_kv(gguf, "stt.gigaam.encoder.n_heads", kFamilyTag, hp.enc_n_heads); st != TRANSCRIBE_OK) { return st; @@ -85,11 +97,6 @@ transcribe_status read_gigaam_hparams(const gguf_context * gguf, GigaamHParams & st != TRANSCRIBE_OK) { return st; } - if (auto st = read_required_u32_kv(gguf, "stt.gigaam.encoder.subsampling_factor", kFamilyTag, - hp.enc_subsampling_factor); - st != TRANSCRIBE_OK) { - return st; - } if (auto st = read_required_u32_kv(gguf, "stt.gigaam.encoder.subs_kernel_size", kFamilyTag, hp.enc_subs_kernel_size); st != TRANSCRIBE_OK) { @@ -100,10 +107,6 @@ transcribe_status read_gigaam_hparams(const gguf_context * gguf, GigaamHParams & st != TRANSCRIBE_OK) { return st; } - if (auto st = read_required_u32_kv(gguf, "stt.gigaam.encoder.feat_in", kFamilyTag, hp.enc_feat_in); - st != TRANSCRIBE_OK) { - return st; - } if (auto st = read_required_string_kv(gguf, "stt.gigaam.encoder.self_attention_model", kFamilyTag, hp.enc_self_attention_model); st != TRANSCRIBE_OK) { @@ -134,28 +137,19 @@ transcribe_status read_gigaam_hparams(const gguf_context * gguf, GigaamHParams & } } else { // Zapformer (GigaAM-v4). - if (auto st = read_required_u32_kv(gguf, "stt.gigaam.encoder.n_layers", kFamilyTag, hp.enc_n_layers); - st != TRANSCRIBE_OK) { - return st; - } - if (auto st = read_required_u32_kv(gguf, "stt.gigaam.encoder.d_model", kFamilyTag, hp.enc_d_model); - st != TRANSCRIBE_OK) { - return st; - } - if (auto st = read_required_u32_kv(gguf, "stt.gigaam.encoder.feat_in", kFamilyTag, hp.enc_feat_in); - st != TRANSCRIBE_OK) { - return st; - } - if (auto st = read_required_u32_kv(gguf, "stt.gigaam.encoder.subsampling_factor", kFamilyTag, - hp.enc_subsampling_factor); - st != TRANSCRIBE_OK) { - return st; - } if (auto st = read_optional_bool_kv(gguf, "stt.gigaam.encoder.causal_frontend", kFamilyTag, true, hp.zap_causal_frontend); st != TRANSCRIBE_OK) { return st; } + // The symmetric-padding frontend is built by the graph but no + // checkpoint with it has been compared against the reference. + if (!hp.zap_causal_frontend) { + log_msg(TRANSCRIBE_LOG_LEVEL_ERROR, + "gigaam: stt.gigaam.encoder.causal_frontend=false is not supported (only the causal frontend of " + "GigaAM-v4 is validated)"); + return TRANSCRIBE_ERR_GGUF; + } if (auto st = read_required_f32_kv(gguf, "stt.gigaam.encoder.out_norm.scale", kFamilyTag, hp.zap_out_norm_scale); st != TRANSCRIBE_OK) { @@ -172,14 +166,16 @@ transcribe_status read_gigaam_hparams(const gguf_context * gguf, GigaamHParams & auto req_i32_arr = [&](const char * key, std::vector & out) -> transcribe_status { if (read_int32_array_kv(gguf, key, out) != KvResult::Ok || out.empty()) { - log_msg(TRANSCRIBE_LOG_LEVEL_ERROR, "gigaam: required i32 array KV \"%s\" missing or empty", key); + log_msg(TRANSCRIBE_LOG_LEVEL_ERROR, + "gigaam: required i32 array KV \"%s\" is missing, empty, or not an i32 array", key); return TRANSCRIBE_ERR_GGUF; } return TRANSCRIBE_OK; }; auto req_f32_arr = [&](const char * key, std::vector & out) -> transcribe_status { if (read_float32_array_kv(gguf, key, out) != KvResult::Ok || out.empty()) { - log_msg(TRANSCRIBE_LOG_LEVEL_ERROR, "gigaam: required f32 array KV \"%s\" missing or empty", key); + log_msg(TRANSCRIBE_LOG_LEVEL_ERROR, + "gigaam: required f32 array KV \"%s\" is missing, empty, or not an f32 array", key); return TRANSCRIBE_ERR_GGUF; } return TRANSCRIBE_OK; @@ -225,12 +221,25 @@ transcribe_status read_gigaam_hparams(const gguf_context * gguf, GigaamHParams & return st; } - const size_t n_stages = st_layers.size(); - if (st_dims.size() != n_stages || st_heads.size() != n_stages || st_qdim.size() != n_stages || - st_vdim.size() != n_stages || st_ff.size() != n_stages || st_conv.size() != n_stages || - st_ds.size() != n_stages || st_in_scales.size() != n_stages) { - log_msg(TRANSCRIBE_LOG_LEVEL_ERROR, "gigaam: zapformer stage array length mismatch"); - return TRANSCRIBE_ERR_GGUF; + const size_t n_stages = st_layers.size(); + const std::pair stage_arrays[] = { + { "stage_dims", st_dims.size() }, + { "stage_heads", st_heads.size() }, + { "stage_qdim", st_qdim.size() }, + { "stage_vdim", st_vdim.size() }, + { "stage_ff_mult", st_ff.size() }, + { "stage_conv_kernel", st_conv.size() }, + { "stage_downsampling", st_ds.size() }, + { "stage_input_scales", st_in_scales.size() }, + }; + for (const auto & [name, len] : stage_arrays) { + if (len != n_stages) { + log_msg(TRANSCRIBE_LOG_LEVEL_ERROR, + "gigaam: stt.gigaam.encoder.%s has %zu entries, expected %zu (the length of " + "stt.gigaam.encoder.stage_layers)", + name, len, n_stages); + return TRANSCRIBE_ERR_GGUF; + } } hp.zap_stages.resize(n_stages); @@ -269,23 +278,37 @@ transcribe_status read_gigaam_hparams(const gguf_context * gguf, GigaamHParams & return TRANSCRIBE_ERR_GGUF; } } - // Frames are padded to the largest downsampling factor, so every - // stage's factor must divide it. + if (n_stages == 0) { + log_msg(TRANSCRIBE_LOG_LEVEL_ERROR, "gigaam: zapformer has no stages"); + return TRANSCRIBE_ERR_GGUF; + } + // Frames are padded to the largest downsampling factor, and the graph + // masks the padded tail only in full-rate stages (factor 1). A stage at + // the largest factor sees no padded group start once the pad is + // zeroed; an intermediate factor (1 < ds < max) would, and the graph + // does not mask it, so only 1 and the largest are accepted. int32_t max_ds = 1; for (const auto & st : hp.zap_stages) { max_ds = std::max(max_ds, st.downsampling); } for (size_t s = 0; s < n_stages; ++s) { - if (max_ds % hp.zap_stages[s].downsampling != 0) { - log_msg(TRANSCRIBE_LOG_LEVEL_ERROR, "gigaam: stage %zu downsampling %d does not divide %d", s, - hp.zap_stages[s].downsampling, max_ds); + const int32_t ds = hp.zap_stages[s].downsampling; + if (ds != 1 && ds != max_ds) { + log_msg(TRANSCRIBE_LOG_LEVEL_ERROR, + "gigaam: stage %zu downsampling %d is not supported (each stage must use 1 or the largest " + "factor, %d)", + s, ds, max_ds); + return TRANSCRIBE_ERR_GGUF; + } + // One RoPE table serves every stage (modeling_gigaam.py keys the + // tables by qdim; GigaAM-v4 uses one). + if (hp.zap_stages[s].qdim != hp.zap_stages[0].qdim) { + log_msg(TRANSCRIBE_LOG_LEVEL_ERROR, "gigaam: stage %zu qdim %d differs from stage 0 qdim %d", s, + hp.zap_stages[s].qdim, hp.zap_stages[0].qdim); return TRANSCRIBE_ERR_GGUF; } } - if (n_stages == 0) { - log_msg(TRANSCRIBE_LOG_LEVEL_ERROR, "gigaam: zapformer has no stages"); - return TRANSCRIBE_ERR_GGUF; - } + hp.zap_max_downsampling = max_ds; } if (hp.head_kind == HeadKind::RNNT) { @@ -342,6 +365,14 @@ transcribe_status read_gigaam_hparams(const gguf_context * gguf, GigaamHParams & st != TRANSCRIBE_OK) { return st; } + // The Zapformer frontend convolves the mel bands as the frequency axis + // (feat_in of them); a mismatch would only fail inside ggml. + if (hp.encoder_kind == EncoderKind::Zapformer && hp.enc_feat_in != hp.fe_num_mels) { + log_msg(TRANSCRIBE_LOG_LEVEL_ERROR, + "gigaam: stt.gigaam.encoder.feat_in=%d differs from stt.frontend.num_mels=%d", hp.enc_feat_in, + hp.fe_num_mels); + return TRANSCRIBE_ERR_GGUF; + } if (auto st = read_required_u32_kv(gguf, "stt.frontend.sample_rate", kFamilyTag, hp.fe_sample_rate); st != TRANSCRIBE_OK) { return st; diff --git a/src/arch/gigaam/weights.h b/src/arch/gigaam/weights.h index 6a3d9aaf4..d55b62d3a 100644 --- a/src/arch/gigaam/weights.h +++ b/src/arch/gigaam/weights.h @@ -79,9 +79,13 @@ struct GigaamHParams { bool zap_causal_frontend = true; int32_t zap_fe_channels[3] = { 16, 32, 64 }; std::vector zap_stages; - float zap_out_norm_scale = 0.2f; - float zap_out_norm_eps = 0.1f; - float zap_rope_base = 10000.0f; + float zap_out_norm_scale = 0.2f; + float zap_out_norm_eps = 0.1f; + float zap_rope_base = 10000.0f; + // Largest stage downsampling factor, set by the loader once it has checked + // every factor is 1 or this value. Frames are padded to a multiple of it + // and long-form windows start on a multiple of it. 1 for Conformer. + int32_t zap_max_downsampling = 1; // RNN-T predictor + joint (HeadKind::RNNT only). int32_t pred_hidden = 0; @@ -259,7 +263,7 @@ struct ZapformerLayerWeights { }; struct ZapformerStageWeights { - ggml_tensor * proj_w = nullptr; // [ds * d_model, dim] (scale baked) + ggml_tensor * proj_w = nullptr; // [ds * d_model, dim], times OrthogonalLinear weight_scale ggml_tensor * proj_out_w = nullptr; // [dim, ds * d_model] (transposed) std::vector layers; }; diff --git a/src/transcribe-meta.cpp b/src/transcribe-meta.cpp index 3362e89aa..f1162c781 100644 --- a/src/transcribe-meta.cpp +++ b/src/transcribe-meta.cpp @@ -138,7 +138,12 @@ KvResult read_string_array_kv(const gguf_context * ctx, const char * key, std::v return KvResult::Ok; } -KvResult read_int32_array_kv(const gguf_context * ctx, const char * key, std::vector & out) { +namespace { + +// Scalar-array KV of element type T (GGUF tag arr_type) into out. Absent when +// the key is missing; BadType when it is not an array of that type. +template +KvResult read_scalar_array_kv(const gguf_context * ctx, const char * key, gguf_type arr_type, std::vector & out) { const int64_t key_id = gguf_find_key(ctx, key); if (key_id < 0) { return KvResult::Absent; @@ -146,7 +151,7 @@ KvResult read_int32_array_kv(const gguf_context * ctx, const char * key, std::ve if (gguf_get_kv_type(ctx, key_id) != GGUF_TYPE_ARRAY) { return KvResult::BadType; } - if (gguf_get_arr_type(ctx, key_id) != GGUF_TYPE_INT32) { + if (gguf_get_arr_type(ctx, key_id) != arr_type) { return KvResult::BadType; } const size_t n = gguf_get_arr_n(ctx, key_id); @@ -160,36 +165,22 @@ KvResult read_int32_array_kv(const gguf_context * ctx, const char * key, std::ve if (data == nullptr && n > 0) { return KvResult::BadType; } - std::vector tmp(n); + std::vector tmp(n); if (n > 0) { - std::memcpy(tmp.data(), data, n * sizeof(int32_t)); + std::memcpy(tmp.data(), data, n * sizeof(T)); } out = std::move(tmp); return KvResult::Ok; } +} // namespace + +KvResult read_int32_array_kv(const gguf_context * ctx, const char * key, std::vector & out) { + return read_scalar_array_kv(ctx, key, GGUF_TYPE_INT32, out); +} + KvResult read_float32_array_kv(const gguf_context * ctx, const char * key, std::vector & out) { - const int64_t key_id = gguf_find_key(ctx, key); - if (key_id < 0) { - return KvResult::Absent; - } - if (gguf_get_kv_type(ctx, key_id) != GGUF_TYPE_ARRAY) { - return KvResult::BadType; - } - if (gguf_get_arr_type(ctx, key_id) != GGUF_TYPE_FLOAT32) { - return KvResult::BadType; - } - const size_t n = gguf_get_arr_n(ctx, key_id); - const void * data = gguf_get_arr_data(ctx, key_id); - if (data == nullptr && n > 0) { - return KvResult::BadType; - } - std::vector tmp(n); - if (n > 0) { - std::memcpy(tmp.data(), data, n * sizeof(float)); - } - out = std::move(tmp); - return KvResult::Ok; + return read_scalar_array_kv(ctx, key, GGUF_TYPE_FLOAT32, out); } // --------------------------------------------------------------------------- diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 23d292459..51b2b222c 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -588,6 +588,15 @@ set(TRANSCRIBE_FIXTURE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/fixtures/tokenizer_minimal_streaming_buffered.gguf ${CMAKE_CURRENT_SOURCE_DIR}/fixtures/arch_cohere_minimal.gguf ${CMAKE_CURRENT_SOURCE_DIR}/fixtures/arch_granite5_ctc_minimal.gguf + ${CMAKE_CURRENT_SOURCE_DIR}/fixtures/arch_gigaam_v4_minimal.gguf + ${CMAKE_CURRENT_SOURCE_DIR}/fixtures/arch_gigaam_v4_bad_odd_qdim.gguf + ${CMAKE_CURRENT_SOURCE_DIR}/fixtures/arch_gigaam_v4_bad_even_conv_kernel.gguf + ${CMAKE_CURRENT_SOURCE_DIR}/fixtures/arch_gigaam_v4_bad_zero_downsampling.gguf + ${CMAKE_CURRENT_SOURCE_DIR}/fixtures/arch_gigaam_v4_bad_intermediate_downsampling.gguf + ${CMAKE_CURRENT_SOURCE_DIR}/fixtures/arch_gigaam_v4_bad_mixed_qdim.gguf + ${CMAKE_CURRENT_SOURCE_DIR}/fixtures/arch_gigaam_v4_bad_symmetric_frontend.gguf + ${CMAKE_CURRENT_SOURCE_DIR}/fixtures/arch_gigaam_v4_bad_short_stage_array.gguf + ${CMAKE_CURRENT_SOURCE_DIR}/fixtures/arch_gigaam_v4_bad_squeezeformer.gguf ${CMAKE_CURRENT_SOURCE_DIR}/fixtures/arch_qwen3_asr_minimal.gguf ${CMAKE_CURRENT_SOURCE_DIR}/fixtures/arch_ecapa_tdnn_minimal.gguf ${CMAKE_CURRENT_SOURCE_DIR}/fixtures/arch_ecapa_tdnn_q8_0.gguf @@ -844,6 +853,31 @@ if(TRANSCRIBE_UV) SKIP_RETURN_CODE 77) endif() +# ----------------------------------------------------------------------------- +# GigaAM-v4 (Zapformer) fixture loader smoke +# ----------------------------------------------------------------------------- + +if(TRANSCRIBE_UV) + add_executable(transcribe_gigaam_smoke + gigaam_smoke.cpp) + + target_link_libraries(transcribe_gigaam_smoke PRIVATE transcribe ggml) + + target_include_directories(transcribe_gigaam_smoke PRIVATE + ${CMAKE_SOURCE_DIR}/src) + + target_compile_definitions(transcribe_gigaam_smoke PRIVATE + "TRANSCRIBE_TEST_FIXTURES_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}/fixtures\"") + + transcribe_apply_warnings(transcribe_gigaam_smoke) + add_dependencies(transcribe_gigaam_smoke fixtures) + + add_test(NAME transcribe_gigaam_smoke + COMMAND transcribe_gigaam_smoke) + set_tests_properties(transcribe_gigaam_smoke PROPERTIES + SKIP_RETURN_CODE 77) +endif() + # ----------------------------------------------------------------------------- # ecapa_tdnn (LANGID role) fixture smoke # ----------------------------------------------------------------------------- @@ -972,8 +1006,9 @@ if(TRANSCRIBE_BUILD_REAL_MODEL_TESTS) add_executable(transcribe_gigaam_v4_e2e_smoke gigaam_v4_e2e_smoke.cpp) + # ggml for gguf.h: the test reads general.file_type to pick its checks. target_link_libraries(transcribe_gigaam_v4_e2e_smoke - PRIVATE transcribe transcribe-common-example) + PRIVATE transcribe transcribe-common-example ggml) target_compile_definitions(transcribe_gigaam_v4_e2e_smoke PRIVATE "TRANSCRIBE_TEST_SAMPLES_DIR=\"${CMAKE_SOURCE_DIR}/samples\"") diff --git a/tests/fixtures/make_gguf_fixtures.py b/tests/fixtures/make_gguf_fixtures.py index b643163f8..b4ea1263d 100644 --- a/tests/fixtures/make_gguf_fixtures.py +++ b/tests/fixtures/make_gguf_fixtures.py @@ -793,6 +793,243 @@ def _granite5_ctc_tensors() -> list[Tensor]: return tensors +# --------------------------------------------------------------------------- +# Toy GigaAM-v4 (Zapformer encoder + RNN-T head) hparams + tensor catalog +# --------------------------------------------------------------------------- +# +# Mirrors the KV block and tensor table scripts/convert-gigaam-v4.py writes, +# at toy dims: three stages at downsampling 1, 2, 1 (1 or the largest factor, +# as read_gigaam_hparams requires), one qdim for every stage, conv kernels +# 3, 0 (no conv module) and 3. Pinned by transcribe_gigaam_smoke, which also +# loads one mutant per stage-geometry rejection in read_gigaam_hparams; each +# mutant differs from this dict in one field (see GIGAAM_V4_MUTANTS). + +GIGAAM_V4_HP = { + "d_model": 8, + "feat_in": 8, + "causal_frontend": True, + "frontend_channels": [2, 4, 4], + "stage_layers": [1, 1, 1], + "stage_dims": [8, 12, 8], + "stage_heads": [2, 2, 2], + "stage_qdim": [4, 4, 4], + "stage_vdim": [4, 6, 4], + "stage_ff_mult": [2, 2, 2], + "stage_conv_kernel": [3, 0, 3], + "stage_downsampling": [1, 2, 1], + "encoder_type": "zapformer", + "pred_hidden": 4, + "pred_n_layers": 1, + # The converter appends to the SentencePiece vocab, so + # num_classes == vocab size and blank == the last id (TOY_VOCAB[15]). + "vocab": 16, + "joint_hidden": 4, + "fe_num_mels": 8, + "fe_sample_rate": 16000, + "fe_n_fft": 64, + "fe_win_length": 64, + "fe_hop_length": 32, +} + + +def _gigaam_v4_hparams_kv(hp: dict, short_array: str | None = None) -> list[bytes]: + """stt.gigaam.* / stt.frontend.* KV block. `short_array`, when given, + names a stage_* array emitted one entry short.""" + n_stages = len(hp["stage_layers"]) + + def arr(key: str) -> list: + v = list(hp[key]) + return v[:-1] if key == short_array else v + + kvs = [ + _pack_kv_string("stt.gigaam.head_kind", "rnnt"), + _pack_kv_string("stt.gigaam.encoder.type", hp["encoder_type"]), + _pack_kv_uint32("stt.gigaam.encoder.n_layers", sum(hp["stage_layers"])), + _pack_kv_uint32("stt.gigaam.encoder.d_model", hp["d_model"]), + _pack_kv_uint32("stt.gigaam.encoder.feat_in", hp["feat_in"]), + _pack_kv_uint32("stt.gigaam.encoder.subsampling_factor", 4), + _pack_kv_bool("stt.gigaam.encoder.causal_frontend", hp["causal_frontend"]), + _pack_kv_array_int32("stt.gigaam.encoder.frontend_channels", hp["frontend_channels"]), + ] + for key in ("stage_layers", "stage_dims", "stage_heads", "stage_qdim", "stage_vdim", + "stage_ff_mult", "stage_conv_kernel", "stage_downsampling"): + kvs.append(_pack_kv_array_int32(f"stt.gigaam.encoder.{key}", arr(key))) + kvs.append(_pack_kv_array_float32("stt.gigaam.encoder.stage_input_scales", [1.0] * n_stages)) + for s in range(n_stages): + kvs.append(_pack_kv_array_float32( + f"stt.gigaam.encoder.stage_{s}.residual_scales", + [1.0] + [0.5] * hp["stage_layers"][s])) + kvs += [ + _pack_kv_float32("stt.gigaam.encoder.out_norm.scale", 0.2), + _pack_kv_float32("stt.gigaam.encoder.out_norm.eps", 0.1), + _pack_kv_float32("stt.gigaam.encoder.rope_base", 10000.0), + _pack_kv_uint32("stt.gigaam.predictor.hidden", hp["pred_hidden"]), + _pack_kv_uint32("stt.gigaam.predictor.n_layers", hp["pred_n_layers"]), + _pack_kv_uint32("stt.gigaam.predictor.vocab", hp["vocab"]), + _pack_kv_uint32("stt.gigaam.joint.hidden", hp["joint_hidden"]), + _pack_kv_uint32("stt.gigaam.joint.num_classes", hp["vocab"]), + _pack_kv_string("stt.gigaam.joint.activation", "relu"), + _pack_kv_string("stt.frontend.type", "mel"), + _pack_kv_uint32("stt.frontend.num_mels", hp["fe_num_mels"]), + _pack_kv_uint32("stt.frontend.sample_rate", hp["fe_sample_rate"]), + _pack_kv_uint32("stt.frontend.n_fft", hp["fe_n_fft"]), + _pack_kv_uint32("stt.frontend.win_length", hp["fe_win_length"]), + _pack_kv_uint32("stt.frontend.hop_length", hp["fe_hop_length"]), + _pack_kv_string("stt.frontend.window", "hann_periodic"), + _pack_kv_string("stt.frontend.normalize", "none"), + _pack_kv_float32("stt.frontend.dither", 0.0), + _pack_kv_float32("stt.frontend.pre_emphasis", 0.0), + _pack_kv_float32("stt.frontend.f_min", 0.0), + _pack_kv_float32("stt.frontend.f_max", 8000.0), + _pack_kv_bool("stt.frontend.center", False), + _pack_kv_string("stt.frontend.mel_norm", "htk"), + _pack_kv_float32("stt.frontend.log_clamp_min", 1e-9), + _pack_kv_float32("stt.frontend.log_clamp_max", 1e9), + ] + return kvs + + +def _gigaam_v4_tensor_descriptors(hp: dict) -> list[tuple[str, list[int]]]: + """Tensor table in the converter's order, as ggml ne (reversed numpy + shape): a linear weight is [in, out], a conv2d weight [kw, kh, in, out].""" + d = hp["d_model"] + c0, c1, c2 = hp["frontend_channels"] + cn_k = 3 if hp["causal_frontend"] else 7 + f_out = (((hp["feat_in"] - 1) // 2) - 1) // 2 + out: list[tuple[str, list[int]]] = [ + ("frontend.mel_filterbank", [hp["fe_n_fft"] // 2 + 1, hp["fe_num_mels"]]), + ("frontend.window", [hp["fe_win_length"]]), + ("enc.frontend.conv.0.weight", [3, 3, 1, c0]), + ("enc.frontend.conv.0.bias", [c0]), + ("enc.frontend.conv.1.weight", [3, 3, c0, c1]), + ("enc.frontend.conv.1.bias", [c1]), + ("enc.frontend.conv.2.weight", [3, 3, c1, c2]), + ("enc.frontend.conv.2.bias", [c2]), + ("enc.frontend.convnext.conv.dw.weight", [cn_k, cn_k, 1, c2]), + ("enc.frontend.convnext.conv.dw.bias", [c2]), + ("enc.frontend.convnext.conv.pw1.weight", [1, 1, c2, 3 * c2]), + ("enc.frontend.convnext.conv.pw1.bias", [3 * c2]), + ("enc.frontend.convnext.conv.pw2.weight", [1, 1, 3 * c2, c2]), + ("enc.frontend.convnext.conv.pw2.bias", [c2]), + ("enc.frontend.out.weight", [c2 * f_out, d]), + ("enc.frontend.out.bias", [d]), + ] + for s in range(len(hp["stage_layers"])): + in_dim = hp["stage_downsampling"][s] * d + sd = hp["stage_dims"][s] + dff = sd * hp["stage_ff_mult"][s] + dq = hp["stage_heads"][s] * hp["stage_qdim"][s] + dv = hp["stage_heads"][s] * hp["stage_vdim"][s] + k = hp["stage_conv_kernel"][s] + p = f"enc.stages.{s}" + out += [ + (f"{p}.proj.weight", [in_dim, sd]), + (f"{p}.proj_out.weight", [sd, in_dim]), + ] + for l in range(hp["stage_layers"][s]): + lp = f"{p}.layers.{l}" + out += [ + (f"{lp}.ff1.in.weight", [sd, dff]), + (f"{lp}.ff1.in.bias", [dff]), + (f"{lp}.ff1.out.weight", [dff, sd]), + (f"{lp}.ff1.out.bias", [sd]), + (f"{lp}.attn.in_norm.weight", [sd]), + (f"{lp}.attn.qk_in.weight", [sd, 2 * dq]), + (f"{lp}.attn.qk_in.bias", [2 * dq]), + (f"{lp}.attn.vg_in.weight", [sd, 3 * dv]), + (f"{lp}.attn.vg_in.bias", [3 * dv]), + (f"{lp}.attn.out.weight", [dv, sd]), + (f"{lp}.attn.out.bias", [sd]), + ] + if k > 0: + out += [ + (f"{lp}.conv_in.weight", [sd, 2 * sd]), + (f"{lp}.conv_in.bias", [2 * sd]), + (f"{lp}.conv.dw.weight", [k, 1, sd]), + (f"{lp}.conv.dw.bias", [sd]), + (f"{lp}.conv.weighted_mean.weight", [sd]), + (f"{lp}.conv_out.weight", [sd, sd]), + (f"{lp}.conv_out.bias", [sd]), + (f"{lp}.ff2.in.weight", [sd, dff]), + (f"{lp}.ff2.in.bias", [dff]), + (f"{lp}.ff2.out.weight", [dff, sd]), + (f"{lp}.ff2.out.bias", [sd]), + ] + out.append((f"{lp}.out_norm.weight", [sd])) + ph = hp["pred_hidden"] + jh = hp["joint_hidden"] + out.append(("pred.embed.weight", [ph, hp["vocab"]])) + for i in range(hp["pred_n_layers"]): + out += [ + (f"pred.lstm.{i}.Wx", [ph, 4 * ph]), + (f"pred.lstm.{i}.Wh", [ph, 4 * ph]), + (f"pred.lstm.{i}.bias", [4 * ph]), + ] + out += [ + ("joint.enc.weight", [d, jh]), + ("joint.enc.bias", [jh]), + ("joint.pred.weight", [ph, jh]), + ("joint.pred.bias", [jh]), + ("joint.out.weight", [jh, hp["vocab"]]), + ("joint.out.bias", [hp["vocab"]]), + ] + return out + + +def _gigaam_v4_tensors(hp: dict) -> list[Tensor]: + # Small values keep the toy graph finite if a test runs it: element j + # of tensor i is 0.01 * ((i + j) % 7 - 3). + tensors: list[Tensor] = [] + for idx, (name, ne) in enumerate(_gigaam_v4_tensor_descriptors(hp)): + n_elem = 1 + for dim in ne: + n_elem *= dim + values = [0.01 * ((idx + j) % 7 - 3) for j in range(n_elem)] + tensors.append(Tensor(name, ne, GGML_TYPE_F32, _f32_bytes(values))) + return tensors + + +def _with_stage(hp: dict, key: str, stage: int, value: int) -> dict: + out = {**hp, key: list(hp[key])} + out[key][stage] = value + return out + + +# One mutant per stage-geometry rejection in read_gigaam_hparams. Each entry +# is (file suffix, hparams, stage array emitted one entry short). The KV check +# fails before tensors are bound; tensors follow the mutated hparams where +# that gives a well-formed table, else the valid ones. +GIGAAM_V4_MUTANTS: list[tuple[str, dict, str | None]] = [ + ("odd_qdim", _with_stage(GIGAAM_V4_HP, "stage_qdim", 1, 3), None), + ("even_conv_kernel", _with_stage(GIGAAM_V4_HP, "stage_conv_kernel", 2, 4), None), + ("zero_downsampling", _with_stage(GIGAAM_V4_HP, "stage_downsampling", 1, 0), None), + # 1, 2, 4: the 2 is neither 1 nor the largest factor. + ("intermediate_downsampling", _with_stage(GIGAAM_V4_HP, "stage_downsampling", 2, 4), None), + ("mixed_qdim", _with_stage(GIGAAM_V4_HP, "stage_qdim", 2, 6), None), + ("symmetric_frontend", {**GIGAAM_V4_HP, "causal_frontend": False}, None), + ("short_stage_array", GIGAAM_V4_HP, "stage_dims"), + ("squeezeformer", {**GIGAAM_V4_HP, "encoder_type": "squeezeformer"}, None), +] + + +def _gigaam_v4_gguf(hp: dict, tokenizer_kv: list[bytes], short_array: str | None = None) -> bytes: + tensor_hp = hp if min(hp["stage_downsampling"]) > 0 else GIGAAM_V4_HP + return _build_full_gguf( + GGUF_MAGIC, + [ + _pack_kv_string("general.architecture", "gigaam"), + _pack_kv_string("stt.variant", "gigaam-v4-toy-rnnt"), + _pack_kv_bool("stt.capability.translate", False), + _pack_kv_bool("stt.capability.lang_detect", False), + _pack_kv_bool("stt.capability.streaming", False), + _pack_kv_array_string("general.languages", ["ru", "en"]), + *tokenizer_kv, + *_gigaam_v4_hparams_kv(hp, short_array), + ], + _gigaam_v4_tensors(tensor_hp), + ) + + # --------------------------------------------------------------------------- # Toy cohere hparams + tensor catalog # --------------------------------------------------------------------------- @@ -2238,6 +2475,24 @@ def emit_fixtures(out_dir: Path) -> None: ), ) + # GigaAM-v4 (Zapformer + RNN-T) minimal fixture plus one mutant per + # stage-geometry rejection; transcribe_gigaam_smoke loads them all. + gigaam_v4_tokenizer_kv = [ + _pack_kv_string("tokenizer.ggml.model", "bpe"), + _pack_kv_array_string("tokenizer.ggml.tokens", TOY_VOCAB), + _pack_kv_array_float32("tokenizer.ggml.scores", TOY_SCORES), + _pack_kv_array_int32("tokenizer.ggml.token_type", TOY_TOKEN_TYPES), + _pack_kv_uint32("tokenizer.ggml.unknown_token_id", 0), + _pack_kv_uint32("tokenizer.ggml.bos_token_id", 1), + _pack_kv_uint32("tokenizer.ggml.eos_token_id", 2), + _pack_kv_uint32("tokenizer.ggml.blank_token_id", 15), + ] + _write(out_dir / "arch_gigaam_v4_minimal.gguf", + _gigaam_v4_gguf(GIGAAM_V4_HP, gigaam_v4_tokenizer_kv)) + for suffix, hp, short_array in GIGAAM_V4_MUTANTS: + _write(out_dir / f"arch_gigaam_v4_bad_{suffix}.gguf", + _gigaam_v4_gguf(hp, gigaam_v4_tokenizer_kv, short_array)) + # Cohere ASR minimal fixture. Uses the Cohere tokenizer model # name "bpe" (vs Parakeet's "unigram"); same toy vocabulary # otherwise. The tensor catalog is the full Cohere weight set diff --git a/tests/gigaam_smoke.cpp b/tests/gigaam_smoke.cpp new file mode 100644 index 000000000..f461c3e97 --- /dev/null +++ b/tests/gigaam_smoke.cpp @@ -0,0 +1,199 @@ +// gigaam_smoke.cpp - hermetic GigaAM-v4 (Zapformer + RNN-T) loader smoke. +// +// Loads a tiny but complete three-stage Zapformer GGUF through the public C +// ABI, checks arch, variant, the stage hparams and representative tensor +// shapes, runs one second of silence through the encoder graph and RNN-T +// decoder, then loads one mutant per stage-geometry rejection in +// read_gigaam_hparams and asserts each is refused with TRANSCRIBE_ERR_GGUF. +// Fixtures come from tests/fixtures/make_gguf_fixtures.py (GIGAAM_V4_HP, +// GIGAAM_V4_MUTANTS). + +#include "arch/gigaam/gigaam.h" +#include "ggml.h" +#include "transcribe.h" + +#include + +#include +#include +#include +#include +#include + +#ifndef TRANSCRIBE_TEST_FIXTURES_DIR +# error "TRANSCRIBE_TEST_FIXTURES_DIR must be defined by the build system" +#endif + +namespace { + +int g_failures = 0; + +#define CHECK(cond) \ + do { \ + if (!(cond)) { \ + std::fprintf(stderr, "FAIL %s:%d: %s\n", __FILE__, __LINE__, #cond); \ + ++g_failures; \ + } \ + } while (0) + +#define CHECK_EQ(actual, expected) \ + do { \ + const long long _a = static_cast(actual); \ + const long long _e = static_cast(expected); \ + if (_a != _e) { \ + std::fprintf(stderr, "FAIL %s:%d: %s = %lld, expected %lld\n", __FILE__, __LINE__, #actual, _a, _e); \ + ++g_failures; \ + } \ + } while (0) + +bool file_exists(const std::string & path) { + struct stat st{}; + return ::stat(path.c_str(), &st) == 0; +} + +std::string fixture_path(const char * name) { + return std::string(TRANSCRIBE_TEST_FIXTURES_DIR) + "/" + name; +} + +transcribe_status load_cpu(const std::string & path, transcribe_model ** out) { + transcribe_model_load_params load_params; + transcribe_model_load_params_init(&load_params); + load_params.backend = TRANSCRIBE_BACKEND_CPU; + return transcribe_model_load_file(path.c_str(), &load_params, out); +} + +void check_valid_model(const transcribe_model * model) { + CHECK(std::strcmp(transcribe_model_arch_string(model), "gigaam") == 0); + CHECK(std::strcmp(transcribe_model_variant_string(model), "gigaam-v4-toy-rnnt") == 0); + + transcribe_capabilities caps; + transcribe_capabilities_init(&caps); + CHECK(transcribe_model_get_capabilities(model, &caps) == TRANSCRIBE_OK); + CHECK_EQ(caps.native_sample_rate, 16000); + CHECK(!caps.supports_translate); + + const auto * gm = static_cast(model); + const auto & hp = gm->hparams; + CHECK(hp.encoder_kind == transcribe::gigaam::EncoderKind::Zapformer); + CHECK(hp.head_kind == transcribe::gigaam::HeadKind::RNNT); + CHECK(hp.zap_causal_frontend); + CHECK_EQ(hp.enc_d_model, 8); + CHECK_EQ(hp.zap_max_downsampling, 2); + CHECK_EQ(hp.zap_stages.size(), 3); + if (hp.zap_stages.size() == 3) { + const int dims[3] = { 8, 12, 8 }; + const int conv[3] = { 3, 0, 3 }; + const int ds[3] = { 1, 2, 1 }; + for (size_t s = 0; s < 3; ++s) { + CHECK_EQ(hp.zap_stages[s].dim, dims[s]); + CHECK_EQ(hp.zap_stages[s].qdim, 4); + CHECK_EQ(hp.zap_stages[s].conv_kernel, conv[s]); + CHECK_EQ(hp.zap_stages[s].downsampling, ds[s]); + CHECK_EQ(hp.zap_stages[s].residual_scales.size(), 2); + } + } + CHECK_EQ(hp.pred_vocab, 16); + CHECK_EQ(hp.joint_n_classes, 16); + + const auto & zw = gm->weights.zapformer; + CHECK(zw.frontend.out_w != nullptr); + if (zw.frontend.out_w != nullptr) { + // c2 * f_out = 4 * 1 -> d_model. + CHECK_EQ(zw.frontend.out_w->ne[0], 4); + CHECK_EQ(zw.frontend.out_w->ne[1], 8); + } + CHECK_EQ(zw.stages.size(), 3); + if (zw.stages.size() == 3) { + // Stage 1 groups 2 frames: proj [2 * d_model, dim]. + CHECK(zw.stages[1].proj_w != nullptr && zw.stages[1].proj_w->ne[0] == 16 && zw.stages[1].proj_w->ne[1] == 12); + CHECK_EQ(zw.stages[1].layers.size(), 1); + if (zw.stages[1].layers.size() == 1) { + // conv_kernel 0: no conv module and no second feed-forward. + CHECK(zw.stages[1].layers[0].conv_dw_w == nullptr); + CHECK(zw.stages[1].layers[0].ff2_in_w == nullptr); + } + CHECK_EQ(zw.stages[0].layers.size(), 1); + if (zw.stages[0].layers.size() == 1) { + const ggml_tensor * dw = zw.stages[0].layers[0].conv_dw_w; + CHECK(dw != nullptr && dw->ne[0] == 3 && dw->ne[2] == 8); + } + } +} + +// One second of silence through the encoder graph and RNN-T decoder: the +// tiny geometry must build and run, whatever the (meaningless) text is. +void check_silent_run(transcribe_model * model) { + transcribe_session_params sp; + transcribe_session_params_init(&sp); + transcribe_session * session = nullptr; + const transcribe_status st = transcribe_session_init(model, &sp, &session); + CHECK(st == TRANSCRIBE_OK); + if (st != TRANSCRIBE_OK || session == nullptr) { + return; + } + const std::vector pcm(16000, 0.0f); + transcribe_run_params rp; + transcribe_run_params_init(&rp); + const transcribe_status run_st = transcribe_run(session, pcm.data(), static_cast(pcm.size()), &rp); + if (run_st != TRANSCRIBE_OK) { + std::fprintf(stderr, "FAIL silent run: %s\n", transcribe_status_string(run_st)); + ++g_failures; + } + CHECK(transcribe_full_text(session) != nullptr); + transcribe_session_free(session); +} + +} // namespace + +int main() { + const char * mutants[] = { + "arch_gigaam_v4_bad_odd_qdim.gguf", "arch_gigaam_v4_bad_even_conv_kernel.gguf", + "arch_gigaam_v4_bad_zero_downsampling.gguf", "arch_gigaam_v4_bad_intermediate_downsampling.gguf", + "arch_gigaam_v4_bad_mixed_qdim.gguf", "arch_gigaam_v4_bad_symmetric_frontend.gguf", + "arch_gigaam_v4_bad_short_stage_array.gguf", "arch_gigaam_v4_bad_squeezeformer.gguf", + }; + + const std::string valid = fixture_path("arch_gigaam_v4_minimal.gguf"); + if (!file_exists(valid)) { + std::fprintf(stderr, "gigaam_smoke: fixture not found: %s\n", valid.c_str()); + return 77; + } + for (const char * name : mutants) { + if (!file_exists(fixture_path(name))) { + std::fprintf(stderr, "gigaam_smoke: fixture not found: %s\n", fixture_path(name).c_str()); + return 77; + } + } + + transcribe_model * model = nullptr; + const transcribe_status st = load_cpu(valid, &model); + if (st != TRANSCRIBE_OK || model == nullptr) { + std::fprintf(stderr, "FAIL load %s: %s\n", valid.c_str(), transcribe_status_string(st)); + return EXIT_FAILURE; + } + check_valid_model(model); + check_silent_run(model); + transcribe_model_free(model); + + for (const char * name : mutants) { + transcribe_model * bad = nullptr; + const transcribe_status bad_st = load_cpu(fixture_path(name), &bad); + if (bad_st != TRANSCRIBE_ERR_GGUF) { + std::fprintf(stderr, "FAIL %s: load returned %s, expected TRANSCRIBE_ERR_GGUF\n", name, + transcribe_status_string(bad_st)); + ++g_failures; + } + if (bad != nullptr) { + std::fprintf(stderr, "FAIL %s: model pointer is not NULL after a refused load\n", name); + ++g_failures; + transcribe_model_free(bad); + } + } + + if (g_failures != 0) { + std::fprintf(stderr, "gigaam_smoke: %d failures\n", g_failures); + return EXIT_FAILURE; + } + std::fprintf(stdout, "gigaam_smoke: ok\n"); + return EXIT_SUCCESS; +} diff --git a/tests/gigaam_v4_e2e_smoke.cpp b/tests/gigaam_v4_e2e_smoke.cpp index 6c0da468d..1c17cc1be 100644 --- a/tests/gigaam_v4_e2e_smoke.cpp +++ b/tests/gigaam_v4_e2e_smoke.cpp @@ -2,12 +2,22 @@ // GigaAM-v4 (Zapformer encoder + RNN-T). // // Set TRANSCRIBE_GIGAAM_V4_GGUF to a gigaam-v4-e2e-rnnt GGUF (any quant). -// The test runs CPU inference on samples/ru.wav, whose encoder length is odd -// (T_enc = 113) so the padded-tail masks are exercised, and on -// samples/fleurs-en.wav, then runs both clips as one transcribe_run_batch -// call (the per-utterance Zapformer batch path) and checks that each batch -// result matches its single run. - +// The test transcribes +// - samples/ru.wav, whose encoder length is odd (T_enc = 113), so the +// padded-tail masks are exercised; +// - samples/fleurs-en.wav; +// - samples/dots.wav (35 s, T_enc = 883), encoded in two windows whose +// second one would start on odd frame 391: its transcript is the PyTorch +// reference run on the same windows, started on even frame 390 as +// model.cpp does. Starting on 391 instead changes "future you" to +// "future. You". Checked exactly for F32, F16 and Q8_0 (the K-quants drop +// a comma there) and skipped for other quants; +// then runs the clips as one transcribe_run_batch call (the per-utterance +// Zapformer batch path) and checks that each batch result matches its single +// run. All of it runs on CPU and, when a GPU backend is available, again on +// it (Zapformer attention takes the flash-attention path there). + +#include "gguf.h" #include "transcribe.h" #include "wav.h" @@ -18,6 +28,7 @@ #include #include #include +#include #include #include @@ -63,46 +74,71 @@ int edit_distance(const std::string & a, const std::string & b) { struct Case { const char * wav; - const char * reference; // PyTorch GigaAMDualASR e2e transcript (F32, CPU) + const char * reference; // PyTorch GigaAMDualASR e2e transcript (F32, CPU) + int max_distance; // byte edit distance allowed + bool exact_quants; // only checked on F32, F16 and Q8_0 files }; const Case kCases[] = { - { "ru.wav", "Важно различать глаголы и дополнения." }, + { "ru.wav", "Важно различать глаголы и дополнения.", 2, false }, { "fleurs-en.wav", - "However, due to the slow communication channels styles in the West could lag behind by 25 to 30 years." }, + "However, due to the slow communication channels styles in the West could lag behind by 25 to 30 years.", 2, + false }, + { "dots.wav", + "Of course, it was impossible to connect the dots looking forward when I was in college, but it was very, very " + "clear looking backwards 10 years later again, you can't connect the dots looking forward, you can only connect " + "them looking backwards so you have to trust that the dots will somehow connect in your future you have to trust " + "in something your gut, destiny, life, karma, whatever because believing that the dots will connect down the " + "road will give you the confidence to follow your heart even when it leads you off the well-worn path, and that " + "will make all the difference.", 0, true }, }; -} // namespace - -int main() { - const char * model_env = std::getenv("TRANSCRIBE_GIGAAM_V4_GGUF"); - if (model_env == nullptr || model_env[0] == '\0' || !file_exists(model_env)) { - std::fprintf(stderr, "gigaam_v4_e2e_smoke: TRANSCRIBE_GIGAAM_V4_GGUF is unset or missing; skipping\n"); - return 77; +// general.file_type (u32, not exposed by transcribe_model_meta_val_str): +// 0 = F32, 1 = F16, 7 = Q8_0. +bool is_exact_quant(const char * model_path) { + gguf_init_params gp{}; + gp.no_alloc = true; + gguf_context * gg = gguf_init_from_file(model_path, gp); + if (gg == nullptr) { + return false; } + const int64_t key = gguf_find_key(gg, "general.file_type"); + const bool exact = + key >= 0 && gguf_get_kv_type(gg, key) == GGUF_TYPE_UINT32 && + (gguf_get_val_u32(gg, key) == 0 || gguf_get_val_u32(gg, key) == 1 || gguf_get_val_u32(gg, key) == 7); + gguf_free(gg); + return exact; +} - const auto start = std::chrono::steady_clock::now(); +// Load the model on `backend`, transcribe every case singly and as one batch. +// Returns false when the model does not load on that backend. +bool run_suite(const char * model_path, transcribe_backend_request backend, const char * label) { transcribe_model_load_params load_params; transcribe_model_load_params_init(&load_params); - load_params.backend = TRANSCRIBE_BACKEND_CPU; + load_params.backend = backend; transcribe_model * model = nullptr; - transcribe_status st = transcribe_model_load_file(model_env, &load_params, &model); + transcribe_status st = transcribe_model_load_file(model_path, &load_params, &model); if (st != TRANSCRIBE_OK || model == nullptr) { - std::fprintf(stderr, "FAIL load: %s\n", transcribe_status_string(st)); - return EXIT_FAILURE; + std::fprintf(stderr, "FAIL load (%s): %s\n", label, transcribe_status_string(st)); + ++g_failures; + return false; } + const char * bound = transcribe_model_backend(model); + std::fprintf(stderr, "gigaam_v4_e2e_smoke: [%s] backend %s\n", label, bound != nullptr ? bound : "(null)"); CHECK(std::strcmp(transcribe_model_arch_string(model), "gigaam") == 0); CHECK(std::strcmp(transcribe_model_variant_string(model), "gigaam-v4-e2e-rnnt") == 0); + const bool exact = is_exact_quant(model_path); transcribe_session_params session_params; transcribe_session_params_init(&session_params); transcribe_session * session = nullptr; st = transcribe_session_init(model, &session_params, &session); if (st != TRANSCRIBE_OK || session == nullptr) { - std::fprintf(stderr, "FAIL session init: %s\n", transcribe_status_string(st)); + std::fprintf(stderr, "FAIL session init (%s): %s\n", label, transcribe_status_string(st)); + ++g_failures; transcribe_model_free(model); - return EXIT_FAILURE; + return true; } transcribe_run_params run_params; @@ -111,6 +147,7 @@ int main() { std::vector> pcms; std::vector singles; + std::vector names; for (const Case & c : kCases) { const std::string path = std::string(TRANSCRIBE_TEST_SAMPLES_DIR) + "/" + c.wav; std::vector pcm; @@ -124,9 +161,16 @@ int main() { CHECK(st == TRANSCRIBE_OK); const std::string actual = st == TRANSCRIBE_OK ? transcribe_full_text(session) : ""; const int distance = edit_distance(actual, c.reference); - std::fprintf(stderr, "gigaam_v4_e2e_smoke: %s text=\"%s\" edit_distance=%d\n", c.wav, actual.c_str(), distance); + std::fprintf(stderr, "gigaam_v4_e2e_smoke: [%s] %s text=\"%s\" edit_distance=%d\n", label, c.wav, + actual.c_str(), distance); CHECK(!actual.empty()); - CHECK(distance <= 2); + if (c.exact_quants && !exact) { + std::fprintf(stderr, "gigaam_v4_e2e_smoke: [%s] %s transcript not checked for this quant\n", label, c.wav); + } else if (distance > c.max_distance) { + std::fprintf(stderr, "FAIL [%s] %s: edit_distance=%d > %d\n expected \"%s\"\n", label, c.wav, distance, + c.max_distance, c.reference); + ++g_failures; + } CHECK(transcribe_n_tokens(session) > 0); transcribe_timings timings; @@ -137,6 +181,7 @@ int main() { pcms.push_back(std::move(pcm)); singles.push_back(actual); + names.push_back(c.wav); } if (pcms.size() == std::size(kCases)) { @@ -152,15 +197,44 @@ int main() { for (int i = 0; st == TRANSCRIBE_OK && i < static_cast(ptrs.size()); ++i) { CHECK(transcribe_batch_status(session, i) == TRANSCRIBE_OK); const char * text = transcribe_batch_full_text(session, i); - CHECK(text != nullptr && singles[static_cast(i)] == text); + if (text == nullptr || singles[static_cast(i)] != text) { + std::fprintf(stderr, "FAIL [%s] batch %s: batch=\"%s\" single=\"%s\"\n", label, + names[static_cast(i)], text != nullptr ? text : "(null)", + singles[static_cast(i)].c_str()); + ++g_failures; + } } } - const double wall_ms = std::chrono::duration(std::chrono::steady_clock::now() - start).count(); - CHECK(wall_ms < 120000.0); - transcribe_session_free(session); transcribe_model_free(model); + return true; +} + +} // namespace + +int main() { + const char * model_env = std::getenv("TRANSCRIBE_GIGAAM_V4_GGUF"); + if (model_env == nullptr || model_env[0] == '\0' || !file_exists(model_env)) { + std::fprintf(stderr, "gigaam_v4_e2e_smoke: TRANSCRIBE_GIGAAM_V4_GGUF is unset or missing; skipping\n"); + return 77; + } + + const auto start = std::chrono::steady_clock::now(); + run_suite(model_env, TRANSCRIBE_BACKEND_CPU, "cpu"); + + const transcribe_backend_request gpus[] = { TRANSCRIBE_BACKEND_METAL, TRANSCRIBE_BACKEND_VULKAN, + TRANSCRIBE_BACKEND_CUDA, TRANSCRIBE_BACKEND_ROCM }; + for (const transcribe_backend_request gpu : gpus) { + if (transcribe_backend_available(gpu)) { + run_suite(model_env, gpu, "gpu"); + break; + } + } + + const double wall_ms = std::chrono::duration(std::chrono::steady_clock::now() - start).count(); + CHECK(wall_ms < 240000.0); + if (g_failures != 0) { std::fprintf(stderr, "gigaam_v4_e2e_smoke: %d failures\n", g_failures); return EXIT_FAILURE; diff --git a/tests/tolerances/gigaam-v4.json b/tests/tolerances/gigaam-v4.json index b0babc20a..6f9483475 100644 --- a/tests/tolerances/gigaam-v4.json +++ b/tests/tolerances/gigaam-v4.json @@ -13,7 +13,7 @@ "- Backend / threading: --backend cpu --threads 1 (deterministic).", "", "ENTRY SOURCING", - "- Recipe (same as tests/tolerances/gigaam.json):", + "- Recipe: the 1.5x of tests/tolerances/gigaam.json, without its 1e-6 floor:", " max_abs = 1.5 × worst_observed_max_abs", " mean_abs = 1.5 × worst_observed_mean_abs", " rounded up to two significant digits, where 'worst' is the larger of", @@ -26,13 +26,16 @@ "- enc.stage.{0,1,2}.out: SDPA + feed-forward + convolution module noise", " over 4/11/4 layers. Stage 1 runs at half the frame rate on a 1536-wide", " stacked input, so its matmuls reduce over twice as many terms.", + "- RoPE: the graph rotates by the reference's F16-rounded cos/sin tables", + " (fill_zapformer_rope_tables), which equal the checkpoint's at every", + " position a window reaches, so RoPE adds no drift. With ggml_rope_ext's", + " F32 angles instead, enc.out drifted 5.7e-4 max / 5.8e-5 mean on ru.", "- enc.out / rnnt.encoded: the final RmsNorm (learned scale 0.9951, eps", " 7.7e-6) multiplies by scale / RMS of the stage-2 output per frame (median", - " RMS ~0.38 on both cases), so absolute drift here is ~2.5x that of", - " enc.stage.2.out. Per-frame error correlates only moderately with", - " 1/RMS (r = 0.40 ru, 0.47 fleurs-en).", + " RMS ~0.38 on both cases), so absolute drift here is ~2.5-3x that of", + " enc.stage.2.out.", "", - "Sign-off: 2026-11-29, validate.py all green for gigaam-v4-e2e-rnnt;", + "Sign-off: 2026-12-02, validate.py all green for gigaam-v4-e2e-rnnt;", "transcripts exact against the reference on both cases." ], "frontend.mel.out": { @@ -46,28 +49,28 @@ "_seen_in": ["gigaam-v4-e2e-rnnt"] }, "enc.stage.0.out": { - "max_abs": 9.0e-05, - "mean_abs": 9.6e-06, + "max_abs": 8.6e-06, + "mean_abs": 4.2e-07, "_seen_in": ["gigaam-v4-e2e-rnnt"] }, "enc.stage.1.out": { - "max_abs": 4.2e-04, - "mean_abs": 5.0e-05, + "max_abs": 9.5e-06, + "mean_abs": 5.7e-07, "_seen_in": ["gigaam-v4-e2e-rnnt"] }, "enc.stage.2.out": { - "max_abs": 5.6e-04, - "mean_abs": 5.5e-05, + "max_abs": 6.8e-06, + "mean_abs": 6.3e-07, "_seen_in": ["gigaam-v4-e2e-rnnt"] }, "enc.out": { - "max_abs": 1.5e-03, - "mean_abs": 1.4e-04, + "max_abs": 2.0e-05, + "mean_abs": 1.7e-06, "_seen_in": ["gigaam-v4-e2e-rnnt"] }, "rnnt.encoded": { - "max_abs": 1.5e-03, - "mean_abs": 1.4e-04, + "max_abs": 2.0e-05, + "mean_abs": 1.7e-06, "_seen_in": ["gigaam-v4-e2e-rnnt"] } } From 65364422918c0932c95c26459c86cc07619ca706 Mon Sep 17 00:00:00 2001 From: CJ Pais Date: Wed, 2 Dec 2026 16:37:58 +0800 Subject: [PATCH 07/13] gigaam: rotate Zapformer q/k with one mul_mat per layer Replace the element-wise RoPE (per q and k: a de-interleave copy, four muls, an add, a sub and a concat) with one batched mul_mat over q and k together: fill_zapformer_rope_tables builds, from the same F16-rounded cos/sin, a block-diagonal 2x2 rotation per lane pair and frame ([qdim, qdim, T_pad], shared by every layer), and q/k are strided views of the product. src1 is kept in F32 so Metal's matrix kernel does not round q and k to half. Q8_0 encode, min of 3 interleaved rounds (M1): Metal jfk 82.9 -> 75.9 ms, ru-long 284.6 -> 258.6 ms; CPU jfk 350.6 -> 347.7 ms, ru-long 1161.9 -> 1147.2 ms. enc.out drift (CPU, 1 thread) is 1.05e-5 on ru and 1.10e-5 on fleurs-en, within the tolerances; FLEURS F32 (Metal, batch 8) still matches the reference's error counts (ru 4.3435%, en 4.9171%). --- docs/porting/families/gigaam.md | 4 +- .../gigaam/gigaam-v4-e2e-rnnt/_porting-log.md | 7 +- src/arch/gigaam/encoder.cpp | 119 +++++++----------- src/arch/gigaam/encoder.h | 12 +- 4 files changed, 60 insertions(+), 82 deletions(-) diff --git a/docs/porting/families/gigaam.md b/docs/porting/families/gigaam.md index a7d738887..ac5b95206 100644 --- a/docs/porting/families/gigaam.md +++ b/docs/porting/families/gigaam.md @@ -424,7 +424,7 @@ reference rotates by them. C++ does not read them from the GGUF: it builds the same tables at run time (`fill_zapformer_rope_tables`: the reference's F32 angles, rounded through F16), which equal the checkpoint's up to position 824, past the longest window. With `ggml_rope_ext`'s F32 tables -instead, `enc.out` drifted 5.7e-4 from the reference on `ru`, 44x the +instead, `enc.out` drifted 5.7e-4 from the reference on `ru`, 54x the drift with the F16 tables. C++ dumps `enc.stage..out` for each stage, before frames are @@ -457,7 +457,7 @@ Numerical validation at F32 on CPU, one thread, on `ru` (113 encoder frames, odd, so the padded tail is masked) and `fleurs-en` (264 frames) is within the tolerances with exact transcripts; the observed drift is in the `_comment` of the tolerance file. The largest drift is at `enc.out`, -1.3e-5 on `ru` and 1.1e-5 on `fleurs-en`. +1.0e-5 on `ru` and 1.1e-5 on `fleurs-en`. Reference WER baseline: the PyTorch reference (the module the dumper builds, F32, CPU, whole-clip greedy decode) over the same FLEURS test diff --git a/reports/porting/gigaam/gigaam-v4-e2e-rnnt/_porting-log.md b/reports/porting/gigaam/gigaam-v4-e2e-rnnt/_porting-log.md index 4ff5fb6ec..58e492b07 100644 --- a/reports/porting/gigaam/gigaam-v4-e2e-rnnt/_porting-log.md +++ b/reports/porting/gigaam/gigaam-v4-e2e-rnnt/_porting-log.md @@ -84,9 +84,10 @@ commits. adjacent pairs by tables built at run time, rounded through F16 (`fill_zapformer_rope_tables`); they equal the checkpoint's bit for bit up to position 824 (two later entries differ by one F16 ulp), past the - longest window. q and k come out in planar lane order, which the - attention dot product does not see. `enc.out` drift is now 1.3e-5 on - `ru` and 1.1e-5 on `fleurs-en`, and `tests/tolerances/gigaam-v4.json` is + longest window. Each layer applies them as one batched `mul_mat` over q + and k (a block-diagonal 2x2 rotation per lane pair and frame), which + encodes 8-9% faster on Metal than rotating with element-wise ops. + `enc.out` drift is now 1.0e-5 on `ru` and 1.1e-5 on `fleurs-en`, and `tests/tolerances/gigaam-v4.json` is re-derived with the same 1.5x recipe (enc.out 1.5e-3 -> 2.0e-5). - **Windows stay within 625 frames.** Rounding a window start down could add a frame past `k_window_frames`; `plan_windows` now takes the diff --git a/src/arch/gigaam/encoder.cpp b/src/arch/gigaam/encoder.cpp index 38bae126b..5ec701c71 100644 --- a/src/arch/gigaam/encoder.cpp +++ b/src/arch/gigaam/encoder.cpp @@ -366,44 +366,10 @@ ggml_tensor * build_zapformer_frontend(ggml_context * ctx, return x; } -// RoPE on adjacent pairs with the reference's tables. qk is the [2*H*qdim, -// T_s] q|k projection; off_elems selects q (0) or k (H*qdim). cos/sin are -// [qdim/2, 1, 1, T_s]. GigaAM-v4 keeps the rotation tables in the checkpoint -// as F16, so the reference rotates by F16-rounded cos/sin; ggml_rope_ext -// computes them in F32, which moved enc.out by ~6e-4. -// -// Returns [qdim, H, T_s, 1] in planar order per head ([y0 lanes, y1 lanes] -// instead of interleaved pairs). q and k both go through here and attention -// only takes their dot product over the head dim, so the lane order does not -// matter. -ggml_tensor * zap_rope(ggml_context * ctx, - ggml_tensor * qk, - int64_t off_elems, - int64_t qdim, - int64_t H, - ggml_tensor * cos_t, - ggml_tensor * sin_t) { - const int64_t half = qdim / 2; - const int64_t T_s = qk->ne[1]; - const size_t es = ggml_element_size(qk); - - // Interleaved pairs [2, half, H, T_s] viewed in place, then one copy into - // planar [half, 2, H, T_s]. - ggml_tensor * xi = ggml_view_4d(ctx, qk, 2, half, H, T_s, 2 * es, qdim * es, qk->nb[1], off_elems * es); - ggml_tensor * xp = ggml_cont(ctx, ggml_permute(ctx, xi, 1, 0, 2, 3)); - ggml_tensor * x0 = ggml_view_4d(ctx, xp, half, 1, H, T_s, xp->nb[1], xp->nb[2], xp->nb[3], 0); - ggml_tensor * x1 = ggml_view_4d(ctx, xp, half, 1, H, T_s, xp->nb[1], xp->nb[2], xp->nb[3], xp->nb[1]); - - ggml_tensor * y0 = ggml_sub(ctx, ggml_mul(ctx, x0, cos_t), ggml_mul(ctx, x1, sin_t)); - ggml_tensor * y1 = ggml_add(ctx, ggml_mul(ctx, x0, sin_t), ggml_mul(ctx, x1, cos_t)); - return ggml_reshape_4d(ctx, ggml_concat(ctx, y0, y1, /*dim=*/1), qdim, H, T_s, 1); -} - ggml_tensor * build_zapformer_attn(ggml_context * ctx, ggml_tensor * x_qk, ggml_tensor * x_vg, - ggml_tensor * rope_cos, - ggml_tensor * rope_sin, + ggml_tensor * rope, const ZapformerLayerWeights & lw, const ZapformerStageHParams & shp, bool use_flash, @@ -421,11 +387,22 @@ ggml_tensor * build_zapformer_attn(ggml_context * ctx, ggml_tensor * qk_norm = zap_rms_norm(ctx, x_qk, lw.attn_in_norm_w); ggml_tensor * qk = ggml_add(ctx, ggml_mul_mat(ctx, lw.attn_qk_in_w, qk_norm), lw.attn_qk_in_b); - // q and k are read in place from qk (B = 1); zap_rope writes contiguous - // [qdim, H, T_s, 1] outputs. + // RoPE on q and k together, by the reference's F16 tables: the qk rows + // hold 2H heads of qdim lanes (q heads, then k heads), and one batched + // mul_mat applies rotation t (block-diagonal over adjacent lane pairs, + // see fill_zapformer_rope_tables) to the 2H heads of frame t, so each + // output lane is the two-product sum apply_rope computes. F32 src1 + // precision keeps backends that stage mul_mat operands in half (Metal) + // from rounding q and k. ggml_rope_ext computes F32 tables, which moved + // enc.out by ~6e-4. GGML_ASSERT(B == 1); - ggml_tensor * q = zap_rope(ctx, qk, 0, qdim, H, rope_cos, rope_sin); - ggml_tensor * k = zap_rope(ctx, qk, dq, qdim, H, rope_cos, rope_sin); + ggml_tensor * qk_rot = ggml_mul_mat(ctx, rope, ggml_reshape_3d(ctx, qk, qdim, 2 * H, T_s)); + ggml_prec_set_src(qk_rot, GGML_PREC_F32, 1); + + // q and k are strided [qdim, H, T_s, 1] views into the rotated qk. + ggml_tensor * q = ggml_view_4d(ctx, qk_rot, qdim, H, T_s, 1, qk_rot->nb[1], qk_rot->nb[2], qk_rot->nb[2] * T_s, 0); + ggml_tensor * k = ggml_view_4d(ctx, qk_rot, qdim, H, T_s, 1, qk_rot->nb[1], qk_rot->nb[2], qk_rot->nb[2] * T_s, + static_cast(dq) * ggml_element_size(qk_rot)); // v, gate_in and gate_out are row-strided views into vg; the gating ops // read them in place. @@ -522,8 +499,7 @@ ggml_tensor * build_zapformer_conv(ggml_context * ctx, ggml_tensor * build_zapformer_layer(ggml_context * ctx, ggml_tensor * x, - ggml_tensor * rope_cos, - ggml_tensor * rope_sin, + ggml_tensor * rope, const ZapformerLayerWeights & lw, const ZapformerStageHParams & shp, bool use_flash, @@ -535,8 +511,7 @@ ggml_tensor * build_zapformer_layer(ggml_context * ctx, ggml_tensor * qk = x; x = ggml_add(ctx, x, conf::feed_forward(ctx, x, lw.ff1_in_w, lw.ff1_in_b, lw.ff1_out_w, lw.ff1_out_b)); - x = ggml_add(ctx, x, - build_zapformer_attn(ctx, qk, x, rope_cos, rope_sin, lw, shp, use_flash, attn_mask, attn_mask_f16)); + x = ggml_add(ctx, x, build_zapformer_attn(ctx, qk, x, rope, lw, shp, use_flash, attn_mask, attn_mask_f16)); if (shp.conv_kernel > 0) { x = ggml_add(ctx, x, build_zapformer_conv(ctx, x, lw, shp.conv_kernel, valid_mask, T_valid)); x = ggml_add(ctx, x, conf::feed_forward(ctx, x, lw.ff2_in_w, lw.ff2_in_b, lw.ff2_out_w, lw.ff2_out_b)); @@ -585,16 +560,13 @@ EncoderBuild build_zapformer_encoder_graph(ggml_context * ctx, ggml_set_input(eb.zap_attn_mask_in); } - // RoPE tables [qdim/2, 1, 1, T_pad], filled by fill_zapformer_rope_tables. - // Every stage rotates positions 0..T_s-1, a prefix of these rows; the - // loader requires one qdim for all stages. - const int64_t rope_half = hp.zap_stages.front().qdim / 2; - eb.zap_rope_cos_in = ggml_new_tensor_4d(ctx, GGML_TYPE_F32, rope_half, 1, 1, T_pad); - eb.zap_rope_sin_in = ggml_new_tensor_4d(ctx, GGML_TYPE_F32, rope_half, 1, 1, T_pad); - ggml_set_name(eb.zap_rope_cos_in, "zap.rope_cos"); - ggml_set_name(eb.zap_rope_sin_in, "zap.rope_sin"); - ggml_set_input(eb.zap_rope_cos_in); - ggml_set_input(eb.zap_rope_sin_in); + // RoPE rotations [qdim, qdim, T_pad], filled by fill_zapformer_rope_tables. + // Every stage rotates positions 0..T_s-1, a prefix of them; the loader + // requires one qdim for all stages. + const int64_t rope_qdim = hp.zap_stages.front().qdim; + eb.zap_rope_in = ggml_new_tensor_3d(ctx, GGML_TYPE_F32, rope_qdim, rope_qdim, T_pad); + ggml_set_name(eb.zap_rope_in, "zap.rope"); + ggml_set_input(eb.zap_rope_in); const bool use_flash = (backend_name != nullptr && std::string(backend_name).find("CPU") == std::string::npos); @@ -618,11 +590,9 @@ EncoderBuild build_zapformer_encoder_graph(ggml_context * ctx, x = ggml_reshape_3d(ctx, x, d_model * ds, T_s, 1); } - ggml_tensor * cos_s = ggml_view_4d(ctx, eb.zap_rope_cos_in, rope_half, 1, 1, T_s, eb.zap_rope_cos_in->nb[1], - eb.zap_rope_cos_in->nb[2], eb.zap_rope_cos_in->nb[3], 0); - ggml_tensor * sin_s = ggml_view_4d(ctx, eb.zap_rope_sin_in, rope_half, 1, 1, T_s, eb.zap_rope_sin_in->nb[1], - eb.zap_rope_sin_in->nb[2], eb.zap_rope_sin_in->nb[3], 0); - ggml_tensor * valid_s = (ds == 1) ? eb.zap_valid_mask_in : nullptr; + ggml_tensor * rope_s = ggml_view_3d(ctx, eb.zap_rope_in, rope_qdim, rope_qdim, T_s, eb.zap_rope_in->nb[1], + eb.zap_rope_in->nb[2], 0); + ggml_tensor * valid_s = (ds == 1) ? eb.zap_valid_mask_in : nullptr; ggml_tensor * attn_mask_s = (ds == 1) ? eb.zap_attn_mask_in : nullptr; ggml_tensor * attn_f16_s = (ds == 1) ? attn_mask_f16 : nullptr; const int64_t T_valid_s = (ds == 1) ? T_orig : T_s; @@ -633,8 +603,8 @@ EncoderBuild build_zapformer_encoder_graph(ggml_context * ctx, x = ggml_scale(ctx, x, shp.input_scale); for (int l = 0; l < shp.n_layers; ++l) { - x = build_zapformer_layer(ctx, x, cos_s, sin_s, sw.layers[l], shp, use_flash, valid_s, attn_mask_s, - attn_f16_s, T_valid_s); + x = build_zapformer_layer(ctx, x, rope_s, sw.layers[l], shp, use_flash, valid_s, attn_mask_s, attn_f16_s, + T_valid_s); bypass = ggml_add(ctx, bypass, ggml_scale(ctx, x, shp.residual_scales[l + 1])); } @@ -854,13 +824,14 @@ EncoderBuild build_encoder_graph(ggml_context * ctx, } void fill_zapformer_rope_tables(const EncoderBuild & eb, const GigaamHParams & hp) { - if (eb.zap_rope_cos_in == nullptr || eb.zap_rope_sin_in == nullptr) { + if (eb.zap_rope_in == nullptr) { return; } - const int64_t half = eb.zap_rope_cos_in->ne[0]; - const int64_t T = eb.zap_rope_cos_in->ne[3]; - std::vector cos_buf(static_cast(half * T)); - std::vector sin_buf(static_cast(half * T)); + const int64_t qdim = eb.zap_rope_in->ne[0]; + const int64_t half = qdim / 2; + const int64_t T = eb.zap_rope_in->ne[2]; + const int64_t per_t = qdim * qdim; + std::vector rot(static_cast(per_t * T), 0.0f); // RoPETable in modeling_gigaam.py, in F32, then rounded through F16 as the // checkpoint stores it. Up to position 824 this equals the checkpoint's // tables bit for bit (two later entries differ by one F16 ulp); a window @@ -869,14 +840,20 @@ void fill_zapformer_rope_tables(const EncoderBuild & eb, const GigaamHParams & h const float inv_freq = 1.0f / std::pow(hp.zap_rope_base, static_cast(2 * i) / static_cast(2 * half)); for (int64_t t = 0; t < T; ++t) { - const float angle = static_cast(t) * inv_freq; - const size_t at = static_cast(t * half + i); - cos_buf[at] = ggml_fp16_to_fp32(ggml_fp32_to_fp16(std::cos(angle))); - sin_buf[at] = ggml_fp16_to_fp32(ggml_fp32_to_fp16(std::sin(angle))); + const float angle = static_cast(t) * inv_freq; + const float c = ggml_fp16_to_fp32(ggml_fp32_to_fp16(std::cos(angle))); + const float s = ggml_fp16_to_fp32(ggml_fp32_to_fp16(std::sin(angle))); + // Element (k, j) of rotation t, at k + qdim * j, weighs input lane + // k in output lane j: y[2i] = x[2i] c - x[2i+1] s and + // y[2i+1] = x[2i] s + x[2i+1] c, as apply_rope computes them. + float * r = rot.data() + t * per_t; + r[2 * i + qdim * (2 * i)] = c; + r[2 * i + 1 + qdim * (2 * i)] = -s; + r[2 * i + qdim * (2 * i + 1)] = s; + r[2 * i + 1 + qdim * (2 * i + 1)] = c; } } - ggml_backend_tensor_set(eb.zap_rope_cos_in, cos_buf.data(), 0, cos_buf.size() * sizeof(float)); - ggml_backend_tensor_set(eb.zap_rope_sin_in, sin_buf.data(), 0, sin_buf.size() * sizeof(float)); + ggml_backend_tensor_set(eb.zap_rope_in, rot.data(), 0, rot.size() * sizeof(float)); } } // namespace transcribe::gigaam diff --git a/src/arch/gigaam/encoder.h b/src/arch/gigaam/encoder.h index 2f41f6afc..eca25067f 100644 --- a/src/arch/gigaam/encoder.h +++ b/src/arch/gigaam/encoder.h @@ -74,10 +74,10 @@ struct EncoderBuild { ggml_tensor * zap_valid_mask_in = nullptr; // [1, T_pad, 1] f32: 1 real / 0 pad ggml_tensor * zap_attn_mask_in = nullptr; // [T_pad, 1, 1, 1] f32: 0 real / -INF pad int zap_T_orig = 0; - // Zapformer RoPE tables, ne=[qdim/2, 1, 1, T_pad] f32; filled host-side by + // Zapformer RoPE as one block-diagonal rotation per position, ne=[qdim, + // qdim, T_pad] f32 (a ggml_mul_mat src0); filled host-side by // fill_zapformer_rope_tables after the compute buffer is allocated. - ggml_tensor * zap_rope_cos_in = nullptr; - ggml_tensor * zap_rope_sin_in = nullptr; + ggml_tensor * zap_rope_in = nullptr; EncoderDumps dumps{}; ggml_cgraph * graph = nullptr; @@ -102,9 +102,9 @@ EncoderBuild build_encoder_graph(ggml_context * compute_ctx, int n_batch = 1, bool batch_var_len = false); -// Fill eb's Zapformer RoPE tables (no-op for Conformer graphs): cos/sin of the -// reference's angles, rounded through F16 as the GigaAM-v4 checkpoint stores -// them. +// Fill eb's Zapformer RoPE rotations (no-op for Conformer graphs): rotation t +// turns the adjacent lanes (2i, 2i + 1) by the cos/sin of the reference's +// angle, rounded through F16 as the GigaAM-v4 checkpoint stores them. void fill_zapformer_rope_tables(const EncoderBuild & eb, const GigaamHParams & hp); } // namespace transcribe::gigaam From 1690f28829bb5690de013b5b9b9d1c387b373209 Mon Sep 17 00:00:00 2001 From: CJ Pais Date: Wed, 2 Dec 2026 21:20:59 +0800 Subject: [PATCH 08/13] quantize: keep gigaam Zapformer stage projections at the attn_out tier Each Zapformer stage computes x + proj_out(r0 * proj(x) + ...) with r0 ~= -1 and proj_out * proj ~= I in stages 0 and 2 (||I - P'P|| 0.003 at F32), so the stage replaces its residual. Under Q4_K the product is 0.10 off identity and about 10% of the residual leaks through. Route enc.stages..proj.weight / proj_out.weight through linear_attn_out like the attention output projection: Q8_0 in Q4_K_M and Q5_K_M; F16, Q8_0 and Q6_K files are byte-identical. Only gigaam-v4 has these tensor names. FLEURS en Q4_K_M (Metal, batch 8): 5.68% -> 5.23% (F32 4.92%); FLEURS ru: 4.52% -> 4.46%. Q4_K_M grows 140.9 -> 143.7 MB. --- tools/transcribe-quantize/policy.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tools/transcribe-quantize/policy.cpp b/tools/transcribe-quantize/policy.cpp index eb33f5997..56ee2cc81 100644 --- a/tools/transcribe-quantize/policy.cpp +++ b/tools/transcribe-quantize/policy.cpp @@ -369,9 +369,17 @@ ggml_type resolve_target_type(const Preset & preset, const std::string & name, i // also uses "attn.o.weight" (decoder). All land in the same // bump. Whisper additionally has self_attn / cross_attn // out projections in the decoder under those exact names. - const bool is_attn_out = ends_with(name, "attn.linear_out.weight") || - ends_with(name, "attn.out.weight") || ends_with(name, "attn.o.weight"); - ggml_type target = is_attn_out ? preset.linear_attn_out : preset.linear_main; + const bool is_attn_out = ends_with(name, "attn.linear_out.weight") || + ends_with(name, "attn.out.weight") || ends_with(name, "attn.o.weight"); + // gigaam Zapformer stage projections (enc.stages..proj / + // proj_out) take the same bump. The stage output is + // x + proj_out(-proj(x) + ...) with proj_out * proj ~= I, so + // the residual cancels; under Q4_K the product is ~10% off + // identity and the residual leaks (FLEURS en Q4_K_M 5.68% -> + // 5.23% with these 6 tensors at Q8_0, +2.75 MB). + const bool is_stage_proj = starts_with(name, "enc.stages.") && !contains(name, ".layers.") && + (ends_with(name, ".proj.weight") || ends_with(name, ".proj_out.weight")); + ggml_type target = (is_attn_out || is_stage_proj) ? preset.linear_attn_out : preset.linear_main; // Fall back when inner dim doesn't divide the chosen // quant's block size. Same rule for both linear_main and // linear_attn_out — without it, e.g. whisper-tiny's From 67a5bc4379490608e5c2048196e8f994afb4425d Mon Sep 17 00:00:00 2001 From: CJ Pais Date: Thu, 3 Dec 2026 09:13:03 +0800 Subject: [PATCH 09/13] gigaam: tighten the GigaAM-v4 docs and porting log Shorter sentences and lists in the family doc section, final WER for every quant (FLEURS ru/en, LibriSpeech test-clean), the stage-projection quantization note, and the serial-batching decision. The porting log drops superseded entries and keeps one fact per bullet. --- docs/environment-variables.md | 2 +- docs/porting/families/gigaam.md | 184 ++++++++---------- .../gigaam/gigaam-v4-e2e-rnnt/_porting-log.md | 168 +++++----------- 3 files changed, 132 insertions(+), 222 deletions(-) diff --git a/docs/environment-variables.md b/docs/environment-variables.md index 341f4ce95..617175828 100644 --- a/docs/environment-variables.md +++ b/docs/environment-variables.md @@ -31,7 +31,7 @@ of tests. | `TRANSCRIBE_FORCE_FLASH` | Force flash attention on. Wins over `TRANSCRIBE_NO_FLASH` if both are set. | | `TRANSCRIBE_CONV_DIRECT_DW` / `TRANSCRIBE_CONV_NO_DIRECT_DW` | Force the depthwise-conv dispatch to the direct `conv_2d_dw` path / the im2col path, overriding the per-family backend default. | | `TRANSCRIBE_CONV_DIRECT_PW` / `TRANSCRIBE_CONV_NO_DIRECT_PW` | Force the pointwise-conv dispatch to direct `mul_mat` / im2col, overriding the backend default. | -| `TRANSCRIBE_GIGAAM_NO_KEEP_WARM` | gigaam: do not spin a host thread while a GPU backend computes the encoder. The spinner keeps the calling core clocked up so the host RNN-T decode right after the encode is not slowed down by a cold core; with it off, one fewer core is busy during the GPU encode. | +| `TRANSCRIBE_GIGAAM_NO_KEEP_WARM` | gigaam: do not spin a host thread during a GPU encode. The thread keeps the calling core clocked up, so the host decode that follows does not start on a slow core. | | `TRANSCRIBE_NO_REPETITION_GUARD` | Turn off the stop for greedy decodes that start repeating themselves, and the trim of a repeating tail at a budget stop (see [`input-limits.md`](input-limits.md)). For byte-exact reference parity; a looping decode then runs to its budget and keeps its repeats. Read once per process. | | `TRANSCRIBE_DUMP_DIR=` | Enable the per-stage tensor dumper; writes `.f32` + `.json` per dumped tensor into ``. The basis for the numerical-comparison harness (`scripts/compare_tensors.py`). | | `TRANSCRIBE_PERF_DEBUG` | Print a per-stage timing breakdown to stderr (DEBUG log) on the families that profile (`cohere`, `granite`, `canary`, `canary_qwen`, `moonshine`, `moonshine_streaming`, `moss`, `qwen3_asr`, `whisper`). For whisper, a value containing `cpu` or `all` additionally prints the CPU sub-section breakdown. | diff --git a/docs/porting/families/gigaam.md b/docs/porting/families/gigaam.md index ac5b95206..4c6fd8891 100644 --- a/docs/porting/families/gigaam.md +++ b/docs/porting/families/gigaam.md @@ -12,8 +12,8 @@ C++ change; WER, benchmarks, and publication are not done. See [GigaAM Multilingual Large CTC](#gigaam-multilingual-large-ctc). `gigaam-v4-e2e-rnnt` (ai-sage/GigaAM-v4) adds the Zapformer encoder to the -runtime. It converts and validates at F32, and its quants match the -reference on the checked samples; publication is not done. See +runtime. It converts and validates at F32, and WER is measured for every +quant; publication is not done. See [GigaAM-v4 E2E RNN-T](#gigaam-v4-e2e-rnnt). ## Identity @@ -339,22 +339,19 @@ commit `180301a192bb45bc2b2ca122e0d4aab24ffe7a96` (`main`; the `rnnt` branch holds the same files). Languages: ru, en. Output is cased and punctuated. Offline only. -v4 replaces the v3 Conformer with a Zapformer encoder: a 2D conv frontend -with a ConvNeXt block (4x subsampling), then three stages of 4, 11 and 4 -layers at 768, 1024 and 768 dims. Stage `s` is `encoder.encoders[s]` of -`modeling_gigaam.py`, a `ZapformerStack`; the C++ hparams, the GGUF keys -(`stt.gigaam.encoder.stage_*`) and the dumps (`enc.stage..out`) use -"stage". The middle stage runs at half the frame rate on pairs of frames -stacked into a 1536-wide input. Each layer is -feed-forward, RoPE attention with separate query/key and value/gate -inputs, an optional convolution module (none in the middle stage), a -second feed-forward, and an RmsNorm; each stage mixes its layers' outputs -through learned `residual_scales`. The RNN-T head (320-wide LSTM -predictor and joint, 1024 SentencePiece pieces + blank) has the v3 shape, -and the mel frontend has the v3 values. The checkpoint also has a `raw` -head (lowercase, no punctuation) on the same encoder; -`convert-gigaam-v4.py --head raw` writes it, but it has no golden manifest -and has not been validated. +v4 replaces the v3 Conformer with a Zapformer encoder: + +- Frontend: three 2D convs and a ConvNeXt block, 4x subsampling. +- Three stages of 4, 11 and 4 layers at 768, 1024 and 768 dims. Stage `s` + is `encoder.encoders[s]` (a `ZapformerStack`) in `modeling_gigaam.py`. + The middle stage runs at half the frame rate on frame pairs. +- Each layer: feed-forward, RoPE attention, a convolution module (not in + the middle stage), a second feed-forward, and an RmsNorm. Each stage + mixes its layers' outputs through learned `residual_scales`. +- The RNN-T head and the mel frontend have the v3 shape. + +The checkpoint also has a `raw` head (lowercase, no punctuation). +`convert-gigaam-v4.py --head raw` writes it, but it is not validated. | Item | Path | |---|---| @@ -379,10 +376,9 @@ uv run --project scripts/envs/gigaam-v4 scripts/convert-gigaam-v4.py ai-sage/Gig uv run scripts/quantize-all.py models/gigaam-v4-e2e-rnnt/gigaam-v4-e2e-rnnt-F32.gguf ``` -The converter downloads `config.json`, `model.safetensors`, -`modeling_gigaam.py` and both tokenizers at the pinned commit into -`$TRANSCRIBE_MODELS_DIR/GigaAM-v4@/` or the Hugging Face cache. A -local directory is accepted too, for a snapshot downloaded by hand. +The converter downloads the files it reads at the pinned commit into +`$TRANSCRIBE_MODELS_DIR/GigaAM-v4@/` or the Hugging Face cache. It +also accepts a local directory. Validation: @@ -395,96 +391,86 @@ TRANSCRIBE_GIGAAM_V4_GGUF=$PWD/models/gigaam-v4-e2e-rnnt/gigaam-v4-e2e-rnnt-Q8_0 uv run scripts/test_gigaam_v4.py ``` -The smoke test is defined only with `-DTRANSCRIBE_BUILD_REAL_MODEL_TESTS=ON`; -`--no-tests=error` makes a build without it fail instead of passing with no -test run. It runs on CPU and, when a GPU backend is available, again on it. +The smoke test exists only with `-DTRANSCRIBE_BUILD_REAL_MODEL_TESTS=ON`; +`--no-tests=error` makes a build without it fail. It runs on CPU, then on +a GPU backend when one is available. ### Reference -The family's `gigaam` package pin (6e4b027c) has no Zapformer, so v4 does -not use it. The repo ships the author implementation as -`modeling_gigaam.py` (the transformers remote-code module). -`scripts/lib/gigaam_v4_hf.py` imports that file from the pinned snapshot -and builds `GigaAMDualASR` from `config.json` and `model.safetensors` -with the `model.` key prefix removed, in F32 on CPU, without -`trust_remote_code`. It runs in its own env, `scripts/envs/gigaam-v4` -(torch, torchaudio, `transformers<5`, omegaconf, sentencepiece), so the v3 -env does not change. The dumper reads the WAV with soundfile; the -module's `load_audio` calls ffmpeg. - -The checkpoint stores the encoder in F16 (including the stage scalars and -the output RmsNorm's learned scale and eps) and the heads in F32. The F32 -GGUF holds exact upcasts of those values, except the stage `proj` / -`proj_out` weights: the converter multiplies them by the OrthogonalLinear -`weight_scale` (`in_channels^-0.5 / 0.3`). F16 re-rounds those and the -heads. - -The checkpoint also stores the RoPE cos/sin tables, in F16, and the -reference rotates by them. C++ does not read them from the GGUF: it builds -the same tables at run time (`fill_zapformer_rope_tables`: the reference's -F32 angles, rounded through F16), which equal the checkpoint's up to -position 824, past the longest window. With `ggml_rope_ext`'s F32 tables -instead, `enc.out` drifted 5.7e-4 from the reference on `ru`, 54x the -drift with the F16 tables. +The family's `gigaam` package pin (6e4b027c) has no Zapformer. The +reference is the `modeling_gigaam.py` that the HF repo ships: +`scripts/lib/gigaam_v4_hf.py` imports it from the pinned snapshot and +builds `GigaAMDualASR` in F32 on CPU, without `trust_remote_code`. It runs +in its own env, `scripts/envs/gigaam-v4`, so the v3 env does not change. + +Conversion notes: + +- The checkpoint stores the encoder in F16 and the heads in F32. The F32 + GGUF holds exact upcasts, except the stage `proj` / `proj_out` weights, + which the converter multiplies by the OrthogonalLinear `weight_scale`. +- Stage scalars (`input_scale`, `residual_scales`, the output RmsNorm scale + and eps) are GGUF KVs, so quantization does not round them. +- The reference rotates by the checkpoint's F16 RoPE tables. C++ builds the + same tables at run time (F32 angles rounded through F16, + `fill_zapformer_rope_tables`). With exact F32 tables, `enc.out` drifts + 5.7e-4 from the reference instead of 1.0e-5. +- The quantizer keeps the stage `proj` / `proj_out` weights at Q8_0 in + Q5_K_M and Q4_K_M. In stages 0 and 2, `proj_out * proj` is close to the + identity and the stage subtracts its input through it; at Q4_K about 10% + of the input leaks through. Keeping them at Q8_0 moved FLEURS en Q4_K_M + from 5.66% to 5.26%. C++ dumps `enc.stage..out` for each stage, before frames are unstacked, so the shapes are `[T_pad / ds, ds * D]` on both sides. -What the converter and the loader accept is what the graph implements, and -the rest is refused: the converter refuses an encoder config whose -effective value (the config's, or `ZapformerEncoder`'s default) differs — -activation other than SiLU, a non-causal frontend, limited-context -attention, `embed_dim` other than the first stage dim, a downsampling -factor other than 1 or the largest, stages with different query head dims, -language conditioning, a key `ZapformerEncoder` does not take — and a -checkpoint tensor it does not convert (other than the RoPE tables and the -unselected head). The loader refuses the same geometry in a GGUF with -`TRANSCRIBE_ERR_GGUF`; an unknown `stt.gigaam.encoder.type` fails with -`gigaam: unsupported stt.gigaam.encoder.type= (expected conformer -or zapformer)`. +The converter and the loader accept only what the graph implements. The +converter refuses, before reading tensors: + +- an activation other than SiLU, or a non-causal frontend; +- limited-context attention or language conditioning; +- `embed_dim` other than the first stage dim, a downsampling factor other + than 1 or the largest, or stages with different query head dims; +- a config key `ZapformerEncoder` does not take, or a checkpoint tensor it + does not convert (other than the RoPE tables and the unselected head). + +The loader refuses the same geometry with `TRANSCRIBE_ERR_GGUF`. An unknown +`stt.gigaam.encoder.type` fails with `gigaam: unsupported +stt.gigaam.encoder.type= (expected conformer or zapformer)`. ### Capability Validation | Capability | Mode | Command / test | Expected observable | Status | |------------|------|----------------|---------------------|--------| -| Transcribe (ru, en) | no language hint | `build/bin/transcribe-cli -m ` | transcript equal to the reference's | PASS on `samples/ru.wav`, `fleurs-ru.wav`, `ru-short.wav`, `fleurs-en.wav`, `jfk.wav`: exact for F32, F16, Q8_0, Q6_K and Q5_K_M on CPU and Metal; Q4_K_M differs by one comma on `ru-short` and one on `fleurs-en`. | -| Long-form (> 25 s, windowed) | no language hint | `transcribe_gigaam_v4_e2e_smoke` on `samples/dots.wav` (35.3 s; its second window would start on odd frame 391); by hand on `samples/ru-long.wav` (33.8 s) and on 12 concatenated FLEURS ru/en clips (34-98 s) whose windows start on an odd frame | transcript equal to the reference run with the C++ windows (`dots`, FLEURS clips); equal to the reference's whole-clip decode (`ru-long`) | PASS (`dots` F32, F16, Q8_0 on CPU and Metal, in the smoke test; `ru-long` Q8_0 Metal; FLEURS clips F32 Metal, 12/12). Window starts are rounded down to an even frame so the half-rate stage pairs the same frames as whole-clip inference, and the kept stride gives up that frame so a window still encodes at most 625 frames. Without the rounding `dots` reads "future. You" for "future you". | -| Batch | `transcribe_run_batch` | `transcribe_gigaam_v4_e2e_smoke` | each batch result equal to its single run | PASS. Zapformer takes the per-utterance loop, not the packed batch encode. | +| Transcribe (ru, en) | no language hint | `build/bin/transcribe-cli -m ` | transcript equal to the reference's | PASS on `samples/ru.wav`, `fleurs-ru.wav`, `ru-short.wav`, `fleurs-en.wav`, `jfk.wav`: exact for F32 through Q5_K_M on CPU and Metal; Q4_K_M differs by one comma on `ru-short` and on `fleurs-en`. Vulkan (Ryzen 4750U) matches CPU on F32 and Q8_0. | +| Long-form (> 25 s, windowed) | no language hint | `transcribe_gigaam_v4_e2e_smoke` on `samples/dots.wav` (35.3 s) | transcript equal to the reference run with the same windows | PASS on F32, F16 and Q8_0, CPU and Metal. Window starts are rounded down to an even frame so the half-rate stage pairs the same frames as whole-clip inference. Without the rounding `dots` reads "future. You" for "future you". | +| Batch | `transcribe_run_batch` | `transcribe_gigaam_v4_e2e_smoke` | each batch result equal to its single run | ACCEPTED GAP — serial (benchmarked no faster). Zapformer batches run the per-utterance loop. A packed-batch prototype was no faster on Metal (M1, 256 FLEURS clips: 23.8 s serial, 24.4 s length-sorted batch 8); it was faster only on CPU Q8_0 with length-sorted input. | | Raw head, streaming, translate, language detection | n/a | n/a | n/a | SKIP (not converted / not exposed). | | Word timestamps | n/a | n/a | n/a | ACCEPTED GAP, as for v3: token timestamps only. | Numerical validation at F32 on CPU, one thread, on `ru` (113 encoder -frames, odd, so the padded tail is masked) and `fleurs-en` (264 frames) -is within the tolerances with exact transcripts; the observed drift is in -the `_comment` of the tolerance file. The largest drift is at `enc.out`, -1.0e-5 on `ru` and 1.1e-5 on `fleurs-en`. - -Reference WER baseline: the PyTorch reference (the module the dumper -builds, F32, CPU, whole-clip greedy decode) over the same FLEURS test -manifests, scored by `scripts/wer/score.py` like the C++ reports: - -```bash -uv run --project scripts/envs/gigaam-v4 scripts/wer/run_reference_gigaam_v4_hf.py \ - --variant v4_e2e_rnnt \ - --manifest samples/wer/fleurs-ru.manifest.jsonl \ - --out reports/wer/gigaam-v4-e2e-rnnt-REF.fleurs-ru.jsonl -uv run scripts/wer/score.py reports/wer/gigaam-v4-e2e-rnnt-REF.fleurs-ru.jsonl --language ru -``` - -FLEURS test WER. C++ rows: Metal, `scripts/wer/run.py --batch-size 8`, -timestamps none (not a publication-profile run): - -| Run | ru (775 utts) | en (647 utts) | -|---|---:|---:| -| `gigaam-v4-e2e-rnnt` PyTorch reference | 4.34% [3.92, 4.82] | 4.92% [4.49, 5.41] | -| `gigaam-v4-e2e-rnnt` F32 | 4.35% [3.92, 4.83] | 4.92% [4.48, 5.42] | -| `gigaam-v4-e2e-rnnt` Q8_0 | 4.36% [3.93, 4.84] | 4.92% [4.47, 5.42] | -| `gigaam-v3-e2e-rnnt` Q8_0 | 5.38% [4.89, 5.91] | n/a | - -The F32 row passes the family's `C++ <= reference + 0.01pp` gate: ru -4.3501% vs 4.3435% (+0.0066pp, one more substitution), en equal (712 -errors on both). The F32 hypotheses equal the reference's on 766 of 775 -ru and 639 of 647 en utterances; the rest are near ties (a comma, a -plural ending, a transliterated name). - -The other quants and benchmarks have not been run. +frames, odd, so the padded tail is masked) and `fleurs-en` (264 frames) is +within the tolerances with exact transcripts. The largest drift is at +`enc.out`: 1.0e-5 on `ru`, 1.1e-5 on `fleurs-en`. + +### WER + +The reference row is the PyTorch module the dumper builds (F32, CPU, +whole-clip greedy decode), from `scripts/wer/run_reference_gigaam_v4_hf.py`. +C++ rows are CUDA (L40S, Modal): FLEURS test at batch 1, LibriSpeech +test-clean at batch 8. + +| Run | FLEURS ru (775) | FLEURS en (647) | LibriSpeech test-clean (2620) | +|---|---:|---:|---:| +| PyTorch reference | 4.34% | 4.92% | 2.04% | +| F32 | 4.34% | 4.92% | 2.05% | +| F16 | 4.34% | 4.91% | 2.05% | +| Q8_0 | 4.36% | 4.92% | 2.05% | +| Q6_K | 4.40% | 4.94% | 2.04% | +| Q5_K_M | 4.38% | 4.99% | 2.06% | +| Q4_K_M | 4.48% | 5.26% | 2.10% | + +F32 is within the `reference + 0.01pp` gate on FLEURS. On LibriSpeech it +is 6 words over the reference (+0.01pp): 24 of the 25 utterances that +differ are longer than 25 s, where C++ decodes in windows and the +reference decodes the whole clip. `gigaam-v3-e2e-rnnt` Q8_0 is 5.35% on +FLEURS ru. diff --git a/reports/porting/gigaam/gigaam-v4-e2e-rnnt/_porting-log.md b/reports/porting/gigaam/gigaam-v4-e2e-rnnt/_porting-log.md index 58e492b07..7004f44b0 100644 --- a/reports/porting/gigaam/gigaam-v4-e2e-rnnt/_porting-log.md +++ b/reports/porting/gigaam/gigaam-v4-e2e-rnnt/_porting-log.md @@ -3,125 +3,49 @@ Surprises worth feeding back into the docs and tooling. - **The family reference package cannot build v4.** `gigaam` at 6e4b027c - has no `ZapformerEncoder`, and the v4 config is a different schema - (`cfg.encoder` / `cfg.heads` / `cfg.decodings` at the top level, two - heads) from the v3 one (`cfg.model.cfg`). The reference is the - `modeling_gigaam.py` the repo ships, imported from the pinned snapshot - by `scripts/lib/gigaam_v4_hf.py`, in its own env - (`scripts/envs/gigaam-v4`), so the v3 env, pin and reference do not move. -- **A separate converter, not a `VARIANT_PROFILES` entry.** The weights - are `model.safetensors` (v3 and Multilingual: `pytorch_model.bin` or the - package download), the tensor names have nothing in common with the - Conformer's, and the scalar stage parameters (`input_scale`, - `residual_scales`, the output RmsNorm scale and eps) go to GGUF KVs - instead of tensors, so they stay exact under quantization. - `scripts/test_convert_gigaam.py` compared every gigaam golden manifest - with `convert-gigaam.py`'s profiles; it now skips manifests whose - reference is not `dump_reference_gigaam_author.py`, and a new case - checks the v4 manifest against the pin. -- **The converter output is byte-identical to the GGUFs published by the - author of the Zapformer port** (https://huggingface.co/70sh1/gigaam-v4-e2e-rnnt-gguf): - F32 sha256 `6cd32ae7…cd745`, Q8_0 `debd6179…e3e29`. -- **`main` and `rnnt` are different commits with the same files.** The - model card says `main` is the rnnt revision; `rnnt` (9fe3ebf5) re-applies - the same commit message on top of `main` (180301a1), and every file's - blob / LFS id is equal. The pin is `main`. -- **The encoder is F16 in the checkpoint**, 349 of 373 tensors, including - the stage scalars and the output RmsNorm's learned scale (0.9951) and eps - (7.7e-6); the module's constructor defaults, 0.2 and 0.1, are not what - the checkpoint holds. The 24 F32 tensors are the two heads and the mel - buffers. The converter bakes the OrthogonalLinear weight_scale into the - stage proj / proj_out weights, so those are not exact upcasts in the F32 - GGUF, and the F16 GGUF re-rounds them along with the heads. -- **The Conformer's per-block dumps do not map onto Zapformer.** C++ now - dumps `enc.stage..out` for each stack, taken before the frame - unstacking so the shape matches the PyTorch `ZapformerStack` output - without a reshape on either side. -- **Odd frame counts take a padded path.** The middle stack stacks frame - pairs, so an odd `T_enc` is padded by one frame, masked in the - full-rate stacks' attention and convolution, and dropped before the - final norm. `samples/ru.wav` has `T_enc = 113`, so the `ru` golden case - covers it; `fleurs-en` (264) covers the even path. -- **No fixture smoke.** The gigaam family has no synthetic-GGUF smoke test - for v3 either; v4 adds the real-model public-ABI smoke - (`transcribe_gigaam_v4_e2e_smoke`), which also runs both clips through - `transcribe_run_batch`. -- **`uv run scripts/wer/ingest.py fleurs` failed under Python 3.14** - (`Pickler._batch_setitems() takes 2 positional arguments but 3 were - given` from `datasets`); uv picked a 3.14 interpreter from the PATH. - `uv run --python 3.12` works. -- **Batching.** `run_batch` keeps the per-utterance loop for Zapformer - instead of the packed batch encode; batch results equal single runs. -- **Reference WER baseline.** `scripts/wer/run_reference_gigaam_v4_hf.py` - runs the dumper's forward and greedy decode over a WER manifest. FLEURS - test: reference 4.34% ru / 4.92% en, C++ F32 (Metal, batch 8) 4.35% / - 4.92%. ru is +0.0066pp, inside the family's +0.01pp gate; the F32 - hypotheses differ from the reference's on 9 of 775 ru and 8 of 647 en - utterances, all near ties. -- **Long-form windows start on an even frame.** Audio past 25 s is - encoded in overlapping windows whose start (`a - 50`) can be odd, and the - half-rate stack pairs frames from the window's first frame, so the pairs - inside the window were shifted against whole-clip inference. Window - starts are now rounded down to the largest downsampling factor. Checked - on 12 concatenated FLEURS clips (34-98 s, each with an odd window start): - C++ F32 equals PyTorch run with the same windows on all 12 (before the - change, 22 word edits against it). WER against the FLEURS text did not - move measurably (ru equal; en within 6 words on 6 clips). -- **Loader checks for stage geometry.** A GGUF with an odd `qdim`, an even - conv kernel, a zero downsampling factor or one that does not divide the - largest, now fails to load with `TRANSCRIBE_ERR_GGUF` instead of asserting - inside ggml. - -## Review fixes (2026-12-02) - -From the review of #285 (vlsi), on top of the maintainer's graph-speed -commits. - -- **RoPE rotates by the reference's F16 tables.** The checkpoint stores the - RoPE cos/sin tables as F16 parameters, and the reference rotates by them; - `ggml_rope_ext` computed them in F32, which accounted for nearly all of - the encoder drift (`enc.out` 5.7e-4 max on `ru`). The graph now rotates - adjacent pairs by tables built at run time, rounded through F16 - (`fill_zapformer_rope_tables`); they equal the checkpoint's bit for bit - up to position 824 (two later entries differ by one F16 ulp), past the - longest window. Each layer applies them as one batched `mul_mat` over q - and k (a block-diagonal 2x2 rotation per lane pair and frame), which - encodes 8-9% faster on Metal than rotating with element-wise ops. - `enc.out` drift is now 1.0e-5 on `ru` and 1.1e-5 on `fleurs-en`, and `tests/tolerances/gigaam-v4.json` is - re-derived with the same 1.5x recipe (enc.out 1.5e-3 -> 2.0e-5). -- **Windows stay within 625 frames.** Rounding a window start down could - add a frame past `k_window_frames`; `plan_windows` now takes the - alignment and gives up `align - 1` frames of kept stride. -- **Long-form regression test.** `transcribe_gigaam_v4_e2e_smoke` adds - `samples/dots.wav` (35.3 s, two windows, the second would start on odd - frame 391) with the PyTorch transcript of the same windows. Without the - rounding it fails ("future. You" for "future you"). Exact on F32, F16 - and Q8_0; the K-quants drop a comma, so the check is skipped for them. - The smoke now also runs on a GPU backend when one is available, which - takes the flash-attention branch. -- **Converter and loader refuse what the graph does not implement.** The - converter checks every `ZapformerEncoder` argument's effective value - (config or reference default) and refuses non-SiLU activation, a - non-causal frontend, limited-context attention, `embed_dim` other than - the first stage dim, a downsampling factor other than 1 or the largest, - mixed query head dims, language conditioning, unknown keys, and - checkpoint tensors it does not convert. The loader refuses the same - stage geometry, `causal_frontend=false`, and names the array and lengths - on a stage-array mismatch. The F32 GGUF is byte-identical - (`6cd32ae7…cd745`). -- **Python tests.** `scripts/lib/test_gigaam_hf.py` failed on the v4 - manifest (it expects every manifest in `gigaam_hf.VARIANTS`); it now - checks only author-dumper manifests. `scripts/test_gigaam_v4.py` (in the - python-bindings workflow) tests the pin, the snapshot fetch, the - converter's and the dumper's source refusals, and the config refusals. - The v4 snapshot is fetched through `hf_source.download_snapshot` - (new `allow_patterns`), so an offline miss names the directory. -- **Compute context back to 4 MiB.** The 8 MiB was not needed: the - Zapformer graph builds in 4 MiB, including with dumps on. -- **Fixture loader smoke.** `transcribe_gigaam_smoke` (default build) - loads a toy Zapformer GGUF generated by `tests/fixtures/make_gguf_fixtures.py` - (d_model 8, stages 1,2,1), runs 1 s of silence through it, and checks that - eight one-change mutants (odd qdim, even conv kernel, downsampling 0, an - intermediate factor, mixed qdim, `causal_frontend=false`, a short stage - array, an unknown encoder type) fail with `TRANSCRIBE_ERR_GGUF`. The loader - also refuses `feat_in` differing from `stt.frontend.num_mels`. + has no `ZapformerEncoder`, and the v4 config uses a different schema + (`cfg.encoder` / `cfg.heads` / `cfg.decodings`, two heads). The reference + is the `modeling_gigaam.py` that the HF repo ships, in its own env + (`scripts/envs/gigaam-v4`), so the v3 env and pin do not move. +- **A separate converter.** The weights are `model.safetensors`, the tensor + names share nothing with the Conformer's, and the stage scalars go to + GGUF KVs so quantization does not round them. +- **`main` and `rnnt` are different commits with the same files.** Every + file's blob / LFS id is equal. The pin is `main` (180301a1). +- **The encoder is F16 in the checkpoint**, including the stage scalars and + the output RmsNorm's learned scale (0.9951) and eps (7.7e-6). The + module's constructor defaults (0.2 and 0.1) are not what the checkpoint + holds. +- **The reference rotates by the checkpoint's F16 RoPE tables.** + `ggml_rope_ext` computes them in F32, which was nearly all of the encoder + drift (`enc.out` 5.7e-4 on `ru`). C++ now builds the tables at run time, + rounded through F16, and applies them as one `mul_mat` per layer. + `enc.out` drift is 1.0e-5. +- **Odd frame counts take a padded path.** The middle stage pairs frames, + so an odd `T_enc` is padded by one frame and masked in the full-rate + stages. `samples/ru.wav` (`T_enc` = 113) covers it. +- **Long-form windows must start on an even frame.** Otherwise the + half-rate stage pairs different frames than whole-clip inference. On 12 + concatenated FLEURS clips with odd window starts, C++ was 22 word edits + from the reference before the fix and equal after it. The smoke test + checks `samples/dots.wav`. +- **The stage projections cancel the residual.** In stages 0 and 2, + `proj_out * proj` is close to the identity, and the stage subtracts its + input through it. At Q4_K about 10% of the input leaks through, which + cost 0.74pp on FLEURS en. The quantizer keeps these six tensors at Q8_0 + in Q5_K_M and Q4_K_M (+2.8 MB). +- **Batching stays serial.** A packed-batch prototype was no faster on + Metal (M1). It was 1.33x faster on CPU Q8_0 with length-sorted input, + but its Q8_0 output also drifted from the serial path; not adopted. +- **Converter and loader accept only what the graph implements.** Other + activations, a non-causal frontend, limited context, language + conditioning, other downsampling factors, unknown config keys and + unconverted tensors are refused. +- **`scripts/lib/test_gigaam_hf.py` expects every gigaam manifest in + `gigaam_hf.VARIANTS`.** It now checks only author-dumper manifests; + `scripts/test_gigaam_v4.py` covers the v4 pin. +- **`uv run scripts/wer/ingest.py fleurs` fails under Python 3.14** + (`datasets` pickling error). `uv run --python 3.12` works. +- **The converter output is byte-identical** to the GGUFs published by the + author of the Zapformer port + (https://huggingface.co/70sh1/gigaam-v4-e2e-rnnt-gguf). From c3328ce4184ac494e411a8f05db41172c9a68f41 Mon Sep 17 00:00:00 2001 From: CJ Pais Date: Thu, 3 Dec 2026 10:15:26 +0800 Subject: [PATCH 10/13] catalog: opt-in speed targets; Apple M1 as a stand-in for the base M4 An asr-publication-v2 target can be marked opt_in: it is required only for records that list its machine in speed_opt_in. Adds an m1 target (cpu, metal) on that basis, so a record can publish Apple M1 numbers in place of a missing base M4 run. No existing record opts in; publication check results for every other record are unchanged. --- catalog/_benchmark_profiles.json | 9 +++++++++ catalog/_schema.json | 9 +++++++++ scripts/catalog/profiles.py | 12 ++++++++++++ scripts/catalog/test_profiles.py | 25 +++++++++++++++++++++++++ 4 files changed, 55 insertions(+) diff --git a/catalog/_benchmark_profiles.json b/catalog/_benchmark_profiles.json index 1ce385c57..5fa63a976 100644 --- a/catalog/_benchmark_profiles.json +++ b/catalog/_benchmark_profiles.json @@ -72,6 +72,15 @@ ], "cooldown_tctl_c": 55.0, "max_model_gib": 5 + }, + { + "machine": "m1", + "display": "Apple M1 (stand-in for the base Apple M4)", + "backends": [ + "cpu", + "metal" + ], + "opt_in": true } ], "single_language_samples": { diff --git a/catalog/_schema.json b/catalog/_schema.json index b8974a004..e652e25f3 100644 --- a/catalog/_schema.json +++ b/catalog/_schema.json @@ -96,6 +96,15 @@ "type": "string" } }, + "speed_opt_in": { + "type": "array", + "description": "Machine slugs of opt-in speed targets (`opt_in: true` in the publication profile) whose cells this record publishes and therefore requires. Opt-in targets are stand-ins, such as an Apple M1 for an unavailable base Apple M4; other records do not run them.", + "items": { + "type": "string", + "minLength": 1 + }, + "uniqueItems": true + }, "benchmark_exceptions": { "type": "array", "description": "Narrow, reviewed exclusions from the repository publication profile. An exception removes only cells matched explicitly here; a free-form statement cannot satisfy a publication gate.", diff --git a/scripts/catalog/profiles.py b/scripts/catalog/profiles.py index 8765b1a76..5d17c2645 100644 --- a/scripts/catalog/profiles.py +++ b/scripts/catalog/profiles.py @@ -57,6 +57,9 @@ def load_profiles(path: pathlib.Path = PROFILE_PATH) -> dict: if not isinstance(target, dict) or not isinstance(target.get("machine"), str): raise ValueError(f"{path}: {profile_id}.speed.targets entries must be " f"objects with a machine name") + if not isinstance(target.get("opt_in", False), bool): + raise ValueError(f"{path}: {profile_id} target {target['machine']!r} " + f"opt_in must be a boolean") cap = target.get("max_model_gib") if cap is not None and (isinstance(cap, bool) or not isinstance(cap, (int, float)) @@ -261,7 +264,13 @@ def target_admits(record: dict, target: dict) -> bool: expresses a policy for weak reference machines (a base M4 or a Ryzen 4750U class host) once per target instead of one hand-written exception per large model. + + A target may declare `opt_in: true`: a stand-in machine (an Apple M1 for + an unavailable base Apple M4) whose cells only records that list it in + `speed_opt_in` publish. Every other record ignores it. """ + if target.get("opt_in") and target["machine"] not in (record.get("speed_opt_in") or []): + return False cap = target.get("max_model_gib") if cap is None: return True @@ -277,6 +286,9 @@ def admission_reason(record: dict, target: dict) -> str | None: """ if target_admits(record, target): return None + if target.get("opt_in") and target["machine"] not in (record.get("speed_opt_in") or []): + return (f"{target['machine']} is an opt-in target and the record's " + f"speed_opt_in does not list it") size = published_gib(record) return (f"{size:.2f} GiB publication footprint exceeds the target's " f"max_model_gib={float(target['max_model_gib']):g}") diff --git a/scripts/catalog/test_profiles.py b/scripts/catalog/test_profiles.py index cc86f43f8..1e9655f70 100644 --- a/scripts/catalog/test_profiles.py +++ b/scripts/catalog/test_profiles.py @@ -84,6 +84,31 @@ def test_the_shipped_profile_keeps_the_voxtral_minis_and_drops_the_24b(): assert not profiles.target_admits(records["voxtral-small-24b-2507"], target) +OPT_IN = {"machine": "m1", "backends": ["cpu"], "opt_in": True} + + +def test_an_opt_in_target_admits_only_records_that_list_it(): + plain = record({"Q8_0": GIB}) + listed = {**plain, "speed_opt_in": ["m1"]} + assert not profiles.target_admits(plain, OPT_IN) + assert profiles.target_admits(listed, OPT_IN) + assert "speed_opt_in" in profiles.admission_reason(plain, OPT_IN) + profile = {"speed": {**PROFILE["speed"], "targets": [UNCAPPED, OPT_IN]}} + assert {c["machine"] for c in profiles.expected_speed(plain, profile)} == {"m4-max"} + assert {c["machine"] for c in profiles.expected_speed(listed, profile)} == {"m4-max", "m1"} + + +def test_the_shipped_m1_stand_in_is_opt_in(): + _, profile = profiles.load_profile() + target = profiles.target_for_machine(profile, "apple-m1") + assert target["opt_in"] is True + records = profiles.common.load_records() + admitted = sorted(name for name, rec in records.items() + if profiles.governs(profile, rec) and profiles.target_admits(rec, target)) + assert admitted == sorted(name for name, rec in records.items() + if profiles.governs(profile, rec) and "m1" in (rec.get("speed_opt_in") or [])) + + STREAMING_PROFILE = { "speed": { "quants": "all-downloads", From a1752c1fb4e8fda517a29a5a0716611fb53cd7f7 Mon Sep 17 00:00:00 2001 From: CJ Pais Date: Thu, 3 Dec 2026 10:15:26 +0800 Subject: [PATCH 11/13] gigaam: publish gigaam-v4-e2e-rnnt Catalog record, model page, HF card spec and family page entry. Accuracy: LibriSpeech test-clean for every quant, FLEURS ru/en at Q8_0 (asr-publication-v2, L40S). Speed: Apple M4 Max, Ryzen 7 PRO 4750U, and Apple M1 standing in for the base M4, which was not available. --- README.md | 2 +- catalog/gigaam-v4-e2e-rnnt.json | 83 ++++++++++ docs/models/gigaam-v4-e2e-rnnt.md | 190 +++++++++++++++++++++++ docs/models/gigaam.md | 60 +++---- docs/porting/families/gigaam.md | 7 +- scripts/hf_cards/gigaam-v4-e2e-rnnt.yaml | 36 +++++ 6 files changed, 335 insertions(+), 43 deletions(-) create mode 100644 catalog/gigaam-v4-e2e-rnnt.json create mode 100644 docs/models/gigaam-v4-e2e-rnnt.md create mode 100644 scripts/hf_cards/gigaam-v4-e2e-rnnt.yaml diff --git a/README.md b/README.md index 05cc7993a..9c41d8c19 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ C/C++ speech-to-text inference library. Runs diverse STT model families via [GGU | Canary-Qwen 2.5B | `canary-qwen-2.5b` | - | [docs/models/canary-qwen-2.5b.md](docs/models/canary-qwen-2.5b.md) | | Cohere Transcribe | `cohere-transcribe-03-2026`, `cohere-transcribe-arabic-07-2026` | - | [docs/models/cohere.md](docs/models/cohere.md) | | Fun-ASR-Nano | `fun-asr-mlt-nano-2512`, `fun-asr-nano-2512` | - | [docs/models/fun-asr-nano.md](docs/models/fun-asr-nano.md) | -| GigaAM-v3 | `gigaam-v3-ctc`, `gigaam-v3-e2e-ctc`, `gigaam-v3-e2e-rnnt`, `gigaam-v3-rnnt` | token timestamps | [docs/models/gigaam.md](docs/models/gigaam.md) | +| GigaAM | `gigaam-v3-ctc`, `gigaam-v3-e2e-ctc`, `gigaam-v3-e2e-rnnt`, `gigaam-v3-rnnt`, `gigaam-v4-e2e-rnnt` | token timestamps | [docs/models/gigaam.md](docs/models/gigaam.md) | | Granite Speech 4 / 4.1 | `granite-4.0-1b-speech`, `granite-speech-4.1-2b`, `granite-speech-4.1-2b-nar`, `granite-speech-4.1-2b-plus` | diarize, translate, word timestamps | [docs/models/granite-speech.md](docs/models/granite-speech.md) | | Granite Speech 5.0 TurboCTC | `granite-speech-5.0-470m-turboctc`, `granite-speech-5.0-470m-turboctc-nc` | - | [docs/models/granite-speech-5.0-turboctc.md](docs/models/granite-speech-5.0-turboctc.md) | | MedASR | `medasr` | token timestamps | [docs/models/medasr.md](docs/models/medasr.md) | diff --git a/catalog/gigaam-v4-e2e-rnnt.json b/catalog/gigaam-v4-e2e-rnnt.json new file mode 100644 index 000000000..3377ecbba --- /dev/null +++ b/catalog/gigaam-v4-e2e-rnnt.json @@ -0,0 +1,83 @@ +{ + "schema": "transcribe-catalog-v1", + "variant": "gigaam-v4-e2e-rnnt", + "family": "gigaam", + "display_name": "GigaAM v4 E2E-RNN-T", + "params": 239090433, + "license": { + "spdx": "mit", + "display": "MIT" + }, + "upstream_repo": "ai-sage/GigaAM-v4", + "upstream_commit": "180301a", + "published_repo": "handy-computer/gigaam-v4-e2e-rnnt-gguf", + "docs_page": "gigaam.md", + "languages": ["ru","en"], + "language_tag_form": "bare-bcp47", + "long_form_strategy": "chunked-unbounded", + "speed_opt_in": ["m1"], + "benchmark_exceptions": [ + {"kind":"speed","match":{"machine":"m4"},"reason":"No base Apple M4 was available when v4 was published; speed is published for the Apple M4 Max, the Ryzen 7 PRO 4750U, and an Apple M1 as a stand-in (speed_opt_in)."} + ], + "capabilities": { + "transcribe": {"supported":true,"verified":false}, + "translate": {"supported":false}, + "lang_detect": {"supported":false}, + "timestamps": {"supported":true,"verified":false,"granularities":["token"]}, + "streaming": {"supported":false}, + "diarize": {"supported":false}, + "batching": {"supported":false} + }, + "downloads": [ + {"quant":"F32","filename":"gigaam-v4-e2e-rnnt-F32.gguf","size_bytes":956411456}, + {"quant":"F16","filename":"gigaam-v4-e2e-rnnt-F16.gguf","size_bytes":478906688}, + {"quant":"Q8_0","filename":"gigaam-v4-e2e-rnnt-Q8_0.gguf","size_bytes":255076352}, + {"quant":"Q6_K","filename":"gigaam-v4-e2e-rnnt-Q6_K.gguf","size_bytes":198385536}, + {"quant":"Q5_K_M","filename":"gigaam-v4-e2e-rnnt-Q5_K_M.gguf","size_bytes":171524096}, + {"quant":"Q4_K_M","filename":"gigaam-v4-e2e-rnnt-Q4_K_M.gguf","size_bytes":143673344} + ], + "accuracy_benchmarks": [ + {"dataset":"librispeech","split":"test-clean","language":"en","language_hint":"en","backend":"cuda","quant":"F32","metric":"wer","err_pct":2.05,"ci95":[1.89,2.23],"n_utts":2620,"batch_size":8,"timestamps":"none","engine_sha":"65364422","publication_profile":"asr-publication-v2","measured_on":null,"errors":{"sub":847,"del":136,"ins":100},"empty_hyp":0,"utts_over_50pct":5}, + {"dataset":"librispeech","split":"test-clean","language":"en","language_hint":"en","backend":"cuda","quant":"F16","metric":"wer","err_pct":2.05,"ci95":[1.89,2.23],"n_utts":2620,"batch_size":8,"timestamps":"none","engine_sha":"65364422","publication_profile":"asr-publication-v2","measured_on":null,"errors":{"sub":847,"del":135,"ins":100},"empty_hyp":0,"utts_over_50pct":5}, + {"dataset":"librispeech","split":"test-clean","language":"en","language_hint":"en","backend":"cuda","quant":"Q8_0","metric":"wer","err_pct":2.05,"ci95":[1.9,2.23],"n_utts":2620,"batch_size":8,"timestamps":"none","engine_sha":"65364422","publication_profile":"asr-publication-v2","measured_on":null,"errors":{"sub":846,"del":137,"ins":101},"empty_hyp":0,"utts_over_50pct":5}, + {"dataset":"librispeech","split":"test-clean","language":"en","language_hint":"en","backend":"cuda","quant":"Q6_K","metric":"wer","err_pct":2.04,"ci95":[1.89,2.22],"n_utts":2620,"batch_size":8,"timestamps":"none","engine_sha":"65364422","publication_profile":"asr-publication-v2","measured_on":null,"errors":{"sub":844,"del":132,"ins":101},"empty_hyp":0,"utts_over_50pct":5}, + {"dataset":"fleurs","split":"test","language":"ru","language_hint":"ru","backend":"cuda","quant":"Q8_0","metric":"wer","err_pct":4.36,"ci95":[3.9,4.83],"n_utts":775,"batch_size":8,"timestamps":"none","engine_sha":"65364422","publication_profile":"asr-publication-v2","measured_on":null,"errors":{"sub":566,"del":69,"ins":23},"empty_hyp":0,"utts_over_50pct":1}, + {"dataset":"fleurs","split":"test","language":"en","language_hint":"en","backend":"cuda","quant":"Q8_0","metric":"wer","err_pct":4.92,"ci95":[4.48,5.44],"n_utts":647,"batch_size":8,"timestamps":"none","engine_sha":"65364422","publication_profile":"asr-publication-v2","measured_on":null,"errors":{"sub":521,"del":117,"ins":75},"empty_hyp":0,"utts_over_50pct":0}, + {"dataset":"librispeech","split":"test-clean","language":"en","language_hint":"en","backend":"cuda","quant":"Q5_K_M","metric":"wer","err_pct":2.06,"ci95":[1.9,2.23],"n_utts":2620,"batch_size":8,"timestamps":"none","engine_sha":"67a5bc43","publication_profile":"asr-publication-v2","measured_on":null,"errors":{"sub":852,"del":134,"ins":100},"empty_hyp":0,"utts_over_50pct":5}, + {"dataset":"librispeech","split":"test-clean","language":"en","language_hint":"en","backend":"cuda","quant":"Q4_K_M","metric":"wer","err_pct":2.1,"ci95":[1.94,2.27],"n_utts":2620,"batch_size":8,"timestamps":"none","engine_sha":"67a5bc43","publication_profile":"asr-publication-v2","measured_on":null,"errors":{"sub":874,"del":149,"ins":89},"empty_hyp":0,"utts_over_50pct":5} + ], + "headline_benchmark": { + "dataset": "librispeech", + "split": "test-clean", + "language": "en", + "metric": "wer", + "batch_size": 8, + "timestamps": "none" + }, + "speed_benchmarks": [ + {"machine":"m4-max","backend":"cpu","quant":"Q4_K_M","sample":"dots","sample_duration_s":35.332,"total_ms":516.9,"xrt_compute":68.35,"wall_ms":517.3,"xrt_wall":68.31,"load_ms":42.7,"mel_ms":4.8,"encode_ms":499.5,"decode_ms":12.5,"engine_sha":"1690f288","publication_profile":"asr-publication-v2","measured_on":"2026-12-02","thermal_gated":null}, + {"machine":"m4-max","backend":"cpu","quant":"Q4_K_M","sample":"jfk","sample_duration_s":11.0,"total_ms":138.5,"xrt_compute":79.45,"wall_ms":139.1,"xrt_wall":79.11,"load_ms":36.7,"mel_ms":1.6,"encode_ms":134.4,"decode_ms":2.5,"engine_sha":"1690f288","publication_profile":"asr-publication-v2","measured_on":"2026-12-02","thermal_gated":null}, + {"machine":"m4-max","backend":"cpu","quant":"Q8_0","sample":"dots","sample_duration_s":35.332,"total_ms":375.4,"xrt_compute":94.12,"wall_ms":375.8,"xrt_wall":94.03,"load_ms":33.8,"mel_ms":4.7,"encode_ms":358.4,"decode_ms":12.3,"engine_sha":"1690f288","publication_profile":"asr-publication-v2","measured_on":"2026-12-02","thermal_gated":null}, + {"machine":"m4-max","backend":"cpu","quant":"Q8_0","sample":"jfk","sample_duration_s":11.0,"total_ms":99.3,"xrt_compute":110.79,"wall_ms":99.9,"xrt_wall":110.06,"load_ms":36.4,"mel_ms":1.6,"encode_ms":95.2,"decode_ms":2.5,"engine_sha":"1690f288","publication_profile":"asr-publication-v2","measured_on":"2026-12-02","thermal_gated":null}, + {"machine":"m4-max","backend":"metal","quant":"Q4_K_M","sample":"dots","sample_duration_s":35.332,"total_ms":72.9,"xrt_compute":484.68,"wall_ms":73.1,"xrt_wall":483.42,"load_ms":36.0,"mel_ms":4.9,"encode_ms":55.3,"decode_ms":12.7,"engine_sha":"1690f288","publication_profile":"asr-publication-v2","measured_on":"2026-12-02","thermal_gated":null}, + {"machine":"m4-max","backend":"metal","quant":"Q4_K_M","sample":"jfk","sample_duration_s":11.0,"total_ms":23.7,"xrt_compute":463.37,"wall_ms":25.3,"xrt_wall":434.94,"load_ms":32.8,"mel_ms":2.4,"encode_ms":18.8,"decode_ms":2.5,"engine_sha":"1690f288","publication_profile":"asr-publication-v2","measured_on":"2026-12-02","thermal_gated":null}, + {"machine":"m4-max","backend":"metal","quant":"Q8_0","sample":"dots","sample_duration_s":35.332,"total_ms":71.6,"xrt_compute":493.71,"wall_ms":71.8,"xrt_wall":492.36,"load_ms":33.0,"mel_ms":5.5,"encode_ms":53.5,"decode_ms":12.6,"engine_sha":"1690f288","publication_profile":"asr-publication-v2","measured_on":"2026-12-02","thermal_gated":null}, + {"machine":"m4-max","backend":"metal","quant":"Q8_0","sample":"jfk","sample_duration_s":11.0,"total_ms":22.7,"xrt_compute":485.31,"wall_ms":24.2,"xrt_wall":454.66,"load_ms":35.5,"mel_ms":2.4,"encode_ms":17.7,"decode_ms":2.5,"engine_sha":"1690f288","publication_profile":"asr-publication-v2","measured_on":"2026-12-02","thermal_gated":null}, + {"machine":"ryzen-4750u","backend":"cpu","quant":"Q4_K_M","sample":"dots","sample_duration_s":35.332,"total_ms":1270.9,"xrt_compute":27.8,"wall_ms":1271.3,"xrt_wall":27.79,"load_ms":41.9,"mel_ms":33.0,"encode_ms":1144.8,"decode_ms":93.1,"engine_sha":"1690f288","publication_profile":"asr-publication-v2","measured_on":"2026-12-03","thermal_gated":null}, + {"machine":"ryzen-4750u","backend":"cpu","quant":"Q4_K_M","sample":"jfk","sample_duration_s":11.0,"total_ms":345.5,"xrt_compute":31.84,"wall_ms":348.5,"xrt_wall":31.57,"load_ms":42.5,"mel_ms":15.7,"encode_ms":311.5,"decode_ms":18.3,"engine_sha":"1690f288","publication_profile":"asr-publication-v2","measured_on":"2026-12-03","thermal_gated":null}, + {"machine":"ryzen-4750u","backend":"cpu","quant":"Q8_0","sample":"dots","sample_duration_s":35.332,"total_ms":1450.2,"xrt_compute":24.36,"wall_ms":1450.6,"xrt_wall":24.36,"load_ms":41.0,"mel_ms":33.5,"encode_ms":1324.0,"decode_ms":92.7,"engine_sha":"1690f288","publication_profile":"asr-publication-v2","measured_on":"2026-12-03","thermal_gated":null}, + {"machine":"ryzen-4750u","backend":"cpu","quant":"Q8_0","sample":"jfk","sample_duration_s":11.0,"total_ms":375.0,"xrt_compute":29.33,"wall_ms":378.0,"xrt_wall":29.1,"load_ms":42.5,"mel_ms":13.7,"encode_ms":343.2,"decode_ms":18.1,"engine_sha":"1690f288","publication_profile":"asr-publication-v2","measured_on":"2026-12-03","thermal_gated":null}, + {"machine":"ryzen-4750u","backend":"vulkan","quant":"Q4_K_M","sample":"dots","sample_duration_s":35.332,"total_ms":1052.4,"xrt_compute":33.57,"wall_ms":1053.8,"xrt_wall":33.53,"load_ms":86.2,"mel_ms":34.3,"encode_ms":909.1,"decode_ms":109.0,"engine_sha":"1690f288","publication_profile":"asr-publication-v2","measured_on":"2026-12-03","thermal_gated":null}, + {"machine":"ryzen-4750u","backend":"vulkan","quant":"Q4_K_M","sample":"jfk","sample_duration_s":11.0,"total_ms":298.7,"xrt_compute":36.83,"wall_ms":304.6,"xrt_wall":36.11,"load_ms":88.0,"mel_ms":17.1,"encode_ms":245.2,"decode_ms":36.4,"engine_sha":"1690f288","publication_profile":"asr-publication-v2","measured_on":"2026-12-03","thermal_gated":null}, + {"machine":"ryzen-4750u","backend":"vulkan","quant":"Q8_0","sample":"dots","sample_duration_s":35.332,"total_ms":1055.3,"xrt_compute":33.48,"wall_ms":1056.5,"xrt_wall":33.44,"load_ms":126.7,"mel_ms":35.1,"encode_ms":913.9,"decode_ms":106.3,"engine_sha":"1690f288","publication_profile":"asr-publication-v2","measured_on":"2026-12-03","thermal_gated":null}, + {"machine":"ryzen-4750u","backend":"vulkan","quant":"Q8_0","sample":"jfk","sample_duration_s":11.0,"total_ms":317.5,"xrt_compute":34.64,"wall_ms":322.9,"xrt_wall":34.07,"load_ms":127.9,"mel_ms":17.3,"encode_ms":268.7,"decode_ms":31.6,"engine_sha":"1690f288","publication_profile":"asr-publication-v2","measured_on":"2026-12-03","thermal_gated":null}, + {"machine":"m1","backend":"cpu","quant":"Q4_K_M","sample":"dots","sample_duration_s":35.332,"total_ms":1338.6,"xrt_compute":26.4,"wall_ms":1339.1,"xrt_wall":26.39,"load_ms":48.1,"mel_ms":12.3,"encode_ms":1305.7,"decode_ms":20.6,"engine_sha":"67a5bc43","publication_profile":"asr-publication-v2","measured_on":"2026-12-03","thermal_gated":null}, + {"machine":"m1","backend":"cpu","quant":"Q4_K_M","sample":"jfk","sample_duration_s":11.0,"total_ms":362.0,"xrt_compute":30.39,"wall_ms":362.8,"xrt_wall":30.32,"load_ms":51.7,"mel_ms":4.2,"encode_ms":353.5,"decode_ms":4.2,"engine_sha":"67a5bc43","publication_profile":"asr-publication-v2","measured_on":"2026-12-03","thermal_gated":null}, + {"machine":"m1","backend":"cpu","quant":"Q8_0","sample":"dots","sample_duration_s":35.332,"total_ms":1217.7,"xrt_compute":29.02,"wall_ms":1218.2,"xrt_wall":29.0,"load_ms":51.7,"mel_ms":12.2,"encode_ms":1185.1,"decode_ms":20.4,"engine_sha":"67a5bc43","publication_profile":"asr-publication-v2","measured_on":"2026-12-03","thermal_gated":null}, + {"machine":"m1","backend":"cpu","quant":"Q8_0","sample":"jfk","sample_duration_s":11.0,"total_ms":364.9,"xrt_compute":30.14,"wall_ms":365.7,"xrt_wall":30.08,"load_ms":49.5,"mel_ms":4.2,"encode_ms":356.7,"decode_ms":4.0,"engine_sha":"67a5bc43","publication_profile":"asr-publication-v2","measured_on":"2026-12-03","thermal_gated":null}, + {"machine":"m1","backend":"metal","quant":"Q4_K_M","sample":"dots","sample_duration_s":35.332,"total_ms":322.7,"xrt_compute":109.49,"wall_ms":323.1,"xrt_wall":109.37,"load_ms":49.8,"mel_ms":11.8,"encode_ms":290.9,"decode_ms":20.0,"engine_sha":"67a5bc43","publication_profile":"asr-publication-v2","measured_on":"2026-12-03","thermal_gated":null}, + {"machine":"m1","backend":"metal","quant":"Q4_K_M","sample":"jfk","sample_duration_s":11.0,"total_ms":90.3,"xrt_compute":121.75,"wall_ms":92.7,"xrt_wall":118.68,"load_ms":49.3,"mel_ms":3.9,"encode_ms":82.5,"decode_ms":3.9,"engine_sha":"67a5bc43","publication_profile":"asr-publication-v2","measured_on":"2026-12-03","thermal_gated":null}, + {"machine":"m1","backend":"metal","quant":"Q8_0","sample":"dots","sample_duration_s":35.332,"total_ms":301.7,"xrt_compute":117.12,"wall_ms":302.0,"xrt_wall":116.98,"load_ms":51.9,"mel_ms":12.9,"encode_ms":268.8,"decode_ms":20.0,"engine_sha":"67a5bc43","publication_profile":"asr-publication-v2","measured_on":"2026-12-03","thermal_gated":null}, + {"machine":"m1","backend":"metal","quant":"Q8_0","sample":"jfk","sample_duration_s":11.0,"total_ms":83.9,"xrt_compute":131.07,"wall_ms":86.3,"xrt_wall":127.51,"load_ms":50.4,"mel_ms":4.0,"encode_ms":76.0,"decode_ms":3.9,"engine_sha":"67a5bc43","publication_profile":"asr-publication-v2","measured_on":"2026-12-03","thermal_gated":null} + ] +} diff --git a/docs/models/gigaam-v4-e2e-rnnt.md b/docs/models/gigaam-v4-e2e-rnnt.md new file mode 100644 index 000000000..dfefa00ad --- /dev/null +++ b/docs/models/gigaam-v4-e2e-rnnt.md @@ -0,0 +1,190 @@ +# GigaAM-v4 e2e-RNN-T + + +Upstream: [`ai-sage/GigaAM-v4`](https://huggingface.co/ai-sage/GigaAM-v4) at [`180301a`](https://huggingface.co/ai-sage/GigaAM-v4/commit/180301a). + +Offline Russian and English speech-to-text with greedy RNN-T decoding. Zapformer encoder (three stages of 4, 11 and 4 layers, the middle one at half the frame rate) paired with the GigaAM-v3 RNN-T head. Output is cased text with punctuation, decoded from a 1024-piece SentencePiece tokenizer. Not a streaming model and does not translate. Audio past the 25 s training window is encoded in overlapping windows. + + +## What it's for + +Offline Russian and English speech-to-text with greedy RNN-T decoding. +Output is cased text with punctuation from a 1024-piece SentencePiece +tokenizer. The model takes no language input; it transcribes either +language as spoken. + +GigaAM-v4 replaces the v3 Conformer with a Zapformer encoder: a +convolutional frontend, then three stages of 4, 11 and 4 layers, the +middle one at half the frame rate. The RNN-T head and the mel frontend +have the v3 shape. The upstream checkpoint also has a `raw` head +(lowercase, no punctuation); it is not published here. + +Decoder is greedy; no language model, no beam search. Audio longer than +the 25 s training window is encoded in overlapping windows (see +[Input limits](gigaam.md#input-limits)); upstream's VAD-based long-form +path is not ported. Token-level timestamps are emitted at the encoder +frame rate (40 ms granularity); word- and segment-level timestamps are +out of scope. Batches run one utterance at a time: a packed batch was +no faster. + +Use Q8_0. On FLEURS at batch 1, Q8_0 matches F32 within 0.02 pp in both +languages; Q4_K_M loses about 0.3 pp on English and 0.1 pp on Russian +(per-quant table in the +[family doc](../porting/families/gigaam.md#gigaam-v4-e2e-rnnt)). + +Other GigaAM variants are listed in the [family page](gigaam.md). See +ai-sage's [model card](https://huggingface.co/ai-sage/GigaAM-v4) for +training data, intended use, and upstream evaluation methodology. + + +Licensed MIT. Ported from upstream commit [`180301a`](https://huggingface.co/ai-sage/GigaAM-v4/commit/180301a), pinned 2026-11-29. Validated against the upstream `modeling_gigaam.py` reference at transcribe.cpp commit [`67a5bc43`](https://github.com/handy-computer/transcribe.cpp/tree/67a5bc43) on 2026-12-03. + + +## Download + + +| Quantization | Download | Size | WER (LibriSpeech test-clean) | +| --- | --- | ---: | ---: | +| F32 | [gigaam-v4-e2e-rnnt-F32.gguf](https://huggingface.co/handy-computer/gigaam-v4-e2e-rnnt-gguf/resolve/main/gigaam-v4-e2e-rnnt-F32.gguf) | 956 MB | 2.05% | +| F16 | [gigaam-v4-e2e-rnnt-F16.gguf](https://huggingface.co/handy-computer/gigaam-v4-e2e-rnnt-gguf/resolve/main/gigaam-v4-e2e-rnnt-F16.gguf) | 479 MB | 2.05% | +| Q8_0 | [gigaam-v4-e2e-rnnt-Q8_0.gguf](https://huggingface.co/handy-computer/gigaam-v4-e2e-rnnt-gguf/resolve/main/gigaam-v4-e2e-rnnt-Q8_0.gguf) | 255 MB | 2.05% | +| Q6_K | [gigaam-v4-e2e-rnnt-Q6_K.gguf](https://huggingface.co/handy-computer/gigaam-v4-e2e-rnnt-gguf/resolve/main/gigaam-v4-e2e-rnnt-Q6_K.gguf) | 198 MB | 2.04% | +| Q5_K_M | [gigaam-v4-e2e-rnnt-Q5_K_M.gguf](https://huggingface.co/handy-computer/gigaam-v4-e2e-rnnt-gguf/resolve/main/gigaam-v4-e2e-rnnt-Q5_K_M.gguf) | 172 MB | 2.06% | +| Q4_K_M | [gigaam-v4-e2e-rnnt-Q4_K_M.gguf](https://huggingface.co/handy-computer/gigaam-v4-e2e-rnnt-gguf/resolve/main/gigaam-v4-e2e-rnnt-Q4_K_M.gguf) | 144 MB | 2.10% | + + + +WER on the full LibriSpeech test-clean split (2,620 utterances), batch size 8, timestamps none, language hint `en`, decoded on cuda. Measured at transcribe.cpp `65364422`; transcribe.cpp `67a5bc43`. + + + +Greedy decoding, no external LM. Batches decode one utterance at a time, so the +batch size does not change the transcript. The PyTorch reference (the upstream +`modeling_gigaam.py`, F32 on CPU, whole-clip decode) scores 2.04% on the same +manifest. F32 is 6 words worse: 24 of the 25 utterances that differ are longer than +25 s, where transcribe.cpp decodes in windows. ai-sage does not publish a +LibriSpeech test-clean WER; its English figure is an average over seven Open ASR +sets and is not comparable. + + + +**FLEURS test** + +| Language | Metric | Q8_0 | +| --- | --- | ---: | +| en | WER | 4.92% | +| ru | WER | 4.36% | + + +## Quick Start + +```bash +cmake -B build +cmake --build build + +build/bin/transcribe-cli \ + -m models/gigaam-v4-e2e-rnnt/gigaam-v4-e2e-rnnt-Q8_0.gguf \ + samples/ru.wav +``` + +If your audio is not already 16 kHz mono WAV, convert it first: + +```bash +ffmpeg -i input.mp3 -ar 16000 -ac 1 output.wav +``` + +## Performance + +### Apple M4 Max + + +Compute latency (mel + encode + decode), speedup over realtime in parentheses; profile `asr-publication-v2`: mean over 3 iterations after 1 warmup. + +| Backend | Sample | Q8_0 | Q4_K_M | +| ------- | ------------ | --------------: | --------------: | +| Metal | jfk (11.0s) | 23 ms (485.31×) | 24 ms (463.37×) | +| Metal | dots (35.3s) | 72 ms (493.71×) | 73 ms (484.68×) | +| CPU | jfk (11.0s) | 99 ms (110.79×) | 138 ms (79.45×) | +| CPU | dots (35.3s) | 375 ms (94.12×) | 517 ms (68.35×) | + +Apple M4 Max: transcribe.cpp `1690f288` on 2026-12-02. + + +### AMD Ryzen 7 PRO 4750U + + +Compute latency (mel + encode + decode), speedup over realtime in parentheses; profile `asr-publication-v2`: mean over 3 iterations after 1 warmup. + +| Backend | Sample | Q8_0 | Q4_K_M | +| ------- | ------------ | --------------: | --------------: | +| Vulkan | jfk (11.0s) | 318 ms (34.64×) | 299 ms (36.83×) | +| Vulkan | dots (35.3s) | 1.06 s (33.48×) | 1.05 s (33.57×) | +| CPU | jfk (11.0s) | 375 ms (29.33×) | 346 ms (31.84×) | +| CPU | dots (35.3s) | 1.45 s (24.36×) | 1.27 s (27.80×) | + +AMD Ryzen 7 PRO 4750U (Radeon RADV RENOIR): transcribe.cpp `1690f288` on 2026-12-03. + + +### Apple M1 + +The base Apple M4 was not available when this variant was published. +These Apple M1 numbers stand in for it. + + +Compute latency (mel + encode + decode), speedup over realtime in parentheses; profile `asr-publication-v2`: mean over 3 iterations after 1 warmup. + +| Backend | Sample | Q8_0 | Q4_K_M | +| ------- | ------------ | ---------------: | ---------------: | +| Metal | jfk (11.0s) | 84 ms (131.07×) | 90 ms (121.75×) | +| Metal | dots (35.3s) | 302 ms (117.12×) | 323 ms (109.49×) | +| CPU | jfk (11.0s) | 365 ms (30.14×) | 362 ms (30.39×) | +| CPU | dots (35.3s) | 1.22 s (29.02×) | 1.34 s (26.40×) | + +Apple M1 (stand-in for the base Apple M4): transcribe.cpp `67a5bc43` on 2026-12-03. + + +Benchmark reproduction: + +```bash +uv run scripts/bench/run.py --profile --models gigaam-v4-e2e-rnnt +``` + +## Numerical Validation + +transcribe.cpp is validated tensor-by-tensor against the upstream +`modeling_gigaam.py` on `samples/ru.wav` and `samples/fleurs-en.wav` via +`scripts/validate.py`, with its own tolerance file. The +[family doc](../porting/families/gigaam.md#gigaam-v4-e2e-rnnt) has the +conversion notes and the per-stage results. + +| Field | Value | +| --- | --- | +| Reference | `modeling_gigaam.py` from `ai-sage/GigaAM-v4` @ `180301a`, built in F32 on CPU by `scripts/lib/gigaam_v4_hf.py` | +| Dump script | `scripts/dump_reference_gigaam_v4_hf.py` | +| Manifest | `tests/golden/gigaam/gigaam-v4-e2e-rnnt.manifest.json` | +| Tolerances | `tests/tolerances/gigaam-v4.json` | +| Command | `uv run scripts/validate.py all --family gigaam --variant gigaam-v4-e2e-rnnt` | + +## Reproduction + +### Convert + +```bash +uv run --project scripts/envs/gigaam-v4 \ + scripts/convert-gigaam-v4.py ai-sage/GigaAM-v4 +``` + +### Quantize + +```bash +build/bin/transcribe-quantize \ + models/gigaam-v4-e2e-rnnt/gigaam-v4-e2e-rnnt-F32.gguf \ + models/gigaam-v4-e2e-rnnt/gigaam-v4-e2e-rnnt-Q8_0.gguf \ + --quant Q8_0 +``` + +### Validate + +```bash +uv run scripts/validate.py all --family gigaam --variant gigaam-v4-e2e-rnnt +``` diff --git a/docs/models/gigaam.md b/docs/models/gigaam.md index f45c30f5e..574dcea77 100644 --- a/docs/models/gigaam.md +++ b/docs/models/gigaam.md @@ -1,4 +1,4 @@ -# GigaAM-v3 +# GigaAM ai-sage's [`ai-sage/GigaAM-v3`](https://huggingface.co/ai-sage/GigaAM-v3) family ported to transcribe.cpp. Russian-only ASR built around a shared @@ -15,8 +15,7 @@ transcribes five languages, and is not published yet; see A sixth, `gigaam-v4-e2e-rnnt`, comes from [`ai-sage/GigaAM-v4`](https://huggingface.co/ai-sage/GigaAM-v4): Russian and -English, cased and punctuated, with a new encoder (Zapformer). No GGUF is -published under `handy-computer` yet; see +English, cased and punctuated, with a new encoder (Zapformer). See [GigaAM-v4 E2E RNN-T](#gigaam-v4-e2e-rnnt). For the architecture deep-dive, validation contract, and porting notes, @@ -39,9 +38,8 @@ see the family doc at on case/punctuation are no longer absorbed by tokenization. - **Cased + punctuated Russian and English.** `gigaam-v4-e2e-rnnt` — GigaAM-v4's Zapformer encoder with the v3 RNN-T head shape; lower WER on - FLEURS Russian than `gigaam-v3-e2e-rnnt` (4.4% vs 5.4% at Q8_0). No - pre-built GGUF; convert it yourself, see - [GigaAM-v4 E2E RNN-T](#gigaam-v4-e2e-rnnt). + FLEURS Russian than `gigaam-v3-e2e-rnnt` (see the + [model page](gigaam-v4-e2e-rnnt.md#download)). - **Russian, English, Kazakh, Kyrgyz, or Uzbek.** `gigaam-multilingual-large-ctc` — lowercase charwise output with no punctuation. No pre-built GGUF; convert it yourself, see @@ -53,19 +51,23 @@ see the family doc at ## All variants WER is on FLEURS Russian (`fleurs-ru`) for the **Q8_0** preset, -measured by transcribe.cpp's WER pipeline. See each per-variant doc -for the full quant matrix. +measured by transcribe.cpp's WER pipeline. `gigaam-v4-e2e-rnnt` also +transcribes English, so its row is LibriSpeech test-clean, which is +measured at every quant; its FLEURS Russian and English WER is on its +page. See each per-variant doc for the full quant matrix. - -| Variant | Params | Languages | Q8_0 size | Benchmark | Q8_0 | Capabilities | Doc | + +| Variant | Params | Languages | Q8_0 size | Benchmark | Q8_0 | Capabilities | Doc | | --- | ---: | --- | ---: | --- | ---: | --- | --- | -| `gigaam-v3-e2e-rnnt` | 223M | ru | 274 MB | FLEURS ru (WER) | 5.35% | token timestamps | [gigaam-v3-e2e-rnnt.md](gigaam-v3-e2e-rnnt.md) | -| `gigaam-v3-e2e-ctc` | 221M | ru | 272 MB | FLEURS ru (WER) | 5.53% | token timestamps | [gigaam-v3-e2e-ctc.md](gigaam-v3-e2e-ctc.md) | -| `gigaam-v3-rnnt` | 222M | ru | 273 MB | FLEURS ru (WER) | 8.07% | token timestamps | [gigaam-v3-rnnt.md](gigaam-v3-rnnt.md) | -| `gigaam-v3-ctc` | 221M | ru | 272 MB | FLEURS ru (WER) | 8.42% | token timestamps | [gigaam-v3-ctc.md](gigaam-v3-ctc.md) | +| `gigaam-v3-e2e-rnnt` | 223M | ru | 274 MB | FLEURS ru (WER) | 5.35% | token timestamps | [gigaam-v3-e2e-rnnt.md](gigaam-v3-e2e-rnnt.md) | +| `gigaam-v3-e2e-ctc` | 221M | ru | 272 MB | FLEURS ru (WER) | 5.53% | token timestamps | [gigaam-v3-e2e-ctc.md](gigaam-v3-e2e-ctc.md) | +| `gigaam-v3-rnnt` | 222M | ru | 273 MB | FLEURS ru (WER) | 8.07% | token timestamps | [gigaam-v3-rnnt.md](gigaam-v3-rnnt.md) | +| `gigaam-v3-ctc` | 221M | ru | 272 MB | FLEURS ru (WER) | 8.42% | token timestamps | [gigaam-v3-ctc.md](gigaam-v3-ctc.md) | +| `gigaam-v4-e2e-rnnt` | 239M | ru, en | 255 MB | LibriSpeech test-clean (WER) | 2.05% | token timestamps | [gigaam-v4-e2e-rnnt.md](gigaam-v4-e2e-rnnt.md) | -Pre-built GGUFs for every v3 variant and quant are hosted under +Pre-built GGUFs for every v3 variant, `gigaam-v4-e2e-rnnt`, and every +quant are hosted under [`handy-computer` on Hugging Face](https://huggingface.co/handy-computer); each per-variant doc has direct download links. @@ -121,30 +123,10 @@ the mel frontend have the v3 shape. The checkpoint's second head, `raw` (lowercase, no punctuation), converts with `--head raw` but has not been validated. -The variant is not in the table above: no GGUF is published under -`handy-computer`. Conversion, numerical validation at F32 and the FLEURS -WER gate pass; the [family doc](../porting/families/gigaam.md#gigaam-v4-e2e-rnnt) -has the validation results and WER. - -Convert, quantize, and run: - -```bash -uv run --project scripts/envs/gigaam-v4 \ - scripts/convert-gigaam-v4.py ai-sage/GigaAM-v4 - -build/bin/transcribe-quantize \ - models/gigaam-v4-e2e-rnnt/gigaam-v4-e2e-rnnt-F32.gguf \ - models/gigaam-v4-e2e-rnnt/gigaam-v4-e2e-rnnt-Q8_0.gguf \ - --quant Q8_0 - -build/bin/transcribe-cli \ - -m models/gigaam-v4-e2e-rnnt/gigaam-v4-e2e-rnnt-Q8_0.gguf \ - samples/ru.wav -``` - -The converter downloads the files it reads at the commit pinned in -`scripts/lib/gigaam_v4_hf.py` and writes a 956 MB (956411456 bytes) F32 -GGUF. It also accepts a local directory holding that commit's files. +Downloads, WER, speed and the reproduction commands are on the +[model page](gigaam-v4-e2e-rnnt.md). The +[family doc](../porting/families/gigaam.md#gigaam-v4-e2e-rnnt) has the +validation results. ## Input limits diff --git a/docs/porting/families/gigaam.md b/docs/porting/families/gigaam.md index 4c6fd8891..f8d192514 100644 --- a/docs/porting/families/gigaam.md +++ b/docs/porting/families/gigaam.md @@ -12,8 +12,9 @@ C++ change; WER, benchmarks, and publication are not done. See [GigaAM Multilingual Large CTC](#gigaam-multilingual-large-ctc). `gigaam-v4-e2e-rnnt` (ai-sage/GigaAM-v4) adds the Zapformer encoder to the -runtime. It converts and validates at F32, and WER is measured for every -quant; publication is not done. See +runtime. It converts and validates at F32, WER and speed are measured for +every published quant, and it ships as `handy-computer/gigaam-v4-e2e-rnnt-gguf` +([model page](../../models/gigaam-v4-e2e-rnnt.md)). See [GigaAM-v4 E2E RNN-T](#gigaam-v4-e2e-rnnt). ## Identity @@ -22,7 +23,7 @@ quant; publication is not done. See - Upstream architecture string: `gigaam` (HF `model_type`); paper name "GigaAM" (Sber/ai-sage, InterSpeech 2025, arXiv:2506.01192) - Hugging Face repo: `ai-sage/GigaAM-v3` (five sibling branches upstream; four ported) - Also converted, not yet published: `gigaam-multilingual-large-ctc` from `ai-sage/GigaAM-Multilingual`, see [GigaAM Multilingual Large CTC](#gigaam-multilingual-large-ctc) -- Also converted, not yet published: `gigaam-v4-e2e-rnnt` from `ai-sage/GigaAM-v4`, see [GigaAM-v4 E2E RNN-T](#gigaam-v4-e2e-rnnt) +- Also ported and published: `gigaam-v4-e2e-rnnt` from `ai-sage/GigaAM-v4`, see [GigaAM-v4 E2E RNN-T](#gigaam-v4-e2e-rnnt) - License: MIT - v3 variants in scope (one HF branch each): diff --git a/scripts/hf_cards/gigaam-v4-e2e-rnnt.yaml b/scripts/hf_cards/gigaam-v4-e2e-rnnt.yaml new file mode 100644 index 000000000..47e0024c7 --- /dev/null +++ b/scripts/hf_cards/gigaam-v4-e2e-rnnt.yaml @@ -0,0 +1,36 @@ +# Spec for the HF README of handy-computer/gigaam-v4-e2e-rnnt-gguf. +# Prose only; numbers and metadata come from catalog/.json. See README.md. + +pin_date: 2026-11-29 + +# Validation pin for the most recent upload. Updated on each release; +# older HF revisions carry whatever value was current at their upload time. +validation: + reference: upstream `modeling_gigaam.py` + commit: 67a5bc43 + date: 2026-12-03 + +pipeline_tag: automatic-speech-recognition +tags: + - gguf + - transcribe.cpp + - asr + - speech-to-text + - gigaam + - zapformer + - rnnt + - russian + - english + +summary: | + Offline Russian and English speech-to-text with greedy RNN-T decoding. Zapformer encoder (three stages of 4, 11 and 4 layers, the middle one at half the frame rate) paired with the GigaAM-v3 RNN-T head. Output is cased text with punctuation, decoded from a 1024-piece SentencePiece tokenizer. Not a streaming model and does not translate. Audio past the 25 s training window is encoded in overlapping windows. + +wer: + notes: | + Greedy decoding, no external LM. Batches decode one utterance at a time, so the + batch size does not change the transcript. The PyTorch reference (the upstream + `modeling_gigaam.py`, F32 on CPU, whole-clip decode) scores 2.04% on the same + manifest. F32 is 6 words worse: 24 of the 25 utterances that differ are longer than + 25 s, where transcribe.cpp decodes in windows. ai-sage does not publish a + LibriSpeech test-clean WER; its English figure is an average over seven Open ASR + sets and is not comparable. From 0d1c058442848b8b69484b2a2f25f13e5aae2dcf Mon Sep 17 00:00:00 2001 From: CJ Pais Date: Thu, 3 Dec 2026 10:17:53 +0800 Subject: [PATCH 12/13] gigaam: write the v4 model page for new users Plain-language summary and WER note, a short 'What it does' list, which file to download, and how to read the speed tables. Validation and conversion details move to a 'For developers' section. --- docs/models/gigaam-v4-e2e-rnnt.md | 95 ++++++++++-------------- scripts/hf_cards/gigaam-v4-e2e-rnnt.yaml | 13 ++-- 2 files changed, 43 insertions(+), 65 deletions(-) diff --git a/docs/models/gigaam-v4-e2e-rnnt.md b/docs/models/gigaam-v4-e2e-rnnt.md index dfefa00ad..1c08ab515 100644 --- a/docs/models/gigaam-v4-e2e-rnnt.md +++ b/docs/models/gigaam-v4-e2e-rnnt.md @@ -3,38 +3,23 @@ Upstream: [`ai-sage/GigaAM-v4`](https://huggingface.co/ai-sage/GigaAM-v4) at [`180301a`](https://huggingface.co/ai-sage/GigaAM-v4/commit/180301a). -Offline Russian and English speech-to-text with greedy RNN-T decoding. Zapformer encoder (three stages of 4, 11 and 4 layers, the middle one at half the frame rate) paired with the GigaAM-v3 RNN-T head. Output is cased text with punctuation, decoded from a 1024-piece SentencePiece tokenizer. Not a streaming model and does not translate. Audio past the 25 s training window is encoded in overlapping windows. +Turns Russian and English speech into text, with capital letters and punctuation. It runs on your own computer, with no internet connection. On the FLEURS Russian test it makes the fewest errors of the models in transcribe.cpp. Long recordings work: audio longer than 25 seconds is split into overlapping pieces. It does not transcribe live audio as it is spoken, and it does not translate. -## What it's for +## What it does -Offline Russian and English speech-to-text with greedy RNN-T decoding. -Output is cased text with punctuation from a 1024-piece SentencePiece -tokenizer. The model takes no language input; it transcribes either -language as spoken. +- Transcribes Russian and English. You don't need to say which language + is spoken. +- Adds capital letters and punctuation. +- Handles long recordings. +- Runs offline on CPU, or on a GPU (Metal, Vulkan, CUDA). -GigaAM-v4 replaces the v3 Conformer with a Zapformer encoder: a -convolutional frontend, then three stages of 4, 11 and 4 layers, the -middle one at half the frame rate. The RNN-T head and the mel frontend -have the v3 shape. The upstream checkpoint also has a `raw` head -(lowercase, no punctuation); it is not published here. +It does not transcribe live audio as it comes in, translate, or give a +time for each word. -Decoder is greedy; no language model, no beam search. Audio longer than -the 25 s training window is encoded in overlapping windows (see -[Input limits](gigaam.md#input-limits)); upstream's VAD-based long-form -path is not ported. Token-level timestamps are emitted at the encoder -frame rate (40 ms granularity); word- and segment-level timestamps are -out of scope. Batches run one utterance at a time: a packed batch was -no faster. - -Use Q8_0. On FLEURS at batch 1, Q8_0 matches F32 within 0.02 pp in both -languages; Q4_K_M loses about 0.3 pp on English and 0.1 pp on Russian -(per-quant table in the -[family doc](../porting/families/gigaam.md#gigaam-v4-e2e-rnnt)). - -Other GigaAM variants are listed in the [family page](gigaam.md). See -ai-sage's [model card](https://huggingface.co/ai-sage/GigaAM-v4) for -training data, intended use, and upstream evaluation methodology. +Other GigaAM models are listed on the [GigaAM page](gigaam.md). ai-sage's +[model card](https://huggingface.co/ai-sage/GigaAM-v4) describes the +training data. Licensed MIT. Ported from upstream commit [`180301a`](https://huggingface.co/ai-sage/GigaAM-v4/commit/180301a), pinned 2026-11-29. Validated against the upstream `modeling_gigaam.py` reference at transcribe.cpp commit [`67a5bc43`](https://github.com/handy-computer/transcribe.cpp/tree/67a5bc43) on 2026-12-03. @@ -42,6 +27,10 @@ Licensed MIT. Ported from upstream commit [`180301a`](https://huggingface.co/ai- ## Download +Most people should use **Q8_0**. It is as accurate as the full-size file +at a quarter of the size. Q4_K_M is the smallest, but makes more mistakes, +mostly in English. F32 and F16 are full precision, for development. + | Quantization | Download | Size | WER (LibriSpeech test-clean) | | --- | --- | ---: | ---: | @@ -58,15 +47,14 @@ WER on the full LibriSpeech test-clean split (2,620 utterances), batch size 8, t -Greedy decoding, no external LM. Batches decode one utterance at a time, so the -batch size does not change the transcript. The PyTorch reference (the upstream -`modeling_gigaam.py`, F32 on CPU, whole-clip decode) scores 2.04% on the same -manifest. F32 is 6 words worse: 24 of the 25 utterances that differ are longer than -25 s, where transcribe.cpp decodes in windows. ai-sage does not publish a -LibriSpeech test-clean WER; its English figure is an average over seven Open ASR -sets and is not comparable. +WER is the share of words the model gets wrong; lower is better. The original +PyTorch model scores 2.04% on the same audio. This port gets 6 more words wrong +out of about 53,000. Almost all of the differences are on recordings longer than +25 seconds, which transcribe.cpp splits into pieces. +Accuracy on FLEURS, a test set of read speech in many languages: + **FLEURS test** @@ -76,7 +64,9 @@ sets and is not comparable. | ru | WER | 4.36% | -## Quick Start +## Quick start + +Build transcribe.cpp, then transcribe a file: ```bash cmake -B build @@ -87,13 +77,17 @@ build/bin/transcribe-cli \ samples/ru.wav ``` -If your audio is not already 16 kHz mono WAV, convert it first: +The input must be a 16 kHz mono WAV file. To convert other audio: ```bash ffmpeg -i input.mp3 -ar 16000 -ac 1 output.wav ``` -## Performance +## Speed + +Time to transcribe two sample clips. The number in parentheses is how +many times faster than real time: 100× means one minute of audio takes +under a second. ### Apple M4 Max @@ -127,8 +121,7 @@ AMD Ryzen 7 PRO 4750U (Radeon RADV RENOIR): transcribe.cpp `1690f288` on 2026-12 ### Apple M1 -The base Apple M4 was not available when this variant was published. -These Apple M1 numbers stand in for it. +No base Apple M4 was available, so these Apple M1 numbers stand in for it. Compute latency (mel + encode + decode), speedup over realtime in parentheses; profile `asr-publication-v2`: mean over 3 iterations after 1 warmup. @@ -143,19 +136,18 @@ Compute latency (mel + encode + decode), speedup over realtime in parentheses; p Apple M1 (stand-in for the base Apple M4): transcribe.cpp `67a5bc43` on 2026-12-03. -Benchmark reproduction: +To run the benchmark yourself: ```bash uv run scripts/bench/run.py --profile --models gigaam-v4-e2e-rnnt ``` -## Numerical Validation +## For developers -transcribe.cpp is validated tensor-by-tensor against the upstream -`modeling_gigaam.py` on `samples/ru.wav` and `samples/fleurs-en.wav` via -`scripts/validate.py`, with its own tolerance file. The +This port is checked against the original PyTorch model, layer by layer, +with `scripts/validate.py`. The [family doc](../porting/families/gigaam.md#gigaam-v4-e2e-rnnt) has the -conversion notes and the per-stage results. +details. | Field | Value | | --- | --- | @@ -163,28 +155,17 @@ conversion notes and the per-stage results. | Dump script | `scripts/dump_reference_gigaam_v4_hf.py` | | Manifest | `tests/golden/gigaam/gigaam-v4-e2e-rnnt.manifest.json` | | Tolerances | `tests/tolerances/gigaam-v4.json` | -| Command | `uv run scripts/validate.py all --family gigaam --variant gigaam-v4-e2e-rnnt` | - -## Reproduction -### Convert +Convert the original model, quantize it, and validate: ```bash uv run --project scripts/envs/gigaam-v4 \ scripts/convert-gigaam-v4.py ai-sage/GigaAM-v4 -``` - -### Quantize -```bash build/bin/transcribe-quantize \ models/gigaam-v4-e2e-rnnt/gigaam-v4-e2e-rnnt-F32.gguf \ models/gigaam-v4-e2e-rnnt/gigaam-v4-e2e-rnnt-Q8_0.gguf \ --quant Q8_0 -``` - -### Validate -```bash uv run scripts/validate.py all --family gigaam --variant gigaam-v4-e2e-rnnt ``` diff --git a/scripts/hf_cards/gigaam-v4-e2e-rnnt.yaml b/scripts/hf_cards/gigaam-v4-e2e-rnnt.yaml index 47e0024c7..2db5c7008 100644 --- a/scripts/hf_cards/gigaam-v4-e2e-rnnt.yaml +++ b/scripts/hf_cards/gigaam-v4-e2e-rnnt.yaml @@ -23,14 +23,11 @@ tags: - english summary: | - Offline Russian and English speech-to-text with greedy RNN-T decoding. Zapformer encoder (three stages of 4, 11 and 4 layers, the middle one at half the frame rate) paired with the GigaAM-v3 RNN-T head. Output is cased text with punctuation, decoded from a 1024-piece SentencePiece tokenizer. Not a streaming model and does not translate. Audio past the 25 s training window is encoded in overlapping windows. + Turns Russian and English speech into text, with capital letters and punctuation. It runs on your own computer, with no internet connection. On the FLEURS Russian test it makes the fewest errors of the models in transcribe.cpp. Long recordings work: audio longer than 25 seconds is split into overlapping pieces. It does not transcribe live audio as it is spoken, and it does not translate. wer: notes: | - Greedy decoding, no external LM. Batches decode one utterance at a time, so the - batch size does not change the transcript. The PyTorch reference (the upstream - `modeling_gigaam.py`, F32 on CPU, whole-clip decode) scores 2.04% on the same - manifest. F32 is 6 words worse: 24 of the 25 utterances that differ are longer than - 25 s, where transcribe.cpp decodes in windows. ai-sage does not publish a - LibriSpeech test-clean WER; its English figure is an average over seven Open ASR - sets and is not comparable. + WER is the share of words the model gets wrong; lower is better. The original + PyTorch model scores 2.04% on the same audio. This port gets 6 more words wrong + out of about 53,000. Almost all of the differences are on recordings longer than + 25 seconds, which transcribe.cpp splits into pieces. From e2e5fd3c2d03dda379281a645cb8c891b6cd6194 Mon Sep 17 00:00:00 2001 From: CJ Pais Date: Thu, 3 Dec 2026 10:20:06 +0800 Subject: [PATCH 13/13] gigaam: shorten the v4 model page Drop what the library docs already say (offline use, audio conversion) and the repeated feature list; no semicolons in the prose. --- docs/models/gigaam-v4-e2e-rnnt.md | 41 ++++-------------------- scripts/hf_cards/gigaam-v4-e2e-rnnt.yaml | 7 ++-- 2 files changed, 10 insertions(+), 38 deletions(-) diff --git a/docs/models/gigaam-v4-e2e-rnnt.md b/docs/models/gigaam-v4-e2e-rnnt.md index 1c08ab515..249b11e74 100644 --- a/docs/models/gigaam-v4-e2e-rnnt.md +++ b/docs/models/gigaam-v4-e2e-rnnt.md @@ -3,23 +3,10 @@ Upstream: [`ai-sage/GigaAM-v4`](https://huggingface.co/ai-sage/GigaAM-v4) at [`180301a`](https://huggingface.co/ai-sage/GigaAM-v4/commit/180301a). -Turns Russian and English speech into text, with capital letters and punctuation. It runs on your own computer, with no internet connection. On the FLEURS Russian test it makes the fewest errors of the models in transcribe.cpp. Long recordings work: audio longer than 25 seconds is split into overlapping pieces. It does not transcribe live audio as it is spoken, and it does not translate. +Transcribes Russian and English speech, with capital letters and punctuation. On the FLEURS Russian test it makes the fewest errors of the models in transcribe.cpp. Recordings of any length work. It does not transcribe live audio or translate. -## What it does - -- Transcribes Russian and English. You don't need to say which language - is spoken. -- Adds capital letters and punctuation. -- Handles long recordings. -- Runs offline on CPU, or on a GPU (Metal, Vulkan, CUDA). - -It does not transcribe live audio as it comes in, translate, or give a -time for each word. - -Other GigaAM models are listed on the [GigaAM page](gigaam.md). ai-sage's -[model card](https://huggingface.co/ai-sage/GigaAM-v4) describes the -training data. +Other GigaAM models are on the [GigaAM page](gigaam.md). Licensed MIT. Ported from upstream commit [`180301a`](https://huggingface.co/ai-sage/GigaAM-v4/commit/180301a), pinned 2026-11-29. Validated against the upstream `modeling_gigaam.py` reference at transcribe.cpp commit [`67a5bc43`](https://github.com/handy-computer/transcribe.cpp/tree/67a5bc43) on 2026-12-03. @@ -27,9 +14,8 @@ Licensed MIT. Ported from upstream commit [`180301a`](https://huggingface.co/ai- ## Download -Most people should use **Q8_0**. It is as accurate as the full-size file -at a quarter of the size. Q4_K_M is the smallest, but makes more mistakes, -mostly in English. F32 and F16 are full precision, for development. +Use **Q8_0**. It is as accurate as the full-size file at a quarter of the +size. Q4_K_M is the smallest but makes more mistakes, mostly in English. | Quantization | Download | Size | WER (LibriSpeech test-clean) | @@ -47,13 +33,12 @@ WER on the full LibriSpeech test-clean split (2,620 utterances), batch size 8, t -WER is the share of words the model gets wrong; lower is better. The original +WER is the share of words the model gets wrong. Lower is better. The original PyTorch model scores 2.04% on the same audio. This port gets 6 more words wrong -out of about 53,000. Almost all of the differences are on recordings longer than -25 seconds, which transcribe.cpp splits into pieces. +out of about 53,000, almost all on recordings longer than 25 seconds. -Accuracy on FLEURS, a test set of read speech in many languages: +Accuracy on FLEURS, a test set of read speech: **FLEURS test** @@ -66,8 +51,6 @@ Accuracy on FLEURS, a test set of read speech in many languages: ## Quick start -Build transcribe.cpp, then transcribe a file: - ```bash cmake -B build cmake --build build @@ -77,18 +60,8 @@ build/bin/transcribe-cli \ samples/ru.wav ``` -The input must be a 16 kHz mono WAV file. To convert other audio: - -```bash -ffmpeg -i input.mp3 -ar 16000 -ac 1 output.wav -``` - ## Speed -Time to transcribe two sample clips. The number in parentheses is how -many times faster than real time: 100× means one minute of audio takes -under a second. - ### Apple M4 Max diff --git a/scripts/hf_cards/gigaam-v4-e2e-rnnt.yaml b/scripts/hf_cards/gigaam-v4-e2e-rnnt.yaml index 2db5c7008..577dee075 100644 --- a/scripts/hf_cards/gigaam-v4-e2e-rnnt.yaml +++ b/scripts/hf_cards/gigaam-v4-e2e-rnnt.yaml @@ -23,11 +23,10 @@ tags: - english summary: | - Turns Russian and English speech into text, with capital letters and punctuation. It runs on your own computer, with no internet connection. On the FLEURS Russian test it makes the fewest errors of the models in transcribe.cpp. Long recordings work: audio longer than 25 seconds is split into overlapping pieces. It does not transcribe live audio as it is spoken, and it does not translate. + Transcribes Russian and English speech, with capital letters and punctuation. On the FLEURS Russian test it makes the fewest errors of the models in transcribe.cpp. Recordings of any length work. It does not transcribe live audio or translate. wer: notes: | - WER is the share of words the model gets wrong; lower is better. The original + WER is the share of words the model gets wrong. Lower is better. The original PyTorch model scores 2.04% on the same audio. This port gets 6 more words wrong - out of about 53,000. Almost all of the differences are on recordings longer than - 25 seconds, which transcribe.cpp splits into pieces. + out of about 53,000, almost all on recordings longer than 25 seconds.