Audio-Text-to-Text
Transformers
Safetensors
English
Chinese
moss_transcribe_diarize
text2text-generation
moss
audio
speech
asr
diarization
timestamp-asr
long-form-audio
multimodal
multilingual
custom_code
Eval Results
Instructions to use OxBee/MOSS-Transcribe-Diarize with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OxBee/MOSS-Transcribe-Diarize with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("OxBee/MOSS-Transcribe-Diarize", trust_remote_code=True) model = AutoModelForMultimodalLM.from_pretrained("OxBee/MOSS-Transcribe-Diarize", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit ·
9cfa7b2
0
Parent(s):
Duplicate from OpenMOSS-Team/MOSS-Transcribe-Diarize
Browse filesCo-authored-by: Zhaoye Fei <ngc7293@users.noreply.huggingface.co>
- .eval_results/open_asr_leaderboard.yaml +89 -0
- .gitattributes +5 -0
- Model_Architecture.png +0 -0
- README.md +383 -0
- added_tokens.json +28 -0
- chat_template.jinja +103 -0
- config.json +84 -0
- configuration_moss_transcribe_diarize.py +67 -0
- generation_config.json +6 -0
- merges.txt +0 -0
- model-00000-of-00001.safetensors +3 -0
- model.safetensors.index.json +690 -0
- modeling_moss_transcribe_diarize.py +369 -0
- preprocessor_config.json +14 -0
- processing_moss_transcribe_diarize.py +272 -0
- processor_config.json +10 -0
- special_tokens_map.json +31 -0
- tokenizer.json +3 -0
- tokenizer_config.json +21 -0
- vocab.json +0 -0
.eval_results/open_asr_leaderboard.yaml
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
- dataset:
|
| 2 |
+
id: hf-audio/open-asr-leaderboard
|
| 3 |
+
task_id: mean_wer
|
| 4 |
+
value: 5.17
|
| 5 |
+
date: '2026-07-25'
|
| 6 |
+
source:
|
| 7 |
+
url: https://huggingface.co/hf-audio
|
| 8 |
+
name: open-asr-leaderboard
|
| 9 |
+
user: hf-audio
|
| 10 |
+
|
| 11 |
+
- dataset:
|
| 12 |
+
id: hf-audio/open-asr-leaderboard
|
| 13 |
+
task_id: rtfx
|
| 14 |
+
value: 294.02
|
| 15 |
+
date: '2026-07-25'
|
| 16 |
+
source:
|
| 17 |
+
url: https://huggingface.co/hf-audio
|
| 18 |
+
name: open-asr-leaderboard
|
| 19 |
+
user: hf-audio
|
| 20 |
+
|
| 21 |
+
- dataset:
|
| 22 |
+
id: hf-audio/open-asr-leaderboard
|
| 23 |
+
task_id: ami_wer
|
| 24 |
+
value: 8.40
|
| 25 |
+
date: '2026-07-25'
|
| 26 |
+
source:
|
| 27 |
+
url: https://huggingface.co/hf-audio
|
| 28 |
+
name: open-asr-leaderboard
|
| 29 |
+
user: hf-audio
|
| 30 |
+
|
| 31 |
+
- dataset:
|
| 32 |
+
id: hf-audio/open-asr-leaderboard
|
| 33 |
+
task_id: earnings22_wer
|
| 34 |
+
value: 9.01
|
| 35 |
+
date: '2026-07-25'
|
| 36 |
+
source:
|
| 37 |
+
url: https://huggingface.co/hf-audio
|
| 38 |
+
name: open-asr-leaderboard
|
| 39 |
+
user: hf-audio
|
| 40 |
+
|
| 41 |
+
- dataset:
|
| 42 |
+
id: hf-audio/open-asr-leaderboard
|
| 43 |
+
task_id: gigaspeech_wer
|
| 44 |
+
value: 7.68
|
| 45 |
+
date: '2026-07-25'
|
| 46 |
+
source:
|
| 47 |
+
url: https://huggingface.co/hf-audio
|
| 48 |
+
name: open-asr-leaderboard
|
| 49 |
+
user: hf-audio
|
| 50 |
+
|
| 51 |
+
- dataset:
|
| 52 |
+
id: hf-audio/open-asr-leaderboard
|
| 53 |
+
task_id: librispeech_clean_wer
|
| 54 |
+
value: 1.64
|
| 55 |
+
date: '2026-07-25'
|
| 56 |
+
source:
|
| 57 |
+
url: https://huggingface.co/hf-audio
|
| 58 |
+
name: open-asr-leaderboard
|
| 59 |
+
user: hf-audio
|
| 60 |
+
|
| 61 |
+
- dataset:
|
| 62 |
+
id: hf-audio/open-asr-leaderboard
|
| 63 |
+
task_id: librispeech_other_wer
|
| 64 |
+
value: 4.15
|
| 65 |
+
date: '2026-07-25'
|
| 66 |
+
source:
|
| 67 |
+
url: https://huggingface.co/hf-audio
|
| 68 |
+
name: open-asr-leaderboard
|
| 69 |
+
user: hf-audio
|
| 70 |
+
|
| 71 |
+
- dataset:
|
| 72 |
+
id: hf-audio/open-asr-leaderboard
|
| 73 |
+
task_id: spgispeech_wer
|
| 74 |
+
value: 1.70
|
| 75 |
+
date: '2026-07-25'
|
| 76 |
+
source:
|
| 77 |
+
url: https://huggingface.co/hf-audio
|
| 78 |
+
name: open-asr-leaderboard
|
| 79 |
+
user: hf-audio
|
| 80 |
+
|
| 81 |
+
- dataset:
|
| 82 |
+
id: hf-audio/open-asr-leaderboard
|
| 83 |
+
task_id: voxpopuli_wer
|
| 84 |
+
value: 3.58
|
| 85 |
+
date: '2026-07-25'
|
| 86 |
+
source:
|
| 87 |
+
url: https://huggingface.co/hf-audio
|
| 88 |
+
name: open-asr-leaderboard
|
| 89 |
+
user: hf-audio
|
.gitattributes
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
Model_Architecture.png
ADDED
|
README.md
ADDED
|
@@ -0,0 +1,383 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
library_name: transformers
|
| 4 |
+
language:
|
| 5 |
+
- en
|
| 6 |
+
- zh
|
| 7 |
+
tags:
|
| 8 |
+
- moss
|
| 9 |
+
- audio
|
| 10 |
+
- speech
|
| 11 |
+
- asr
|
| 12 |
+
- diarization
|
| 13 |
+
- timestamp-asr
|
| 14 |
+
- long-form-audio
|
| 15 |
+
- multimodal
|
| 16 |
+
- multilingual
|
| 17 |
+
- custom_code
|
| 18 |
+
pipeline_tag: audio-text-to-text
|
| 19 |
+
---
|
| 20 |
+
|
| 21 |
+
# MOSS-Transcribe-Diarize 0.9B
|
| 22 |
+
|
| 23 |
+
<div align="center">
|
| 24 |
+
<a href="https://github.com/OpenMOSS/MOSS-Transcribe-Diarize"><img src="https://img.shields.io/badge/GitHub-OpenMOSS%2FMOSS--Transcribe--Diarize-black?logo=github"></a>
|
| 25 |
+
<a href="https://huggingface.co/OpenMOSS-Team/MOSS-Transcribe-Diarize"><img src="https://img.shields.io/badge/HuggingFace-Model-orange?logo=huggingface"></a>
|
| 26 |
+
<a href="https://arxiv.org/abs/2601.01554"><img src="https://img.shields.io/badge/arXiv-2601.01554-b31b1b?logo=arxiv"></a>
|
| 27 |
+
<a href="https://platform.moss.cn/app/playground/"><img src="https://img.shields.io/badge/Demo-MOSS%20Playground-green?logo=rocket"></a>
|
| 28 |
+
</div>
|
| 29 |
+
|
| 30 |
+
MOSS-Transcribe-Diarize 0.9B is an end-to-end audio understanding model for long-form multi-speaker transcription, diarization, timestamps, and acoustic event awareness.
|
| 31 |
+
|
| 32 |
+
It supports transcription and diarization across **50+** languages, single-pass inference on audio recordings up to **90 minutes** long, and custom hotword prompting for domain-specific terms.
|
| 33 |
+
|
| 34 |
+
Given an audio or video file, the model generates a compact speaker-aware transcript in one pass, including timestamps and anonymous speaker labels such as `[S01]`, `[S02]`, and beyond.
|
| 35 |
+
|
| 36 |
+
## News
|
| 37 |
+
* 2026-07-22: The subtitle Web UI now supports both Simplified Chinese and English.
|
| 38 |
+
* 2026-07-14: 🏆 MOSS-Transcribe-Diarize won first place in the [2nd MLC-SLM Challenge](https://www.nexdata.ai/competition/mlc-slm) at INTERSPEECH 2026, spanning 14 languages (English, French, German, Italian, Portuguese, Spanish, Japanese, Korean, Russian, Thai, Vietnamese, Tagalog, Urdu, Turkish).
|
| 39 |
+
* 2026-07-09: Released MOSS-Transcribe-Diarize 0.9B.
|
| 40 |
+
|
| 41 |
+
## Contents
|
| 42 |
+
|
| 43 |
+
- [Introduction](#introduction)
|
| 44 |
+
- [Model Architecture](#model-architecture)
|
| 45 |
+
- [Evaluation](#evaluation)
|
| 46 |
+
- [Quickstart](#quickstart)
|
| 47 |
+
- [Environment Setup](#environment-setup)
|
| 48 |
+
- [Python Usage](#python-usage)
|
| 49 |
+
- [Serve with vLLM and SGLang](#serve-with-vllm-and-sglang)
|
| 50 |
+
- [Subtitle Web App](#subtitle-web-app)
|
| 51 |
+
- [Output Format](#output-format)
|
| 52 |
+
- [More Information](#more-information)
|
| 53 |
+
- [License](#license)
|
| 54 |
+
- [Citation](#citation)
|
| 55 |
+
|
| 56 |
+
## Introduction
|
| 57 |
+
|
| 58 |
+
MOSS-Transcribe-Diarize 0.9B turns real-world long-form audio into structured, speaker-aware transcripts in one pass. Instead of stitching together separate ASR and diarization systems, it jointly performs speech transcription and speaker diarization, producing time-aligned text with consistent speaker labels.
|
| 59 |
+
|
| 60 |
+
The model is built for meetings, calls, podcasts, interviews, lectures, videos, and other long or messy multi-speaker recordings. It can also emit acoustic event annotations, giving downstream systems a richer view of what happened, who spoke, and when.
|
| 61 |
+
|
| 62 |
+
Core capabilities:
|
| 63 |
+
|
| 64 |
+
* **Long-form transcription**: Converts long audio or video recordings into timestamped text.
|
| 65 |
+
* **Speaker-aware diarization**: Assigns anonymous speaker labels such as `[S01]` and `[S02]` without a separate diarization pipeline.
|
| 66 |
+
* **Promptable generation**: Supports custom transcription instructions, hotwords, and acoustic event annotations.
|
| 67 |
+
|
| 68 |
+
## Model Architecture
|
| 69 |
+
|
| 70 |
+
<p align="center">
|
| 71 |
+
<img src="Model_Architecture.png" alt="MOSS-Transcribe-Diarize 0.9B model architecture" width="900">
|
| 72 |
+
</p>
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
This Hugging Face repository includes the custom Transformers remote code required to load the model with `trust_remote_code=True`.
|
| 76 |
+
|
| 77 |
+
## Evaluation
|
| 78 |
+
|
| 79 |
+
We evaluate MOSS-Transcribe-Diarize using three objective metrics: Character Error Rate (CER), concatenated minimum-permutation Character Error Rate (cpCER), and Delta-cp. Lower is better for all metrics. A dash (`-`) indicates that the result is unavailable.
|
| 80 |
+
|
| 81 |
+
<div style="overflow-x: auto;">
|
| 82 |
+
<table style="white-space: nowrap;">
|
| 83 |
+
<thead>
|
| 84 |
+
<tr>
|
| 85 |
+
<th rowspan="2" style="min-width: 220px;">Model</th>
|
| 86 |
+
<th colspan="3" style="text-align:center;">AISHELL‑4</th>
|
| 87 |
+
<th colspan="3" style="text-align:center;">Alimeeting</th>
|
| 88 |
+
<th colspan="3" style="text-align:center;">Podcast</th>
|
| 89 |
+
<th colspan="3" style="text-align:center;">Movies</th>
|
| 90 |
+
</tr>
|
| 91 |
+
<tr>
|
| 92 |
+
<th>CER↓</th><th>cpCER↓</th><th>Δcp↓</th>
|
| 93 |
+
<th>CER↓</th><th>cpCER↓</th><th>Δcp↓</th>
|
| 94 |
+
<th>CER↓</th><th>cpCER↓</th><th>Δcp↓</th>
|
| 95 |
+
<th>CER↓</th><th>cpCER↓</th><th>Δcp↓</th>
|
| 96 |
+
</tr>
|
| 97 |
+
</thead>
|
| 98 |
+
<tbody>
|
| 99 |
+
<tr>
|
| 100 |
+
<td style="white-space: nowrap;">Doubao</td>
|
| 101 |
+
<td>18.18</td><td>27.86</td><td>9.68</td>
|
| 102 |
+
<td>25.25</td><td>37.57</td><td>12.31</td>
|
| 103 |
+
<td>7.93</td><td>10.54</td><td>2.61</td>
|
| 104 |
+
<td>9.94</td><td>30.88</td><td>20.94</td>
|
| 105 |
+
</tr>
|
| 106 |
+
<tr>
|
| 107 |
+
<td style="white-space: nowrap;">ElevenLabs</td>
|
| 108 |
+
<td>19.58</td><td>37.95</td><td>18.36</td>
|
| 109 |
+
<td>25.70</td><td>36.69</td><td>10.99</td>
|
| 110 |
+
<td>8.50</td><td>11.34</td><td>2.85</td>
|
| 111 |
+
<td>11.49</td><td>17.85</td><td>6.37</td>
|
| 112 |
+
</tr>
|
| 113 |
+
<tr>
|
| 114 |
+
<td style="white-space: nowrap;">GPT-4o</td>
|
| 115 |
+
<td>-</td><td>-</td><td>-</td>
|
| 116 |
+
<td>-</td><td>-</td><td>-</td>
|
| 117 |
+
<td>-</td><td>-</td><td>-</td>
|
| 118 |
+
<td>14.37</td><td>23.67</td><td>9.31</td>
|
| 119 |
+
</tr>
|
| 120 |
+
<tr>
|
| 121 |
+
<td style="white-space: nowrap;">Gemini 2.5 Pro</td>
|
| 122 |
+
<td>42.70</td><td>53.42</td><td>10.72</td>
|
| 123 |
+
<td>27.43</td><td>41.64</td><td>14.21</td>
|
| 124 |
+
<td>7.38</td><td>10.23</td><td>2.85</td>
|
| 125 |
+
<td>15.46</td><td>24.15</td><td>8.69</td>
|
| 126 |
+
</tr>
|
| 127 |
+
<tr>
|
| 128 |
+
<td style="white-space: nowrap;">Gemini 3 Pro</td>
|
| 129 |
+
<td>22.75</td><td>27.43</td><td>4.68</td>
|
| 130 |
+
<td>26.75</td><td>32.84</td><td>6.09</td>
|
| 131 |
+
<td>-</td><td>-</td><td>-</td>
|
| 132 |
+
<td>8.62</td><td>14.73</td><td><u>6.11</u></td>
|
| 133 |
+
</tr>
|
| 134 |
+
<tr>
|
| 135 |
+
<td style="white-space: nowrap;">VIBEVOICE ASR</td>
|
| 136 |
+
<td>21.40</td><td>24.99</td><td>3.59</td>
|
| 137 |
+
<td>27.40</td><td>29.33</td><td>1.93</td>
|
| 138 |
+
<td>27.94</td><td>48.30</td><td>20.36</td>
|
| 139 |
+
<td>14.59</td><td>42.54</td><td>27.94</td>
|
| 140 |
+
</tr>
|
| 141 |
+
<tr>
|
| 142 |
+
<td style="white-space: nowrap;"><b>MOSS Transcribe Diarize 0.9B</b></td>
|
| 143 |
+
<td><u>14.84</u></td><td><u>15.83</u></td><td><u>0.99</u></td>
|
| 144 |
+
<td><u>24.86</u></td><td><u>22.17</u></td><td><u>-2.69</u></td>
|
| 145 |
+
<td><u>5.97</u></td><td><u>7.37</u></td><td><b>1.40</b></td>
|
| 146 |
+
<td><u>6.36</u></td><td><u>12.76</u></td><td>6.40</td>
|
| 147 |
+
</tr>
|
| 148 |
+
<tr>
|
| 149 |
+
<td style="white-space: nowrap;"><a href="https://platform.mosi.cn/app/playground"><b>MOSS Transcribe Diarize Pro</b></a></td>
|
| 150 |
+
<td><b>13.78</b></td><td><b>14.02</b></td><td><b>0.24</b></td>
|
| 151 |
+
<td><b>18.22</b></td><td><b>13.94</b></td><td><b>-4.27</b></td>
|
| 152 |
+
<td><b>4.46</b></td><td><b>6.97</b></td><td><u>2.51</u></td>
|
| 153 |
+
<td><b>5.86</b></td><td><b>11.78</b></td><td><b>5.92</b></td>
|
| 154 |
+
</tr>
|
| 155 |
+
</tbody>
|
| 156 |
+
</table>
|
| 157 |
+
</div>
|
| 158 |
+
|
| 159 |
+
## Quickstart
|
| 160 |
+
|
| 161 |
+
### Environment Setup
|
| 162 |
+
|
| 163 |
+
Use a clean Python environment. The model uses custom Transformers code, so load the model and processor with `trust_remote_code=True`.
|
| 164 |
+
|
| 165 |
+
```bash
|
| 166 |
+
conda create -n moss-transcribe-diarize python=3.12 -y
|
| 167 |
+
conda activate moss-transcribe-diarize
|
| 168 |
+
|
| 169 |
+
git clone https://github.com/OpenMOSS/MOSS-Transcribe-Diarize.git
|
| 170 |
+
cd MOSS-Transcribe-Diarize
|
| 171 |
+
|
| 172 |
+
pip install --index-url https://download.pytorch.org/whl/cu128 torch torchaudio
|
| 173 |
+
pip install -e .
|
| 174 |
+
```
|
| 175 |
+
|
| 176 |
+
The GitHub package provides helper utilities such as audio/video loading, transcription message construction, transcript parsing, CLI inference, and the subtitle web app. The model weights and remote-code model files are loaded from this Hugging Face repository.
|
| 177 |
+
|
| 178 |
+
### Python Usage
|
| 179 |
+
|
| 180 |
+
```python
|
| 181 |
+
import torch
|
| 182 |
+
from transformers import AutoModelForCausalLM, AutoProcessor
|
| 183 |
+
|
| 184 |
+
from moss_transcribe_diarize import parse_transcript
|
| 185 |
+
from moss_transcribe_diarize.inference_utils import (
|
| 186 |
+
build_transcription_messages,
|
| 187 |
+
generate_transcription,
|
| 188 |
+
resolve_device,
|
| 189 |
+
)
|
| 190 |
+
|
| 191 |
+
model_id = "OpenMOSS-Team/MOSS-Transcribe-Diarize"
|
| 192 |
+
audio_path = "audio.wav"
|
| 193 |
+
|
| 194 |
+
device = resolve_device("auto")
|
| 195 |
+
dtype = torch.bfloat16 if device.type == "cuda" else torch.float32
|
| 196 |
+
|
| 197 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 198 |
+
model_id,
|
| 199 |
+
trust_remote_code=True,
|
| 200 |
+
dtype="auto",
|
| 201 |
+
attn_implementation="sdpa", # or "flash_attention_2" with the flash-attn package installed
|
| 202 |
+
).to(dtype=dtype).to(device).eval()
|
| 203 |
+
|
| 204 |
+
processor = AutoProcessor.from_pretrained(
|
| 205 |
+
model_id,
|
| 206 |
+
trust_remote_code=True,
|
| 207 |
+
)
|
| 208 |
+
|
| 209 |
+
messages = build_transcription_messages(audio_path)
|
| 210 |
+
result = generate_transcription(
|
| 211 |
+
model,
|
| 212 |
+
processor,
|
| 213 |
+
messages,
|
| 214 |
+
max_new_tokens=2048,
|
| 215 |
+
do_sample=False,
|
| 216 |
+
device=device,
|
| 217 |
+
dtype=dtype,
|
| 218 |
+
)
|
| 219 |
+
|
| 220 |
+
print(result["text"])
|
| 221 |
+
|
| 222 |
+
for segment in parse_transcript(result["text"]):
|
| 223 |
+
print(segment.start, segment.end, segment.speaker, segment.text)
|
| 224 |
+
```
|
| 225 |
+
|
| 226 |
+
The message flow follows the common Qwen multimodal pattern:
|
| 227 |
+
|
| 228 |
+
1. `processor.apply_chat_template(messages, tokenize=False)` renders text with audio placeholders.
|
| 229 |
+
2. The helper utilities load audio waveforms from the same messages.
|
| 230 |
+
3. `processor(text=text, audio=audios)` computes Whisper input features and expands audio placeholders.
|
| 231 |
+
4. `model.generate(...)` produces timestamped transcription and diarization text.
|
| 232 |
+
|
| 233 |
+
### Custom Prompt and Hotwords
|
| 234 |
+
|
| 235 |
+
The default prompt is optimized for timestamped transcription and speaker diarization:
|
| 236 |
+
|
| 237 |
+
```text
|
| 238 |
+
请将音频转写为文本,每一段需以起始时间戳和说话人编号([S01]、[S02]、[S03]…)开头,正文为对应的语音内容,并在段末标注结束时间戳,以清晰标明该段语音范围。
|
| 239 |
+
```
|
| 240 |
+
|
| 241 |
+
To add hotwords, append a short hint to the default prompt:
|
| 242 |
+
|
| 243 |
+
```text
|
| 244 |
+
请将音频转写为文本,每一段需以起始时间戳和说话人编号([S01]、[S02]、[S03]…)开头,正文为对应的语音内容,并在段末标注结束时间戳,以清晰标明该段语音范围。热词提示:热词1, 热词2, 热词3
|
| 245 |
+
```
|
| 246 |
+
|
| 247 |
+
More prompt recipes are available in the GitHub repository: <https://github.com/OpenMOSS/MOSS-Transcribe-Diarize/blob/main/examples/prompts.md>
|
| 248 |
+
|
| 249 |
+
### Serve with SGLang and VLLM
|
| 250 |
+
|
| 251 |
+
The recommended way to serve MOSS-Transcribe-Diarize is [SGLang Omni](https://github.com/sgl-project/sglang-omni) through the OpenAI-compatible `/v1/audio/transcriptions` endpoint. If you are using a CUDA 12 environment, SGLang is currently not supported; use vLLM instead. Install `sglang-omni` by following the [installation guide](https://github.com/sgl-project/sglang-omni/blob/main/docs/get_started/installation.md), then download the model:
|
| 252 |
+
|
| 253 |
+
```bash
|
| 254 |
+
hf download OpenMOSS-Team/MOSS-Transcribe-Diarize
|
| 255 |
+
```
|
| 256 |
+
|
| 257 |
+
Serve the model:
|
| 258 |
+
|
| 259 |
+
```bash
|
| 260 |
+
sgl-omni serve \
|
| 261 |
+
--model-path OpenMOSS-Team/MOSS-Transcribe-Diarize \
|
| 262 |
+
--port 8000 \
|
| 263 |
+
--max-running-requests 16 \
|
| 264 |
+
--cuda-graph-max-bs 16 \
|
| 265 |
+
--mem-fraction-static 0.80
|
| 266 |
+
```
|
| 267 |
+
|
| 268 |
+
Use `response_format=verbose_json` when you need parsed speaker segments. `json` returns the raw transcript text only.
|
| 269 |
+
|
| 270 |
+
```bash
|
| 271 |
+
curl -X POST http://localhost:8000/v1/audio/transcriptions \
|
| 272 |
+
-F model=OpenMOSS-Team/MOSS-Transcribe-Diarize \
|
| 273 |
+
-F file=@audio.wav \
|
| 274 |
+
-F response_format=verbose_json
|
| 275 |
+
```
|
| 276 |
+
|
| 277 |
+
For longer multi-speaker audio, raise `max_new_tokens` so the decoder can finish the full diarized transcript:
|
| 278 |
+
|
| 279 |
+
```bash
|
| 280 |
+
curl -X POST http://localhost:8000/v1/audio/transcriptions \
|
| 281 |
+
-F model=OpenMOSS-Team/MOSS-Transcribe-Diarize \
|
| 282 |
+
-F file=@audio.wav \
|
| 283 |
+
-F response_format=verbose_json \
|
| 284 |
+
-F max_new_tokens=65536
|
| 285 |
+
```
|
| 286 |
+
|
| 287 |
+
MOSS-Transcribe-Diarize also supports **vLLM** serving through the OpenAI-compatible transcription API. Use a pinned vLLM nightly build that includes the MOSS-Transcribe-Diarize model registration. Choose one of the following commands: for CUDA 12 environments, use `cu129`; for CUDA 13 environments, use `cu130`.
|
| 288 |
+
|
| 289 |
+
```bash
|
| 290 |
+
uv pip install -U vllm \
|
| 291 |
+
--torch-backend=auto \
|
| 292 |
+
--extra-index-url https://wheels.vllm.ai/68b4a1d582818e67adc903bf1b8fc5a5447da2fa/cu129
|
| 293 |
+
```
|
| 294 |
+
|
| 295 |
+
or:
|
| 296 |
+
|
| 297 |
+
```bash
|
| 298 |
+
uv pip install -U vllm \
|
| 299 |
+
--torch-backend=auto \
|
| 300 |
+
--extra-index-url https://wheels.vllm.ai/68b4a1d582818e67adc903bf1b8fc5a5447da2fa/cu130
|
| 301 |
+
```
|
| 302 |
+
|
| 303 |
+
```bash
|
| 304 |
+
vllm serve OpenMOSS-Team/MOSS-Transcribe-Diarize --trust-remote-code
|
| 305 |
+
```
|
| 306 |
+
|
| 307 |
+
```bash
|
| 308 |
+
curl http://localhost:8000/v1/audio/transcriptions \
|
| 309 |
+
-F model="OpenMOSS-Team/MOSS-Transcribe-Diarize" \
|
| 310 |
+
-F file=@"audio.wav" \
|
| 311 |
+
-F response_format="json" \
|
| 312 |
+
-F temperature="0"
|
| 313 |
+
```
|
| 314 |
+
|
| 315 |
+
|
| 316 |
+
|
| 317 |
+
### Subtitle Web App
|
| 318 |
+
|
| 319 |
+
The source package includes a local subtitle workflow for upload, review, subtitle export, and optional FFmpeg burn-in:
|
| 320 |
+
|
| 321 |
+
```bash
|
| 322 |
+
mtd-subtitle-web \
|
| 323 |
+
--model OpenMOSS-Team/MOSS-Transcribe-Diarize \
|
| 324 |
+
--host 127.0.0.1 \
|
| 325 |
+
--port 7860
|
| 326 |
+
```
|
| 327 |
+
|
| 328 |
+
Open `http://127.0.0.1:7860`, upload an audio/video file, review the parsed subtitle segments, then download JSON/SRT/ASS or burn an MP4 if `ffmpeg` and `ffprobe` are available on `PATH`.
|
| 329 |
+
|
| 330 |
+
For batch processing:
|
| 331 |
+
|
| 332 |
+
```bash
|
| 333 |
+
mtd-subtitle /path/to/input.mp4 \
|
| 334 |
+
--model OpenMOSS-Team/MOSS-Transcribe-Diarize \
|
| 335 |
+
--out-dir runs/example \
|
| 336 |
+
--render
|
| 337 |
+
```
|
| 338 |
+
|
| 339 |
+
## Output Format
|
| 340 |
+
|
| 341 |
+
The canonical output format is:
|
| 342 |
+
|
| 343 |
+
```text
|
| 344 |
+
[start_time][Sxx]transcribed speech[end_time]
|
| 345 |
+
```
|
| 346 |
+
|
| 347 |
+
Example:
|
| 348 |
+
|
| 349 |
+
```text
|
| 350 |
+
[0.48][S01]Welcome everyone[1.66][12.26][S02]The new transcription pipeline is ready for evaluation[13.81][14.36][S01]Great, include the diarization results in the report[18.76]
|
| 351 |
+
```
|
| 352 |
+
|
| 353 |
+
In this format:
|
| 354 |
+
|
| 355 |
+
* `start_time` and `end_time` are timestamps in seconds.
|
| 356 |
+
* `[S01]`, `[S02]`, and similar labels are anonymous model-generated speaker labels.
|
| 357 |
+
* Speaker labels are relative labels within the input audio and should not be interpreted as real speaker identities.
|
| 358 |
+
|
| 359 |
+
## More Information
|
| 360 |
+
|
| 361 |
+
* **GitHub**: <https://github.com/OpenMOSS/MOSS-Transcribe-Diarize>
|
| 362 |
+
* **MOSI.AI**: <https://mosi.cn>
|
| 363 |
+
* **OpenMOSS**: <https://www.open-moss.com>
|
| 364 |
+
|
| 365 |
+
## License
|
| 366 |
+
|
| 367 |
+
MOSS-Transcribe-Diarize 0.9B is licensed under the Apache License 2.0.
|
| 368 |
+
|
| 369 |
+
## Citation
|
| 370 |
+
|
| 371 |
+
If you use MOSS-Transcribe-Diarize 0.9B, please cite the technical report:
|
| 372 |
+
|
| 373 |
+
```bibtex
|
| 374 |
+
@misc{moss_transcribe_diarize_2026,
|
| 375 |
+
title={MOSS Transcribe Diarize Technical Report},
|
| 376 |
+
author={{MOSI.AI}},
|
| 377 |
+
year={2026},
|
| 378 |
+
eprint={2601.01554},
|
| 379 |
+
archivePrefix={arXiv},
|
| 380 |
+
primaryClass={cs.SD},
|
| 381 |
+
url={https://arxiv.org/abs/2601.01554}
|
| 382 |
+
}
|
| 383 |
+
```
|
added_tokens.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"</think>": 151668,
|
| 3 |
+
"</tool_call>": 151658,
|
| 4 |
+
"</tool_response>": 151666,
|
| 5 |
+
"<think>": 151667,
|
| 6 |
+
"<tool_call>": 151657,
|
| 7 |
+
"<tool_response>": 151665,
|
| 8 |
+
"<|box_end|>": 151649,
|
| 9 |
+
"<|box_start|>": 151648,
|
| 10 |
+
"<|endoftext|>": 151643,
|
| 11 |
+
"<|file_sep|>": 151664,
|
| 12 |
+
"<|fim_middle|>": 151660,
|
| 13 |
+
"<|fim_pad|>": 151662,
|
| 14 |
+
"<|fim_prefix|>": 151659,
|
| 15 |
+
"<|fim_suffix|>": 151661,
|
| 16 |
+
"<|im_end|>": 151645,
|
| 17 |
+
"<|im_start|>": 151644,
|
| 18 |
+
"<|image_pad|>": 151655,
|
| 19 |
+
"<|object_ref_end|>": 151647,
|
| 20 |
+
"<|object_ref_start|>": 151646,
|
| 21 |
+
"<|quad_end|>": 151651,
|
| 22 |
+
"<|quad_start|>": 151650,
|
| 23 |
+
"<|repo_name|>": 151663,
|
| 24 |
+
"<|video_pad|>": 151656,
|
| 25 |
+
"<|vision_end|>": 151653,
|
| 26 |
+
"<|vision_pad|>": 151654,
|
| 27 |
+
"<|vision_start|>": 151652
|
| 28 |
+
}
|
chat_template.jinja
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{%- macro render_content(content) -%}
|
| 2 |
+
{%- if content is string -%}
|
| 3 |
+
{{- content -}}
|
| 4 |
+
{%- else -%}
|
| 5 |
+
{%- for item in content -%}
|
| 6 |
+
{%- if item.type == 'audio' or 'audio' in item or 'audio_url' in item -%}
|
| 7 |
+
{{- '<|audio_start|><|audio_pad|><|audio_end|>\n' -}}
|
| 8 |
+
{%- elif item.type == 'text' -%}
|
| 9 |
+
{{- item.text -}}
|
| 10 |
+
{%- endif -%}
|
| 11 |
+
{%- endfor -%}
|
| 12 |
+
{%- endif -%}
|
| 13 |
+
{%- endmacro -%}
|
| 14 |
+
{%- if tools %}
|
| 15 |
+
{{- '<|im_start|>system\n' }}
|
| 16 |
+
{%- if messages[0].role == 'system' %}
|
| 17 |
+
{{- render_content(messages[0].content) + '\n\n' }}
|
| 18 |
+
{%- else %}
|
| 19 |
+
{{- 'You are a helpful assistant.\n\n' }}
|
| 20 |
+
{%- endif %}
|
| 21 |
+
{{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
|
| 22 |
+
{%- for tool in tools %}
|
| 23 |
+
{{- "\n" }}
|
| 24 |
+
{{- tool | tojson }}
|
| 25 |
+
{%- endfor %}
|
| 26 |
+
{{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
|
| 27 |
+
{%- else %}
|
| 28 |
+
{%- if messages[0].role == 'system' %}
|
| 29 |
+
{{- '<|im_start|>system\n' + render_content(messages[0].content) + '<|im_end|>\n' }}
|
| 30 |
+
{%- else %}
|
| 31 |
+
{{- '<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n' }}
|
| 32 |
+
{%- endif %}
|
| 33 |
+
{%- endif %}
|
| 34 |
+
{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
|
| 35 |
+
{%- for message in messages[::-1] %}
|
| 36 |
+
{%- set index = (messages|length - 1) - loop.index0 %}
|
| 37 |
+
{%- set content = render_content(message.content) %}
|
| 38 |
+
{%- if ns.multi_step_tool and message.role == "user" and content is string and not(content.startswith('<tool_response>') and content.endswith('</tool_response>')) %}
|
| 39 |
+
{%- set ns.multi_step_tool = false %}
|
| 40 |
+
{%- set ns.last_query_index = index %}
|
| 41 |
+
{%- endif %}
|
| 42 |
+
{%- endfor %}
|
| 43 |
+
{%- for message in messages %}
|
| 44 |
+
{%- set content = render_content(message.content) %}
|
| 45 |
+
{%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
|
| 46 |
+
{{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>\n' }}
|
| 47 |
+
{%- elif message.role == "assistant" %}
|
| 48 |
+
{%- set reasoning_content = '' %}
|
| 49 |
+
{%- if message.reasoning_content is string %}
|
| 50 |
+
{%- set reasoning_content = message.reasoning_content %}
|
| 51 |
+
{%- else %}
|
| 52 |
+
{%- if '</think>' in content %}
|
| 53 |
+
{%- set reasoning_content = content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
|
| 54 |
+
{%- set content = content.split('</think>')[-1].lstrip('\n') %}
|
| 55 |
+
{%- endif %}
|
| 56 |
+
{%- endif %}
|
| 57 |
+
{%- if loop.index0 > ns.last_query_index %}
|
| 58 |
+
{%- if loop.last or (not loop.last and reasoning_content) %}
|
| 59 |
+
{{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }}
|
| 60 |
+
{%- else %}
|
| 61 |
+
{{- '<|im_start|>' + message.role + '\n' + content }}
|
| 62 |
+
{%- endif %}
|
| 63 |
+
{%- else %}
|
| 64 |
+
{{- '<|im_start|>' + message.role + '\n' + content }}
|
| 65 |
+
{%- endif %}
|
| 66 |
+
{%- if message.tool_calls %}
|
| 67 |
+
{%- for tool_call in message.tool_calls %}
|
| 68 |
+
{%- if (loop.first and content) or (not loop.first) %}
|
| 69 |
+
{{- '\n' }}
|
| 70 |
+
{%- endif %}
|
| 71 |
+
{%- if tool_call.function %}
|
| 72 |
+
{%- set tool_call = tool_call.function %}
|
| 73 |
+
{%- endif %}
|
| 74 |
+
{{- '<tool_call>\n{"name": "' }}
|
| 75 |
+
{{- tool_call.name }}
|
| 76 |
+
{{- '", "arguments": ' }}
|
| 77 |
+
{%- if tool_call.arguments is string %}
|
| 78 |
+
{{- tool_call.arguments }}
|
| 79 |
+
{%- else %}
|
| 80 |
+
{{- tool_call.arguments | tojson }}
|
| 81 |
+
{%- endif %}
|
| 82 |
+
{{- '}\n</tool_call>' }}
|
| 83 |
+
{%- endfor %}
|
| 84 |
+
{%- endif %}
|
| 85 |
+
{{- '<|im_end|>\n' }}
|
| 86 |
+
{%- elif message.role == "tool" %}
|
| 87 |
+
{%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
|
| 88 |
+
{{- '<|im_start|>user' }}
|
| 89 |
+
{%- endif %}
|
| 90 |
+
{{- '\n<tool_response>\n' }}
|
| 91 |
+
{{- content }}
|
| 92 |
+
{{- '\n</tool_response>' }}
|
| 93 |
+
{%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
|
| 94 |
+
{{- '<|im_end|>\n' }}
|
| 95 |
+
{%- endif %}
|
| 96 |
+
{%- endif %}
|
| 97 |
+
{%- endfor %}
|
| 98 |
+
{%- if add_generation_prompt %}
|
| 99 |
+
{{- '<|im_start|>assistant\n' }}
|
| 100 |
+
{%- if enable_thinking is defined and enable_thinking is false %}
|
| 101 |
+
{{- '<think>\n\n</think>\n\n' }}
|
| 102 |
+
{%- endif %}
|
| 103 |
+
{%- endif %}
|
config.json
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"MossTranscribeDiarizeForConditionalGeneration"
|
| 4 |
+
],
|
| 5 |
+
"auto_map": {
|
| 6 |
+
"AutoConfig": "configuration_moss_transcribe_diarize.MossTranscribeDiarizeConfig",
|
| 7 |
+
"AutoModel": "modeling_moss_transcribe_diarize.MossTranscribeDiarizeModel",
|
| 8 |
+
"AutoModelForCausalLM": "modeling_moss_transcribe_diarize.MossTranscribeDiarizeForConditionalGeneration",
|
| 9 |
+
"AutoProcessor": "processing_moss_transcribe_diarize.MossTranscribeDiarizeProcessor"
|
| 10 |
+
},
|
| 11 |
+
"model_type": "moss_transcribe_diarize",
|
| 12 |
+
"dtype": "bfloat16",
|
| 13 |
+
"text_config": {
|
| 14 |
+
"model_type": "qwen3",
|
| 15 |
+
"vocab_size": 151936,
|
| 16 |
+
"hidden_size": 1024,
|
| 17 |
+
"intermediate_size": 3072,
|
| 18 |
+
"num_hidden_layers": 28,
|
| 19 |
+
"num_attention_heads": 16,
|
| 20 |
+
"num_key_value_heads": 8,
|
| 21 |
+
"head_dim": 128,
|
| 22 |
+
"hidden_act": "silu",
|
| 23 |
+
"max_position_embeddings": 131072,
|
| 24 |
+
"initializer_range": 0.02,
|
| 25 |
+
"rms_norm_eps": 1e-06,
|
| 26 |
+
"tie_word_embeddings": true,
|
| 27 |
+
"rope_theta": 1000000,
|
| 28 |
+
"attention_bias": false,
|
| 29 |
+
"attention_dropout": 0.0,
|
| 30 |
+
"layer_types": [
|
| 31 |
+
"full_attention",
|
| 32 |
+
"full_attention",
|
| 33 |
+
"full_attention",
|
| 34 |
+
"full_attention",
|
| 35 |
+
"full_attention",
|
| 36 |
+
"full_attention",
|
| 37 |
+
"full_attention",
|
| 38 |
+
"full_attention",
|
| 39 |
+
"full_attention",
|
| 40 |
+
"full_attention",
|
| 41 |
+
"full_attention",
|
| 42 |
+
"full_attention",
|
| 43 |
+
"full_attention",
|
| 44 |
+
"full_attention",
|
| 45 |
+
"full_attention",
|
| 46 |
+
"full_attention",
|
| 47 |
+
"full_attention",
|
| 48 |
+
"full_attention",
|
| 49 |
+
"full_attention",
|
| 50 |
+
"full_attention",
|
| 51 |
+
"full_attention",
|
| 52 |
+
"full_attention",
|
| 53 |
+
"full_attention",
|
| 54 |
+
"full_attention",
|
| 55 |
+
"full_attention",
|
| 56 |
+
"full_attention",
|
| 57 |
+
"full_attention",
|
| 58 |
+
"full_attention"
|
| 59 |
+
],
|
| 60 |
+
"pad_token_id": 151643,
|
| 61 |
+
"bos_token_id": null,
|
| 62 |
+
"eos_token_id": null
|
| 63 |
+
},
|
| 64 |
+
"audio_config": {
|
| 65 |
+
"model_type": "whisper",
|
| 66 |
+
"num_mel_bins": 80,
|
| 67 |
+
"d_model": 1024,
|
| 68 |
+
"encoder_layers": 24,
|
| 69 |
+
"encoder_attention_heads": 16,
|
| 70 |
+
"encoder_ffn_dim": 4096,
|
| 71 |
+
"max_source_positions": 1500,
|
| 72 |
+
"dropout": 0.0,
|
| 73 |
+
"attention_dropout": 0.0,
|
| 74 |
+
"activation_dropout": 0.0,
|
| 75 |
+
"activation_function": "gelu",
|
| 76 |
+
"encoder_layerdrop": 0.0,
|
| 77 |
+
"scale_embedding": false
|
| 78 |
+
},
|
| 79 |
+
"audio_token_id": 151671,
|
| 80 |
+
"audio_merge_size": 4,
|
| 81 |
+
"adaptor_input_dim": 4096,
|
| 82 |
+
"tie_word_embeddings": true,
|
| 83 |
+
"pad_token_id": 151643
|
| 84 |
+
}
|
configuration_moss_transcribe_diarize.py
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from transformers import PretrainedConfig
|
| 2 |
+
from transformers.models.qwen3.configuration_qwen3 import Qwen3Config
|
| 3 |
+
from transformers.models.whisper.configuration_whisper import WhisperConfig
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
class MossTranscribeDiarizeConfig(PretrainedConfig):
|
| 7 |
+
"""Configuration for MOSS-Transcribe-Diarize: Qwen3 text backbone + Whisper audio encoder."""
|
| 8 |
+
|
| 9 |
+
model_type = "moss_transcribe_diarize"
|
| 10 |
+
sub_configs = {"text_config": Qwen3Config, "audio_config": WhisperConfig}
|
| 11 |
+
keys_to_ignore_at_inference = ["past_key_values"]
|
| 12 |
+
|
| 13 |
+
def __init__(
|
| 14 |
+
self,
|
| 15 |
+
text_config=None,
|
| 16 |
+
audio_config=None,
|
| 17 |
+
audio_token_id: int = 151671,
|
| 18 |
+
audio_merge_size: int = 4,
|
| 19 |
+
adaptor_input_dim: int | None = None,
|
| 20 |
+
tie_word_embeddings: bool = True,
|
| 21 |
+
**kwargs,
|
| 22 |
+
):
|
| 23 |
+
if text_config is None:
|
| 24 |
+
text_config = Qwen3Config(
|
| 25 |
+
vocab_size=151936,
|
| 26 |
+
hidden_size=1024,
|
| 27 |
+
intermediate_size=3072,
|
| 28 |
+
num_hidden_layers=28,
|
| 29 |
+
num_attention_heads=16,
|
| 30 |
+
num_key_value_heads=8,
|
| 31 |
+
head_dim=128,
|
| 32 |
+
max_position_embeddings=40960,
|
| 33 |
+
tie_word_embeddings=tie_word_embeddings,
|
| 34 |
+
rope_theta=1_000_000.0,
|
| 35 |
+
layer_types=["full_attention"] * 28,
|
| 36 |
+
)
|
| 37 |
+
elif isinstance(text_config, dict):
|
| 38 |
+
text_config = self.sub_configs["text_config"](**text_config)
|
| 39 |
+
|
| 40 |
+
if audio_config is None:
|
| 41 |
+
audio_config = WhisperConfig(
|
| 42 |
+
num_mel_bins=80,
|
| 43 |
+
d_model=1024,
|
| 44 |
+
encoder_layers=24,
|
| 45 |
+
encoder_attention_heads=16,
|
| 46 |
+
encoder_ffn_dim=4096,
|
| 47 |
+
max_source_positions=1500,
|
| 48 |
+
dropout=0.0,
|
| 49 |
+
attention_dropout=0.0,
|
| 50 |
+
activation_dropout=0.0,
|
| 51 |
+
activation_function="gelu",
|
| 52 |
+
encoder_layerdrop=0.0,
|
| 53 |
+
scale_embedding=False,
|
| 54 |
+
)
|
| 55 |
+
elif isinstance(audio_config, dict):
|
| 56 |
+
audio_config = self.sub_configs["audio_config"](**audio_config)
|
| 57 |
+
|
| 58 |
+
text_config.tie_word_embeddings = tie_word_embeddings
|
| 59 |
+
if not getattr(text_config, "layer_types", None):
|
| 60 |
+
text_config.layer_types = ["full_attention"] * text_config.num_hidden_layers
|
| 61 |
+
|
| 62 |
+
self.text_config = text_config
|
| 63 |
+
self.audio_config = audio_config
|
| 64 |
+
self.audio_token_id = audio_token_id
|
| 65 |
+
self.audio_merge_size = audio_merge_size
|
| 66 |
+
self.adaptor_input_dim = adaptor_input_dim or audio_config.d_model * audio_merge_size
|
| 67 |
+
super().__init__(tie_word_embeddings=tie_word_embeddings, **kwargs)
|
generation_config.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token_id": 151643,
|
| 3 |
+
"eos_token_id": 151645,
|
| 4 |
+
"pad_token_id": 151643,
|
| 5 |
+
"max_new_tokens": 5120
|
| 6 |
+
}
|
merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
model-00000-of-00001.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9a0ceb4ab7330357db3ff583dba8d83625d5b733b00e1d55d6970e11b07026c4
|
| 3 |
+
size 1817113576
|
model.safetensors.index.json
ADDED
|
@@ -0,0 +1,690 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"metadata": {
|
| 3 |
+
"total_size": 1817026560
|
| 4 |
+
},
|
| 5 |
+
"weight_map": {
|
| 6 |
+
"model.whisper_encoder.conv1.bias": "model-00000-of-00001.safetensors",
|
| 7 |
+
"model.whisper_encoder.conv1.weight": "model-00000-of-00001.safetensors",
|
| 8 |
+
"model.whisper_encoder.conv2.bias": "model-00000-of-00001.safetensors",
|
| 9 |
+
"model.whisper_encoder.conv2.weight": "model-00000-of-00001.safetensors",
|
| 10 |
+
"model.whisper_encoder.embed_positions.weight": "model-00000-of-00001.safetensors",
|
| 11 |
+
"model.whisper_encoder.layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 12 |
+
"model.whisper_encoder.layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 13 |
+
"model.whisper_encoder.layers.0.fc1.bias": "model-00000-of-00001.safetensors",
|
| 14 |
+
"model.whisper_encoder.layers.0.fc1.weight": "model-00000-of-00001.safetensors",
|
| 15 |
+
"model.whisper_encoder.layers.0.fc2.bias": "model-00000-of-00001.safetensors",
|
| 16 |
+
"model.whisper_encoder.layers.0.fc2.weight": "model-00000-of-00001.safetensors",
|
| 17 |
+
"model.whisper_encoder.layers.0.final_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 18 |
+
"model.whisper_encoder.layers.0.final_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 19 |
+
"model.whisper_encoder.layers.0.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 20 |
+
"model.whisper_encoder.layers.0.self_attn.out_proj.bias": "model-00000-of-00001.safetensors",
|
| 21 |
+
"model.whisper_encoder.layers.0.self_attn.out_proj.weight": "model-00000-of-00001.safetensors",
|
| 22 |
+
"model.whisper_encoder.layers.0.self_attn.q_proj.bias": "model-00000-of-00001.safetensors",
|
| 23 |
+
"model.whisper_encoder.layers.0.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 24 |
+
"model.whisper_encoder.layers.0.self_attn.v_proj.bias": "model-00000-of-00001.safetensors",
|
| 25 |
+
"model.whisper_encoder.layers.0.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 26 |
+
"model.whisper_encoder.layers.0.self_attn_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 27 |
+
"model.whisper_encoder.layers.0.self_attn_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 28 |
+
"model.whisper_encoder.layers.1.fc1.bias": "model-00000-of-00001.safetensors",
|
| 29 |
+
"model.whisper_encoder.layers.1.fc1.weight": "model-00000-of-00001.safetensors",
|
| 30 |
+
"model.whisper_encoder.layers.1.fc2.bias": "model-00000-of-00001.safetensors",
|
| 31 |
+
"model.whisper_encoder.layers.1.fc2.weight": "model-00000-of-00001.safetensors",
|
| 32 |
+
"model.whisper_encoder.layers.1.final_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 33 |
+
"model.whisper_encoder.layers.1.final_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 34 |
+
"model.whisper_encoder.layers.1.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 35 |
+
"model.whisper_encoder.layers.1.self_attn.out_proj.bias": "model-00000-of-00001.safetensors",
|
| 36 |
+
"model.whisper_encoder.layers.1.self_attn.out_proj.weight": "model-00000-of-00001.safetensors",
|
| 37 |
+
"model.whisper_encoder.layers.1.self_attn.q_proj.bias": "model-00000-of-00001.safetensors",
|
| 38 |
+
"model.whisper_encoder.layers.1.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 39 |
+
"model.whisper_encoder.layers.1.self_attn.v_proj.bias": "model-00000-of-00001.safetensors",
|
| 40 |
+
"model.whisper_encoder.layers.1.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 41 |
+
"model.whisper_encoder.layers.1.self_attn_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 42 |
+
"model.whisper_encoder.layers.1.self_attn_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 43 |
+
"model.whisper_encoder.layers.10.fc1.bias": "model-00000-of-00001.safetensors",
|
| 44 |
+
"model.whisper_encoder.layers.10.fc1.weight": "model-00000-of-00001.safetensors",
|
| 45 |
+
"model.whisper_encoder.layers.10.fc2.bias": "model-00000-of-00001.safetensors",
|
| 46 |
+
"model.whisper_encoder.layers.10.fc2.weight": "model-00000-of-00001.safetensors",
|
| 47 |
+
"model.whisper_encoder.layers.10.final_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 48 |
+
"model.whisper_encoder.layers.10.final_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 49 |
+
"model.whisper_encoder.layers.10.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 50 |
+
"model.whisper_encoder.layers.10.self_attn.out_proj.bias": "model-00000-of-00001.safetensors",
|
| 51 |
+
"model.whisper_encoder.layers.10.self_attn.out_proj.weight": "model-00000-of-00001.safetensors",
|
| 52 |
+
"model.whisper_encoder.layers.10.self_attn.q_proj.bias": "model-00000-of-00001.safetensors",
|
| 53 |
+
"model.whisper_encoder.layers.10.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 54 |
+
"model.whisper_encoder.layers.10.self_attn.v_proj.bias": "model-00000-of-00001.safetensors",
|
| 55 |
+
"model.whisper_encoder.layers.10.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 56 |
+
"model.whisper_encoder.layers.10.self_attn_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 57 |
+
"model.whisper_encoder.layers.10.self_attn_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 58 |
+
"model.whisper_encoder.layers.11.fc1.bias": "model-00000-of-00001.safetensors",
|
| 59 |
+
"model.whisper_encoder.layers.11.fc1.weight": "model-00000-of-00001.safetensors",
|
| 60 |
+
"model.whisper_encoder.layers.11.fc2.bias": "model-00000-of-00001.safetensors",
|
| 61 |
+
"model.whisper_encoder.layers.11.fc2.weight": "model-00000-of-00001.safetensors",
|
| 62 |
+
"model.whisper_encoder.layers.11.final_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 63 |
+
"model.whisper_encoder.layers.11.final_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 64 |
+
"model.whisper_encoder.layers.11.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 65 |
+
"model.whisper_encoder.layers.11.self_attn.out_proj.bias": "model-00000-of-00001.safetensors",
|
| 66 |
+
"model.whisper_encoder.layers.11.self_attn.out_proj.weight": "model-00000-of-00001.safetensors",
|
| 67 |
+
"model.whisper_encoder.layers.11.self_attn.q_proj.bias": "model-00000-of-00001.safetensors",
|
| 68 |
+
"model.whisper_encoder.layers.11.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 69 |
+
"model.whisper_encoder.layers.11.self_attn.v_proj.bias": "model-00000-of-00001.safetensors",
|
| 70 |
+
"model.whisper_encoder.layers.11.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 71 |
+
"model.whisper_encoder.layers.11.self_attn_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 72 |
+
"model.whisper_encoder.layers.11.self_attn_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 73 |
+
"model.whisper_encoder.layers.12.fc1.bias": "model-00000-of-00001.safetensors",
|
| 74 |
+
"model.whisper_encoder.layers.12.fc1.weight": "model-00000-of-00001.safetensors",
|
| 75 |
+
"model.whisper_encoder.layers.12.fc2.bias": "model-00000-of-00001.safetensors",
|
| 76 |
+
"model.whisper_encoder.layers.12.fc2.weight": "model-00000-of-00001.safetensors",
|
| 77 |
+
"model.whisper_encoder.layers.12.final_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 78 |
+
"model.whisper_encoder.layers.12.final_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 79 |
+
"model.whisper_encoder.layers.12.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 80 |
+
"model.whisper_encoder.layers.12.self_attn.out_proj.bias": "model-00000-of-00001.safetensors",
|
| 81 |
+
"model.whisper_encoder.layers.12.self_attn.out_proj.weight": "model-00000-of-00001.safetensors",
|
| 82 |
+
"model.whisper_encoder.layers.12.self_attn.q_proj.bias": "model-00000-of-00001.safetensors",
|
| 83 |
+
"model.whisper_encoder.layers.12.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 84 |
+
"model.whisper_encoder.layers.12.self_attn.v_proj.bias": "model-00000-of-00001.safetensors",
|
| 85 |
+
"model.whisper_encoder.layers.12.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 86 |
+
"model.whisper_encoder.layers.12.self_attn_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 87 |
+
"model.whisper_encoder.layers.12.self_attn_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 88 |
+
"model.whisper_encoder.layers.13.fc1.bias": "model-00000-of-00001.safetensors",
|
| 89 |
+
"model.whisper_encoder.layers.13.fc1.weight": "model-00000-of-00001.safetensors",
|
| 90 |
+
"model.whisper_encoder.layers.13.fc2.bias": "model-00000-of-00001.safetensors",
|
| 91 |
+
"model.whisper_encoder.layers.13.fc2.weight": "model-00000-of-00001.safetensors",
|
| 92 |
+
"model.whisper_encoder.layers.13.final_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 93 |
+
"model.whisper_encoder.layers.13.final_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 94 |
+
"model.whisper_encoder.layers.13.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 95 |
+
"model.whisper_encoder.layers.13.self_attn.out_proj.bias": "model-00000-of-00001.safetensors",
|
| 96 |
+
"model.whisper_encoder.layers.13.self_attn.out_proj.weight": "model-00000-of-00001.safetensors",
|
| 97 |
+
"model.whisper_encoder.layers.13.self_attn.q_proj.bias": "model-00000-of-00001.safetensors",
|
| 98 |
+
"model.whisper_encoder.layers.13.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 99 |
+
"model.whisper_encoder.layers.13.self_attn.v_proj.bias": "model-00000-of-00001.safetensors",
|
| 100 |
+
"model.whisper_encoder.layers.13.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 101 |
+
"model.whisper_encoder.layers.13.self_attn_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 102 |
+
"model.whisper_encoder.layers.13.self_attn_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 103 |
+
"model.whisper_encoder.layers.14.fc1.bias": "model-00000-of-00001.safetensors",
|
| 104 |
+
"model.whisper_encoder.layers.14.fc1.weight": "model-00000-of-00001.safetensors",
|
| 105 |
+
"model.whisper_encoder.layers.14.fc2.bias": "model-00000-of-00001.safetensors",
|
| 106 |
+
"model.whisper_encoder.layers.14.fc2.weight": "model-00000-of-00001.safetensors",
|
| 107 |
+
"model.whisper_encoder.layers.14.final_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 108 |
+
"model.whisper_encoder.layers.14.final_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 109 |
+
"model.whisper_encoder.layers.14.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 110 |
+
"model.whisper_encoder.layers.14.self_attn.out_proj.bias": "model-00000-of-00001.safetensors",
|
| 111 |
+
"model.whisper_encoder.layers.14.self_attn.out_proj.weight": "model-00000-of-00001.safetensors",
|
| 112 |
+
"model.whisper_encoder.layers.14.self_attn.q_proj.bias": "model-00000-of-00001.safetensors",
|
| 113 |
+
"model.whisper_encoder.layers.14.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 114 |
+
"model.whisper_encoder.layers.14.self_attn.v_proj.bias": "model-00000-of-00001.safetensors",
|
| 115 |
+
"model.whisper_encoder.layers.14.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 116 |
+
"model.whisper_encoder.layers.14.self_attn_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 117 |
+
"model.whisper_encoder.layers.14.self_attn_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 118 |
+
"model.whisper_encoder.layers.15.fc1.bias": "model-00000-of-00001.safetensors",
|
| 119 |
+
"model.whisper_encoder.layers.15.fc1.weight": "model-00000-of-00001.safetensors",
|
| 120 |
+
"model.whisper_encoder.layers.15.fc2.bias": "model-00000-of-00001.safetensors",
|
| 121 |
+
"model.whisper_encoder.layers.15.fc2.weight": "model-00000-of-00001.safetensors",
|
| 122 |
+
"model.whisper_encoder.layers.15.final_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 123 |
+
"model.whisper_encoder.layers.15.final_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 124 |
+
"model.whisper_encoder.layers.15.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 125 |
+
"model.whisper_encoder.layers.15.self_attn.out_proj.bias": "model-00000-of-00001.safetensors",
|
| 126 |
+
"model.whisper_encoder.layers.15.self_attn.out_proj.weight": "model-00000-of-00001.safetensors",
|
| 127 |
+
"model.whisper_encoder.layers.15.self_attn.q_proj.bias": "model-00000-of-00001.safetensors",
|
| 128 |
+
"model.whisper_encoder.layers.15.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 129 |
+
"model.whisper_encoder.layers.15.self_attn.v_proj.bias": "model-00000-of-00001.safetensors",
|
| 130 |
+
"model.whisper_encoder.layers.15.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 131 |
+
"model.whisper_encoder.layers.15.self_attn_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 132 |
+
"model.whisper_encoder.layers.15.self_attn_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 133 |
+
"model.whisper_encoder.layers.16.fc1.bias": "model-00000-of-00001.safetensors",
|
| 134 |
+
"model.whisper_encoder.layers.16.fc1.weight": "model-00000-of-00001.safetensors",
|
| 135 |
+
"model.whisper_encoder.layers.16.fc2.bias": "model-00000-of-00001.safetensors",
|
| 136 |
+
"model.whisper_encoder.layers.16.fc2.weight": "model-00000-of-00001.safetensors",
|
| 137 |
+
"model.whisper_encoder.layers.16.final_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 138 |
+
"model.whisper_encoder.layers.16.final_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 139 |
+
"model.whisper_encoder.layers.16.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 140 |
+
"model.whisper_encoder.layers.16.self_attn.out_proj.bias": "model-00000-of-00001.safetensors",
|
| 141 |
+
"model.whisper_encoder.layers.16.self_attn.out_proj.weight": "model-00000-of-00001.safetensors",
|
| 142 |
+
"model.whisper_encoder.layers.16.self_attn.q_proj.bias": "model-00000-of-00001.safetensors",
|
| 143 |
+
"model.whisper_encoder.layers.16.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 144 |
+
"model.whisper_encoder.layers.16.self_attn.v_proj.bias": "model-00000-of-00001.safetensors",
|
| 145 |
+
"model.whisper_encoder.layers.16.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 146 |
+
"model.whisper_encoder.layers.16.self_attn_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 147 |
+
"model.whisper_encoder.layers.16.self_attn_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 148 |
+
"model.whisper_encoder.layers.17.fc1.bias": "model-00000-of-00001.safetensors",
|
| 149 |
+
"model.whisper_encoder.layers.17.fc1.weight": "model-00000-of-00001.safetensors",
|
| 150 |
+
"model.whisper_encoder.layers.17.fc2.bias": "model-00000-of-00001.safetensors",
|
| 151 |
+
"model.whisper_encoder.layers.17.fc2.weight": "model-00000-of-00001.safetensors",
|
| 152 |
+
"model.whisper_encoder.layers.17.final_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 153 |
+
"model.whisper_encoder.layers.17.final_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 154 |
+
"model.whisper_encoder.layers.17.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 155 |
+
"model.whisper_encoder.layers.17.self_attn.out_proj.bias": "model-00000-of-00001.safetensors",
|
| 156 |
+
"model.whisper_encoder.layers.17.self_attn.out_proj.weight": "model-00000-of-00001.safetensors",
|
| 157 |
+
"model.whisper_encoder.layers.17.self_attn.q_proj.bias": "model-00000-of-00001.safetensors",
|
| 158 |
+
"model.whisper_encoder.layers.17.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 159 |
+
"model.whisper_encoder.layers.17.self_attn.v_proj.bias": "model-00000-of-00001.safetensors",
|
| 160 |
+
"model.whisper_encoder.layers.17.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 161 |
+
"model.whisper_encoder.layers.17.self_attn_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 162 |
+
"model.whisper_encoder.layers.17.self_attn_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 163 |
+
"model.whisper_encoder.layers.18.fc1.bias": "model-00000-of-00001.safetensors",
|
| 164 |
+
"model.whisper_encoder.layers.18.fc1.weight": "model-00000-of-00001.safetensors",
|
| 165 |
+
"model.whisper_encoder.layers.18.fc2.bias": "model-00000-of-00001.safetensors",
|
| 166 |
+
"model.whisper_encoder.layers.18.fc2.weight": "model-00000-of-00001.safetensors",
|
| 167 |
+
"model.whisper_encoder.layers.18.final_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 168 |
+
"model.whisper_encoder.layers.18.final_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 169 |
+
"model.whisper_encoder.layers.18.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 170 |
+
"model.whisper_encoder.layers.18.self_attn.out_proj.bias": "model-00000-of-00001.safetensors",
|
| 171 |
+
"model.whisper_encoder.layers.18.self_attn.out_proj.weight": "model-00000-of-00001.safetensors",
|
| 172 |
+
"model.whisper_encoder.layers.18.self_attn.q_proj.bias": "model-00000-of-00001.safetensors",
|
| 173 |
+
"model.whisper_encoder.layers.18.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 174 |
+
"model.whisper_encoder.layers.18.self_attn.v_proj.bias": "model-00000-of-00001.safetensors",
|
| 175 |
+
"model.whisper_encoder.layers.18.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 176 |
+
"model.whisper_encoder.layers.18.self_attn_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 177 |
+
"model.whisper_encoder.layers.18.self_attn_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 178 |
+
"model.whisper_encoder.layers.19.fc1.bias": "model-00000-of-00001.safetensors",
|
| 179 |
+
"model.whisper_encoder.layers.19.fc1.weight": "model-00000-of-00001.safetensors",
|
| 180 |
+
"model.whisper_encoder.layers.19.fc2.bias": "model-00000-of-00001.safetensors",
|
| 181 |
+
"model.whisper_encoder.layers.19.fc2.weight": "model-00000-of-00001.safetensors",
|
| 182 |
+
"model.whisper_encoder.layers.19.final_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 183 |
+
"model.whisper_encoder.layers.19.final_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 184 |
+
"model.whisper_encoder.layers.19.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 185 |
+
"model.whisper_encoder.layers.19.self_attn.out_proj.bias": "model-00000-of-00001.safetensors",
|
| 186 |
+
"model.whisper_encoder.layers.19.self_attn.out_proj.weight": "model-00000-of-00001.safetensors",
|
| 187 |
+
"model.whisper_encoder.layers.19.self_attn.q_proj.bias": "model-00000-of-00001.safetensors",
|
| 188 |
+
"model.whisper_encoder.layers.19.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 189 |
+
"model.whisper_encoder.layers.19.self_attn.v_proj.bias": "model-00000-of-00001.safetensors",
|
| 190 |
+
"model.whisper_encoder.layers.19.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 191 |
+
"model.whisper_encoder.layers.19.self_attn_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 192 |
+
"model.whisper_encoder.layers.19.self_attn_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 193 |
+
"model.whisper_encoder.layers.2.fc1.bias": "model-00000-of-00001.safetensors",
|
| 194 |
+
"model.whisper_encoder.layers.2.fc1.weight": "model-00000-of-00001.safetensors",
|
| 195 |
+
"model.whisper_encoder.layers.2.fc2.bias": "model-00000-of-00001.safetensors",
|
| 196 |
+
"model.whisper_encoder.layers.2.fc2.weight": "model-00000-of-00001.safetensors",
|
| 197 |
+
"model.whisper_encoder.layers.2.final_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 198 |
+
"model.whisper_encoder.layers.2.final_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 199 |
+
"model.whisper_encoder.layers.2.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 200 |
+
"model.whisper_encoder.layers.2.self_attn.out_proj.bias": "model-00000-of-00001.safetensors",
|
| 201 |
+
"model.whisper_encoder.layers.2.self_attn.out_proj.weight": "model-00000-of-00001.safetensors",
|
| 202 |
+
"model.whisper_encoder.layers.2.self_attn.q_proj.bias": "model-00000-of-00001.safetensors",
|
| 203 |
+
"model.whisper_encoder.layers.2.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 204 |
+
"model.whisper_encoder.layers.2.self_attn.v_proj.bias": "model-00000-of-00001.safetensors",
|
| 205 |
+
"model.whisper_encoder.layers.2.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 206 |
+
"model.whisper_encoder.layers.2.self_attn_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 207 |
+
"model.whisper_encoder.layers.2.self_attn_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 208 |
+
"model.whisper_encoder.layers.20.fc1.bias": "model-00000-of-00001.safetensors",
|
| 209 |
+
"model.whisper_encoder.layers.20.fc1.weight": "model-00000-of-00001.safetensors",
|
| 210 |
+
"model.whisper_encoder.layers.20.fc2.bias": "model-00000-of-00001.safetensors",
|
| 211 |
+
"model.whisper_encoder.layers.20.fc2.weight": "model-00000-of-00001.safetensors",
|
| 212 |
+
"model.whisper_encoder.layers.20.final_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 213 |
+
"model.whisper_encoder.layers.20.final_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 214 |
+
"model.whisper_encoder.layers.20.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 215 |
+
"model.whisper_encoder.layers.20.self_attn.out_proj.bias": "model-00000-of-00001.safetensors",
|
| 216 |
+
"model.whisper_encoder.layers.20.self_attn.out_proj.weight": "model-00000-of-00001.safetensors",
|
| 217 |
+
"model.whisper_encoder.layers.20.self_attn.q_proj.bias": "model-00000-of-00001.safetensors",
|
| 218 |
+
"model.whisper_encoder.layers.20.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 219 |
+
"model.whisper_encoder.layers.20.self_attn.v_proj.bias": "model-00000-of-00001.safetensors",
|
| 220 |
+
"model.whisper_encoder.layers.20.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 221 |
+
"model.whisper_encoder.layers.20.self_attn_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 222 |
+
"model.whisper_encoder.layers.20.self_attn_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 223 |
+
"model.whisper_encoder.layers.21.fc1.bias": "model-00000-of-00001.safetensors",
|
| 224 |
+
"model.whisper_encoder.layers.21.fc1.weight": "model-00000-of-00001.safetensors",
|
| 225 |
+
"model.whisper_encoder.layers.21.fc2.bias": "model-00000-of-00001.safetensors",
|
| 226 |
+
"model.whisper_encoder.layers.21.fc2.weight": "model-00000-of-00001.safetensors",
|
| 227 |
+
"model.whisper_encoder.layers.21.final_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 228 |
+
"model.whisper_encoder.layers.21.final_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 229 |
+
"model.whisper_encoder.layers.21.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 230 |
+
"model.whisper_encoder.layers.21.self_attn.out_proj.bias": "model-00000-of-00001.safetensors",
|
| 231 |
+
"model.whisper_encoder.layers.21.self_attn.out_proj.weight": "model-00000-of-00001.safetensors",
|
| 232 |
+
"model.whisper_encoder.layers.21.self_attn.q_proj.bias": "model-00000-of-00001.safetensors",
|
| 233 |
+
"model.whisper_encoder.layers.21.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 234 |
+
"model.whisper_encoder.layers.21.self_attn.v_proj.bias": "model-00000-of-00001.safetensors",
|
| 235 |
+
"model.whisper_encoder.layers.21.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 236 |
+
"model.whisper_encoder.layers.21.self_attn_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 237 |
+
"model.whisper_encoder.layers.21.self_attn_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 238 |
+
"model.whisper_encoder.layers.22.fc1.bias": "model-00000-of-00001.safetensors",
|
| 239 |
+
"model.whisper_encoder.layers.22.fc1.weight": "model-00000-of-00001.safetensors",
|
| 240 |
+
"model.whisper_encoder.layers.22.fc2.bias": "model-00000-of-00001.safetensors",
|
| 241 |
+
"model.whisper_encoder.layers.22.fc2.weight": "model-00000-of-00001.safetensors",
|
| 242 |
+
"model.whisper_encoder.layers.22.final_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 243 |
+
"model.whisper_encoder.layers.22.final_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 244 |
+
"model.whisper_encoder.layers.22.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 245 |
+
"model.whisper_encoder.layers.22.self_attn.out_proj.bias": "model-00000-of-00001.safetensors",
|
| 246 |
+
"model.whisper_encoder.layers.22.self_attn.out_proj.weight": "model-00000-of-00001.safetensors",
|
| 247 |
+
"model.whisper_encoder.layers.22.self_attn.q_proj.bias": "model-00000-of-00001.safetensors",
|
| 248 |
+
"model.whisper_encoder.layers.22.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 249 |
+
"model.whisper_encoder.layers.22.self_attn.v_proj.bias": "model-00000-of-00001.safetensors",
|
| 250 |
+
"model.whisper_encoder.layers.22.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 251 |
+
"model.whisper_encoder.layers.22.self_attn_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 252 |
+
"model.whisper_encoder.layers.22.self_attn_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 253 |
+
"model.whisper_encoder.layers.23.fc1.bias": "model-00000-of-00001.safetensors",
|
| 254 |
+
"model.whisper_encoder.layers.23.fc1.weight": "model-00000-of-00001.safetensors",
|
| 255 |
+
"model.whisper_encoder.layers.23.fc2.bias": "model-00000-of-00001.safetensors",
|
| 256 |
+
"model.whisper_encoder.layers.23.fc2.weight": "model-00000-of-00001.safetensors",
|
| 257 |
+
"model.whisper_encoder.layers.23.final_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 258 |
+
"model.whisper_encoder.layers.23.final_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 259 |
+
"model.whisper_encoder.layers.23.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 260 |
+
"model.whisper_encoder.layers.23.self_attn.out_proj.bias": "model-00000-of-00001.safetensors",
|
| 261 |
+
"model.whisper_encoder.layers.23.self_attn.out_proj.weight": "model-00000-of-00001.safetensors",
|
| 262 |
+
"model.whisper_encoder.layers.23.self_attn.q_proj.bias": "model-00000-of-00001.safetensors",
|
| 263 |
+
"model.whisper_encoder.layers.23.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 264 |
+
"model.whisper_encoder.layers.23.self_attn.v_proj.bias": "model-00000-of-00001.safetensors",
|
| 265 |
+
"model.whisper_encoder.layers.23.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 266 |
+
"model.whisper_encoder.layers.23.self_attn_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 267 |
+
"model.whisper_encoder.layers.23.self_attn_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 268 |
+
"model.whisper_encoder.layers.3.fc1.bias": "model-00000-of-00001.safetensors",
|
| 269 |
+
"model.whisper_encoder.layers.3.fc1.weight": "model-00000-of-00001.safetensors",
|
| 270 |
+
"model.whisper_encoder.layers.3.fc2.bias": "model-00000-of-00001.safetensors",
|
| 271 |
+
"model.whisper_encoder.layers.3.fc2.weight": "model-00000-of-00001.safetensors",
|
| 272 |
+
"model.whisper_encoder.layers.3.final_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 273 |
+
"model.whisper_encoder.layers.3.final_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 274 |
+
"model.whisper_encoder.layers.3.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 275 |
+
"model.whisper_encoder.layers.3.self_attn.out_proj.bias": "model-00000-of-00001.safetensors",
|
| 276 |
+
"model.whisper_encoder.layers.3.self_attn.out_proj.weight": "model-00000-of-00001.safetensors",
|
| 277 |
+
"model.whisper_encoder.layers.3.self_attn.q_proj.bias": "model-00000-of-00001.safetensors",
|
| 278 |
+
"model.whisper_encoder.layers.3.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 279 |
+
"model.whisper_encoder.layers.3.self_attn.v_proj.bias": "model-00000-of-00001.safetensors",
|
| 280 |
+
"model.whisper_encoder.layers.3.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 281 |
+
"model.whisper_encoder.layers.3.self_attn_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 282 |
+
"model.whisper_encoder.layers.3.self_attn_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 283 |
+
"model.whisper_encoder.layers.4.fc1.bias": "model-00000-of-00001.safetensors",
|
| 284 |
+
"model.whisper_encoder.layers.4.fc1.weight": "model-00000-of-00001.safetensors",
|
| 285 |
+
"model.whisper_encoder.layers.4.fc2.bias": "model-00000-of-00001.safetensors",
|
| 286 |
+
"model.whisper_encoder.layers.4.fc2.weight": "model-00000-of-00001.safetensors",
|
| 287 |
+
"model.whisper_encoder.layers.4.final_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 288 |
+
"model.whisper_encoder.layers.4.final_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 289 |
+
"model.whisper_encoder.layers.4.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 290 |
+
"model.whisper_encoder.layers.4.self_attn.out_proj.bias": "model-00000-of-00001.safetensors",
|
| 291 |
+
"model.whisper_encoder.layers.4.self_attn.out_proj.weight": "model-00000-of-00001.safetensors",
|
| 292 |
+
"model.whisper_encoder.layers.4.self_attn.q_proj.bias": "model-00000-of-00001.safetensors",
|
| 293 |
+
"model.whisper_encoder.layers.4.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 294 |
+
"model.whisper_encoder.layers.4.self_attn.v_proj.bias": "model-00000-of-00001.safetensors",
|
| 295 |
+
"model.whisper_encoder.layers.4.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 296 |
+
"model.whisper_encoder.layers.4.self_attn_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 297 |
+
"model.whisper_encoder.layers.4.self_attn_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 298 |
+
"model.whisper_encoder.layers.5.fc1.bias": "model-00000-of-00001.safetensors",
|
| 299 |
+
"model.whisper_encoder.layers.5.fc1.weight": "model-00000-of-00001.safetensors",
|
| 300 |
+
"model.whisper_encoder.layers.5.fc2.bias": "model-00000-of-00001.safetensors",
|
| 301 |
+
"model.whisper_encoder.layers.5.fc2.weight": "model-00000-of-00001.safetensors",
|
| 302 |
+
"model.whisper_encoder.layers.5.final_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 303 |
+
"model.whisper_encoder.layers.5.final_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 304 |
+
"model.whisper_encoder.layers.5.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 305 |
+
"model.whisper_encoder.layers.5.self_attn.out_proj.bias": "model-00000-of-00001.safetensors",
|
| 306 |
+
"model.whisper_encoder.layers.5.self_attn.out_proj.weight": "model-00000-of-00001.safetensors",
|
| 307 |
+
"model.whisper_encoder.layers.5.self_attn.q_proj.bias": "model-00000-of-00001.safetensors",
|
| 308 |
+
"model.whisper_encoder.layers.5.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 309 |
+
"model.whisper_encoder.layers.5.self_attn.v_proj.bias": "model-00000-of-00001.safetensors",
|
| 310 |
+
"model.whisper_encoder.layers.5.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 311 |
+
"model.whisper_encoder.layers.5.self_attn_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 312 |
+
"model.whisper_encoder.layers.5.self_attn_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 313 |
+
"model.whisper_encoder.layers.6.fc1.bias": "model-00000-of-00001.safetensors",
|
| 314 |
+
"model.whisper_encoder.layers.6.fc1.weight": "model-00000-of-00001.safetensors",
|
| 315 |
+
"model.whisper_encoder.layers.6.fc2.bias": "model-00000-of-00001.safetensors",
|
| 316 |
+
"model.whisper_encoder.layers.6.fc2.weight": "model-00000-of-00001.safetensors",
|
| 317 |
+
"model.whisper_encoder.layers.6.final_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 318 |
+
"model.whisper_encoder.layers.6.final_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 319 |
+
"model.whisper_encoder.layers.6.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 320 |
+
"model.whisper_encoder.layers.6.self_attn.out_proj.bias": "model-00000-of-00001.safetensors",
|
| 321 |
+
"model.whisper_encoder.layers.6.self_attn.out_proj.weight": "model-00000-of-00001.safetensors",
|
| 322 |
+
"model.whisper_encoder.layers.6.self_attn.q_proj.bias": "model-00000-of-00001.safetensors",
|
| 323 |
+
"model.whisper_encoder.layers.6.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 324 |
+
"model.whisper_encoder.layers.6.self_attn.v_proj.bias": "model-00000-of-00001.safetensors",
|
| 325 |
+
"model.whisper_encoder.layers.6.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 326 |
+
"model.whisper_encoder.layers.6.self_attn_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 327 |
+
"model.whisper_encoder.layers.6.self_attn_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 328 |
+
"model.whisper_encoder.layers.7.fc1.bias": "model-00000-of-00001.safetensors",
|
| 329 |
+
"model.whisper_encoder.layers.7.fc1.weight": "model-00000-of-00001.safetensors",
|
| 330 |
+
"model.whisper_encoder.layers.7.fc2.bias": "model-00000-of-00001.safetensors",
|
| 331 |
+
"model.whisper_encoder.layers.7.fc2.weight": "model-00000-of-00001.safetensors",
|
| 332 |
+
"model.whisper_encoder.layers.7.final_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 333 |
+
"model.whisper_encoder.layers.7.final_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 334 |
+
"model.whisper_encoder.layers.7.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 335 |
+
"model.whisper_encoder.layers.7.self_attn.out_proj.bias": "model-00000-of-00001.safetensors",
|
| 336 |
+
"model.whisper_encoder.layers.7.self_attn.out_proj.weight": "model-00000-of-00001.safetensors",
|
| 337 |
+
"model.whisper_encoder.layers.7.self_attn.q_proj.bias": "model-00000-of-00001.safetensors",
|
| 338 |
+
"model.whisper_encoder.layers.7.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 339 |
+
"model.whisper_encoder.layers.7.self_attn.v_proj.bias": "model-00000-of-00001.safetensors",
|
| 340 |
+
"model.whisper_encoder.layers.7.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 341 |
+
"model.whisper_encoder.layers.7.self_attn_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 342 |
+
"model.whisper_encoder.layers.7.self_attn_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 343 |
+
"model.whisper_encoder.layers.8.fc1.bias": "model-00000-of-00001.safetensors",
|
| 344 |
+
"model.whisper_encoder.layers.8.fc1.weight": "model-00000-of-00001.safetensors",
|
| 345 |
+
"model.whisper_encoder.layers.8.fc2.bias": "model-00000-of-00001.safetensors",
|
| 346 |
+
"model.whisper_encoder.layers.8.fc2.weight": "model-00000-of-00001.safetensors",
|
| 347 |
+
"model.whisper_encoder.layers.8.final_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 348 |
+
"model.whisper_encoder.layers.8.final_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 349 |
+
"model.whisper_encoder.layers.8.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 350 |
+
"model.whisper_encoder.layers.8.self_attn.out_proj.bias": "model-00000-of-00001.safetensors",
|
| 351 |
+
"model.whisper_encoder.layers.8.self_attn.out_proj.weight": "model-00000-of-00001.safetensors",
|
| 352 |
+
"model.whisper_encoder.layers.8.self_attn.q_proj.bias": "model-00000-of-00001.safetensors",
|
| 353 |
+
"model.whisper_encoder.layers.8.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 354 |
+
"model.whisper_encoder.layers.8.self_attn.v_proj.bias": "model-00000-of-00001.safetensors",
|
| 355 |
+
"model.whisper_encoder.layers.8.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 356 |
+
"model.whisper_encoder.layers.8.self_attn_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 357 |
+
"model.whisper_encoder.layers.8.self_attn_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 358 |
+
"model.whisper_encoder.layers.9.fc1.bias": "model-00000-of-00001.safetensors",
|
| 359 |
+
"model.whisper_encoder.layers.9.fc1.weight": "model-00000-of-00001.safetensors",
|
| 360 |
+
"model.whisper_encoder.layers.9.fc2.bias": "model-00000-of-00001.safetensors",
|
| 361 |
+
"model.whisper_encoder.layers.9.fc2.weight": "model-00000-of-00001.safetensors",
|
| 362 |
+
"model.whisper_encoder.layers.9.final_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 363 |
+
"model.whisper_encoder.layers.9.final_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 364 |
+
"model.whisper_encoder.layers.9.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 365 |
+
"model.whisper_encoder.layers.9.self_attn.out_proj.bias": "model-00000-of-00001.safetensors",
|
| 366 |
+
"model.whisper_encoder.layers.9.self_attn.out_proj.weight": "model-00000-of-00001.safetensors",
|
| 367 |
+
"model.whisper_encoder.layers.9.self_attn.q_proj.bias": "model-00000-of-00001.safetensors",
|
| 368 |
+
"model.whisper_encoder.layers.9.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 369 |
+
"model.whisper_encoder.layers.9.self_attn.v_proj.bias": "model-00000-of-00001.safetensors",
|
| 370 |
+
"model.whisper_encoder.layers.9.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 371 |
+
"model.whisper_encoder.layers.9.self_attn_layer_norm.bias": "model-00000-of-00001.safetensors",
|
| 372 |
+
"model.whisper_encoder.layers.9.self_attn_layer_norm.weight": "model-00000-of-00001.safetensors",
|
| 373 |
+
"model.language_model.norm.weight": "model-00000-of-00001.safetensors",
|
| 374 |
+
"model.language_model.layers.0.post_attention_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 375 |
+
"model.language_model.layers.0.mlp.gate_proj.weight": "model-00000-of-00001.safetensors",
|
| 376 |
+
"model.language_model.layers.0.mlp.up_proj.weight": "model-00000-of-00001.safetensors",
|
| 377 |
+
"model.language_model.layers.0.mlp.down_proj.weight": "model-00000-of-00001.safetensors",
|
| 378 |
+
"model.language_model.layers.0.self_attn.k_norm.weight": "model-00000-of-00001.safetensors",
|
| 379 |
+
"model.language_model.layers.0.self_attn.o_proj.weight": "model-00000-of-00001.safetensors",
|
| 380 |
+
"model.language_model.layers.0.input_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 381 |
+
"model.language_model.layers.0.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 382 |
+
"model.language_model.layers.0.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 383 |
+
"model.language_model.layers.0.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 384 |
+
"model.language_model.layers.0.self_attn.q_norm.weight": "model-00000-of-00001.safetensors",
|
| 385 |
+
"model.language_model.layers.1.post_attention_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 386 |
+
"model.language_model.layers.1.mlp.gate_proj.weight": "model-00000-of-00001.safetensors",
|
| 387 |
+
"model.language_model.layers.1.mlp.up_proj.weight": "model-00000-of-00001.safetensors",
|
| 388 |
+
"model.language_model.layers.1.mlp.down_proj.weight": "model-00000-of-00001.safetensors",
|
| 389 |
+
"model.language_model.layers.1.self_attn.k_norm.weight": "model-00000-of-00001.safetensors",
|
| 390 |
+
"model.language_model.layers.1.self_attn.o_proj.weight": "model-00000-of-00001.safetensors",
|
| 391 |
+
"model.language_model.layers.1.input_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 392 |
+
"model.language_model.layers.1.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 393 |
+
"model.language_model.layers.1.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 394 |
+
"model.language_model.layers.1.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 395 |
+
"model.language_model.layers.1.self_attn.q_norm.weight": "model-00000-of-00001.safetensors",
|
| 396 |
+
"model.language_model.layers.10.post_attention_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 397 |
+
"model.language_model.layers.10.mlp.gate_proj.weight": "model-00000-of-00001.safetensors",
|
| 398 |
+
"model.language_model.layers.10.mlp.up_proj.weight": "model-00000-of-00001.safetensors",
|
| 399 |
+
"model.language_model.layers.10.mlp.down_proj.weight": "model-00000-of-00001.safetensors",
|
| 400 |
+
"model.language_model.layers.10.self_attn.k_norm.weight": "model-00000-of-00001.safetensors",
|
| 401 |
+
"model.language_model.layers.10.self_attn.o_proj.weight": "model-00000-of-00001.safetensors",
|
| 402 |
+
"model.language_model.layers.10.input_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 403 |
+
"model.language_model.layers.10.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 404 |
+
"model.language_model.layers.10.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 405 |
+
"model.language_model.layers.10.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 406 |
+
"model.language_model.layers.10.self_attn.q_norm.weight": "model-00000-of-00001.safetensors",
|
| 407 |
+
"model.language_model.layers.11.post_attention_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 408 |
+
"model.language_model.layers.11.mlp.gate_proj.weight": "model-00000-of-00001.safetensors",
|
| 409 |
+
"model.language_model.layers.11.mlp.up_proj.weight": "model-00000-of-00001.safetensors",
|
| 410 |
+
"model.language_model.layers.11.mlp.down_proj.weight": "model-00000-of-00001.safetensors",
|
| 411 |
+
"model.language_model.layers.11.self_attn.k_norm.weight": "model-00000-of-00001.safetensors",
|
| 412 |
+
"model.language_model.layers.11.self_attn.o_proj.weight": "model-00000-of-00001.safetensors",
|
| 413 |
+
"model.language_model.layers.11.input_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 414 |
+
"model.language_model.layers.11.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 415 |
+
"model.language_model.layers.11.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 416 |
+
"model.language_model.layers.11.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 417 |
+
"model.language_model.layers.11.self_attn.q_norm.weight": "model-00000-of-00001.safetensors",
|
| 418 |
+
"model.language_model.layers.12.post_attention_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 419 |
+
"model.language_model.layers.12.mlp.gate_proj.weight": "model-00000-of-00001.safetensors",
|
| 420 |
+
"model.language_model.layers.12.mlp.up_proj.weight": "model-00000-of-00001.safetensors",
|
| 421 |
+
"model.language_model.layers.12.mlp.down_proj.weight": "model-00000-of-00001.safetensors",
|
| 422 |
+
"model.language_model.layers.12.self_attn.k_norm.weight": "model-00000-of-00001.safetensors",
|
| 423 |
+
"model.language_model.layers.12.self_attn.o_proj.weight": "model-00000-of-00001.safetensors",
|
| 424 |
+
"model.language_model.layers.12.input_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 425 |
+
"model.language_model.layers.12.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 426 |
+
"model.language_model.layers.12.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 427 |
+
"model.language_model.layers.12.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 428 |
+
"model.language_model.layers.12.self_attn.q_norm.weight": "model-00000-of-00001.safetensors",
|
| 429 |
+
"model.language_model.layers.13.post_attention_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 430 |
+
"model.language_model.layers.13.mlp.gate_proj.weight": "model-00000-of-00001.safetensors",
|
| 431 |
+
"model.language_model.layers.13.mlp.up_proj.weight": "model-00000-of-00001.safetensors",
|
| 432 |
+
"model.language_model.layers.13.mlp.down_proj.weight": "model-00000-of-00001.safetensors",
|
| 433 |
+
"model.language_model.layers.13.self_attn.k_norm.weight": "model-00000-of-00001.safetensors",
|
| 434 |
+
"model.language_model.layers.13.self_attn.o_proj.weight": "model-00000-of-00001.safetensors",
|
| 435 |
+
"model.language_model.layers.13.input_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 436 |
+
"model.language_model.layers.13.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 437 |
+
"model.language_model.layers.13.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 438 |
+
"model.language_model.layers.13.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 439 |
+
"model.language_model.layers.13.self_attn.q_norm.weight": "model-00000-of-00001.safetensors",
|
| 440 |
+
"model.language_model.layers.14.post_attention_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 441 |
+
"model.language_model.layers.14.mlp.gate_proj.weight": "model-00000-of-00001.safetensors",
|
| 442 |
+
"model.language_model.layers.14.mlp.up_proj.weight": "model-00000-of-00001.safetensors",
|
| 443 |
+
"model.language_model.layers.14.mlp.down_proj.weight": "model-00000-of-00001.safetensors",
|
| 444 |
+
"model.language_model.layers.14.self_attn.k_norm.weight": "model-00000-of-00001.safetensors",
|
| 445 |
+
"model.language_model.layers.14.self_attn.o_proj.weight": "model-00000-of-00001.safetensors",
|
| 446 |
+
"model.language_model.layers.14.input_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 447 |
+
"model.language_model.layers.14.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 448 |
+
"model.language_model.layers.14.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 449 |
+
"model.language_model.layers.14.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 450 |
+
"model.language_model.layers.14.self_attn.q_norm.weight": "model-00000-of-00001.safetensors",
|
| 451 |
+
"model.language_model.layers.15.post_attention_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 452 |
+
"model.language_model.layers.15.mlp.gate_proj.weight": "model-00000-of-00001.safetensors",
|
| 453 |
+
"model.language_model.layers.15.mlp.up_proj.weight": "model-00000-of-00001.safetensors",
|
| 454 |
+
"model.language_model.layers.15.mlp.down_proj.weight": "model-00000-of-00001.safetensors",
|
| 455 |
+
"model.language_model.layers.15.self_attn.k_norm.weight": "model-00000-of-00001.safetensors",
|
| 456 |
+
"model.language_model.layers.15.self_attn.o_proj.weight": "model-00000-of-00001.safetensors",
|
| 457 |
+
"model.language_model.layers.15.input_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 458 |
+
"model.language_model.layers.15.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 459 |
+
"model.language_model.layers.15.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 460 |
+
"model.language_model.layers.15.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 461 |
+
"model.language_model.layers.15.self_attn.q_norm.weight": "model-00000-of-00001.safetensors",
|
| 462 |
+
"model.language_model.layers.16.post_attention_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 463 |
+
"model.language_model.layers.16.mlp.gate_proj.weight": "model-00000-of-00001.safetensors",
|
| 464 |
+
"model.language_model.layers.16.mlp.up_proj.weight": "model-00000-of-00001.safetensors",
|
| 465 |
+
"model.language_model.layers.16.mlp.down_proj.weight": "model-00000-of-00001.safetensors",
|
| 466 |
+
"model.language_model.layers.16.self_attn.k_norm.weight": "model-00000-of-00001.safetensors",
|
| 467 |
+
"model.language_model.layers.16.self_attn.o_proj.weight": "model-00000-of-00001.safetensors",
|
| 468 |
+
"model.language_model.layers.16.input_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 469 |
+
"model.language_model.layers.16.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 470 |
+
"model.language_model.layers.16.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 471 |
+
"model.language_model.layers.16.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 472 |
+
"model.language_model.layers.16.self_attn.q_norm.weight": "model-00000-of-00001.safetensors",
|
| 473 |
+
"model.language_model.layers.17.post_attention_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 474 |
+
"model.language_model.layers.17.mlp.gate_proj.weight": "model-00000-of-00001.safetensors",
|
| 475 |
+
"model.language_model.layers.17.mlp.up_proj.weight": "model-00000-of-00001.safetensors",
|
| 476 |
+
"model.language_model.layers.17.mlp.down_proj.weight": "model-00000-of-00001.safetensors",
|
| 477 |
+
"model.language_model.layers.17.self_attn.k_norm.weight": "model-00000-of-00001.safetensors",
|
| 478 |
+
"model.language_model.layers.17.self_attn.o_proj.weight": "model-00000-of-00001.safetensors",
|
| 479 |
+
"model.language_model.layers.17.input_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 480 |
+
"model.language_model.layers.17.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 481 |
+
"model.language_model.layers.17.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 482 |
+
"model.language_model.layers.17.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 483 |
+
"model.language_model.layers.17.self_attn.q_norm.weight": "model-00000-of-00001.safetensors",
|
| 484 |
+
"model.language_model.layers.18.post_attention_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 485 |
+
"model.language_model.layers.18.mlp.gate_proj.weight": "model-00000-of-00001.safetensors",
|
| 486 |
+
"model.language_model.layers.18.mlp.up_proj.weight": "model-00000-of-00001.safetensors",
|
| 487 |
+
"model.language_model.layers.18.mlp.down_proj.weight": "model-00000-of-00001.safetensors",
|
| 488 |
+
"model.language_model.layers.18.self_attn.k_norm.weight": "model-00000-of-00001.safetensors",
|
| 489 |
+
"model.language_model.layers.18.self_attn.o_proj.weight": "model-00000-of-00001.safetensors",
|
| 490 |
+
"model.language_model.layers.18.input_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 491 |
+
"model.language_model.layers.18.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 492 |
+
"model.language_model.layers.18.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 493 |
+
"model.language_model.layers.18.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 494 |
+
"model.language_model.layers.18.self_attn.q_norm.weight": "model-00000-of-00001.safetensors",
|
| 495 |
+
"model.language_model.layers.19.post_attention_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 496 |
+
"model.language_model.layers.19.mlp.gate_proj.weight": "model-00000-of-00001.safetensors",
|
| 497 |
+
"model.language_model.layers.19.mlp.up_proj.weight": "model-00000-of-00001.safetensors",
|
| 498 |
+
"model.language_model.layers.19.mlp.down_proj.weight": "model-00000-of-00001.safetensors",
|
| 499 |
+
"model.language_model.layers.19.self_attn.k_norm.weight": "model-00000-of-00001.safetensors",
|
| 500 |
+
"model.language_model.layers.19.self_attn.o_proj.weight": "model-00000-of-00001.safetensors",
|
| 501 |
+
"model.language_model.layers.19.input_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 502 |
+
"model.language_model.layers.19.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 503 |
+
"model.language_model.layers.19.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 504 |
+
"model.language_model.layers.19.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 505 |
+
"model.language_model.layers.19.self_attn.q_norm.weight": "model-00000-of-00001.safetensors",
|
| 506 |
+
"model.language_model.layers.2.post_attention_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 507 |
+
"model.language_model.layers.2.mlp.gate_proj.weight": "model-00000-of-00001.safetensors",
|
| 508 |
+
"model.language_model.layers.2.mlp.up_proj.weight": "model-00000-of-00001.safetensors",
|
| 509 |
+
"model.language_model.layers.2.mlp.down_proj.weight": "model-00000-of-00001.safetensors",
|
| 510 |
+
"model.language_model.layers.2.self_attn.k_norm.weight": "model-00000-of-00001.safetensors",
|
| 511 |
+
"model.language_model.layers.2.self_attn.o_proj.weight": "model-00000-of-00001.safetensors",
|
| 512 |
+
"model.language_model.layers.2.input_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 513 |
+
"model.language_model.layers.2.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 514 |
+
"model.language_model.layers.2.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 515 |
+
"model.language_model.layers.2.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 516 |
+
"model.language_model.layers.2.self_attn.q_norm.weight": "model-00000-of-00001.safetensors",
|
| 517 |
+
"model.language_model.layers.20.post_attention_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 518 |
+
"model.language_model.layers.20.mlp.gate_proj.weight": "model-00000-of-00001.safetensors",
|
| 519 |
+
"model.language_model.layers.20.mlp.up_proj.weight": "model-00000-of-00001.safetensors",
|
| 520 |
+
"model.language_model.layers.20.mlp.down_proj.weight": "model-00000-of-00001.safetensors",
|
| 521 |
+
"model.language_model.layers.20.self_attn.k_norm.weight": "model-00000-of-00001.safetensors",
|
| 522 |
+
"model.language_model.layers.20.self_attn.o_proj.weight": "model-00000-of-00001.safetensors",
|
| 523 |
+
"model.language_model.layers.20.input_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 524 |
+
"model.language_model.layers.20.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 525 |
+
"model.language_model.layers.20.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 526 |
+
"model.language_model.layers.20.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 527 |
+
"model.language_model.layers.20.self_attn.q_norm.weight": "model-00000-of-00001.safetensors",
|
| 528 |
+
"model.language_model.layers.21.post_attention_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 529 |
+
"model.language_model.layers.21.mlp.gate_proj.weight": "model-00000-of-00001.safetensors",
|
| 530 |
+
"model.language_model.layers.21.mlp.up_proj.weight": "model-00000-of-00001.safetensors",
|
| 531 |
+
"model.language_model.layers.21.mlp.down_proj.weight": "model-00000-of-00001.safetensors",
|
| 532 |
+
"model.language_model.layers.21.self_attn.k_norm.weight": "model-00000-of-00001.safetensors",
|
| 533 |
+
"model.language_model.layers.21.self_attn.o_proj.weight": "model-00000-of-00001.safetensors",
|
| 534 |
+
"model.language_model.layers.21.input_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 535 |
+
"model.language_model.layers.21.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 536 |
+
"model.language_model.layers.21.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 537 |
+
"model.language_model.layers.21.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 538 |
+
"model.language_model.layers.21.self_attn.q_norm.weight": "model-00000-of-00001.safetensors",
|
| 539 |
+
"model.language_model.layers.22.post_attention_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 540 |
+
"model.language_model.layers.22.mlp.gate_proj.weight": "model-00000-of-00001.safetensors",
|
| 541 |
+
"model.language_model.layers.22.mlp.up_proj.weight": "model-00000-of-00001.safetensors",
|
| 542 |
+
"model.language_model.layers.22.mlp.down_proj.weight": "model-00000-of-00001.safetensors",
|
| 543 |
+
"model.language_model.layers.22.self_attn.k_norm.weight": "model-00000-of-00001.safetensors",
|
| 544 |
+
"model.language_model.layers.22.self_attn.o_proj.weight": "model-00000-of-00001.safetensors",
|
| 545 |
+
"model.language_model.layers.22.input_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 546 |
+
"model.language_model.layers.22.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 547 |
+
"model.language_model.layers.22.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 548 |
+
"model.language_model.layers.22.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 549 |
+
"model.language_model.layers.22.self_attn.q_norm.weight": "model-00000-of-00001.safetensors",
|
| 550 |
+
"model.language_model.layers.23.post_attention_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 551 |
+
"model.language_model.layers.23.mlp.gate_proj.weight": "model-00000-of-00001.safetensors",
|
| 552 |
+
"model.language_model.layers.23.mlp.up_proj.weight": "model-00000-of-00001.safetensors",
|
| 553 |
+
"model.language_model.layers.23.mlp.down_proj.weight": "model-00000-of-00001.safetensors",
|
| 554 |
+
"model.language_model.layers.23.self_attn.k_norm.weight": "model-00000-of-00001.safetensors",
|
| 555 |
+
"model.language_model.layers.23.self_attn.o_proj.weight": "model-00000-of-00001.safetensors",
|
| 556 |
+
"model.language_model.layers.23.input_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 557 |
+
"model.language_model.layers.23.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 558 |
+
"model.language_model.layers.23.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 559 |
+
"model.language_model.layers.23.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 560 |
+
"model.language_model.layers.23.self_attn.q_norm.weight": "model-00000-of-00001.safetensors",
|
| 561 |
+
"model.language_model.layers.24.post_attention_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 562 |
+
"model.language_model.layers.24.mlp.gate_proj.weight": "model-00000-of-00001.safetensors",
|
| 563 |
+
"model.language_model.layers.24.mlp.up_proj.weight": "model-00000-of-00001.safetensors",
|
| 564 |
+
"model.language_model.layers.24.mlp.down_proj.weight": "model-00000-of-00001.safetensors",
|
| 565 |
+
"model.language_model.layers.24.self_attn.k_norm.weight": "model-00000-of-00001.safetensors",
|
| 566 |
+
"model.language_model.layers.24.self_attn.o_proj.weight": "model-00000-of-00001.safetensors",
|
| 567 |
+
"model.language_model.layers.24.input_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 568 |
+
"model.language_model.layers.24.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 569 |
+
"model.language_model.layers.24.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 570 |
+
"model.language_model.layers.24.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 571 |
+
"model.language_model.layers.24.self_attn.q_norm.weight": "model-00000-of-00001.safetensors",
|
| 572 |
+
"model.language_model.layers.25.post_attention_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 573 |
+
"model.language_model.layers.25.mlp.gate_proj.weight": "model-00000-of-00001.safetensors",
|
| 574 |
+
"model.language_model.layers.25.mlp.up_proj.weight": "model-00000-of-00001.safetensors",
|
| 575 |
+
"model.language_model.layers.25.mlp.down_proj.weight": "model-00000-of-00001.safetensors",
|
| 576 |
+
"model.language_model.layers.25.self_attn.k_norm.weight": "model-00000-of-00001.safetensors",
|
| 577 |
+
"model.language_model.layers.25.self_attn.o_proj.weight": "model-00000-of-00001.safetensors",
|
| 578 |
+
"model.language_model.layers.25.input_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 579 |
+
"model.language_model.layers.25.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 580 |
+
"model.language_model.layers.25.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 581 |
+
"model.language_model.layers.25.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 582 |
+
"model.language_model.layers.25.self_attn.q_norm.weight": "model-00000-of-00001.safetensors",
|
| 583 |
+
"model.language_model.layers.26.post_attention_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 584 |
+
"model.language_model.layers.26.mlp.gate_proj.weight": "model-00000-of-00001.safetensors",
|
| 585 |
+
"model.language_model.layers.26.mlp.up_proj.weight": "model-00000-of-00001.safetensors",
|
| 586 |
+
"model.language_model.layers.26.mlp.down_proj.weight": "model-00000-of-00001.safetensors",
|
| 587 |
+
"model.language_model.layers.26.self_attn.k_norm.weight": "model-00000-of-00001.safetensors",
|
| 588 |
+
"model.language_model.layers.26.self_attn.o_proj.weight": "model-00000-of-00001.safetensors",
|
| 589 |
+
"model.language_model.layers.26.input_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 590 |
+
"model.language_model.layers.26.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 591 |
+
"model.language_model.layers.26.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 592 |
+
"model.language_model.layers.26.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 593 |
+
"model.language_model.layers.26.self_attn.q_norm.weight": "model-00000-of-00001.safetensors",
|
| 594 |
+
"model.language_model.layers.27.post_attention_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 595 |
+
"model.language_model.layers.27.mlp.gate_proj.weight": "model-00000-of-00001.safetensors",
|
| 596 |
+
"model.language_model.layers.27.mlp.up_proj.weight": "model-00000-of-00001.safetensors",
|
| 597 |
+
"model.language_model.layers.27.mlp.down_proj.weight": "model-00000-of-00001.safetensors",
|
| 598 |
+
"model.language_model.layers.27.self_attn.k_norm.weight": "model-00000-of-00001.safetensors",
|
| 599 |
+
"model.language_model.layers.27.self_attn.o_proj.weight": "model-00000-of-00001.safetensors",
|
| 600 |
+
"model.language_model.layers.27.input_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 601 |
+
"model.language_model.layers.27.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 602 |
+
"model.language_model.layers.27.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 603 |
+
"model.language_model.layers.27.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 604 |
+
"model.language_model.layers.27.self_attn.q_norm.weight": "model-00000-of-00001.safetensors",
|
| 605 |
+
"model.language_model.layers.3.post_attention_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 606 |
+
"model.language_model.layers.3.mlp.gate_proj.weight": "model-00000-of-00001.safetensors",
|
| 607 |
+
"model.language_model.layers.3.mlp.up_proj.weight": "model-00000-of-00001.safetensors",
|
| 608 |
+
"model.language_model.layers.3.mlp.down_proj.weight": "model-00000-of-00001.safetensors",
|
| 609 |
+
"model.language_model.layers.3.self_attn.k_norm.weight": "model-00000-of-00001.safetensors",
|
| 610 |
+
"model.language_model.layers.3.self_attn.o_proj.weight": "model-00000-of-00001.safetensors",
|
| 611 |
+
"model.language_model.layers.3.input_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 612 |
+
"model.language_model.layers.3.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 613 |
+
"model.language_model.layers.3.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 614 |
+
"model.language_model.layers.3.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 615 |
+
"model.language_model.layers.3.self_attn.q_norm.weight": "model-00000-of-00001.safetensors",
|
| 616 |
+
"model.language_model.layers.4.post_attention_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 617 |
+
"model.language_model.layers.4.mlp.gate_proj.weight": "model-00000-of-00001.safetensors",
|
| 618 |
+
"model.language_model.layers.4.mlp.up_proj.weight": "model-00000-of-00001.safetensors",
|
| 619 |
+
"model.language_model.layers.4.mlp.down_proj.weight": "model-00000-of-00001.safetensors",
|
| 620 |
+
"model.language_model.layers.4.self_attn.k_norm.weight": "model-00000-of-00001.safetensors",
|
| 621 |
+
"model.language_model.layers.4.self_attn.o_proj.weight": "model-00000-of-00001.safetensors",
|
| 622 |
+
"model.language_model.layers.4.input_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 623 |
+
"model.language_model.layers.4.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 624 |
+
"model.language_model.layers.4.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 625 |
+
"model.language_model.layers.4.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 626 |
+
"model.language_model.layers.4.self_attn.q_norm.weight": "model-00000-of-00001.safetensors",
|
| 627 |
+
"model.language_model.layers.5.post_attention_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 628 |
+
"model.language_model.layers.5.mlp.gate_proj.weight": "model-00000-of-00001.safetensors",
|
| 629 |
+
"model.language_model.layers.5.mlp.up_proj.weight": "model-00000-of-00001.safetensors",
|
| 630 |
+
"model.language_model.layers.5.mlp.down_proj.weight": "model-00000-of-00001.safetensors",
|
| 631 |
+
"model.language_model.layers.5.self_attn.k_norm.weight": "model-00000-of-00001.safetensors",
|
| 632 |
+
"model.language_model.layers.5.self_attn.o_proj.weight": "model-00000-of-00001.safetensors",
|
| 633 |
+
"model.language_model.layers.5.input_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 634 |
+
"model.language_model.layers.5.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 635 |
+
"model.language_model.layers.5.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 636 |
+
"model.language_model.layers.5.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 637 |
+
"model.language_model.layers.5.self_attn.q_norm.weight": "model-00000-of-00001.safetensors",
|
| 638 |
+
"model.language_model.layers.6.post_attention_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 639 |
+
"model.language_model.layers.6.mlp.gate_proj.weight": "model-00000-of-00001.safetensors",
|
| 640 |
+
"model.language_model.layers.6.mlp.up_proj.weight": "model-00000-of-00001.safetensors",
|
| 641 |
+
"model.language_model.layers.6.mlp.down_proj.weight": "model-00000-of-00001.safetensors",
|
| 642 |
+
"model.language_model.layers.6.self_attn.k_norm.weight": "model-00000-of-00001.safetensors",
|
| 643 |
+
"model.language_model.layers.6.self_attn.o_proj.weight": "model-00000-of-00001.safetensors",
|
| 644 |
+
"model.language_model.layers.6.input_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 645 |
+
"model.language_model.layers.6.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 646 |
+
"model.language_model.layers.6.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 647 |
+
"model.language_model.layers.6.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 648 |
+
"model.language_model.layers.6.self_attn.q_norm.weight": "model-00000-of-00001.safetensors",
|
| 649 |
+
"model.language_model.layers.7.post_attention_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 650 |
+
"model.language_model.layers.7.mlp.gate_proj.weight": "model-00000-of-00001.safetensors",
|
| 651 |
+
"model.language_model.layers.7.mlp.up_proj.weight": "model-00000-of-00001.safetensors",
|
| 652 |
+
"model.language_model.layers.7.mlp.down_proj.weight": "model-00000-of-00001.safetensors",
|
| 653 |
+
"model.language_model.layers.7.self_attn.k_norm.weight": "model-00000-of-00001.safetensors",
|
| 654 |
+
"model.language_model.layers.7.self_attn.o_proj.weight": "model-00000-of-00001.safetensors",
|
| 655 |
+
"model.language_model.layers.7.input_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 656 |
+
"model.language_model.layers.7.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 657 |
+
"model.language_model.layers.7.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 658 |
+
"model.language_model.layers.7.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 659 |
+
"model.language_model.layers.7.self_attn.q_norm.weight": "model-00000-of-00001.safetensors",
|
| 660 |
+
"model.language_model.layers.8.post_attention_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 661 |
+
"model.language_model.layers.8.mlp.gate_proj.weight": "model-00000-of-00001.safetensors",
|
| 662 |
+
"model.language_model.layers.8.mlp.up_proj.weight": "model-00000-of-00001.safetensors",
|
| 663 |
+
"model.language_model.layers.8.mlp.down_proj.weight": "model-00000-of-00001.safetensors",
|
| 664 |
+
"model.language_model.layers.8.self_attn.k_norm.weight": "model-00000-of-00001.safetensors",
|
| 665 |
+
"model.language_model.layers.8.self_attn.o_proj.weight": "model-00000-of-00001.safetensors",
|
| 666 |
+
"model.language_model.layers.8.input_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 667 |
+
"model.language_model.layers.8.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 668 |
+
"model.language_model.layers.8.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 669 |
+
"model.language_model.layers.8.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 670 |
+
"model.language_model.layers.8.self_attn.q_norm.weight": "model-00000-of-00001.safetensors",
|
| 671 |
+
"model.language_model.layers.9.post_attention_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 672 |
+
"model.language_model.layers.9.mlp.gate_proj.weight": "model-00000-of-00001.safetensors",
|
| 673 |
+
"model.language_model.layers.9.mlp.up_proj.weight": "model-00000-of-00001.safetensors",
|
| 674 |
+
"model.language_model.layers.9.mlp.down_proj.weight": "model-00000-of-00001.safetensors",
|
| 675 |
+
"model.language_model.layers.9.self_attn.k_norm.weight": "model-00000-of-00001.safetensors",
|
| 676 |
+
"model.language_model.layers.9.self_attn.o_proj.weight": "model-00000-of-00001.safetensors",
|
| 677 |
+
"model.language_model.layers.9.input_layernorm.weight": "model-00000-of-00001.safetensors",
|
| 678 |
+
"model.language_model.layers.9.self_attn.q_proj.weight": "model-00000-of-00001.safetensors",
|
| 679 |
+
"model.language_model.layers.9.self_attn.k_proj.weight": "model-00000-of-00001.safetensors",
|
| 680 |
+
"model.language_model.layers.9.self_attn.v_proj.weight": "model-00000-of-00001.safetensors",
|
| 681 |
+
"model.language_model.layers.9.self_attn.q_norm.weight": "model-00000-of-00001.safetensors",
|
| 682 |
+
"model.language_model.embed_tokens.weight": "model-00000-of-00001.safetensors",
|
| 683 |
+
"model.vq_adaptor.layers.0.bias": "model-00000-of-00001.safetensors",
|
| 684 |
+
"model.vq_adaptor.layers.0.weight": "model-00000-of-00001.safetensors",
|
| 685 |
+
"model.vq_adaptor.layers.2.bias": "model-00000-of-00001.safetensors",
|
| 686 |
+
"model.vq_adaptor.layers.2.weight": "model-00000-of-00001.safetensors",
|
| 687 |
+
"model.vq_adaptor.layers.3.bias": "model-00000-of-00001.safetensors",
|
| 688 |
+
"model.vq_adaptor.layers.3.weight": "model-00000-of-00001.safetensors"
|
| 689 |
+
}
|
| 690 |
+
}
|
modeling_moss_transcribe_diarize.py
ADDED
|
@@ -0,0 +1,369 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""MossTranscribeDiarizeForConditionalGeneration: Whisper-Medium + VQAdaptor + Qwen3-0.6B.
|
| 2 |
+
|
| 3 |
+
Architecture:
|
| 4 |
+
log-mel input_features -> HF WhisperEncoder
|
| 5 |
+
-> 4x time merge (B, T, 1024) -> (B, T/4, 4096)
|
| 6 |
+
-> VQAdaptor (4096 -> 1024)
|
| 7 |
+
-> masked_scatter into text embeddings
|
| 8 |
+
-> Qwen3-0.6B decoder -> logits
|
| 9 |
+
"""
|
| 10 |
+
|
| 11 |
+
from __future__ import annotations
|
| 12 |
+
|
| 13 |
+
from typing import Optional
|
| 14 |
+
|
| 15 |
+
import torch
|
| 16 |
+
from torch import nn
|
| 17 |
+
from transformers import GenerationMixin, PreTrainedModel
|
| 18 |
+
from transformers.modeling_outputs import CausalLMOutputWithPast
|
| 19 |
+
from transformers.models.qwen3.modeling_qwen3 import Qwen3Model
|
| 20 |
+
from transformers.models.whisper.modeling_whisper import WhisperEncoder
|
| 21 |
+
from transformers.utils import torch_compilable_check
|
| 22 |
+
|
| 23 |
+
from .configuration_moss_transcribe_diarize import MossTranscribeDiarizeConfig
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
class VQAdaptor(nn.Module):
|
| 27 |
+
"""Projects merged Whisper features to LM hidden dim.
|
| 28 |
+
|
| 29 |
+
``Linear(in → hidden) → SiLU → Linear(hidden → hidden) → LayerNorm``
|
| 30 |
+
"""
|
| 31 |
+
|
| 32 |
+
def __init__(self, input_dim: int, hidden_size: int, norm_eps: float = 1e-6):
|
| 33 |
+
super().__init__()
|
| 34 |
+
self.layers = nn.Sequential(
|
| 35 |
+
nn.Linear(input_dim, hidden_size, bias=True),
|
| 36 |
+
nn.SiLU(),
|
| 37 |
+
nn.Linear(hidden_size, hidden_size, bias=True),
|
| 38 |
+
nn.LayerNorm(hidden_size, eps=norm_eps, bias=True),
|
| 39 |
+
)
|
| 40 |
+
|
| 41 |
+
def forward(self, x: torch.Tensor) -> torch.Tensor:
|
| 42 |
+
return self.layers(x)
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
class MossTranscribeDiarizePreTrainedModel(PreTrainedModel):
|
| 46 |
+
config_class = MossTranscribeDiarizeConfig
|
| 47 |
+
base_model_prefix = "model"
|
| 48 |
+
input_modalities = ("audio", "text")
|
| 49 |
+
_no_split_modules = ["Qwen3DecoderLayer", "WhisperEncoderLayer"]
|
| 50 |
+
_skip_keys_device_placement = "past_key_values"
|
| 51 |
+
supports_gradient_checkpointing = True
|
| 52 |
+
_supports_sdpa = True
|
| 53 |
+
_supports_attention_backend = True
|
| 54 |
+
_supports_flash_attn = True
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
class MossTranscribeDiarizeModel(MossTranscribeDiarizePreTrainedModel):
|
| 58 |
+
base_model_prefix = "model"
|
| 59 |
+
|
| 60 |
+
"""Single-stream multimodal backbone: Whisper-Medium encoder + Qwen3-0.6B.
|
| 61 |
+
|
| 62 |
+
Audio features are injected into text embeddings via ``masked_scatter`` at
|
| 63 |
+
positions marked by ``audio_token_id`` in ``input_ids``.
|
| 64 |
+
"""
|
| 65 |
+
|
| 66 |
+
def __init__(self, config: MossTranscribeDiarizeConfig):
|
| 67 |
+
super().__init__(config)
|
| 68 |
+
|
| 69 |
+
self.language_model: nn.Module = Qwen3Model(config.text_config)
|
| 70 |
+
self.whisper_encoder: nn.Module = WhisperEncoder(config.audio_config)
|
| 71 |
+
self.vq_adaptor: VQAdaptor = VQAdaptor(
|
| 72 |
+
input_dim=config.adaptor_input_dim,
|
| 73 |
+
hidden_size=config.text_config.hidden_size,
|
| 74 |
+
norm_eps=config.text_config.rms_norm_eps,
|
| 75 |
+
)
|
| 76 |
+
self.post_init()
|
| 77 |
+
|
| 78 |
+
def get_input_embeddings(self):
|
| 79 |
+
return self.language_model.embed_tokens
|
| 80 |
+
|
| 81 |
+
def set_input_embeddings(self, value):
|
| 82 |
+
self.language_model.embed_tokens = value
|
| 83 |
+
|
| 84 |
+
# ---- 4x time merge ---------------------------------------------------
|
| 85 |
+
|
| 86 |
+
def time_merge(self, features: torch.Tensor) -> torch.Tensor:
|
| 87 |
+
"""``(B, T, D) -> (B, T//M, D*M)`` where M is ``audio_merge_size``."""
|
| 88 |
+
B, T, D = features.shape
|
| 89 |
+
merge_size = int(self.config.audio_merge_size)
|
| 90 |
+
T_trim = (T // merge_size) * merge_size
|
| 91 |
+
return features[:, :T_trim, :].reshape(B, T_trim // merge_size, D * merge_size)
|
| 92 |
+
|
| 93 |
+
# ---- audio feature extraction -----------------------------------------
|
| 94 |
+
|
| 95 |
+
def get_audio_features(
|
| 96 |
+
self,
|
| 97 |
+
input_features: torch.Tensor,
|
| 98 |
+
audio_feature_lengths: torch.LongTensor,
|
| 99 |
+
audio_chunk_mapping: Optional[torch.LongTensor] = None,
|
| 100 |
+
) -> list[torch.Tensor]:
|
| 101 |
+
"""Whisper encoder -> 4x time merge -> VQAdaptor.
|
| 102 |
+
|
| 103 |
+
Returns list of ``(1, N_tokens, hidden_size)`` tensors.
|
| 104 |
+
"""
|
| 105 |
+
if input_features is None:
|
| 106 |
+
raise ValueError("input_features must be provided for audio feature extraction.")
|
| 107 |
+
if audio_feature_lengths is None:
|
| 108 |
+
raise ValueError("audio_feature_lengths must be provided with input_features.")
|
| 109 |
+
|
| 110 |
+
device = next(self.whisper_encoder.parameters()).device
|
| 111 |
+
encoder_dtype = next(self.whisper_encoder.parameters()).dtype
|
| 112 |
+
input_features = input_features.to(device=device, dtype=encoder_dtype)
|
| 113 |
+
audio_feature_lengths = audio_feature_lengths.to(device=device)
|
| 114 |
+
if audio_feature_lengths.numel() != input_features.shape[0]:
|
| 115 |
+
raise ValueError(
|
| 116 |
+
"audio_feature_lengths must contain one length per input_features chunk: "
|
| 117 |
+
f"got {audio_feature_lengths.numel()} lengths for {input_features.shape[0]} chunks."
|
| 118 |
+
)
|
| 119 |
+
|
| 120 |
+
whisper_features = self.whisper_encoder(input_features, return_dict=True).last_hidden_state
|
| 121 |
+
|
| 122 |
+
chunk_mapping = (
|
| 123 |
+
audio_chunk_mapping.to(device=device)
|
| 124 |
+
if audio_chunk_mapping is not None
|
| 125 |
+
else torch.zeros(input_features.shape[0], dtype=torch.long, device=device)
|
| 126 |
+
)
|
| 127 |
+
if chunk_mapping.numel() != input_features.shape[0]:
|
| 128 |
+
raise ValueError(
|
| 129 |
+
"audio_chunk_mapping must contain one sample index per input_features chunk: "
|
| 130 |
+
f"got {chunk_mapping.numel()} indices for {input_features.shape[0]} chunks."
|
| 131 |
+
)
|
| 132 |
+
|
| 133 |
+
num_audios = int(chunk_mapping.max().item()) + 1 if chunk_mapping.numel() else 0
|
| 134 |
+
per_audio_chunks = [[] for _ in range(num_audios)]
|
| 135 |
+
for chunk_idx, token_len in enumerate(audio_feature_lengths.tolist()):
|
| 136 |
+
sample_idx = int(chunk_mapping[chunk_idx].item())
|
| 137 |
+
per_audio_chunks[sample_idx].append(
|
| 138 |
+
whisper_features[chunk_idx : chunk_idx + 1, : int(token_len) * 4]
|
| 139 |
+
)
|
| 140 |
+
|
| 141 |
+
adapted = []
|
| 142 |
+
for parts in per_audio_chunks:
|
| 143 |
+
feat = torch.cat(parts, dim=1)
|
| 144 |
+
feat = feat.to(self.dtype)
|
| 145 |
+
merged = self.time_merge(feat)
|
| 146 |
+
adapted.append(self.vq_adaptor(merged))
|
| 147 |
+
return adapted
|
| 148 |
+
|
| 149 |
+
# ---- inject audio into text embeddings --------------------------------
|
| 150 |
+
|
| 151 |
+
def get_placeholder_mask(
|
| 152 |
+
self,
|
| 153 |
+
input_ids: Optional[torch.LongTensor],
|
| 154 |
+
inputs_embeds: torch.FloatTensor,
|
| 155 |
+
audio_features: torch.Tensor,
|
| 156 |
+
) -> torch.BoolTensor:
|
| 157 |
+
"""Return the expanded audio placeholder mask and validate feature count."""
|
| 158 |
+
if input_ids is None:
|
| 159 |
+
special_audio_mask = inputs_embeds == self.get_input_embeddings()(
|
| 160 |
+
torch.tensor(self.config.audio_token_id, dtype=torch.long, device=inputs_embeds.device)
|
| 161 |
+
)
|
| 162 |
+
special_audio_mask = special_audio_mask.all(-1)
|
| 163 |
+
else:
|
| 164 |
+
special_audio_mask = input_ids.to(device=inputs_embeds.device) == self.config.audio_token_id
|
| 165 |
+
|
| 166 |
+
if special_audio_mask.shape != inputs_embeds.shape[:2]:
|
| 167 |
+
raise ValueError(
|
| 168 |
+
"input_ids shape must match the first two dimensions of inputs_embeds: "
|
| 169 |
+
f"got {tuple(special_audio_mask.shape)} and {tuple(inputs_embeds.shape[:2])}."
|
| 170 |
+
)
|
| 171 |
+
|
| 172 |
+
n_audio_tokens = special_audio_mask.sum()
|
| 173 |
+
special_audio_mask = special_audio_mask.unsqueeze(-1).expand_as(inputs_embeds).to(inputs_embeds.device)
|
| 174 |
+
torch_compilable_check(
|
| 175 |
+
inputs_embeds[special_audio_mask].numel() == audio_features.numel(),
|
| 176 |
+
(
|
| 177 |
+
f"Audio features and audio tokens do not match: "
|
| 178 |
+
f"tokens: {n_audio_tokens}, features {audio_features.shape[0]}"
|
| 179 |
+
),
|
| 180 |
+
)
|
| 181 |
+
return special_audio_mask
|
| 182 |
+
|
| 183 |
+
def inject_audio_features(
|
| 184 |
+
self,
|
| 185 |
+
input_ids,
|
| 186 |
+
inputs_embeds,
|
| 187 |
+
input_features,
|
| 188 |
+
audio_feature_lengths,
|
| 189 |
+
audio_chunk_mapping,
|
| 190 |
+
):
|
| 191 |
+
"""Replace audio placeholder positions with projected audio features."""
|
| 192 |
+
if input_features is None:
|
| 193 |
+
return inputs_embeds
|
| 194 |
+
audio_features = self.get_audio_features(
|
| 195 |
+
input_features=input_features,
|
| 196 |
+
audio_feature_lengths=audio_feature_lengths,
|
| 197 |
+
audio_chunk_mapping=audio_chunk_mapping,
|
| 198 |
+
)
|
| 199 |
+
audio_embeds = torch.cat([f.squeeze(0) for f in audio_features], dim=0)
|
| 200 |
+
audio_embeds = audio_embeds.to(inputs_embeds.device, inputs_embeds.dtype)
|
| 201 |
+
audio_mask = self.get_placeholder_mask(input_ids, inputs_embeds, audio_embeds)
|
| 202 |
+
return inputs_embeds.masked_scatter(audio_mask, audio_embeds)
|
| 203 |
+
|
| 204 |
+
# ---- forward ----------------------------------------------------------
|
| 205 |
+
|
| 206 |
+
def forward(
|
| 207 |
+
self,
|
| 208 |
+
input_ids: Optional[torch.LongTensor] = None,
|
| 209 |
+
attention_mask: Optional[torch.Tensor] = None,
|
| 210 |
+
position_ids: Optional[torch.LongTensor] = None,
|
| 211 |
+
past_key_values=None,
|
| 212 |
+
inputs_embeds: Optional[torch.FloatTensor] = None,
|
| 213 |
+
use_cache: Optional[bool] = None,
|
| 214 |
+
output_attentions: Optional[bool] = None,
|
| 215 |
+
output_hidden_states: Optional[bool] = None,
|
| 216 |
+
return_dict: Optional[bool] = None,
|
| 217 |
+
input_features: Optional[torch.FloatTensor] = None,
|
| 218 |
+
audio_feature_lengths: Optional[torch.LongTensor] = None,
|
| 219 |
+
audio_chunk_mapping: Optional[torch.LongTensor] = None,
|
| 220 |
+
**kwargs,
|
| 221 |
+
):
|
| 222 |
+
return_dict = True if return_dict is None else return_dict
|
| 223 |
+
if input_ids is None and inputs_embeds is None:
|
| 224 |
+
raise ValueError("You must specify one of input_ids or inputs_embeds.")
|
| 225 |
+
if input_ids is not None and inputs_embeds is not None:
|
| 226 |
+
raise ValueError("You must specify only one of input_ids or inputs_embeds.")
|
| 227 |
+
|
| 228 |
+
if inputs_embeds is None:
|
| 229 |
+
inputs_embeds = self.get_input_embeddings()(input_ids)
|
| 230 |
+
inputs_embeds = self.inject_audio_features(
|
| 231 |
+
input_ids=input_ids,
|
| 232 |
+
inputs_embeds=inputs_embeds,
|
| 233 |
+
input_features=input_features,
|
| 234 |
+
audio_feature_lengths=audio_feature_lengths,
|
| 235 |
+
audio_chunk_mapping=audio_chunk_mapping,
|
| 236 |
+
)
|
| 237 |
+
if output_attentions is not None:
|
| 238 |
+
kwargs["output_attentions"] = output_attentions
|
| 239 |
+
if output_hidden_states is not None:
|
| 240 |
+
kwargs["output_hidden_states"] = output_hidden_states
|
| 241 |
+
|
| 242 |
+
outputs = self.language_model(
|
| 243 |
+
input_ids=None, attention_mask=attention_mask, position_ids=position_ids,
|
| 244 |
+
past_key_values=past_key_values, inputs_embeds=inputs_embeds,
|
| 245 |
+
use_cache=use_cache, **kwargs,
|
| 246 |
+
)
|
| 247 |
+
if not return_dict:
|
| 248 |
+
return outputs.to_tuple()
|
| 249 |
+
return outputs
|
| 250 |
+
|
| 251 |
+
|
| 252 |
+
class MossTranscribeDiarizeForConditionalGeneration(MossTranscribeDiarizePreTrainedModel, GenerationMixin):
|
| 253 |
+
_tied_weights_keys = {"lm_head.weight": "model.language_model.embed_tokens.weight"}
|
| 254 |
+
|
| 255 |
+
def __init__(self, config: MossTranscribeDiarizeConfig):
|
| 256 |
+
super().__init__(config)
|
| 257 |
+
self.model = MossTranscribeDiarizeModel(config)
|
| 258 |
+
self.vocab_size = config.text_config.vocab_size
|
| 259 |
+
self.lm_head = nn.Linear(config.text_config.hidden_size, config.text_config.vocab_size, bias=False)
|
| 260 |
+
self.post_init()
|
| 261 |
+
|
| 262 |
+
def get_input_embeddings(self):
|
| 263 |
+
return self.model.get_input_embeddings()
|
| 264 |
+
|
| 265 |
+
def set_input_embeddings(self, value):
|
| 266 |
+
self.model.set_input_embeddings(value)
|
| 267 |
+
|
| 268 |
+
def get_output_embeddings(self):
|
| 269 |
+
return self.lm_head
|
| 270 |
+
|
| 271 |
+
def set_output_embeddings(self, new_embeddings):
|
| 272 |
+
self.lm_head = new_embeddings
|
| 273 |
+
|
| 274 |
+
def get_audio_features(
|
| 275 |
+
self,
|
| 276 |
+
input_features: torch.Tensor,
|
| 277 |
+
audio_feature_lengths: torch.LongTensor,
|
| 278 |
+
audio_chunk_mapping: Optional[torch.LongTensor] = None,
|
| 279 |
+
) -> list[torch.Tensor]:
|
| 280 |
+
return self.model.get_audio_features(
|
| 281 |
+
input_features=input_features,
|
| 282 |
+
audio_feature_lengths=audio_feature_lengths,
|
| 283 |
+
audio_chunk_mapping=audio_chunk_mapping,
|
| 284 |
+
)
|
| 285 |
+
|
| 286 |
+
def forward(
|
| 287 |
+
self,
|
| 288 |
+
input_ids: Optional[torch.LongTensor] = None,
|
| 289 |
+
attention_mask: Optional[torch.Tensor] = None,
|
| 290 |
+
position_ids: Optional[torch.LongTensor] = None,
|
| 291 |
+
past_key_values=None,
|
| 292 |
+
inputs_embeds: Optional[torch.FloatTensor] = None,
|
| 293 |
+
labels: Optional[torch.LongTensor] = None,
|
| 294 |
+
use_cache: Optional[bool] = None,
|
| 295 |
+
output_attentions: Optional[bool] = None,
|
| 296 |
+
output_hidden_states: Optional[bool] = None,
|
| 297 |
+
return_dict: Optional[bool] = None,
|
| 298 |
+
input_features: Optional[torch.FloatTensor] = None,
|
| 299 |
+
audio_feature_lengths: Optional[torch.LongTensor] = None,
|
| 300 |
+
audio_chunk_mapping: Optional[torch.LongTensor] = None,
|
| 301 |
+
logits_to_keep: int | torch.Tensor = 0,
|
| 302 |
+
**kwargs,
|
| 303 |
+
):
|
| 304 |
+
return_dict = True if return_dict is None else return_dict
|
| 305 |
+
outputs = self.model(
|
| 306 |
+
input_ids=input_ids,
|
| 307 |
+
attention_mask=attention_mask,
|
| 308 |
+
position_ids=position_ids,
|
| 309 |
+
past_key_values=past_key_values,
|
| 310 |
+
inputs_embeds=inputs_embeds,
|
| 311 |
+
use_cache=use_cache,
|
| 312 |
+
output_attentions=output_attentions,
|
| 313 |
+
output_hidden_states=output_hidden_states,
|
| 314 |
+
return_dict=True,
|
| 315 |
+
input_features=input_features,
|
| 316 |
+
audio_feature_lengths=audio_feature_lengths,
|
| 317 |
+
audio_chunk_mapping=audio_chunk_mapping,
|
| 318 |
+
**kwargs,
|
| 319 |
+
)
|
| 320 |
+
|
| 321 |
+
hidden_states = outputs.last_hidden_state
|
| 322 |
+
slice_indices = slice(-logits_to_keep, None) if isinstance(logits_to_keep, int) else logits_to_keep
|
| 323 |
+
logits = self.lm_head(hidden_states[:, slice_indices, :])
|
| 324 |
+
|
| 325 |
+
loss = None
|
| 326 |
+
if labels is not None:
|
| 327 |
+
loss = self.loss_function(
|
| 328 |
+
logits=logits,
|
| 329 |
+
labels=labels,
|
| 330 |
+
vocab_size=self.config.text_config.vocab_size,
|
| 331 |
+
**kwargs,
|
| 332 |
+
)
|
| 333 |
+
|
| 334 |
+
if not return_dict:
|
| 335 |
+
output = (logits,) + outputs[1:]
|
| 336 |
+
return (loss,) + output if loss is not None else output
|
| 337 |
+
return CausalLMOutputWithPast(
|
| 338 |
+
loss=loss, logits=logits,
|
| 339 |
+
past_key_values=outputs.past_key_values,
|
| 340 |
+
hidden_states=outputs.hidden_states,
|
| 341 |
+
attentions=outputs.attentions,
|
| 342 |
+
)
|
| 343 |
+
|
| 344 |
+
# ---- generation support -----------------------------------------------
|
| 345 |
+
|
| 346 |
+
def prepare_inputs_for_generation(
|
| 347 |
+
self,
|
| 348 |
+
input_ids,
|
| 349 |
+
past_key_values=None,
|
| 350 |
+
attention_mask=None,
|
| 351 |
+
inputs_embeds=None,
|
| 352 |
+
input_features=None,
|
| 353 |
+
audio_feature_lengths=None,
|
| 354 |
+
audio_chunk_mapping=None,
|
| 355 |
+
is_first_iteration=False,
|
| 356 |
+
use_cache=True,
|
| 357 |
+
**kwargs,
|
| 358 |
+
):
|
| 359 |
+
model_inputs = super().prepare_inputs_for_generation(
|
| 360 |
+
input_ids,
|
| 361 |
+
past_key_values=past_key_values,
|
| 362 |
+
attention_mask=attention_mask, inputs_embeds=inputs_embeds,
|
| 363 |
+
is_first_iteration=is_first_iteration, use_cache=use_cache, **kwargs,
|
| 364 |
+
)
|
| 365 |
+
if input_features is not None and (is_first_iteration or not use_cache):
|
| 366 |
+
model_inputs["input_features"] = input_features
|
| 367 |
+
model_inputs["audio_feature_lengths"] = audio_feature_lengths
|
| 368 |
+
model_inputs["audio_chunk_mapping"] = audio_chunk_mapping
|
| 369 |
+
return model_inputs
|
preprocessor_config.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"chunk_length": 30,
|
| 3 |
+
"dither": 0.0,
|
| 4 |
+
"feature_extractor_type": "WhisperFeatureExtractor",
|
| 5 |
+
"feature_size": 80,
|
| 6 |
+
"hop_length": 160,
|
| 7 |
+
"n_fft": 400,
|
| 8 |
+
"n_samples": 480000,
|
| 9 |
+
"nb_max_frames": 3000,
|
| 10 |
+
"padding_side": "right",
|
| 11 |
+
"padding_value": 0.0,
|
| 12 |
+
"return_attention_mask": false,
|
| 13 |
+
"sampling_rate": 16000
|
| 14 |
+
}
|
processing_moss_transcribe_diarize.py
ADDED
|
@@ -0,0 +1,272 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Processor for MOSS-Transcribe-Diarize audio-text inference."""
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing import Optional, Union
|
| 6 |
+
|
| 7 |
+
import numpy as np
|
| 8 |
+
import torch
|
| 9 |
+
from transformers.feature_extraction_utils import BatchFeature
|
| 10 |
+
from transformers.processing_utils import ProcessingKwargs, ProcessorMixin, Unpack
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
AUDIO_PAD_TOKEN = "<|audio_pad|>"
|
| 14 |
+
AUDIO_START_TOKEN = "<|audio_start|>"
|
| 15 |
+
AUDIO_END_TOKEN = "<|audio_end|>"
|
| 16 |
+
WHISPER_ENCODER_STRIDE = 2
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
class MossTranscribeDiarizeProcessorKwargs(ProcessingKwargs, total=False):
|
| 20 |
+
_defaults = {
|
| 21 |
+
"common_kwargs": {
|
| 22 |
+
"return_tensors": "pt",
|
| 23 |
+
},
|
| 24 |
+
"audio_kwargs": {},
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
def _audio_to_numpy(audio: Union[np.ndarray, torch.Tensor]) -> np.ndarray:
|
| 29 |
+
if torch.is_tensor(audio):
|
| 30 |
+
audio = audio.detach().cpu().numpy()
|
| 31 |
+
audio = np.asarray(audio, dtype=np.float32)
|
| 32 |
+
if audio.ndim > 1:
|
| 33 |
+
audio = np.squeeze(audio)
|
| 34 |
+
if audio.ndim == 0:
|
| 35 |
+
audio = audio.reshape(1)
|
| 36 |
+
if audio.ndim != 1:
|
| 37 |
+
raise ValueError(f"Expected mono audio with shape (num_samples,), got shape {audio.shape}.")
|
| 38 |
+
if audio.shape[0] == 0:
|
| 39 |
+
raise ValueError("Audio must contain at least one sample.")
|
| 40 |
+
return audio
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
def _pad_or_trim_audio(audio: np.ndarray, length: int) -> np.ndarray:
|
| 44 |
+
if audio.shape[0] > length:
|
| 45 |
+
audio = audio[:length]
|
| 46 |
+
elif audio.shape[0] < length:
|
| 47 |
+
audio = np.pad(audio, (0, length - audio.shape[0]))
|
| 48 |
+
return audio.astype(np.float32, copy=False)
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
def _compute_audio_token_length(num_samples: int, feature_extractor, audio_merge_size: int) -> int:
|
| 52 |
+
stride = int(feature_extractor.hop_length) * WHISPER_ENCODER_STRIDE * int(audio_merge_size)
|
| 53 |
+
return (int(num_samples) - 1) // stride + 1
|
| 54 |
+
|
| 55 |
+
|
| 56 |
+
def _chunk_audio(
|
| 57 |
+
feature_extractor,
|
| 58 |
+
audio: Union[np.ndarray, torch.Tensor],
|
| 59 |
+
audio_merge_size: int,
|
| 60 |
+
) -> tuple[np.ndarray, list[int]]:
|
| 61 |
+
audio = _audio_to_numpy(audio)
|
| 62 |
+
n_samples = int(feature_extractor.n_samples)
|
| 63 |
+
|
| 64 |
+
chunks, token_lengths = [], []
|
| 65 |
+
for start in range(0, audio.shape[0], n_samples):
|
| 66 |
+
chunk = audio[start : start + n_samples]
|
| 67 |
+
token_lengths.append(_compute_audio_token_length(chunk.shape[0], feature_extractor, audio_merge_size))
|
| 68 |
+
chunks.append(_pad_or_trim_audio(chunk, n_samples))
|
| 69 |
+
return np.stack(chunks), token_lengths
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
def _audios_to_input_features(
|
| 73 |
+
feature_extractor,
|
| 74 |
+
audios: list[Union[np.ndarray, torch.Tensor]],
|
| 75 |
+
*,
|
| 76 |
+
audio_merge_size: int,
|
| 77 |
+
feature_extractor_kwargs: Optional[dict] = None,
|
| 78 |
+
) -> tuple[torch.Tensor, torch.LongTensor, torch.LongTensor]:
|
| 79 |
+
feature_batches, feature_lengths, chunk_mapping = [], [], []
|
| 80 |
+
feature_extractor_kwargs = dict(feature_extractor_kwargs or {})
|
| 81 |
+
feature_extractor_kwargs.update(
|
| 82 |
+
{
|
| 83 |
+
"sampling_rate": int(feature_extractor.sampling_rate),
|
| 84 |
+
"padding": "max_length",
|
| 85 |
+
"return_tensors": "pt",
|
| 86 |
+
}
|
| 87 |
+
)
|
| 88 |
+
|
| 89 |
+
for audio_idx, audio in enumerate(audios):
|
| 90 |
+
chunks, token_lengths = _chunk_audio(feature_extractor, audio, audio_merge_size)
|
| 91 |
+
features = feature_extractor(
|
| 92 |
+
list(chunks),
|
| 93 |
+
**feature_extractor_kwargs,
|
| 94 |
+
)["input_features"]
|
| 95 |
+
feature_batches.append(features)
|
| 96 |
+
feature_lengths.extend(token_lengths)
|
| 97 |
+
chunk_mapping.extend([audio_idx] * len(token_lengths))
|
| 98 |
+
|
| 99 |
+
if feature_batches:
|
| 100 |
+
input_features = torch.cat(feature_batches, dim=0)
|
| 101 |
+
else:
|
| 102 |
+
input_features = torch.empty(
|
| 103 |
+
(0, int(feature_extractor.feature_size), int(feature_extractor.nb_max_frames)),
|
| 104 |
+
)
|
| 105 |
+
|
| 106 |
+
length_device = input_features.device
|
| 107 |
+
return (
|
| 108 |
+
input_features,
|
| 109 |
+
torch.tensor(feature_lengths, dtype=torch.long, device=length_device),
|
| 110 |
+
torch.tensor(chunk_mapping, dtype=torch.long, device=length_device),
|
| 111 |
+
)
|
| 112 |
+
|
| 113 |
+
|
| 114 |
+
class MossTranscribeDiarizeProcessor(ProcessorMixin):
|
| 115 |
+
"""Build MOSS-Transcribe-Diarize model inputs from text prompts and raw waveforms.
|
| 116 |
+
|
| 117 |
+
The model consumes log-mel ``input_features``. This processor owns the raw
|
| 118 |
+
waveform preprocessing, audio placeholder expansion, and optional numeric
|
| 119 |
+
time anchors inside the audio span.
|
| 120 |
+
"""
|
| 121 |
+
|
| 122 |
+
attributes = ["feature_extractor", "tokenizer"]
|
| 123 |
+
feature_extractor_class = "AutoFeatureExtractor"
|
| 124 |
+
tokenizer_class = "AutoTokenizer"
|
| 125 |
+
|
| 126 |
+
model_input_names = [
|
| 127 |
+
"input_ids",
|
| 128 |
+
"attention_mask",
|
| 129 |
+
"input_features",
|
| 130 |
+
"audio_feature_lengths",
|
| 131 |
+
"audio_chunk_mapping",
|
| 132 |
+
]
|
| 133 |
+
|
| 134 |
+
def __init__(
|
| 135 |
+
self,
|
| 136 |
+
feature_extractor=None,
|
| 137 |
+
tokenizer=None,
|
| 138 |
+
audio_tokens_per_second: float = 12.5,
|
| 139 |
+
audio_merge_size: int = 4,
|
| 140 |
+
time_marker_every_seconds: int = 2,
|
| 141 |
+
enable_time_marker: bool = True,
|
| 142 |
+
chat_template: Optional[str] = None,
|
| 143 |
+
):
|
| 144 |
+
if feature_extractor is None:
|
| 145 |
+
raise ValueError("MossTranscribeDiarizeProcessor requires a feature_extractor.")
|
| 146 |
+
if tokenizer is None:
|
| 147 |
+
raise ValueError("MossTranscribeDiarizeProcessor requires a tokenizer.")
|
| 148 |
+
super().__init__(feature_extractor, tokenizer, chat_template=chat_template)
|
| 149 |
+
self.audio_tokens_per_second = audio_tokens_per_second
|
| 150 |
+
self.audio_merge_size = int(audio_merge_size)
|
| 151 |
+
self.time_marker_every_seconds = time_marker_every_seconds
|
| 152 |
+
self.enable_time_marker = enable_time_marker
|
| 153 |
+
self.audio_token = AUDIO_PAD_TOKEN if not hasattr(tokenizer, "audio_token") else tokenizer.audio_token
|
| 154 |
+
self.audio_start_token = (
|
| 155 |
+
AUDIO_START_TOKEN if not hasattr(tokenizer, "audio_start_token") else tokenizer.audio_start_token
|
| 156 |
+
)
|
| 157 |
+
self.audio_end_token = AUDIO_END_TOKEN if not hasattr(tokenizer, "audio_end_token") else tokenizer.audio_end_token
|
| 158 |
+
resolved_audio_token_id = tokenizer.convert_tokens_to_ids(self.audio_token)
|
| 159 |
+
if resolved_audio_token_id is None:
|
| 160 |
+
raise ValueError(f"Tokenizer is missing required audio placeholder token {self.audio_token!r}.")
|
| 161 |
+
self.audio_token_id = int(resolved_audio_token_id)
|
| 162 |
+
self.digit_token_ids = self._get_digit_token_ids()
|
| 163 |
+
|
| 164 |
+
def _get_digit_token_ids(self) -> dict[str, int]:
|
| 165 |
+
digit_token_ids = {}
|
| 166 |
+
for digit in "0123456789":
|
| 167 |
+
ids = self.tokenizer.encode(digit, add_special_tokens=False)
|
| 168 |
+
if len(ids) != 1:
|
| 169 |
+
raise ValueError(f"Digit {digit!r} is not a single token: {ids}")
|
| 170 |
+
digit_token_ids[digit] = int(ids[0])
|
| 171 |
+
return digit_token_ids
|
| 172 |
+
|
| 173 |
+
def _audio_span_ids(self, audio_seq_len: int) -> list[int]:
|
| 174 |
+
audio_seq_len = int(audio_seq_len)
|
| 175 |
+
if not self.enable_time_marker or audio_seq_len <= 0 or self.time_marker_every_seconds <= 0:
|
| 176 |
+
return [self.audio_token_id] * max(audio_seq_len, 0)
|
| 177 |
+
|
| 178 |
+
tokens_per_marker = int(self.audio_tokens_per_second * self.time_marker_every_seconds)
|
| 179 |
+
if tokens_per_marker <= 0:
|
| 180 |
+
return [self.audio_token_id] * audio_seq_len
|
| 181 |
+
|
| 182 |
+
duration = audio_seq_len / float(self.audio_tokens_per_second)
|
| 183 |
+
output, consumed = [], 0
|
| 184 |
+
for sec in range(self.time_marker_every_seconds, int(duration) + 1, self.time_marker_every_seconds):
|
| 185 |
+
pos = (sec // self.time_marker_every_seconds) * tokens_per_marker
|
| 186 |
+
segment_len = pos - consumed
|
| 187 |
+
if segment_len > 0:
|
| 188 |
+
output.extend([self.audio_token_id] * segment_len)
|
| 189 |
+
consumed += segment_len
|
| 190 |
+
marker_ids = [self.digit_token_ids[digit] for digit in str(sec)]
|
| 191 |
+
output.extend(marker_ids)
|
| 192 |
+
|
| 193 |
+
remainder = audio_seq_len - consumed
|
| 194 |
+
if remainder > 0:
|
| 195 |
+
output.extend([self.audio_token_id] * remainder)
|
| 196 |
+
return output
|
| 197 |
+
|
| 198 |
+
def _expand_audio_token(self, text: str, num_audio_tokens: int, max_length: int) -> list[int]:
|
| 199 |
+
audio_ids = self._audio_span_ids(num_audio_tokens)
|
| 200 |
+
audio_token_count = text.count(self.audio_token)
|
| 201 |
+
if audio_token_count != 1:
|
| 202 |
+
raise ValueError(
|
| 203 |
+
f"Expected exactly one {self.audio_token!r} token per text sample, got {audio_token_count}."
|
| 204 |
+
)
|
| 205 |
+
before_audio, after_audio = text.split(self.audio_token, maxsplit=1)
|
| 206 |
+
before_ids = self.tokenizer.encode(before_audio, add_special_tokens=False)
|
| 207 |
+
after_ids = self.tokenizer.encode(after_audio, add_special_tokens=False)
|
| 208 |
+
|
| 209 |
+
input_ids = before_ids + audio_ids + after_ids
|
| 210 |
+
|
| 211 |
+
if len(input_ids) > max_length:
|
| 212 |
+
raise ValueError(f"Prompt/audio sequence exceeds max_length={max_length}")
|
| 213 |
+
return input_ids
|
| 214 |
+
|
| 215 |
+
def __call__(
|
| 216 |
+
self,
|
| 217 |
+
text: Union[str, list[str]],
|
| 218 |
+
audio,
|
| 219 |
+
*,
|
| 220 |
+
max_length: int = 131072,
|
| 221 |
+
**kwargs: Unpack[MossTranscribeDiarizeProcessorKwargs],
|
| 222 |
+
) -> BatchFeature:
|
| 223 |
+
return_tensors = kwargs.pop("return_tensors", "pt")
|
| 224 |
+
output_kwargs = self._merge_kwargs(
|
| 225 |
+
MossTranscribeDiarizeProcessorKwargs,
|
| 226 |
+
tokenizer_init_kwargs=self.tokenizer.init_kwargs,
|
| 227 |
+
**kwargs,
|
| 228 |
+
)
|
| 229 |
+
if isinstance(text, str):
|
| 230 |
+
texts = [text]
|
| 231 |
+
else:
|
| 232 |
+
texts = list(text)
|
| 233 |
+
audios = audio if isinstance(audio, list) else [audio]
|
| 234 |
+
if len(texts) != len(audios):
|
| 235 |
+
raise ValueError(f"Expected one audio per text prompt, got {len(audios)} audios and {len(texts)} prompts.")
|
| 236 |
+
|
| 237 |
+
input_features, audio_feature_lengths, audio_chunk_mapping = _audios_to_input_features(
|
| 238 |
+
self.feature_extractor,
|
| 239 |
+
audios,
|
| 240 |
+
audio_merge_size=self.audio_merge_size,
|
| 241 |
+
feature_extractor_kwargs=output_kwargs["audio_kwargs"],
|
| 242 |
+
)
|
| 243 |
+
audio_token_counts = torch.zeros(len(audios), dtype=torch.long, device=audio_feature_lengths.device)
|
| 244 |
+
audio_token_counts.scatter_add_(0, audio_chunk_mapping, audio_feature_lengths)
|
| 245 |
+
|
| 246 |
+
encoded = [
|
| 247 |
+
self._expand_audio_token(prompt, int(num_audio_tokens.item()), max_length)
|
| 248 |
+
for prompt, num_audio_tokens in zip(texts, audio_token_counts)
|
| 249 |
+
]
|
| 250 |
+
max_seq_len = max(len(ids) for ids in encoded)
|
| 251 |
+
pad_token_id = self.tokenizer.pad_token_id
|
| 252 |
+
if pad_token_id is None:
|
| 253 |
+
pad_token_id = self.tokenizer.eos_token_id or 0
|
| 254 |
+
|
| 255 |
+
input_ids, attention_mask = [], []
|
| 256 |
+
for ids in encoded:
|
| 257 |
+
pad_len = max_seq_len - len(ids)
|
| 258 |
+
input_ids.append(ids + [pad_token_id] * pad_len)
|
| 259 |
+
attention_mask.append([1] * len(ids) + [0] * pad_len)
|
| 260 |
+
|
| 261 |
+
target_device = input_features.device
|
| 262 |
+
data = {
|
| 263 |
+
"input_ids": torch.tensor(input_ids, dtype=torch.long, device=target_device),
|
| 264 |
+
"attention_mask": torch.tensor(attention_mask, dtype=torch.long, device=target_device),
|
| 265 |
+
"input_features": input_features,
|
| 266 |
+
"audio_feature_lengths": audio_feature_lengths,
|
| 267 |
+
"audio_chunk_mapping": audio_chunk_mapping,
|
| 268 |
+
}
|
| 269 |
+
return BatchFeature(data=data, tensor_type=return_tensors)
|
| 270 |
+
|
| 271 |
+
|
| 272 |
+
__all__ = ["MossTranscribeDiarizeProcessor"]
|
processor_config.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"processor_class": "MossTranscribeDiarizeProcessor",
|
| 3 |
+
"auto_map": {
|
| 4 |
+
"AutoProcessor": "processing_moss_transcribe_diarize.MossTranscribeDiarizeProcessor"
|
| 5 |
+
},
|
| 6 |
+
"audio_tokens_per_second": 12.5,
|
| 7 |
+
"audio_merge_size": 4,
|
| 8 |
+
"time_marker_every_seconds": 5,
|
| 9 |
+
"enable_time_marker": true
|
| 10 |
+
}
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"additional_special_tokens": [
|
| 3 |
+
"<|im_start|>",
|
| 4 |
+
"<|im_end|>",
|
| 5 |
+
"<|object_ref_start|>",
|
| 6 |
+
"<|object_ref_end|>",
|
| 7 |
+
"<|box_start|>",
|
| 8 |
+
"<|box_end|>",
|
| 9 |
+
"<|quad_start|>",
|
| 10 |
+
"<|quad_end|>",
|
| 11 |
+
"<|vision_start|>",
|
| 12 |
+
"<|vision_end|>",
|
| 13 |
+
"<|vision_pad|>",
|
| 14 |
+
"<|image_pad|>",
|
| 15 |
+
"<|video_pad|>"
|
| 16 |
+
],
|
| 17 |
+
"eos_token": {
|
| 18 |
+
"content": "<|im_end|>",
|
| 19 |
+
"lstrip": false,
|
| 20 |
+
"normalized": false,
|
| 21 |
+
"rstrip": false,
|
| 22 |
+
"single_word": false
|
| 23 |
+
},
|
| 24 |
+
"pad_token": {
|
| 25 |
+
"content": "<|endoftext|>",
|
| 26 |
+
"lstrip": false,
|
| 27 |
+
"normalized": false,
|
| 28 |
+
"rstrip": false,
|
| 29 |
+
"single_word": false
|
| 30 |
+
}
|
| 31 |
+
}
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bcf03774334462d6e34b5005cb11120a62275f146ee2953e68731ecdbce84fbb
|
| 3 |
+
size 11423222
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"backend": "tokenizers",
|
| 4 |
+
"bos_token": null,
|
| 5 |
+
"clean_up_tokenization_spaces": false,
|
| 6 |
+
"eos_token": "<|im_end|>",
|
| 7 |
+
"errors": "replace",
|
| 8 |
+
"extra_special_tokens": [
|
| 9 |
+
"<|audio_start|>",
|
| 10 |
+
"<|audio_end|>",
|
| 11 |
+
"<|audio_pad|>"
|
| 12 |
+
],
|
| 13 |
+
"fix_mistral_regex": true,
|
| 14 |
+
"is_local": true,
|
| 15 |
+
"local_files_only": false,
|
| 16 |
+
"model_max_length": 131072,
|
| 17 |
+
"pad_token": "<|endoftext|>",
|
| 18 |
+
"split_special_tokens": false,
|
| 19 |
+
"tokenizer_class": "Qwen2Tokenizer",
|
| 20 |
+
"unk_token": null
|
| 21 |
+
}
|
vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|