Commit ·
5411cd0
verified ·
0
Parent(s):
Duplicate from ASLP-lab/WSChuan-ASR
Browse filesCo-authored-by: ASLP-lab <ASLP-lab@users.noreply.huggingface.co>
- .gitattributes +36 -0
- Paraformer-large-Chuan/am.mvn +8 -0
- Paraformer-large-Chuan/config.yaml +126 -0
- Paraformer-large-Chuan/model.pt +3 -0
- Paraformer-large-Chuan/seg_dict +0 -0
- Paraformer-large-Chuan/tokens.json +0 -0
- Qwen2.5-Omni-3B-Chuan/added_tokens.json +24 -0
- Qwen2.5-Omni-3B-Chuan/args.json +373 -0
- Qwen2.5-Omni-3B-Chuan/chat_template.jinja +7 -0
- Qwen2.5-Omni-3B-Chuan/config.json +644 -0
- Qwen2.5-Omni-3B-Chuan/generation_config.json +8 -0
- Qwen2.5-Omni-3B-Chuan/merges.txt +0 -0
- Qwen2.5-Omni-3B-Chuan/model-00001-of-00003.safetensors +3 -0
- Qwen2.5-Omni-3B-Chuan/model-00002-of-00003.safetensors +3 -0
- Qwen2.5-Omni-3B-Chuan/model-00003-of-00003.safetensors +3 -0
- Qwen2.5-Omni-3B-Chuan/model.safetensors.index.json +0 -0
- Qwen2.5-Omni-3B-Chuan/preprocessor_config.json +31 -0
- Qwen2.5-Omni-3B-Chuan/special_tokens_map.json +38 -0
- Qwen2.5-Omni-3B-Chuan/spk_dict.pt +3 -0
- Qwen2.5-Omni-3B-Chuan/tokenizer.json +3 -0
- Qwen2.5-Omni-3B-Chuan/tokenizer_config.json +222 -0
- Qwen2.5-Omni-3B-Chuan/video_preprocessor_config.json +56 -0
- Qwen2.5-Omni-3B-Chuan/vocab.json +0 -0
- README.md +91 -0
- infer_paraformer.py +65 -0
- infer_qwen2.5omni.py +68 -0
.gitattributes
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
Qwen2.5-Omni-3B-Chuan/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
Paraformer-large-Chuan/am.mvn
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<Nnet>
|
| 2 |
+
<Splice> 560 560
|
| 3 |
+
[ 0 ]
|
| 4 |
+
<AddShift> 560 560
|
| 5 |
+
<LearnRateCoef> 0 [ -8.311879 -8.600912 -9.615928 -10.43595 -11.21292 -11.88333 -12.36243 -12.63706 -12.8818 -12.83066 -12.89103 -12.95666 -13.19763 -13.40598 -13.49113 -13.5546 -13.55639 -13.51915 -13.68284 -13.53289 -13.42107 -13.65519 -13.50713 -13.75251 -13.76715 -13.87408 -13.73109 -13.70412 -13.56073 -13.53488 -13.54895 -13.56228 -13.59408 -13.62047 -13.64198 -13.66109 -13.62669 -13.58297 -13.57387 -13.4739 -13.53063 -13.48348 -13.61047 -13.64716 -13.71546 -13.79184 -13.90614 -14.03098 -14.18205 -14.35881 -14.48419 -14.60172 -14.70591 -14.83362 -14.92122 -15.00622 -15.05122 -15.03119 -14.99028 -14.92302 -14.86927 -14.82691 -14.7972 -14.76909 -14.71356 -14.61277 -14.51696 -14.42252 -14.36405 -14.30451 -14.23161 -14.19851 -14.16633 -14.15649 -14.10504 -13.99518 -13.79562 -13.3996 -12.7767 -11.71208 -8.311879 -8.600912 -9.615928 -10.43595 -11.21292 -11.88333 -12.36243 -12.63706 -12.8818 -12.83066 -12.89103 -12.95666 -13.19763 -13.40598 -13.49113 -13.5546 -13.55639 -13.51915 -13.68284 -13.53289 -13.42107 -13.65519 -13.50713 -13.75251 -13.76715 -13.87408 -13.73109 -13.70412 -13.56073 -13.53488 -13.54895 -13.56228 -13.59408 -13.62047 -13.64198 -13.66109 -13.62669 -13.58297 -13.57387 -13.4739 -13.53063 -13.48348 -13.61047 -13.64716 -13.71546 -13.79184 -13.90614 -14.03098 -14.18205 -14.35881 -14.48419 -14.60172 -14.70591 -14.83362 -14.92122 -15.00622 -15.05122 -15.03119 -14.99028 -14.92302 -14.86927 -14.82691 -14.7972 -14.76909 -14.71356 -14.61277 -14.51696 -14.42252 -14.36405 -14.30451 -14.23161 -14.19851 -14.16633 -14.15649 -14.10504 -13.99518 -13.79562 -13.3996 -12.7767 -11.71208 -8.311879 -8.600912 -9.615928 -10.43595 -11.21292 -11.88333 -12.36243 -12.63706 -12.8818 -12.83066 -12.89103 -12.95666 -13.19763 -13.40598 -13.49113 -13.5546 -13.55639 -13.51915 -13.68284 -13.53289 -13.42107 -13.65519 -13.50713 -13.75251 -13.76715 -13.87408 -13.73109 -13.70412 -13.56073 -13.53488 -13.54895 -13.56228 -13.59408 -13.62047 -13.64198 -13.66109 -13.62669 -13.58297 -13.57387 -13.4739 -13.53063 -13.48348 -13.61047 -13.64716 -13.71546 -13.79184 -13.90614 -14.03098 -14.18205 -14.35881 -14.48419 -14.60172 -14.70591 -14.83362 -14.92122 -15.00622 -15.05122 -15.03119 -14.99028 -14.92302 -14.86927 -14.82691 -14.7972 -14.76909 -14.71356 -14.61277 -14.51696 -14.42252 -14.36405 -14.30451 -14.23161 -14.19851 -14.16633 -14.15649 -14.10504 -13.99518 -13.79562 -13.3996 -12.7767 -11.71208 -8.311879 -8.600912 -9.615928 -10.43595 -11.21292 -11.88333 -12.36243 -12.63706 -12.8818 -12.83066 -12.89103 -12.95666 -13.19763 -13.40598 -13.49113 -13.5546 -13.55639 -13.51915 -13.68284 -13.53289 -13.42107 -13.65519 -13.50713 -13.75251 -13.76715 -13.87408 -13.73109 -13.70412 -13.56073 -13.53488 -13.54895 -13.56228 -13.59408 -13.62047 -13.64198 -13.66109 -13.62669 -13.58297 -13.57387 -13.4739 -13.53063 -13.48348 -13.61047 -13.64716 -13.71546 -13.79184 -13.90614 -14.03098 -14.18205 -14.35881 -14.48419 -14.60172 -14.70591 -14.83362 -14.92122 -15.00622 -15.05122 -15.03119 -14.99028 -14.92302 -14.86927 -14.82691 -14.7972 -14.76909 -14.71356 -14.61277 -14.51696 -14.42252 -14.36405 -14.30451 -14.23161 -14.19851 -14.16633 -14.15649 -14.10504 -13.99518 -13.79562 -13.3996 -12.7767 -11.71208 -8.311879 -8.600912 -9.615928 -10.43595 -11.21292 -11.88333 -12.36243 -12.63706 -12.8818 -12.83066 -12.89103 -12.95666 -13.19763 -13.40598 -13.49113 -13.5546 -13.55639 -13.51915 -13.68284 -13.53289 -13.42107 -13.65519 -13.50713 -13.75251 -13.76715 -13.87408 -13.73109 -13.70412 -13.56073 -13.53488 -13.54895 -13.56228 -13.59408 -13.62047 -13.64198 -13.66109 -13.62669 -13.58297 -13.57387 -13.4739 -13.53063 -13.48348 -13.61047 -13.64716 -13.71546 -13.79184 -13.90614 -14.03098 -14.18205 -14.35881 -14.48419 -14.60172 -14.70591 -14.83362 -14.92122 -15.00622 -15.05122 -15.03119 -14.99028 -14.92302 -14.86927 -14.82691 -14.7972 -14.76909 -14.71356 -14.61277 -14.51696 -14.42252 -14.36405 -14.30451 -14.23161 -14.19851 -14.16633 -14.15649 -14.10504 -13.99518 -13.79562 -13.3996 -12.7767 -11.71208 -8.311879 -8.600912 -9.615928 -10.43595 -11.21292 -11.88333 -12.36243 -12.63706 -12.8818 -12.83066 -12.89103 -12.95666 -13.19763 -13.40598 -13.49113 -13.5546 -13.55639 -13.51915 -13.68284 -13.53289 -13.42107 -13.65519 -13.50713 -13.75251 -13.76715 -13.87408 -13.73109 -13.70412 -13.56073 -13.53488 -13.54895 -13.56228 -13.59408 -13.62047 -13.64198 -13.66109 -13.62669 -13.58297 -13.57387 -13.4739 -13.53063 -13.48348 -13.61047 -13.64716 -13.71546 -13.79184 -13.90614 -14.03098 -14.18205 -14.35881 -14.48419 -14.60172 -14.70591 -14.83362 -14.92122 -15.00622 -15.05122 -15.03119 -14.99028 -14.92302 -14.86927 -14.82691 -14.7972 -14.76909 -14.71356 -14.61277 -14.51696 -14.42252 -14.36405 -14.30451 -14.23161 -14.19851 -14.16633 -14.15649 -14.10504 -13.99518 -13.79562 -13.3996 -12.7767 -11.71208 -8.311879 -8.600912 -9.615928 -10.43595 -11.21292 -11.88333 -12.36243 -12.63706 -12.8818 -12.83066 -12.89103 -12.95666 -13.19763 -13.40598 -13.49113 -13.5546 -13.55639 -13.51915 -13.68284 -13.53289 -13.42107 -13.65519 -13.50713 -13.75251 -13.76715 -13.87408 -13.73109 -13.70412 -13.56073 -13.53488 -13.54895 -13.56228 -13.59408 -13.62047 -13.64198 -13.66109 -13.62669 -13.58297 -13.57387 -13.4739 -13.53063 -13.48348 -13.61047 -13.64716 -13.71546 -13.79184 -13.90614 -14.03098 -14.18205 -14.35881 -14.48419 -14.60172 -14.70591 -14.83362 -14.92122 -15.00622 -15.05122 -15.03119 -14.99028 -14.92302 -14.86927 -14.82691 -14.7972 -14.76909 -14.71356 -14.61277 -14.51696 -14.42252 -14.36405 -14.30451 -14.23161 -14.19851 -14.16633 -14.15649 -14.10504 -13.99518 -13.79562 -13.3996 -12.7767 -11.71208 ]
|
| 6 |
+
<Rescale> 560 560
|
| 7 |
+
<LearnRateCoef> 0 [ 0.155775 0.154484 0.1527379 0.1518718 0.1506028 0.1489256 0.147067 0.1447061 0.1436307 0.1443568 0.1451849 0.1455157 0.1452821 0.1445717 0.1439195 0.1435867 0.1436018 0.1438781 0.1442086 0.1448844 0.1454756 0.145663 0.146268 0.1467386 0.1472724 0.147664 0.1480913 0.1483739 0.1488841 0.1493636 0.1497088 0.1500379 0.1502916 0.1505389 0.1506787 0.1507102 0.1505992 0.1505445 0.1505938 0.1508133 0.1509569 0.1512396 0.1514625 0.1516195 0.1516156 0.1515561 0.1514966 0.1513976 0.1512612 0.151076 0.1510596 0.1510431 0.151077 0.1511168 0.1511917 0.151023 0.1508045 0.1505885 0.1503493 0.1502373 0.1501726 0.1500762 0.1500065 0.1499782 0.150057 0.1502658 0.150469 0.1505335 0.1505505 0.1505328 0.1504275 0.1502438 0.1499674 0.1497118 0.1494661 0.1493102 0.1493681 0.1495501 0.1499738 0.1509654 0.155775 0.154484 0.1527379 0.1518718 0.1506028 0.1489256 0.147067 0.1447061 0.1436307 0.1443568 0.1451849 0.1455157 0.1452821 0.1445717 0.1439195 0.1435867 0.1436018 0.1438781 0.1442086 0.1448844 0.1454756 0.145663 0.146268 0.1467386 0.1472724 0.147664 0.1480913 0.1483739 0.1488841 0.1493636 0.1497088 0.1500379 0.1502916 0.1505389 0.1506787 0.1507102 0.1505992 0.1505445 0.1505938 0.1508133 0.1509569 0.1512396 0.1514625 0.1516195 0.1516156 0.1515561 0.1514966 0.1513976 0.1512612 0.151076 0.1510596 0.1510431 0.151077 0.1511168 0.1511917 0.151023 0.1508045 0.1505885 0.1503493 0.1502373 0.1501726 0.1500762 0.1500065 0.1499782 0.150057 0.1502658 0.150469 0.1505335 0.1505505 0.1505328 0.1504275 0.1502438 0.1499674 0.1497118 0.1494661 0.1493102 0.1493681 0.1495501 0.1499738 0.1509654 0.155775 0.154484 0.1527379 0.1518718 0.1506028 0.1489256 0.147067 0.1447061 0.1436307 0.1443568 0.1451849 0.1455157 0.1452821 0.1445717 0.1439195 0.1435867 0.1436018 0.1438781 0.1442086 0.1448844 0.1454756 0.145663 0.146268 0.1467386 0.1472724 0.147664 0.1480913 0.1483739 0.1488841 0.1493636 0.1497088 0.1500379 0.1502916 0.1505389 0.1506787 0.1507102 0.1505992 0.1505445 0.1505938 0.1508133 0.1509569 0.1512396 0.1514625 0.1516195 0.1516156 0.1515561 0.1514966 0.1513976 0.1512612 0.151076 0.1510596 0.1510431 0.151077 0.1511168 0.1511917 0.151023 0.1508045 0.1505885 0.1503493 0.1502373 0.1501726 0.1500762 0.1500065 0.1499782 0.150057 0.1502658 0.150469 0.1505335 0.1505505 0.1505328 0.1504275 0.1502438 0.1499674 0.1497118 0.1494661 0.1493102 0.1493681 0.1495501 0.1499738 0.1509654 0.155775 0.154484 0.1527379 0.1518718 0.1506028 0.1489256 0.147067 0.1447061 0.1436307 0.1443568 0.1451849 0.1455157 0.1452821 0.1445717 0.1439195 0.1435867 0.1436018 0.1438781 0.1442086 0.1448844 0.1454756 0.145663 0.146268 0.1467386 0.1472724 0.147664 0.1480913 0.1483739 0.1488841 0.1493636 0.1497088 0.1500379 0.1502916 0.1505389 0.1506787 0.1507102 0.1505992 0.1505445 0.1505938 0.1508133 0.1509569 0.1512396 0.1514625 0.1516195 0.1516156 0.1515561 0.1514966 0.1513976 0.1512612 0.151076 0.1510596 0.1510431 0.151077 0.1511168 0.1511917 0.151023 0.1508045 0.1505885 0.1503493 0.1502373 0.1501726 0.1500762 0.1500065 0.1499782 0.150057 0.1502658 0.150469 0.1505335 0.1505505 0.1505328 0.1504275 0.1502438 0.1499674 0.1497118 0.1494661 0.1493102 0.1493681 0.1495501 0.1499738 0.1509654 0.155775 0.154484 0.1527379 0.1518718 0.1506028 0.1489256 0.147067 0.1447061 0.1436307 0.1443568 0.1451849 0.1455157 0.1452821 0.1445717 0.1439195 0.1435867 0.1436018 0.1438781 0.1442086 0.1448844 0.1454756 0.145663 0.146268 0.1467386 0.1472724 0.147664 0.1480913 0.1483739 0.1488841 0.1493636 0.1497088 0.1500379 0.1502916 0.1505389 0.1506787 0.1507102 0.1505992 0.1505445 0.1505938 0.1508133 0.1509569 0.1512396 0.1514625 0.1516195 0.1516156 0.1515561 0.1514966 0.1513976 0.1512612 0.151076 0.1510596 0.1510431 0.151077 0.1511168 0.1511917 0.151023 0.1508045 0.1505885 0.1503493 0.1502373 0.1501726 0.1500762 0.1500065 0.1499782 0.150057 0.1502658 0.150469 0.1505335 0.1505505 0.1505328 0.1504275 0.1502438 0.1499674 0.1497118 0.1494661 0.1493102 0.1493681 0.1495501 0.1499738 0.1509654 0.155775 0.154484 0.1527379 0.1518718 0.1506028 0.1489256 0.147067 0.1447061 0.1436307 0.1443568 0.1451849 0.1455157 0.1452821 0.1445717 0.1439195 0.1435867 0.1436018 0.1438781 0.1442086 0.1448844 0.1454756 0.145663 0.146268 0.1467386 0.1472724 0.147664 0.1480913 0.1483739 0.1488841 0.1493636 0.1497088 0.1500379 0.1502916 0.1505389 0.1506787 0.1507102 0.1505992 0.1505445 0.1505938 0.1508133 0.1509569 0.1512396 0.1514625 0.1516195 0.1516156 0.1515561 0.1514966 0.1513976 0.1512612 0.151076 0.1510596 0.1510431 0.151077 0.1511168 0.1511917 0.151023 0.1508045 0.1505885 0.1503493 0.1502373 0.1501726 0.1500762 0.1500065 0.1499782 0.150057 0.1502658 0.150469 0.1505335 0.1505505 0.1505328 0.1504275 0.1502438 0.1499674 0.1497118 0.1494661 0.1493102 0.1493681 0.1495501 0.1499738 0.1509654 0.155775 0.154484 0.1527379 0.1518718 0.1506028 0.1489256 0.147067 0.1447061 0.1436307 0.1443568 0.1451849 0.1455157 0.1452821 0.1445717 0.1439195 0.1435867 0.1436018 0.1438781 0.1442086 0.1448844 0.1454756 0.145663 0.146268 0.1467386 0.1472724 0.147664 0.1480913 0.1483739 0.1488841 0.1493636 0.1497088 0.1500379 0.1502916 0.1505389 0.1506787 0.1507102 0.1505992 0.1505445 0.1505938 0.1508133 0.1509569 0.1512396 0.1514625 0.1516195 0.1516156 0.1515561 0.1514966 0.1513976 0.1512612 0.151076 0.1510596 0.1510431 0.151077 0.1511168 0.1511917 0.151023 0.1508045 0.1505885 0.1503493 0.1502373 0.1501726 0.1500762 0.1500065 0.1499782 0.150057 0.1502658 0.150469 0.1505335 0.1505505 0.1505328 0.1504275 0.1502438 0.1499674 0.1497118 0.1494661 0.1493102 0.1493681 0.1495501 0.1499738 0.1509654 ]
|
| 8 |
+
</Nnet>
|
Paraformer-large-Chuan/config.yaml
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
model: Paraformer
|
| 2 |
+
model_conf:
|
| 3 |
+
ctc_weight: 0.0
|
| 4 |
+
lsm_weight: 0.1
|
| 5 |
+
length_normalized_loss: true
|
| 6 |
+
predictor_weight: 1.0
|
| 7 |
+
predictor_bias: 1
|
| 8 |
+
sampling_ratio: 0.75
|
| 9 |
+
encoder: SANMEncoder
|
| 10 |
+
encoder_conf:
|
| 11 |
+
output_size: 512
|
| 12 |
+
attention_heads: 4
|
| 13 |
+
linear_units: 2048
|
| 14 |
+
num_blocks: 50
|
| 15 |
+
dropout_rate: 0.1
|
| 16 |
+
positional_dropout_rate: 0.1
|
| 17 |
+
attention_dropout_rate: 0.1
|
| 18 |
+
input_layer: pe
|
| 19 |
+
pos_enc_class: SinusoidalPositionEncoder
|
| 20 |
+
normalize_before: true
|
| 21 |
+
kernel_size: 11
|
| 22 |
+
sanm_shfit: 0
|
| 23 |
+
selfattention_layer_type: sanm
|
| 24 |
+
decoder: ParaformerSANMDecoder
|
| 25 |
+
decoder_conf:
|
| 26 |
+
attention_heads: 4
|
| 27 |
+
linear_units: 2048
|
| 28 |
+
num_blocks: 16
|
| 29 |
+
dropout_rate: 0.1
|
| 30 |
+
positional_dropout_rate: 0.1
|
| 31 |
+
self_attention_dropout_rate: 0.1
|
| 32 |
+
src_attention_dropout_rate: 0.1
|
| 33 |
+
att_layer_num: 16
|
| 34 |
+
kernel_size: 11
|
| 35 |
+
sanm_shfit: 0
|
| 36 |
+
predictor: CifPredictorV2
|
| 37 |
+
predictor_conf:
|
| 38 |
+
idim: 512
|
| 39 |
+
threshold: 1.0
|
| 40 |
+
l_order: 1
|
| 41 |
+
r_order: 1
|
| 42 |
+
tail_threshold: 0.45
|
| 43 |
+
frontend: WavFrontend
|
| 44 |
+
frontend_conf:
|
| 45 |
+
fs: 16000
|
| 46 |
+
window: hamming
|
| 47 |
+
n_mels: 80
|
| 48 |
+
frame_length: 25
|
| 49 |
+
frame_shift: 10
|
| 50 |
+
lfr_m: 7
|
| 51 |
+
lfr_n: 6
|
| 52 |
+
cmvn_file: ./speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/am.mvn
|
| 53 |
+
specaug: SpecAugLFR
|
| 54 |
+
specaug_conf:
|
| 55 |
+
apply_time_warp: false
|
| 56 |
+
time_warp_window: 5
|
| 57 |
+
time_warp_mode: bicubic
|
| 58 |
+
apply_freq_mask: true
|
| 59 |
+
freq_mask_width_range:
|
| 60 |
+
- 0
|
| 61 |
+
- 30
|
| 62 |
+
lfr_rate: 6
|
| 63 |
+
num_freq_mask: 1
|
| 64 |
+
apply_time_mask: true
|
| 65 |
+
time_mask_width_range:
|
| 66 |
+
- 0
|
| 67 |
+
- 12
|
| 68 |
+
num_time_mask: 1
|
| 69 |
+
train_conf:
|
| 70 |
+
accum_grad: 1
|
| 71 |
+
grad_clip: 5
|
| 72 |
+
max_epoch: 5
|
| 73 |
+
val_scheduler_criterion:
|
| 74 |
+
- valid
|
| 75 |
+
- acc
|
| 76 |
+
best_model_criterion:
|
| 77 |
+
- - valid
|
| 78 |
+
- acc
|
| 79 |
+
- max
|
| 80 |
+
keep_nbest_models: 100
|
| 81 |
+
log_interval: 500
|
| 82 |
+
resume: true
|
| 83 |
+
validate_interval: 5000
|
| 84 |
+
save_checkpoint_interval: 5000
|
| 85 |
+
avg_nbest_model: 10
|
| 86 |
+
use_deepspeed: false
|
| 87 |
+
deepspeed_config: ./config/ds_stage1.json
|
| 88 |
+
optim: adam
|
| 89 |
+
optim_conf:
|
| 90 |
+
lr: 0.0002
|
| 91 |
+
scheduler: warmuplr
|
| 92 |
+
scheduler_conf:
|
| 93 |
+
warmup_steps: 30000
|
| 94 |
+
dataset: AudioDataset
|
| 95 |
+
dataset_conf:
|
| 96 |
+
index_ds: IndexDSJsonl
|
| 97 |
+
batch_sampler: BatchSampler
|
| 98 |
+
batch_type: token
|
| 99 |
+
batch_size: 300
|
| 100 |
+
max_token_length: 2048
|
| 101 |
+
buffer_size: 500
|
| 102 |
+
shuffle: true
|
| 103 |
+
num_workers: 4
|
| 104 |
+
data_split_num: 1
|
| 105 |
+
sort_size: 1024
|
| 106 |
+
tokenizer: CharTokenizer
|
| 107 |
+
tokenizer_conf:
|
| 108 |
+
unk_symbol: <unk>
|
| 109 |
+
split_with_space: true
|
| 110 |
+
token_list: ./speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/tokens.json
|
| 111 |
+
seg_dict_file: ./speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/seg_dict
|
| 112 |
+
input_size: 560
|
| 113 |
+
ctc_conf:
|
| 114 |
+
dropout_rate: 0.0
|
| 115 |
+
ctc_type: builtin
|
| 116 |
+
reduce: true
|
| 117 |
+
ignore_nan_grad: true
|
| 118 |
+
normalize: null
|
| 119 |
+
init_param: /home/work_nfs9/sywang/code/paraformer/outputs/model.pt
|
| 120 |
+
config: /home/work_nfs9/sywang/code/paraformer/outputs/config.yaml
|
| 121 |
+
is_training: true
|
| 122 |
+
train_data_set_list: data/train.jsonl
|
| 123 |
+
valid_data_set_list: data/val.jsonl
|
| 124 |
+
output_dir: ./outputs
|
| 125 |
+
model_path: /home/work_nfs9/sywang/code/paraformer/outputs
|
| 126 |
+
device: cpu
|
Paraformer-large-Chuan/model.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3cb8f6c514ada6029c3504f6629a4756a583fe801e56a383a095636dc4c3ee77
|
| 3 |
+
size 2642208221
|
Paraformer-large-Chuan/seg_dict
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
Paraformer-large-Chuan/tokens.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
Qwen2.5-Omni-3B-Chuan/added_tokens.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"</tool_call>": 151658,
|
| 3 |
+
"<tool_call>": 151657,
|
| 4 |
+
"<|AUDIO|>": 151646,
|
| 5 |
+
"<|IMAGE|>": 151655,
|
| 6 |
+
"<|VIDEO|>": 151656,
|
| 7 |
+
"<|audio_bos|>": 151647,
|
| 8 |
+
"<|audio_eos|>": 151648,
|
| 9 |
+
"<|box_end|>": 151649,
|
| 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 |
+
"<|quad_end|>": 151651,
|
| 19 |
+
"<|quad_start|>": 151650,
|
| 20 |
+
"<|repo_name|>": 151663,
|
| 21 |
+
"<|vision_bos|>": 151652,
|
| 22 |
+
"<|vision_eos|>": 151653,
|
| 23 |
+
"<|vision_pad|>": 151654
|
| 24 |
+
}
|
Qwen2.5-Omni-3B-Chuan/args.json
ADDED
|
@@ -0,0 +1,373 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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ediction_loss_only": false,
|
| 9 |
+
"per_device_train_batch_size": 2,
|
| 10 |
+
"per_device_eval_batch_size": 2,
|
| 11 |
+
"per_gpu_train_batch_size": null,
|
| 12 |
+
"per_gpu_eval_batch_size": null,
|
| 13 |
+
"gradient_accumulation_steps": 4,
|
| 14 |
+
"eval_accumulation_steps": null,
|
| 15 |
+
"eval_delay": 0,
|
| 16 |
+
"torch_empty_cache_steps": null,
|
| 17 |
+
"learning_rate": 0.0001,
|
| 18 |
+
"weight_decay": 0.1,
|
| 19 |
+
"adam_beta1": 0.9,
|
| 20 |
+
"adam_beta2": 0.95,
|
| 21 |
+
"adam_epsilon": 1e-08,
|
| 22 |
+
"max_grad_norm": 1.0,
|
| 23 |
+
"num_train_epochs": 5.0,
|
| 24 |
+
"max_steps": -1,
|
| 25 |
+
"lr_scheduler_type": "cosine",
|
| 26 |
+
"lr_scheduler_kwargs": null,
|
| 27 |
+
"warmup_ratio": 0.05,
|
| 28 |
+
"warmup_steps": 0,
|
| 29 |
+
"log_level": "passive",
|
| 30 |
+
"log_level_replica": "warning",
|
| 31 |
+
"log_on_each_node": true,
|
| 32 |
+
"logging_dir": "/home/work_nfs23/sywang/code/asr_rl/exp/sft_chuan2/v0-20250909-174359/runs",
|
| 33 |
+
"logging_strategy": "steps",
|
| 34 |
+
"logging_first_step": true,
|
| 35 |
+
"logging_steps": 5,
|
| 36 |
+
"logging_nan_inf_filter": true,
|
| 37 |
+
"save_strategy": "steps",
|
| 38 |
+
"save_steps": 2000.0,
|
| 39 |
+
"save_total_limit": null,
|
| 40 |
+
"save_safetensors": true,
|
| 41 |
+
"save_on_each_node": false,
|
| 42 |
+
"save_only_model": false,
|
| 43 |
+
"restore_callback_states_from_checkpoint": false,
|
| 44 |
+
"no_cuda": false,
|
| 45 |
+
"use_cpu": false,
|
| 46 |
+
"use_mps_device": false,
|
| 47 |
+
"seed": 42,
|
| 48 |
+
"data_seed": 42,
|
| 49 |
+
"jit_mode_eval": false,
|
| 50 |
+
"use_ipex": false,
|
| 51 |
+
"bf16": true,
|
| 52 |
+
"fp16": false,
|
| 53 |
+
"fp16_opt_level": "O1",
|
| 54 |
+
"half_precision_backend": "auto",
|
| 55 |
+
"bf16_full_eval": false,
|
| 56 |
+
"fp16_full_eval": false,
|
| 57 |
+
"tf32": null,
|
| 58 |
+
"local_rank": 0,
|
| 59 |
+
"ddp_backend": null,
|
| 60 |
+
"tpu_num_cores": null,
|
| 61 |
+
"tpu_metrics_debug": false,
|
| 62 |
+
"debug": null,
|
| 63 |
+
"dataloader_drop_last": false,
|
| 64 |
+
"eval_steps": 2000.0,
|
| 65 |
+
"dataloader_num_workers": 4,
|
| 66 |
+
"dataloader_prefetch_factor": null,
|
| 67 |
+
"past_index": -1,
|
| 68 |
+
"run_name": "/home/work_nfs23/sywang/code/asr_rl/exp/sft_chuan2/v0-20250909-174359",
|
| 69 |
+
"disable_tqdm": null,
|
| 70 |
+
"remove_unused_columns": true,
|
| 71 |
+
"label_names": null,
|
| 72 |
+
"load_best_model_at_end": false,
|
| 73 |
+
"metric_for_best_model": "loss",
|
| 74 |
+
"greater_is_better": false,
|
| 75 |
+
"ignore_data_skip": false,
|
| 76 |
+
"fsdp": "",
|
| 77 |
+
"fsdp_min_num_params": 0,
|
| 78 |
+
"fsdp_config": null,
|
| 79 |
+
"fsdp_transformer_layer_cls_to_wrap": null,
|
| 80 |
+
"accelerator_config": {
|
| 81 |
+
"dispatch_batches": false
|
| 82 |
+
},
|
| 83 |
+
"parallelism_config": null,
|
| 84 |
+
"deepspeed": {
|
| 85 |
+
"fp16": {
|
| 86 |
+
"enabled": "auto",
|
| 87 |
+
"loss_scale": 0,
|
| 88 |
+
"loss_scale_window": 1000,
|
| 89 |
+
"initial_scale_power": 16,
|
| 90 |
+
"hysteresis": 2,
|
| 91 |
+
"min_loss_scale": 1
|
| 92 |
+
},
|
| 93 |
+
"bf16": {
|
| 94 |
+
"enabled": "auto"
|
| 95 |
+
},
|
| 96 |
+
"zero_optimization": {
|
| 97 |
+
"stage": 2,
|
| 98 |
+
"offload_optimizer": {
|
| 99 |
+
"device": "none",
|
| 100 |
+
"pin_memory": true
|
| 101 |
+
},
|
| 102 |
+
"allgather_partitions": true,
|
| 103 |
+
"allgather_bucket_size": 200000000.0,
|
| 104 |
+
"overlap_comm": false,
|
| 105 |
+
"reduce_scatter": true,
|
| 106 |
+
"reduce_bucket_size": 200000000.0,
|
| 107 |
+
"contiguous_gradients": true
|
| 108 |
+
},
|
| 109 |
+
"gradient_accumulation_steps": "auto",
|
| 110 |
+
"gradient_clipping": "auto",
|
| 111 |
+
"steps_per_print": 2000,
|
| 112 |
+
"train_batch_size": "auto",
|
| 113 |
+
"train_micro_batch_size_per_gpu": "auto",
|
| 114 |
+
"wall_clock_breakdown": false
|
| 115 |
+
},
|
| 116 |
+
"label_smoothing_factor": 0.0,
|
| 117 |
+
"optim": "adamw_torch",
|
| 118 |
+
"optim_args": null,
|
| 119 |
+
"adafactor": false,
|
| 120 |
+
"group_by_length": false,
|
| 121 |
+
"length_column_name": "length",
|
| 122 |
+
"report_to": [
|
| 123 |
+
"tensorboard"
|
| 124 |
+
],
|
| 125 |
+
"ddp_find_unused_parameters": null,
|
| 126 |
+
"ddp_bucket_cap_mb": null,
|
| 127 |
+
"ddp_broadcast_buffers": null,
|
| 128 |
+
"dataloader_pin_memory": true,
|
| 129 |
+
"dataloader_persistent_workers": false,
|
| 130 |
+
"skip_memory_metrics": true,
|
| 131 |
+
"use_legacy_prediction_loop": false,
|
| 132 |
+
"push_to_hub": false,
|
| 133 |
+
"resume_from_checkpoint": null,
|
| 134 |
+
"hub_model_id": null,
|
| 135 |
+
"hub_strategy": "every_save",
|
| 136 |
+
"hub_token": null,
|
| 137 |
+
"hub_private_repo": null,
|
| 138 |
+
"hub_always_push": false,
|
| 139 |
+
"hub_revision": null,
|
| 140 |
+
"gradient_checkpointing": true,
|
| 141 |
+
"gradient_checkpointing_kwargs": null,
|
| 142 |
+
"include_inputs_for_metrics": false,
|
| 143 |
+
"include_for_metrics": [],
|
| 144 |
+
"eval_do_concat_batches": true,
|
| 145 |
+
"fp16_backend": "auto",
|
| 146 |
+
"push_to_hub_model_id": null,
|
| 147 |
+
"push_to_hub_organization": null,
|
| 148 |
+
"push_to_hub_token": null,
|
| 149 |
+
"mp_parameters": "",
|
| 150 |
+
"auto_find_batch_size": false,
|
| 151 |
+
"full_determinism": false,
|
| 152 |
+
"torchdynamo": null,
|
| 153 |
+
"ray_scope": "last",
|
| 154 |
+
"ddp_timeout": 18000000,
|
| 155 |
+
"torch_compile": false,
|
| 156 |
+
"torch_compile_backend": null,
|
| 157 |
+
"torch_compile_mode": null,
|
| 158 |
+
"include_tokens_per_second": false,
|
| 159 |
+
"include_num_input_tokens_seen": false,
|
| 160 |
+
"neftune_noise_alpha": null,
|
| 161 |
+
"optim_target_modules": null,
|
| 162 |
+
"batch_eval_metrics": false,
|
| 163 |
+
"eval_on_start": false,
|
| 164 |
+
"use_liger_kernel": false,
|
| 165 |
+
"liger_kernel_config": null,
|
| 166 |
+
"eval_use_gather_object": false,
|
| 167 |
+
"average_tokens_across_devices": true,
|
| 168 |
+
"sortish_sampler": false,
|
| 169 |
+
"predict_with_generate": false,
|
| 170 |
+
"generation_max_length": null,
|
| 171 |
+
"generation_num_beams": null,
|
| 172 |
+
"generation_config": null,
|
| 173 |
+
"tuner_backend": "peft",
|
| 174 |
+
"vit_gradient_checkpointing": null,
|
| 175 |
+
"router_aux_loss_coef": 0.0,
|
| 176 |
+
"enable_dft_loss": false,
|
| 177 |
+
"enable_channel_loss": false,
|
| 178 |
+
"check_model": true,
|
| 179 |
+
"acc_strategy": "token",
|
| 180 |
+
"train_dataloader_shuffle": true,
|
| 181 |
+
"max_epochs": null,
|
| 182 |
+
"aligner_lr": null,
|
| 183 |
+
"vit_lr": null,
|
| 184 |
+
"use_logits_to_keep": null,
|
| 185 |
+
"ds3_gather_for_generation": true,
|
| 186 |
+
"resume_only_model": false,
|
| 187 |
+
"optimizer": null,
|
| 188 |
+
"loss_type": null,
|
| 189 |
+
"metric": null,
|
| 190 |
+
"eval_use_evalscope": false,
|
| 191 |
+
"eval_dataset": [],
|
| 192 |
+
"eval_dataset_args": null,
|
| 193 |
+
"eval_limit": null,
|
| 194 |
+
"eval_generation_config": null,
|
| 195 |
+
"extra_eval_args": null,
|
| 196 |
+
"use_flash_ckpt": false,
|
| 197 |
+
"model": "/home/work_nfs23/sywang/ckpt/Qwen2.5-Omni-3B",
|
| 198 |
+
"model_type": "qwen2_5_omni",
|
| 199 |
+
"model_revision": null,
|
| 200 |
+
"task_type": "causal_lm",
|
| 201 |
+
"torch_dtype": "bfloat16",
|
| 202 |
+
"attn_impl": "flash_attn",
|
| 203 |
+
"new_special_tokens": [],
|
| 204 |
+
"num_labels": null,
|
| 205 |
+
"problem_type": null,
|
| 206 |
+
"rope_scaling": null,
|
| 207 |
+
"device_map": null,
|
| 208 |
+
"max_memory": {},
|
| 209 |
+
"max_model_len": null,
|
| 210 |
+
"local_repo_path": null,
|
| 211 |
+
"init_strategy": null,
|
| 212 |
+
"template": "qwen2_5_omni",
|
| 213 |
+
"system": "You are a speech recognition model.",
|
| 214 |
+
"max_length": 2048,
|
| 215 |
+
"truncation_strategy": "delete",
|
| 216 |
+
"max_pixels": null,
|
| 217 |
+
"agent_template": null,
|
| 218 |
+
"norm_bbox": null,
|
| 219 |
+
"use_chat_template": true,
|
| 220 |
+
"padding_free": false,
|
| 221 |
+
"padding_side": "right",
|
| 222 |
+
"loss_scale": "default",
|
| 223 |
+
"sequence_parallel_size": 1,
|
| 224 |
+
"response_prefix": null,
|
| 225 |
+
"template_backend": "swift",
|
| 226 |
+
"dataset": [
|
| 227 |
+
"data/train/train_chuan2.jsonl"
|
| 228 |
+
],
|
| 229 |
+
"val_dataset": [],
|
| 230 |
+
"split_dataset_ratio": 0.0,
|
| 231 |
+
"dataset_num_proc": 1,
|
| 232 |
+
"load_from_cache_file": true,
|
| 233 |
+
"dataset_shuffle": true,
|
| 234 |
+
"val_dataset_shuffle": false,
|
| 235 |
+
"streaming": false,
|
| 236 |
+
"interleave_prob": null,
|
| 237 |
+
"stopping_strategy": "first_exhausted",
|
| 238 |
+
"shuffle_buffer_size": 1000,
|
| 239 |
+
"download_mode": "reuse_dataset_if_exists",
|
| 240 |
+
"columns": {},
|
| 241 |
+
"strict": false,
|
| 242 |
+
"model_name": null,
|
| 243 |
+
"model_author": null,
|
| 244 |
+
"custom_dataset_info": [],
|
| 245 |
+
"quant_method": null,
|
| 246 |
+
"quant_bits": null,
|
| 247 |
+
"hqq_axis": null,
|
| 248 |
+
"bnb_4bit_compute_dtype": "bfloat16",
|
| 249 |
+
"bnb_4bit_quant_type": "nf4",
|
| 250 |
+
"bnb_4bit_use_double_quant": true,
|
| 251 |
+
"bnb_4bit_quant_storage": null,
|
| 252 |
+
"max_new_tokens": 64,
|
| 253 |
+
"temperature": 0.0,
|
| 254 |
+
"top_k": null,
|
| 255 |
+
"top_p": null,
|
| 256 |
+
"repetition_penalty": null,
|
| 257 |
+
"num_beams": 1,
|
| 258 |
+
"stream": false,
|
| 259 |
+
"stop_words": [],
|
| 260 |
+
"logprobs": false,
|
| 261 |
+
"top_logprobs": null,
|
| 262 |
+
"ckpt_dir": null,
|
| 263 |
+
"lora_modules": [],
|
| 264 |
+
"train_type": "lora",
|
| 265 |
+
"adapters": [],
|
| 266 |
+
"external_plugins": [],
|
| 267 |
+
"model_kwargs": {},
|
| 268 |
+
"load_args": false,
|
| 269 |
+
"load_data_args": false,
|
| 270 |
+
"packing": false,
|
| 271 |
+
"packing_length": null,
|
| 272 |
+
"lazy_tokenize": true,
|
| 273 |
+
"cached_dataset": [],
|
| 274 |
+
"custom_register_path": [],
|
| 275 |
+
"use_hf": false,
|
| 276 |
+
"ignore_args_error": false,
|
| 277 |
+
"use_swift_lora": false,
|
| 278 |
+
"freeze_parameters": [],
|
| 279 |
+
"freeze_parameters_regex": null,
|
| 280 |
+
"freeze_parameters_ratio": 0.0,
|
| 281 |
+
"trainable_parameters": [],
|
| 282 |
+
"trainable_parameters_regex": null,
|
| 283 |
+
"freeze_llm": false,
|
| 284 |
+
"freeze_vit": true,
|
| 285 |
+
"freeze_aligner": true,
|
| 286 |
+
"target_modules": [
|
| 287 |
+
"all-linear"
|
| 288 |
+
],
|
| 289 |
+
"target_regex": null,
|
| 290 |
+
"target_parameters": null,
|
| 291 |
+
"modules_to_save": [],
|
| 292 |
+
"lora_rank": 8,
|
| 293 |
+
"lora_alpha": 32,
|
| 294 |
+
"lora_dropout": 0.05,
|
| 295 |
+
"lora_bias": "none",
|
| 296 |
+
"lora_dtype": null,
|
| 297 |
+
"lorap_lr_ratio": null,
|
| 298 |
+
"use_rslora": false,
|
| 299 |
+
"use_dora": false,
|
| 300 |
+
"lora_ga_batch_size": 2,
|
| 301 |
+
"lora_ga_iters": 2,
|
| 302 |
+
"lora_ga_max_length": 1024,
|
| 303 |
+
"lora_ga_direction": "ArB2r",
|
| 304 |
+
"lora_ga_scale": "stable",
|
| 305 |
+
"lora_ga_stable_gamma": 16,
|
| 306 |
+
"init_weights": true,
|
| 307 |
+
"fourier_n_frequency": 2000,
|
| 308 |
+
"fourier_scaling": 300.0,
|
| 309 |
+
"boft_block_size": 4,
|
| 310 |
+
"boft_block_num": 0,
|
| 311 |
+
"boft_n_butterfly_factor": 1,
|
| 312 |
+
"boft_dropout": 0.0,
|
| 313 |
+
"vera_rank": 256,
|
| 314 |
+
"vera_projection_prng_key": 0,
|
| 315 |
+
"vera_dropout": 0.0,
|
| 316 |
+
"vera_d_initial": 0.1,
|
| 317 |
+
"adapter_act": "gelu",
|
| 318 |
+
"adapter_length": 128,
|
| 319 |
+
"use_galore": false,
|
| 320 |
+
"galore_target_modules": null,
|
| 321 |
+
"galore_rank": 128,
|
| 322 |
+
"galore_update_proj_gap": 50,
|
| 323 |
+
"galore_scale": 1.0,
|
| 324 |
+
"galore_proj_type": "std",
|
| 325 |
+
"galore_optim_per_parameter": false,
|
| 326 |
+
"galore_with_embedding": false,
|
| 327 |
+
"galore_quantization": false,
|
| 328 |
+
"galore_proj_quant": false,
|
| 329 |
+
"galore_proj_bits": 4,
|
| 330 |
+
"galore_proj_group_size": 256,
|
| 331 |
+
"galore_cos_threshold": 0.4,
|
| 332 |
+
"galore_gamma_proj": 2,
|
| 333 |
+
"galore_queue_size": 5,
|
| 334 |
+
"adalora_target_r": 8,
|
| 335 |
+
"adalora_init_r": 12,
|
| 336 |
+
"adalora_tinit": 0,
|
| 337 |
+
"adalora_tfinal": 0,
|
| 338 |
+
"adalora_deltaT": 1,
|
| 339 |
+
"adalora_beta1": 0.85,
|
| 340 |
+
"adalora_beta2": 0.85,
|
| 341 |
+
"adalora_orth_reg_weight": 0.5,
|
| 342 |
+
"llamapro_num_new_blocks": 4,
|
| 343 |
+
"llamapro_num_groups": null,
|
| 344 |
+
"lisa_activated_layers": 0,
|
| 345 |
+
"lisa_step_interval": 20,
|
| 346 |
+
"reft_layer_key": null,
|
| 347 |
+
"reft_layers": null,
|
| 348 |
+
"reft_rank": 4,
|
| 349 |
+
"reft_intervention_type": "LoreftIntervention",
|
| 350 |
+
"reft_args": null,
|
| 351 |
+
"swanlab_token": null,
|
| 352 |
+
"swanlab_project": null,
|
| 353 |
+
"swanlab_workspace": null,
|
| 354 |
+
"swanlab_exp_name": null,
|
| 355 |
+
"swanlab_lark_webhook_url": null,
|
| 356 |
+
"swanlab_lark_secret": null,
|
| 357 |
+
"swanlab_mode": "cloud",
|
| 358 |
+
"add_version": true,
|
| 359 |
+
"create_checkpoint_symlink": false,
|
| 360 |
+
"zero_hpz_partition_size": null,
|
| 361 |
+
"deepspeed_autotp_size": null,
|
| 362 |
+
"early_stop_interval": null,
|
| 363 |
+
"rank": 0,
|
| 364 |
+
"global_world_size": 4,
|
| 365 |
+
"local_world_size": 4,
|
| 366 |
+
"model_suffix": "Qwen2.5-Omni-3B",
|
| 367 |
+
"model_info": "ModelInfo(model_type='qwen2_5_omni', model_dir='/home/work_nfs23/sywang/ckpt/Qwen2.5-Omni-3B', torch_dtype=torch.bfloat16, max_model_len=32768, quant_method=None, quant_bits=None, rope_scaling={'mrope_section': [16, 24, 24], 'rope_type': 'default', 'type': 'default'}, is_moe_model=False, config=None, task_type='causal_lm', num_labels=None)",
|
| 368 |
+
"model_meta": "ModelMeta(model_type='qwen2_5_omni', model_groups=[ModelGroup(models=[Model(ms_model_id='Qwen/Qwen2.5-Omni-3B', hf_model_id='Qwen/Qwen2.5-Omni-3B', model_path=None, ms_revision=None, hf_revision=None), Model(ms_model_id='Qwen/Qwen2.5-Omni-7B', hf_model_id='Qwen/Qwen2.5-Omni-7B', model_path=None, ms_revision=None, hf_revision=None)], ignore_patterns=None, requires=None, tags=[])], template='qwen2_5_omni', get_function=<function get_model_tokenizer_qwen2_5_omni at 0x7fe20f5868e0>, model_arch=MultiModelKeys(arch_name='qwen2_5_omni', embedding=None, module_list=None, lm_head=None, q_proj=None, k_proj=None, v_proj=None, o_proj=None, attention=None, mlp=None, down_proj=None, qkv_proj=None, qk_proj=None, qa_proj=None, qb_proj=None, kv_proj=None, kva_proj=None, kvb_proj=None, language_model=['thinker.model'], aligner=['thinker.audio_tower.proj', 'thinker.visual.merger'], vision_tower=['thinker.audio_tower', 'thinker.visual'], generator=['talker', 'token2wav']), architectures=['Qwen2_5OmniModel', 'Qwen2_5OmniForConditionalGeneration'], additional_saved_files=['spk_dict.pt'], torch_dtype=None, is_multimodal=True, is_reward=False, task_type=None, ignore_patterns=[], requires=['transformers>=4.50', 'soundfile', 'qwen_omni_utils', 'decord'], tags=['vision', 'video', 'audio'])",
|
| 369 |
+
"model_dir": "/home/work_nfs23/sywang/ckpt/Qwen2.5-Omni-3B",
|
| 370 |
+
"hub": "<class 'swift.hub.hub.MSHub'>",
|
| 371 |
+
"evaluation_strategy": "steps",
|
| 372 |
+
"training_args": "Seq2SeqTrainingArguments(output_dir='/home/work_nfs23/sywang/code/asr_rl/exp/sft_chuan2/v0-20250909-174359', overwrite_output_dir=False, do_train=False, do_eval=False, do_predict=False, eval_strategy=<IntervalStrategy.NO: 'no'>, prediction_loss_only=False, per_device_train_batch_size=2, per_device_eval_batch_size=2, per_gpu_train_batch_size=None, per_gpu_eval_batch_size=None, gradient_accumulation_steps=4, eval_accumulation_steps=None, eval_delay=0, torch_empty_cache_steps=None, learning_rate=0.0001, weight_decay=0.1, adam_beta1=0.9, adam_beta2=0.95, adam_epsilon=1e-08, max_grad_norm=1.0, num_train_epochs=5.0, max_steps=-1, lr_scheduler_type=<SchedulerType.COSINE: 'cosine'>, lr_scheduler_kwargs=None, warmup_ratio=0.05, warmup_steps=0, log_level='passive', log_level_replica='warning', log_on_each_node=True, logging_dir='/home/work_nfs23/sywang/code/asr_rl/exp/sft_chuan2/v0-20250909-174359/runs', logging_strategy=<IntervalStrategy.STEPS: 'steps'>, logging_first_step=True, logging_steps=5, logging_nan_inf_filter=True, save_strategy=<SaveStrategy.STEPS: 'steps'>, save_steps=2000, save_total_limit=None, save_safetensors=True, save_on_each_node=False, save_only_model=False, restore_callback_states_from_checkpoint=False, no_cuda=False, use_cpu=False, use_mps_device=False, seed=42, data_seed=42, jit_mode_eval=False, use_ipex=False, bf16=True, fp16=False, fp16_opt_level='O1', half_precision_backend='auto', bf16_full_eval=False, fp16_full_eval=False, tf32=None, local_rank=0, ddp_backend=None, tpu_num_cores=None, tpu_metrics_debug=False, debug=[], dataloader_drop_last=False, eval_steps=2000.0, dataloader_num_workers=4, dataloader_prefetch_factor=10, past_index=-1, run_name='/home/work_nfs23/sywang/code/asr_rl/exp/sft_chuan2/v0-20250909-174359', disable_tqdm=False, remove_unused_columns=False, label_names=None, load_best_model_at_end=False, metric_for_best_model='loss', greater_is_better=False, ignore_data_skip=False, fsdp=[], fsdp_min_num_params=0, fsdp_config={'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}, fsdp_transformer_layer_cls_to_wrap=None, accelerator_config=AcceleratorConfig(split_batches=False, dispatch_batches=False, even_batches=True, use_seedable_sampler=True, non_blocking=False, gradient_accumulation_kwargs=None, use_configured_state=False), parallelism_config=None, deepspeed={'fp16': {'enabled': 'auto', 'loss_scale': 0, 'loss_scale_window': 1000, 'initial_scale_power': 16, 'hysteresis': 2, 'min_loss_scale': 1}, 'bf16': {'enabled': 'auto'}, 'zero_optimization': {'stage': 2, 'offload_optimizer': {'device': 'none', 'pin_memory': True}, 'allgather_partitions': True, 'allgather_bucket_size': 200000000.0, 'overlap_comm': False, 'reduce_scatter': True, 'reduce_bucket_size': 200000000.0, 'contiguous_gradients': True}, 'gradient_accumulation_steps': 'auto', 'gradient_clipping': 'auto', 'steps_per_print': 2000, 'train_batch_size': 'auto', 'train_micro_batch_size_per_gpu': 'auto', 'wall_clock_breakdown': False}, label_smoothing_factor=0.0, optim=<OptimizerNames.ADAMW_TORCH: 'adamw_torch'>, optim_args=None, adafactor=False, group_by_length=False, length_column_name='length', report_to=['tensorboard'], ddp_find_unused_parameters=None, ddp_bucket_cap_mb=None, ddp_broadcast_buffers=None, dataloader_pin_memory=True, dataloader_persistent_workers=False, skip_memory_metrics=True, use_legacy_prediction_loop=False, push_to_hub=False, resume_from_checkpoint=None, hub_model_id=None, hub_strategy=<HubStrategy.EVERY_SAVE: 'every_save'>, hub_token=None, hub_private_repo=None, hub_always_push=False, hub_revision=None, gradient_checkpointing=True, gradient_checkpointing_kwargs=None, include_inputs_for_metrics=False, include_for_metrics=[], eval_do_concat_batches=True, fp16_backend='auto', push_to_hub_model_id=None, push_to_hub_organization=None, push_to_hub_token=None, mp_parameters='', auto_find_batch_size=False, full_determinism=False, torchdynamo=None, ray_scope='last', ddp_timeout=18000000, torch_compile=False, torch_compile_backend=None, torch_compile_mode=None, include_tokens_per_second=None, include_num_input_tokens_seen=None, neftune_noise_alpha=None, optim_target_modules=None, batch_eval_metrics=False, eval_on_start=False, use_liger_kernel=False, liger_kernel_config=None, eval_use_gather_object=False, average_tokens_across_devices=None, sortish_sampler=False, predict_with_generate=False, generation_max_length=None, generation_num_beams=None, generation_config=None, tuner_backend='peft', vit_gradient_checkpointing=True, router_aux_loss_coef=0.0, enable_dft_loss=False, enable_channel_loss=False, check_model=True, acc_strategy='token', train_dataloader_shuffle=True, max_epochs=None, aligner_lr=None, vit_lr=None, use_logits_to_keep=None, ds3_gather_for_generation=True, resume_only_model=False, optimizer=None, loss_type=None, metric=None, eval_use_evalscope=False, eval_dataset=[], eval_dataset_args=None, eval_limit=None, eval_generation_config=None, extra_eval_args=None, use_flash_ckpt=False, sft_alpha=0, train_type='lora', local_repo_path=None, galore_config=None)"
|
| 373 |
+
}
|
Qwen2.5-Omni-3B-Chuan/chat_template.jinja
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% set audio_count = namespace(value=0) %}{% set image_count = namespace(value=0) %}{% set video_count = namespace(value=0) %}{% for message in messages %}{% if loop.first and message['role'] != 'system' %}<|im_start|>system
|
| 2 |
+
You are a helpful assistant.<|im_end|>
|
| 3 |
+
{% endif %}<|im_start|>{{ message['role'] }}
|
| 4 |
+
{% if message['content'] is string %}{{ message['content'] }}<|im_end|>
|
| 5 |
+
{% else %}{% for content in message['content'] %}{% if content['type'] == 'image' or 'image' in content or 'image_url' in content %}{% set image_count.value = image_count.value + 1 %}{% if add_vision_id %}Picture {{ image_count.value }}: {% endif %}<|vision_bos|><|IMAGE|><|vision_eos|>{% elif content['type'] == 'audio' or 'audio' in content or 'audio_url' in content %}{% set audio_count.value = audio_count.value + 1 %}{% if add_audio_id %}Audio {{ audio_count.value }}: {% endif %}<|audio_bos|><|AUDIO|><|audio_eos|>{% elif content['type'] == 'video' or 'video' in content %}{% set video_count.value = video_count.value + 1 %}{% if add_vision_id %}Video {{ video_count.value }}: {% endif %}<|vision_bos|><|VIDEO|><|vision_eos|>{% elif 'text' in content %}{{ content['text'] }}{% endif %}{% endfor %}<|im_end|>
|
| 6 |
+
{% endif %}{% endfor %}{% if add_generation_prompt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
"hidden_size": 2048,
|
| 9 |
+
"keys_to_ignore_at_inference": [
|
| 10 |
+
"past_key_values",
|
| 11 |
+
"hidden_states",
|
| 12 |
+
"attention_mask"
|
| 13 |
+
],
|
| 14 |
+
"model_type": "qwen2_5_omni",
|
| 15 |
+
"pad_token_id": 151643,
|
| 16 |
+
"talker_config": {
|
| 17 |
+
"_attn_implementation_autoset": true,
|
| 18 |
+
"_name_or_path": "Qwen2.5-Omni-3B/talker",
|
| 19 |
+
"architectures": [
|
| 20 |
+
"Qwen2OmniTalkerForConditionalGeneration"
|
| 21 |
+
],
|
| 22 |
+
"attention_dropout": 0.0,
|
| 23 |
+
"audio_end_token_id": 151648,
|
| 24 |
+
"audio_start_token_id": 151647,
|
| 25 |
+
"audio_token_index": 151646,
|
| 26 |
+
"dtype": "bfloat16",
|
| 27 |
+
"embedding_size": 2048,
|
| 28 |
+
"head_dim": 64,
|
| 29 |
+
"hidden_act": "silu",
|
| 30 |
+
"hidden_size": 896,
|
| 31 |
+
"image_token_index": 151655,
|
| 32 |
+
"init_std": 0.02,
|
| 33 |
+
"initializer_range": 0.02,
|
| 34 |
+
"intermediate_size": 4864,
|
| 35 |
+
"layer_types": [
|
| 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 |
+
"full_attention"
|
| 60 |
+
],
|
| 61 |
+
"max_position_embeddings": 32768,
|
| 62 |
+
"max_window_layers": 28,
|
| 63 |
+
"model_type": "qwen2_5_omni_talker",
|
| 64 |
+
"num_attention_heads": 14,
|
| 65 |
+
"num_hidden_layers": 24,
|
| 66 |
+
"num_key_value_heads": 2,
|
| 67 |
+
"position_id_per_seconds": 25,
|
| 68 |
+
"rms_norm_eps": 1e-06,
|
| 69 |
+
"rope_scaling": {
|
| 70 |
+
"mrope_section": [
|
| 71 |
+
16,
|
| 72 |
+
16,
|
| 73 |
+
0
|
| 74 |
+
],
|
| 75 |
+
"rope_type": "default",
|
| 76 |
+
"type": "default"
|
| 77 |
+
},
|
| 78 |
+
"rope_theta": 1000000.0,
|
| 79 |
+
"seconds_per_chunk": 2,
|
| 80 |
+
"sliding_window": null,
|
| 81 |
+
"spatial_merge_size": 2,
|
| 82 |
+
"tts_codec_end_token_id": 8294,
|
| 83 |
+
"tts_codec_mask_token_id": 8296,
|
| 84 |
+
"tts_codec_pad_token_id": 8292,
|
| 85 |
+
"tts_codec_start_token_id": 8293,
|
| 86 |
+
"tts_text_end_token_id": 151861,
|
| 87 |
+
"tts_text_pad_token_id": 151859,
|
| 88 |
+
"tts_text_start_token_id": 151860,
|
| 89 |
+
"use_cache": true,
|
| 90 |
+
"use_sliding_window": false,
|
| 91 |
+
"video_token_index": 151656,
|
| 92 |
+
"vision_end_token_id": 151653,
|
| 93 |
+
"vision_start_token_id": 151652,
|
| 94 |
+
"vocab_size": 8448
|
| 95 |
+
},
|
| 96 |
+
"thinker_config": {
|
| 97 |
+
"_attn_implementation_autoset": true,
|
| 98 |
+
"_name_or_path": "Qwen2.5-Omni-3B/thinker",
|
| 99 |
+
"architectures": [
|
| 100 |
+
"Qwen2OmniNaViTThinkerForConditionalGeneration"
|
| 101 |
+
],
|
| 102 |
+
"audio_config": {
|
| 103 |
+
"_attn_implementation_autoset": true,
|
| 104 |
+
"_name_or_path": "",
|
| 105 |
+
"activation_dropout": 0.0,
|
| 106 |
+
"activation_function": "gelu",
|
| 107 |
+
"add_cross_attention": false,
|
| 108 |
+
"architectures": null,
|
| 109 |
+
"attention_dropout": 0.0,
|
| 110 |
+
"bad_words_ids": null,
|
| 111 |
+
"begin_suppress_tokens": null,
|
| 112 |
+
"bos_token_id": null,
|
| 113 |
+
"chunk_size_feed_forward": 0,
|
| 114 |
+
"cross_attention_hidden_size": null,
|
| 115 |
+
"d_model": 1280,
|
| 116 |
+
"decoder_start_token_id": null,
|
| 117 |
+
"diversity_penalty": 0.0,
|
| 118 |
+
"do_sample": false,
|
| 119 |
+
"dropout": 0.0,
|
| 120 |
+
"dtype": "bfloat16",
|
| 121 |
+
"early_stopping": false,
|
| 122 |
+
"encoder_attention_heads": 20,
|
| 123 |
+
"encoder_ffn_dim": 5120,
|
| 124 |
+
"encoder_layerdrop": 0.0,
|
| 125 |
+
"encoder_layers": 32,
|
| 126 |
+
"encoder_no_repeat_ngram_size": 0,
|
| 127 |
+
"eos_token_id": null,
|
| 128 |
+
"exponential_decay_length_penalty": null,
|
| 129 |
+
"finetuning_task": null,
|
| 130 |
+
"forced_bos_token_id": null,
|
| 131 |
+
"forced_eos_token_id": null,
|
| 132 |
+
"id2label": {
|
| 133 |
+
"0": "LABEL_0",
|
| 134 |
+
"1": "LABEL_1"
|
| 135 |
+
},
|
| 136 |
+
"init_std": 0.02,
|
| 137 |
+
"initializer_range": 0.02,
|
| 138 |
+
"is_decoder": false,
|
| 139 |
+
"is_encoder_decoder": false,
|
| 140 |
+
"label2id": {
|
| 141 |
+
"LABEL_0": 0,
|
| 142 |
+
"LABEL_1": 1
|
| 143 |
+
},
|
| 144 |
+
"length_penalty": 1.0,
|
| 145 |
+
"max_length": 20,
|
| 146 |
+
"max_source_positions": 1500,
|
| 147 |
+
"min_length": 0,
|
| 148 |
+
"model_type": "qwen2_5_omni_audio_encoder",
|
| 149 |
+
"n_window": 100,
|
| 150 |
+
"no_repeat_ngram_size": 0,
|
| 151 |
+
"num_beam_groups": 1,
|
| 152 |
+
"num_beams": 1,
|
| 153 |
+
"num_hidden_layers": 32,
|
| 154 |
+
"num_mel_bins": 128,
|
| 155 |
+
"num_return_sequences": 1,
|
| 156 |
+
"output_attentions": false,
|
| 157 |
+
"output_dim": 2048,
|
| 158 |
+
"output_hidden_states": false,
|
| 159 |
+
"output_scores": false,
|
| 160 |
+
"pad_token_id": 151643,
|
| 161 |
+
"prefix": null,
|
| 162 |
+
"problem_type": null,
|
| 163 |
+
"pruned_heads": {},
|
| 164 |
+
"remove_invalid_values": false,
|
| 165 |
+
"repetition_penalty": 1.0,
|
| 166 |
+
"return_dict": true,
|
| 167 |
+
"return_dict_in_generate": false,
|
| 168 |
+
"scale_embedding": false,
|
| 169 |
+
"sep_token_id": null,
|
| 170 |
+
"suppress_tokens": null,
|
| 171 |
+
"task_specific_params": null,
|
| 172 |
+
"temperature": 1.0,
|
| 173 |
+
"tf_legacy_loss": false,
|
| 174 |
+
"tie_encoder_decoder": false,
|
| 175 |
+
"tie_word_embeddings": true,
|
| 176 |
+
"tokenizer_class": null,
|
| 177 |
+
"top_k": 50,
|
| 178 |
+
"top_p": 1.0,
|
| 179 |
+
"torchscript": false,
|
| 180 |
+
"typical_p": 1.0,
|
| 181 |
+
"use_bfloat16": false
|
| 182 |
+
},
|
| 183 |
+
"audio_end_token_id": 151648,
|
| 184 |
+
"audio_start_token_id": 151647,
|
| 185 |
+
"audio_token_index": 151646,
|
| 186 |
+
"bos_token_id": 151644,
|
| 187 |
+
"dtype": "bfloat16",
|
| 188 |
+
"eos_token_id": 151645,
|
| 189 |
+
"ignore_index": -100,
|
| 190 |
+
"image_token_index": 151655,
|
| 191 |
+
"init_std": 0.02,
|
| 192 |
+
"initializer_range": 0.02,
|
| 193 |
+
"model_type": "qwen2_5_omni_thinker",
|
| 194 |
+
"pad_token_id": 151643,
|
| 195 |
+
"position_id_per_seconds": 25,
|
| 196 |
+
"seconds_per_chunk": 2,
|
| 197 |
+
"text_config": {
|
| 198 |
+
"_name_or_path": "",
|
| 199 |
+
"add_cross_attention": false,
|
| 200 |
+
"architectures": null,
|
| 201 |
+
"attention_dropout": 0.0,
|
| 202 |
+
"bad_words_ids": null,
|
| 203 |
+
"begin_suppress_tokens": null,
|
| 204 |
+
"bos_token_id": null,
|
| 205 |
+
"chunk_size_feed_forward": 0,
|
| 206 |
+
"cross_attention_hidden_size": null,
|
| 207 |
+
"decoder_start_token_id": null,
|
| 208 |
+
"diversity_penalty": 0.0,
|
| 209 |
+
"do_sample": false,
|
| 210 |
+
"dtype": "bfloat16",
|
| 211 |
+
"early_stopping": false,
|
| 212 |
+
"encoder_no_repeat_ngram_size": 0,
|
| 213 |
+
"eos_token_id": null,
|
| 214 |
+
"exponential_decay_length_penalty": null,
|
| 215 |
+
"finetuning_task": null,
|
| 216 |
+
"forced_bos_token_id": null,
|
| 217 |
+
"forced_eos_token_id": null,
|
| 218 |
+
"hidden_act": "silu",
|
| 219 |
+
"hidden_size": 2048,
|
| 220 |
+
"id2label": {
|
| 221 |
+
"0": "LABEL_0",
|
| 222 |
+
"1": "LABEL_1"
|
| 223 |
+
},
|
| 224 |
+
"init_std": 0.02,
|
| 225 |
+
"initializer_range": 0.02,
|
| 226 |
+
"intermediate_size": 11008,
|
| 227 |
+
"is_decoder": false,
|
| 228 |
+
"is_encoder_decoder": false,
|
| 229 |
+
"label2id": {
|
| 230 |
+
"LABEL_0": 0,
|
| 231 |
+
"LABEL_1": 1
|
| 232 |
+
},
|
| 233 |
+
"layer_types": [
|
| 234 |
+
"full_attention",
|
| 235 |
+
"full_attention",
|
| 236 |
+
"full_attention",
|
| 237 |
+
"full_attention",
|
| 238 |
+
"full_attention",
|
| 239 |
+
"full_attention",
|
| 240 |
+
"full_attention",
|
| 241 |
+
"full_attention",
|
| 242 |
+
"full_attention",
|
| 243 |
+
"full_attention",
|
| 244 |
+
"full_attention",
|
| 245 |
+
"full_attention",
|
| 246 |
+
"full_attention",
|
| 247 |
+
"full_attention",
|
| 248 |
+
"full_attention",
|
| 249 |
+
"full_attention",
|
| 250 |
+
"full_attention",
|
| 251 |
+
"full_attention",
|
| 252 |
+
"full_attention",
|
| 253 |
+
"full_attention",
|
| 254 |
+
"full_attention",
|
| 255 |
+
"full_attention",
|
| 256 |
+
"full_attention",
|
| 257 |
+
"full_attention",
|
| 258 |
+
"full_attention",
|
| 259 |
+
"full_attention",
|
| 260 |
+
"full_attention",
|
| 261 |
+
"full_attention",
|
| 262 |
+
"full_attention",
|
| 263 |
+
"full_attention",
|
| 264 |
+
"full_attention",
|
| 265 |
+
"full_attention",
|
| 266 |
+
"full_attention",
|
| 267 |
+
"full_attention",
|
| 268 |
+
"full_attention",
|
| 269 |
+
"full_attention"
|
| 270 |
+
],
|
| 271 |
+
"length_penalty": 1.0,
|
| 272 |
+
"max_length": 20,
|
| 273 |
+
"max_position_embeddings": 32768,
|
| 274 |
+
"max_window_layers": 70,
|
| 275 |
+
"min_length": 0,
|
| 276 |
+
"model_type": "qwen2_5_omni_text",
|
| 277 |
+
"no_repeat_ngram_size": 0,
|
| 278 |
+
"num_attention_heads": 16,
|
| 279 |
+
"num_beam_groups": 1,
|
| 280 |
+
"num_beams": 1,
|
| 281 |
+
"num_hidden_layers": 36,
|
| 282 |
+
"num_key_value_heads": 2,
|
| 283 |
+
"num_return_sequences": 1,
|
| 284 |
+
"output_attentions": false,
|
| 285 |
+
"output_hidden_states": false,
|
| 286 |
+
"output_scores": false,
|
| 287 |
+
"pad_token_id": 151643,
|
| 288 |
+
"prefix": null,
|
| 289 |
+
"problem_type": null,
|
| 290 |
+
"pruned_heads": {},
|
| 291 |
+
"remove_invalid_values": false,
|
| 292 |
+
"repetition_penalty": 1.0,
|
| 293 |
+
"return_dict": true,
|
| 294 |
+
"return_dict_in_generate": false,
|
| 295 |
+
"rms_norm_eps": 1e-06,
|
| 296 |
+
"rope_scaling": {
|
| 297 |
+
"mrope_section": [
|
| 298 |
+
16,
|
| 299 |
+
24,
|
| 300 |
+
24
|
| 301 |
+
],
|
| 302 |
+
"rope_type": "default",
|
| 303 |
+
"type": "default"
|
| 304 |
+
},
|
| 305 |
+
"rope_theta": 1000000.0,
|
| 306 |
+
"sep_token_id": null,
|
| 307 |
+
"sliding_window": null,
|
| 308 |
+
"suppress_tokens": null,
|
| 309 |
+
"task_specific_params": null,
|
| 310 |
+
"temperature": 1.0,
|
| 311 |
+
"tf_legacy_loss": false,
|
| 312 |
+
"tie_encoder_decoder": false,
|
| 313 |
+
"tie_word_embeddings": false,
|
| 314 |
+
"tokenizer_class": null,
|
| 315 |
+
"top_k": 50,
|
| 316 |
+
"top_p": 1.0,
|
| 317 |
+
"torchscript": false,
|
| 318 |
+
"typical_p": 1.0,
|
| 319 |
+
"use_bfloat16": false,
|
| 320 |
+
"use_cache": true,
|
| 321 |
+
"use_sliding_window": false,
|
| 322 |
+
"vocab_size": 151936
|
| 323 |
+
},
|
| 324 |
+
"user_token_id": 872,
|
| 325 |
+
"video_token_index": 151656,
|
| 326 |
+
"vision_config": {
|
| 327 |
+
"_attn_implementation_autoset": true,
|
| 328 |
+
"_name_or_path": "",
|
| 329 |
+
"add_cross_attention": false,
|
| 330 |
+
"architectures": null,
|
| 331 |
+
"bad_words_ids": null,
|
| 332 |
+
"begin_suppress_tokens": null,
|
| 333 |
+
"bos_token_id": null,
|
| 334 |
+
"chunk_size_feed_forward": 0,
|
| 335 |
+
"cross_attention_hidden_size": null,
|
| 336 |
+
"decoder_start_token_id": null,
|
| 337 |
+
"depth": 32,
|
| 338 |
+
"diversity_penalty": 0.0,
|
| 339 |
+
"do_sample": false,
|
| 340 |
+
"dtype": "bfloat16",
|
| 341 |
+
"early_stopping": false,
|
| 342 |
+
"embed_dim": 1280,
|
| 343 |
+
"encoder_no_repeat_ngram_size": 0,
|
| 344 |
+
"eos_token_id": null,
|
| 345 |
+
"exponential_decay_length_penalty": null,
|
| 346 |
+
"finetuning_task": null,
|
| 347 |
+
"forced_bos_token_id": null,
|
| 348 |
+
"forced_eos_token_id": null,
|
| 349 |
+
"fullatt_block_indexes": [
|
| 350 |
+
7,
|
| 351 |
+
15,
|
| 352 |
+
23,
|
| 353 |
+
31
|
| 354 |
+
],
|
| 355 |
+
"hidden_act": "silu",
|
| 356 |
+
"hidden_size": 1280,
|
| 357 |
+
"id2label": {
|
| 358 |
+
"0": "LABEL_0",
|
| 359 |
+
"1": "LABEL_1"
|
| 360 |
+
},
|
| 361 |
+
"in_channels": 3,
|
| 362 |
+
"in_chans": 3,
|
| 363 |
+
"init_std": 0.02,
|
| 364 |
+
"initializer_range": 0.02,
|
| 365 |
+
"intermediate_size": 3420,
|
| 366 |
+
"is_decoder": false,
|
| 367 |
+
"is_encoder_decoder": false,
|
| 368 |
+
"label2id": {
|
| 369 |
+
"LABEL_0": 0,
|
| 370 |
+
"LABEL_1": 1
|
| 371 |
+
},
|
| 372 |
+
"length_penalty": 1.0,
|
| 373 |
+
"max_length": 20,
|
| 374 |
+
"min_length": 0,
|
| 375 |
+
"model_type": "qwen2_5_omni_vision_encoder",
|
| 376 |
+
"no_repeat_ngram_size": 0,
|
| 377 |
+
"num_beam_groups": 1,
|
| 378 |
+
"num_beams": 1,
|
| 379 |
+
"num_heads": 16,
|
| 380 |
+
"num_return_sequences": 1,
|
| 381 |
+
"out_hidden_size": 2048,
|
| 382 |
+
"output_attentions": false,
|
| 383 |
+
"output_hidden_states": false,
|
| 384 |
+
"output_scores": false,
|
| 385 |
+
"pad_token_id": 151643,
|
| 386 |
+
"patch_size": 14,
|
| 387 |
+
"prefix": null,
|
| 388 |
+
"problem_type": null,
|
| 389 |
+
"pruned_heads": {},
|
| 390 |
+
"remove_invalid_values": false,
|
| 391 |
+
"repetition_penalty": 1.0,
|
| 392 |
+
"return_dict": true,
|
| 393 |
+
"return_dict_in_generate": false,
|
| 394 |
+
"sep_token_id": null,
|
| 395 |
+
"spatial_merge_size": 2,
|
| 396 |
+
"spatial_patch_size": 14,
|
| 397 |
+
"suppress_tokens": null,
|
| 398 |
+
"task_specific_params": null,
|
| 399 |
+
"temperature": 1.0,
|
| 400 |
+
"temporal_patch_size": 2,
|
| 401 |
+
"tf_legacy_loss": false,
|
| 402 |
+
"tie_encoder_decoder": false,
|
| 403 |
+
"tie_word_embeddings": true,
|
| 404 |
+
"tokenizer_class": null,
|
| 405 |
+
"tokens_per_second": 25,
|
| 406 |
+
"top_k": 50,
|
| 407 |
+
"top_p": 1.0,
|
| 408 |
+
"torchscript": false,
|
| 409 |
+
"typical_p": 1.0,
|
| 410 |
+
"use_bfloat16": false,
|
| 411 |
+
"window_size": 112
|
| 412 |
+
},
|
| 413 |
+
"vision_end_token_id": 151653,
|
| 414 |
+
"vision_start_token_id": 151652,
|
| 415 |
+
"vision_token_id": 151654
|
| 416 |
+
},
|
| 417 |
+
"token2wav_config": {
|
| 418 |
+
"_attn_implementation_autoset": true,
|
| 419 |
+
"bigvgan_config": {
|
| 420 |
+
"_attn_implementation_autoset": true,
|
| 421 |
+
"_name_or_path": "",
|
| 422 |
+
"add_cross_attention": false,
|
| 423 |
+
"architectures": null,
|
| 424 |
+
"bad_words_ids": null,
|
| 425 |
+
"begin_suppress_tokens": null,
|
| 426 |
+
"bos_token_id": null,
|
| 427 |
+
"chunk_size_feed_forward": 0,
|
| 428 |
+
"cross_attention_hidden_size": null,
|
| 429 |
+
"decoder_start_token_id": null,
|
| 430 |
+
"diversity_penalty": 0.0,
|
| 431 |
+
"do_sample": false,
|
| 432 |
+
"dtype": null,
|
| 433 |
+
"early_stopping": false,
|
| 434 |
+
"encoder_no_repeat_ngram_size": 0,
|
| 435 |
+
"eos_token_id": null,
|
| 436 |
+
"exponential_decay_length_penalty": null,
|
| 437 |
+
"finetuning_task": null,
|
| 438 |
+
"forced_bos_token_id": null,
|
| 439 |
+
"forced_eos_token_id": null,
|
| 440 |
+
"id2label": {
|
| 441 |
+
"0": "LABEL_0",
|
| 442 |
+
"1": "LABEL_1"
|
| 443 |
+
},
|
| 444 |
+
"is_decoder": false,
|
| 445 |
+
"is_encoder_decoder": false,
|
| 446 |
+
"label2id": {
|
| 447 |
+
"LABEL_0": 0,
|
| 448 |
+
"LABEL_1": 1
|
| 449 |
+
},
|
| 450 |
+
"length_penalty": 1.0,
|
| 451 |
+
"max_length": 20,
|
| 452 |
+
"mel_dim": 80,
|
| 453 |
+
"min_length": 0,
|
| 454 |
+
"model_type": "qwen2_5_omni_bigvgan",
|
| 455 |
+
"no_repeat_ngram_size": 0,
|
| 456 |
+
"num_beam_groups": 1,
|
| 457 |
+
"num_beams": 1,
|
| 458 |
+
"num_return_sequences": 1,
|
| 459 |
+
"output_attentions": false,
|
| 460 |
+
"output_hidden_states": false,
|
| 461 |
+
"output_scores": false,
|
| 462 |
+
"pad_token_id": 151643,
|
| 463 |
+
"prefix": null,
|
| 464 |
+
"problem_type": null,
|
| 465 |
+
"pruned_heads": {},
|
| 466 |
+
"remove_invalid_values": false,
|
| 467 |
+
"repetition_penalty": 1.0,
|
| 468 |
+
"resblock_dilation_sizes": [
|
| 469 |
+
[
|
| 470 |
+
1,
|
| 471 |
+
3,
|
| 472 |
+
5
|
| 473 |
+
],
|
| 474 |
+
[
|
| 475 |
+
1,
|
| 476 |
+
3,
|
| 477 |
+
5
|
| 478 |
+
],
|
| 479 |
+
[
|
| 480 |
+
1,
|
| 481 |
+
3,
|
| 482 |
+
5
|
| 483 |
+
]
|
| 484 |
+
],
|
| 485 |
+
"resblock_kernel_sizes": [
|
| 486 |
+
3,
|
| 487 |
+
7,
|
| 488 |
+
11
|
| 489 |
+
],
|
| 490 |
+
"return_dict": true,
|
| 491 |
+
"return_dict_in_generate": false,
|
| 492 |
+
"sep_token_id": null,
|
| 493 |
+
"suppress_tokens": null,
|
| 494 |
+
"task_specific_params": null,
|
| 495 |
+
"temperature": 1.0,
|
| 496 |
+
"tf_legacy_loss": false,
|
| 497 |
+
"tie_encoder_decoder": false,
|
| 498 |
+
"tie_word_embeddings": true,
|
| 499 |
+
"tokenizer_class": null,
|
| 500 |
+
"top_k": 50,
|
| 501 |
+
"top_p": 1.0,
|
| 502 |
+
"torchscript": false,
|
| 503 |
+
"typical_p": 1.0,
|
| 504 |
+
"upsample_initial_channel": 1536,
|
| 505 |
+
"upsample_kernel_sizes": [
|
| 506 |
+
11,
|
| 507 |
+
7,
|
| 508 |
+
4,
|
| 509 |
+
4,
|
| 510 |
+
4,
|
| 511 |
+
4
|
| 512 |
+
],
|
| 513 |
+
"upsample_rates": [
|
| 514 |
+
5,
|
| 515 |
+
3,
|
| 516 |
+
2,
|
| 517 |
+
2,
|
| 518 |
+
2,
|
| 519 |
+
2
|
| 520 |
+
],
|
| 521 |
+
"use_bfloat16": false,
|
| 522 |
+
"use_bias_at_final": false
|
| 523 |
+
},
|
| 524 |
+
"dit_config": {
|
| 525 |
+
"_attn_implementation_autoset": true,
|
| 526 |
+
"_name_or_path": "",
|
| 527 |
+
"add_cross_attention": false,
|
| 528 |
+
"architectures": null,
|
| 529 |
+
"bad_words_ids": null,
|
| 530 |
+
"begin_suppress_tokens": null,
|
| 531 |
+
"block_size": 24,
|
| 532 |
+
"bos_token_id": null,
|
| 533 |
+
"chunk_size_feed_forward": 0,
|
| 534 |
+
"cross_attention_hidden_size": null,
|
| 535 |
+
"decoder_start_token_id": null,
|
| 536 |
+
"depth": 22,
|
| 537 |
+
"dim": 1024,
|
| 538 |
+
"diversity_penalty": 0.0,
|
| 539 |
+
"do_sample": false,
|
| 540 |
+
"dropout": 0.1,
|
| 541 |
+
"dtype": "float32",
|
| 542 |
+
"early_stopping": false,
|
| 543 |
+
"emb_dim": 512,
|
| 544 |
+
"enc_attention_channels": 64,
|
| 545 |
+
"enc_channels": [
|
| 546 |
+
256,
|
| 547 |
+
256,
|
| 548 |
+
256,
|
| 549 |
+
256,
|
| 550 |
+
768
|
| 551 |
+
],
|
| 552 |
+
"enc_dilations": [
|
| 553 |
+
1,
|
| 554 |
+
2,
|
| 555 |
+
3,
|
| 556 |
+
4,
|
| 557 |
+
1
|
| 558 |
+
],
|
| 559 |
+
"enc_dim": 128,
|
| 560 |
+
"enc_emb_dim": 192,
|
| 561 |
+
"enc_global_context": true,
|
| 562 |
+
"enc_kernel_sizes": [
|
| 563 |
+
5,
|
| 564 |
+
3,
|
| 565 |
+
3,
|
| 566 |
+
3,
|
| 567 |
+
1
|
| 568 |
+
],
|
| 569 |
+
"enc_lin_neurons": 192,
|
| 570 |
+
"enc_res2net_scale": 2,
|
| 571 |
+
"enc_se_channels": 64,
|
| 572 |
+
"encoder_no_repeat_ngram_size": 0,
|
| 573 |
+
"eos_token_id": null,
|
| 574 |
+
"exponential_decay_length_penalty": null,
|
| 575 |
+
"ff_mult": 2,
|
| 576 |
+
"finetuning_task": null,
|
| 577 |
+
"forced_bos_token_id": null,
|
| 578 |
+
"forced_eos_token_id": null,
|
| 579 |
+
"head_dim": 64,
|
| 580 |
+
"heads": 16,
|
| 581 |
+
"hidden_size": 1024,
|
| 582 |
+
"id2label": {
|
| 583 |
+
"0": "LABEL_0",
|
| 584 |
+
"1": "LABEL_1"
|
| 585 |
+
},
|
| 586 |
+
"is_decoder": false,
|
| 587 |
+
"is_encoder_decoder": false,
|
| 588 |
+
"label2id": {
|
| 589 |
+
"LABEL_0": 0,
|
| 590 |
+
"LABEL_1": 1
|
| 591 |
+
},
|
| 592 |
+
"length_penalty": 1.0,
|
| 593 |
+
"look_ahead_layers": [
|
| 594 |
+
10
|
| 595 |
+
],
|
| 596 |
+
"look_backward_layers": [
|
| 597 |
+
0,
|
| 598 |
+
20
|
| 599 |
+
],
|
| 600 |
+
"max_length": 20,
|
| 601 |
+
"max_position_embeddings": 32768,
|
| 602 |
+
"mel_dim": 80,
|
| 603 |
+
"min_length": 0,
|
| 604 |
+
"model_type": "qwen2_5_omni_dit",
|
| 605 |
+
"no_repeat_ngram_size": 0,
|
| 606 |
+
"num_attention_heads": 16,
|
| 607 |
+
"num_beam_groups": 1,
|
| 608 |
+
"num_beams": 1,
|
| 609 |
+
"num_embeds": 8193,
|
| 610 |
+
"num_hidden_layers": 22,
|
| 611 |
+
"num_return_sequences": 1,
|
| 612 |
+
"output_attentions": false,
|
| 613 |
+
"output_hidden_states": false,
|
| 614 |
+
"output_scores": false,
|
| 615 |
+
"pad_token_id": 151643,
|
| 616 |
+
"prefix": null,
|
| 617 |
+
"problem_type": null,
|
| 618 |
+
"pruned_heads": {},
|
| 619 |
+
"remove_invalid_values": false,
|
| 620 |
+
"repeats": 2,
|
| 621 |
+
"repetition_penalty": 1.0,
|
| 622 |
+
"return_dict": true,
|
| 623 |
+
"return_dict_in_generate": false,
|
| 624 |
+
"rope_theta": 10000.0,
|
| 625 |
+
"sep_token_id": null,
|
| 626 |
+
"suppress_tokens": null,
|
| 627 |
+
"task_specific_params": null,
|
| 628 |
+
"temperature": 1.0,
|
| 629 |
+
"tf_legacy_loss": false,
|
| 630 |
+
"tie_encoder_decoder": false,
|
| 631 |
+
"tie_word_embeddings": true,
|
| 632 |
+
"tokenizer_class": null,
|
| 633 |
+
"top_k": 50,
|
| 634 |
+
"top_p": 1.0,
|
| 635 |
+
"torchscript": false,
|
| 636 |
+
"typical_p": 1.0,
|
| 637 |
+
"use_bfloat16": false
|
| 638 |
+
},
|
| 639 |
+
"dtype": "bfloat16",
|
| 640 |
+
"model_type": "qwen2_5_omni_token2wav",
|
| 641 |
+
"pad_token_id": 151643
|
| 642 |
+
},
|
| 643 |
+
"transformers_version": "4.56.0"
|
| 644 |
+
}
|
Qwen2.5-Omni-3B-Chuan/generation_config.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"eos_token_id": [
|
| 4 |
+
151643,
|
| 5 |
+
151645
|
| 6 |
+
],
|
| 7 |
+
"transformers_version": "4.56.0"
|
| 8 |
+
}
|
Qwen2.5-Omni-3B-Chuan/merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
Qwen2.5-Omni-3B-Chuan/model-00001-of-00003.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ee5ce647e0d4852a38d4a76408898e54374f9397c2dcefa7314537a55c1e6b21
|
| 3 |
+
size 1570766848
|
Qwen2.5-Omni-3B-Chuan/model-00002-of-00003.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:694f5ce71776f6caf0a94ace088cd7eeafd3c1a30e029c6e1c7a70f8221df4ba
|
| 3 |
+
size 1573912576
|
Qwen2.5-Omni-3B-Chuan/model-00003-of-00003.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:aedb25618881ce9466eefb9872e19e81f30d281dd2b139b8c8111ae7a9025e7b
|
| 3 |
+
size 1582039040
|
Qwen2.5-Omni-3B-Chuan/model.safetensors.index.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
Qwen2.5-Omni-3B-Chuan/preprocessor_config.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"chunk_length": 300,
|
| 3 |
+
"dither": 0.0,
|
| 4 |
+
"feature_extractor_type": "WhisperFeatureExtractor",
|
| 5 |
+
"feature_size": 128,
|
| 6 |
+
"hop_length": 160,
|
| 7 |
+
"image_mean": [
|
| 8 |
+
0.48145466,
|
| 9 |
+
0.4578275,
|
| 10 |
+
0.40821073
|
| 11 |
+
],
|
| 12 |
+
"image_processor_type": "Qwen2VLImageProcessor",
|
| 13 |
+
"image_std": [
|
| 14 |
+
0.26862954,
|
| 15 |
+
0.26130258,
|
| 16 |
+
0.27577711
|
| 17 |
+
],
|
| 18 |
+
"max_pixels": 12845056,
|
| 19 |
+
"merge_size": 2,
|
| 20 |
+
"min_pixels": 3136,
|
| 21 |
+
"n_fft": 400,
|
| 22 |
+
"n_samples": 4800000,
|
| 23 |
+
"nb_max_frames": 30000,
|
| 24 |
+
"padding_side": "right",
|
| 25 |
+
"padding_value": 0.0,
|
| 26 |
+
"patch_size": 14,
|
| 27 |
+
"processor_class": "Qwen2_5OmniProcessor",
|
| 28 |
+
"return_attention_mask": true,
|
| 29 |
+
"sampling_rate": 16000,
|
| 30 |
+
"temporal_patch_size": 2
|
| 31 |
+
}
|
Qwen2.5-Omni-3B-Chuan/special_tokens_map.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"additional_special_tokens": [
|
| 3 |
+
"<|im_start|>",
|
| 4 |
+
"<|im_end|>",
|
| 5 |
+
"<|AUDIO|>",
|
| 6 |
+
"<|audio_bos|>",
|
| 7 |
+
"<|audio_eos|>",
|
| 8 |
+
"<|box_end|>",
|
| 9 |
+
"<|quad_start|>",
|
| 10 |
+
"<|quad_end|>",
|
| 11 |
+
"<|vision_bos|>",
|
| 12 |
+
"<|vision_eos|>",
|
| 13 |
+
"<|vision_pad|>",
|
| 14 |
+
"<|IMAGE|>",
|
| 15 |
+
"<|VIDEO|>"
|
| 16 |
+
],
|
| 17 |
+
"audio_bos_token": "<|audio_bos|>",
|
| 18 |
+
"audio_eos_token": "<|audio_eos|>",
|
| 19 |
+
"audio_token": "<|AUDIO|>",
|
| 20 |
+
"eos_token": {
|
| 21 |
+
"content": "<|im_end|>",
|
| 22 |
+
"lstrip": false,
|
| 23 |
+
"normalized": false,
|
| 24 |
+
"rstrip": false,
|
| 25 |
+
"single_word": false
|
| 26 |
+
},
|
| 27 |
+
"image_token": "<|IMAGE|>",
|
| 28 |
+
"pad_token": {
|
| 29 |
+
"content": "<|endoftext|>",
|
| 30 |
+
"lstrip": false,
|
| 31 |
+
"normalized": false,
|
| 32 |
+
"rstrip": false,
|
| 33 |
+
"single_word": false
|
| 34 |
+
},
|
| 35 |
+
"video_token": "<|VIDEO|>",
|
| 36 |
+
"vision_bos_token": "<|vision_bos|>",
|
| 37 |
+
"vision_eos_token": "<|vision_eos|>"
|
| 38 |
+
}
|
Qwen2.5-Omni-3B-Chuan/spk_dict.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6a05609b28f5d42b7b748f0f07592545c8f1f6885b9ae8fff64baf56e86b2a18
|
| 3 |
+
size 259544
|
Qwen2.5-Omni-3B-Chuan/tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8441917e39ae0244e06d704b95b3124795cec478e297f9afac39ba670d7e9d99
|
| 3 |
+
size 11421870
|
Qwen2.5-Omni-3B-Chuan/tokenizer_config.json
ADDED
|
@@ -0,0 +1,222 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"added_tokens_decoder": {
|
| 4 |
+
"151643": {
|
| 5 |
+
"content": "<|endoftext|>",
|
| 6 |
+
"lstrip": false,
|
| 7 |
+
"normalized": false,
|
| 8 |
+
"rstrip": false,
|
| 9 |
+
"single_word": false,
|
| 10 |
+
"special": true
|
| 11 |
+
},
|
| 12 |
+
"151644": {
|
| 13 |
+
"content": "<|im_start|>",
|
| 14 |
+
"lstrip": false,
|
| 15 |
+
"normalized": false,
|
| 16 |
+
"rstrip": false,
|
| 17 |
+
"single_word": false,
|
| 18 |
+
"special": true
|
| 19 |
+
},
|
| 20 |
+
"151645": {
|
| 21 |
+
"content": "<|im_end|>",
|
| 22 |
+
"lstrip": false,
|
| 23 |
+
"normalized": false,
|
| 24 |
+
"rstrip": false,
|
| 25 |
+
"single_word": false,
|
| 26 |
+
"special": true
|
| 27 |
+
},
|
| 28 |
+
"151646": {
|
| 29 |
+
"content": "<|AUDIO|>",
|
| 30 |
+
"lstrip": false,
|
| 31 |
+
"normalized": false,
|
| 32 |
+
"rstrip": false,
|
| 33 |
+
"single_word": false,
|
| 34 |
+
"special": true
|
| 35 |
+
},
|
| 36 |
+
"151647": {
|
| 37 |
+
"content": "<|audio_bos|>",
|
| 38 |
+
"lstrip": false,
|
| 39 |
+
"normalized": false,
|
| 40 |
+
"rstrip": false,
|
| 41 |
+
"single_word": false,
|
| 42 |
+
"special": true
|
| 43 |
+
},
|
| 44 |
+
"151648": {
|
| 45 |
+
"content": "<|audio_eos|>",
|
| 46 |
+
"lstrip": false,
|
| 47 |
+
"normalized": false,
|
| 48 |
+
"rstrip": false,
|
| 49 |
+
"single_word": false,
|
| 50 |
+
"special": true
|
| 51 |
+
},
|
| 52 |
+
"151649": {
|
| 53 |
+
"content": "<|box_end|>",
|
| 54 |
+
"lstrip": false,
|
| 55 |
+
"normalized": false,
|
| 56 |
+
"rstrip": false,
|
| 57 |
+
"single_word": false,
|
| 58 |
+
"special": true
|
| 59 |
+
},
|
| 60 |
+
"151650": {
|
| 61 |
+
"content": "<|quad_start|>",
|
| 62 |
+
"lstrip": false,
|
| 63 |
+
"normalized": false,
|
| 64 |
+
"rstrip": false,
|
| 65 |
+
"single_word": false,
|
| 66 |
+
"special": true
|
| 67 |
+
},
|
| 68 |
+
"151651": {
|
| 69 |
+
"content": "<|quad_end|>",
|
| 70 |
+
"lstrip": false,
|
| 71 |
+
"normalized": false,
|
| 72 |
+
"rstrip": false,
|
| 73 |
+
"single_word": false,
|
| 74 |
+
"special": true
|
| 75 |
+
},
|
| 76 |
+
"151652": {
|
| 77 |
+
"content": "<|vision_bos|>",
|
| 78 |
+
"lstrip": false,
|
| 79 |
+
"normalized": false,
|
| 80 |
+
"rstrip": false,
|
| 81 |
+
"single_word": false,
|
| 82 |
+
"special": true
|
| 83 |
+
},
|
| 84 |
+
"151653": {
|
| 85 |
+
"content": "<|vision_eos|>",
|
| 86 |
+
"lstrip": false,
|
| 87 |
+
"normalized": false,
|
| 88 |
+
"rstrip": false,
|
| 89 |
+
"single_word": false,
|
| 90 |
+
"special": true
|
| 91 |
+
},
|
| 92 |
+
"151654": {
|
| 93 |
+
"content": "<|vision_pad|>",
|
| 94 |
+
"lstrip": false,
|
| 95 |
+
"normalized": false,
|
| 96 |
+
"rstrip": false,
|
| 97 |
+
"single_word": false,
|
| 98 |
+
"special": true
|
| 99 |
+
},
|
| 100 |
+
"151655": {
|
| 101 |
+
"content": "<|IMAGE|>",
|
| 102 |
+
"lstrip": false,
|
| 103 |
+
"normalized": false,
|
| 104 |
+
"rstrip": false,
|
| 105 |
+
"single_word": false,
|
| 106 |
+
"special": true
|
| 107 |
+
},
|
| 108 |
+
"151656": {
|
| 109 |
+
"content": "<|VIDEO|>",
|
| 110 |
+
"lstrip": false,
|
| 111 |
+
"normalized": false,
|
| 112 |
+
"rstrip": false,
|
| 113 |
+
"single_word": false,
|
| 114 |
+
"special": true
|
| 115 |
+
},
|
| 116 |
+
"151657": {
|
| 117 |
+
"content": "<tool_call>",
|
| 118 |
+
"lstrip": false,
|
| 119 |
+
"normalized": false,
|
| 120 |
+
"rstrip": false,
|
| 121 |
+
"single_word": false,
|
| 122 |
+
"special": false
|
| 123 |
+
},
|
| 124 |
+
"151658": {
|
| 125 |
+
"content": "</tool_call>",
|
| 126 |
+
"lstrip": false,
|
| 127 |
+
"normalized": false,
|
| 128 |
+
"rstrip": false,
|
| 129 |
+
"single_word": false,
|
| 130 |
+
"special": false
|
| 131 |
+
},
|
| 132 |
+
"151659": {
|
| 133 |
+
"content": "<|fim_prefix|>",
|
| 134 |
+
"lstrip": false,
|
| 135 |
+
"normalized": false,
|
| 136 |
+
"rstrip": false,
|
| 137 |
+
"single_word": false,
|
| 138 |
+
"special": false
|
| 139 |
+
},
|
| 140 |
+
"151660": {
|
| 141 |
+
"content": "<|fim_middle|>",
|
| 142 |
+
"lstrip": false,
|
| 143 |
+
"normalized": false,
|
| 144 |
+
"rstrip": false,
|
| 145 |
+
"single_word": false,
|
| 146 |
+
"special": false
|
| 147 |
+
},
|
| 148 |
+
"151661": {
|
| 149 |
+
"content": "<|fim_suffix|>",
|
| 150 |
+
"lstrip": false,
|
| 151 |
+
"normalized": false,
|
| 152 |
+
"rstrip": false,
|
| 153 |
+
"single_word": false,
|
| 154 |
+
"special": false
|
| 155 |
+
},
|
| 156 |
+
"151662": {
|
| 157 |
+
"content": "<|fim_pad|>",
|
| 158 |
+
"lstrip": false,
|
| 159 |
+
"normalized": false,
|
| 160 |
+
"rstrip": false,
|
| 161 |
+
"single_word": false,
|
| 162 |
+
"special": false
|
| 163 |
+
},
|
| 164 |
+
"151663": {
|
| 165 |
+
"content": "<|repo_name|>",
|
| 166 |
+
"lstrip": false,
|
| 167 |
+
"normalized": false,
|
| 168 |
+
"rstrip": false,
|
| 169 |
+
"single_word": false,
|
| 170 |
+
"special": false
|
| 171 |
+
},
|
| 172 |
+
"151664": {
|
| 173 |
+
"content": "<|file_sep|>",
|
| 174 |
+
"lstrip": false,
|
| 175 |
+
"normalized": false,
|
| 176 |
+
"rstrip": false,
|
| 177 |
+
"single_word": false,
|
| 178 |
+
"special": false
|
| 179 |
+
}
|
| 180 |
+
},
|
| 181 |
+
"additional_special_tokens": [
|
| 182 |
+
"<|im_start|>",
|
| 183 |
+
"<|im_end|>",
|
| 184 |
+
"<|AUDIO|>",
|
| 185 |
+
"<|audio_bos|>",
|
| 186 |
+
"<|audio_eos|>",
|
| 187 |
+
"<|box_end|>",
|
| 188 |
+
"<|quad_start|>",
|
| 189 |
+
"<|quad_end|>",
|
| 190 |
+
"<|vision_bos|>",
|
| 191 |
+
"<|vision_eos|>",
|
| 192 |
+
"<|vision_pad|>",
|
| 193 |
+
"<|IMAGE|>",
|
| 194 |
+
"<|VIDEO|>"
|
| 195 |
+
],
|
| 196 |
+
"audio_bos_token": "<|audio_bos|>",
|
| 197 |
+
"audio_eos_token": "<|audio_eos|>",
|
| 198 |
+
"audio_token": "<|AUDIO|>",
|
| 199 |
+
"bos_token": null,
|
| 200 |
+
"clean_up_tokenization_spaces": false,
|
| 201 |
+
"eos_token": "<|im_end|>",
|
| 202 |
+
"errors": "replace",
|
| 203 |
+
"extra_special_tokens": {
|
| 204 |
+
"audio_bos_token": "<|audio_bos|>",
|
| 205 |
+
"audio_eos_token": "<|audio_eos|>",
|
| 206 |
+
"audio_token": "<|AUDIO|>",
|
| 207 |
+
"image_token": "<|IMAGE|>",
|
| 208 |
+
"video_token": "<|VIDEO|>",
|
| 209 |
+
"vision_bos_token": "<|vision_bos|>",
|
| 210 |
+
"vision_eos_token": "<|vision_eos|>"
|
| 211 |
+
},
|
| 212 |
+
"image_token": "<|IMAGE|>",
|
| 213 |
+
"model_max_length": 32768,
|
| 214 |
+
"pad_token": "<|endoftext|>",
|
| 215 |
+
"processor_class": "Qwen2_5OmniProcessor",
|
| 216 |
+
"split_special_tokens": false,
|
| 217 |
+
"tokenizer_class": "Qwen2Tokenizer",
|
| 218 |
+
"unk_token": null,
|
| 219 |
+
"video_token": "<|VIDEO|>",
|
| 220 |
+
"vision_bos_token": "<|vision_bos|>",
|
| 221 |
+
"vision_eos_token": "<|vision_eos|>"
|
| 222 |
+
}
|
Qwen2.5-Omni-3B-Chuan/video_preprocessor_config.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"chunk_length": 300,
|
| 3 |
+
"crop_size": null,
|
| 4 |
+
"data_format": "channels_first",
|
| 5 |
+
"default_to_square": true,
|
| 6 |
+
"device": null,
|
| 7 |
+
"dither": 0.0,
|
| 8 |
+
"do_center_crop": null,
|
| 9 |
+
"do_convert_rgb": true,
|
| 10 |
+
"do_normalize": true,
|
| 11 |
+
"do_pad": null,
|
| 12 |
+
"do_rescale": true,
|
| 13 |
+
"do_resize": true,
|
| 14 |
+
"do_sample_frames": false,
|
| 15 |
+
"feature_extractor_type": "WhisperFeatureExtractor",
|
| 16 |
+
"feature_size": 128,
|
| 17 |
+
"fps": null,
|
| 18 |
+
"hop_length": 160,
|
| 19 |
+
"image_mean": [
|
| 20 |
+
0.48145466,
|
| 21 |
+
0.4578275,
|
| 22 |
+
0.40821073
|
| 23 |
+
],
|
| 24 |
+
"image_std": [
|
| 25 |
+
0.26862954,
|
| 26 |
+
0.26130258,
|
| 27 |
+
0.27577711
|
| 28 |
+
],
|
| 29 |
+
"input_data_format": null,
|
| 30 |
+
"max_frames": 768,
|
| 31 |
+
"max_pixels": 12845056,
|
| 32 |
+
"merge_size": 2,
|
| 33 |
+
"min_frames": 4,
|
| 34 |
+
"min_pixels": 3136,
|
| 35 |
+
"n_fft": 400,
|
| 36 |
+
"n_samples": 4800000,
|
| 37 |
+
"nb_max_frames": 30000,
|
| 38 |
+
"num_frames": null,
|
| 39 |
+
"padding_side": "right",
|
| 40 |
+
"padding_value": 0.0,
|
| 41 |
+
"patch_size": 14,
|
| 42 |
+
"processor_class": "Qwen2_5OmniProcessor",
|
| 43 |
+
"resample": 3,
|
| 44 |
+
"rescale_factor": 0.00392156862745098,
|
| 45 |
+
"return_attention_mask": true,
|
| 46 |
+
"return_metadata": false,
|
| 47 |
+
"sampling_rate": 16000,
|
| 48 |
+
"size": {
|
| 49 |
+
"longest_edge": 12845056,
|
| 50 |
+
"shortest_edge": 3136
|
| 51 |
+
},
|
| 52 |
+
"size_divisor": null,
|
| 53 |
+
"temporal_patch_size": 2,
|
| 54 |
+
"video_metadata": null,
|
| 55 |
+
"video_processor_type": "Qwen2VLVideoProcessor"
|
| 56 |
+
}
|
Qwen2.5-Omni-3B-Chuan/vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
README.md
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language: zh
|
| 3 |
+
license: apache-2.0
|
| 4 |
+
tags:
|
| 5 |
+
- automatic-speech-recognition
|
| 6 |
+
- ASR
|
| 7 |
+
- chinese
|
| 8 |
+
- speech
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
## 📂 Project Tree
|
| 12 |
+
|
| 13 |
+
```
|
| 14 |
+
WSChuan-ASR
|
| 15 |
+
├── paraformer_large_chuan/
|
| 16 |
+
│ ├── config.yaml
|
| 17 |
+
│ ├── model.pt
|
| 18 |
+
│ └── infer.py
|
| 19 |
+
│
|
| 20 |
+
├── Qwen2.5-omni3B/
|
| 21 |
+
| ├──added_tokens.json
|
| 22 |
+
| ├──args.json
|
| 23 |
+
| ├──char_template.jinja
|
| 24 |
+
| ├──config.json
|
| 25 |
+
| ├──generation_config.json
|
| 26 |
+
| ├──merges.txt
|
| 27 |
+
| ├──model-00001-of-00003.safetensors
|
| 28 |
+
| ├──model-00002-of-00003.safetensors
|
| 29 |
+
| ├──model-00003-of-00003.safetensors
|
| 30 |
+
| ├──model.safetensors.index.json
|
| 31 |
+
| ├──preprocessor_config.json
|
| 32 |
+
| ├──special_tokens_map.json
|
| 33 |
+
| ├──spk_dict.pt
|
| 34 |
+
| ├──tokenizer_config.json
|
| 35 |
+
| ├──tokenizer.json
|
| 36 |
+
| ├──video_preprocessor_config.json
|
| 37 |
+
| └──vocab.json
|
| 38 |
+
│
|
| 39 |
+
├── .gitattributes
|
| 40 |
+
└── README.md
|
| 41 |
+
```
|
| 42 |
+
|
| 43 |
+
## ASR Leaderboard
|
| 44 |
+
| Model | Model Size | WSC-Eval-ASR - Easy | WSC-Eval-ASR - Hard | WSC-Eval-ASR - Total | Magicdata - Conversation | Magicdata - Daily-Use | Avg. |
|
| 45 |
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
| 46 |
+
| **with LLM** | | | | | | | |
|
| 47 |
+
| Kimi-Audio<sup></sup> | 7B | 16.65 | 28.66 | 17.66 | 24.67 | **5.77** | 18.68 |
|
| 48 |
+
| FireRedASR-LLM<sup></sup> | 8.3B | 12.80 | 25.27 | 14.40 | 17.68 | 6.69 | 15.37 |
|
| 49 |
+
| Qwen2.5-omni<sup></sup> | 3B | 16.94 | 26.01 | 18.20 | 20.40 | 6.32 | 17.69 |
|
| 50 |
+
| Qwen2.5-omni-WSC-Finetune⭐ | 3B | 14.36 | 24.14 | 15.61 | 18.45 | 6.15 | 15.74 |
|
| 51 |
+
| <span style="background-color: #d4edda; padding: 0 2px;">Qwen2.5-omni+internal data⭐</span> | 3B | 13.17 | 23.36 | 14.81 | 18.50 | 5.88 | 15.14 |
|
| 52 |
+
| <span style="background-color: #d4edda; padding: 0 2px;">Qwen2.5-omni-WSC-Finetune + internal data⭐</span> | 3B | 12.93 | 23.19 | 14.25 | 17.95 | <u>5.89</u> | 14.84 |
|
| 53 |
+
| **without LLM** | | | | | | | |
|
| 54 |
+
| SenseVoice-small<sup></sup> | 234M | 17.43 | 28.38 | 18.39 | 23.50 | 8.77 | 19.29 |
|
| 55 |
+
| Whisper<sup></sup> | 244M | 52.06 | 63.99 | 53.59 | 55.88 | 52.03 | 55.51 |
|
| 56 |
+
| FireRedASR-AED<sup></sup> | 1.1B | 13.29 | 23.64 | 14.62 | 17.84 | 6.69 | 15.14 |
|
| 57 |
+
| Paraformer<sup></sup> | 220M | 14.34 | 24.61 | 15.66 | 19.81 | 8.16 | 16.52 |
|
| 58 |
+
| Paraformer-WSC-Finetune⭐ | 220M | 12.15 | 22.60 | 13.51 | 16.60 | 8.02 | 14.58 |
|
| 59 |
+
| <span style="background-color: #d4edda; padding: 0 2px;">Paraformer + internal data⭐</span> | 220M | <u>11.93</u> | <u>21.82</u> | <u>13.14</u> | <u>15.61</u> | 6.77 | <u>13.85</u> |
|
| 60 |
+
| <span style="background-color: #d4edda; padding: 0 2px;">Paraformer-WSC-Finetune + internal data</span>⭐ | 220M | **11.59** | **21.59** | **12.87** | **14.59** | 6.28 | **13.38** |
|
| 61 |
+
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
## ASR Inference
|
| 65 |
+
### Paraformer_large_Chuan
|
| 66 |
+
```
|
| 67 |
+
export CUDA_VISIBLE_DEVICES=7
|
| 68 |
+
root_dir=./test_data
|
| 69 |
+
test_sets=("WSC-Eval-ASR" "WSC-Eval-ASR-Hard" "WSC-Eval-ASR-Easy")
|
| 70 |
+
model_dir=./model_dir
|
| 71 |
+
|
| 72 |
+
out_rootdir=./results
|
| 73 |
+
mkdir -p $out_rootdir
|
| 74 |
+
python infer_paraformer.py \
|
| 75 |
+
--model $model_dir \
|
| 76 |
+
--wav_scp_file $root_dir/$test_data/wav.scp \
|
| 77 |
+
--output_dir $out_rootdir/debug \
|
| 78 |
+
--device "cuda" \
|
| 79 |
+
--output_file $out_dir/hyp.txt
|
| 80 |
+
```
|
| 81 |
+
---
|
| 82 |
+
|
| 83 |
+
### Qwen2.5-Omni-3B_Chuan
|
| 84 |
+
```
|
| 85 |
+
python infer_qwen2.5omni.py \
|
| 86 |
+
--wavs_path /path/to/your/wav.scp \
|
| 87 |
+
--out_path /path/to/your/results.txt \
|
| 88 |
+
--gpu 0 \
|
| 89 |
+
--model /path/to/your/model
|
| 90 |
+
```
|
| 91 |
+
|
infer_paraformer.py
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import argparse
|
| 2 |
+
import json
|
| 3 |
+
import os
|
| 4 |
+
from funasr import AutoModel
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
def read_wav_scp(wav_scp_file: str):
|
| 8 |
+
"""读取 wav.scp 文件,返回 (id, wav_path) 元组列表。"""
|
| 9 |
+
wav_files = []
|
| 10 |
+
with open(wav_scp_file, 'r') as f:
|
| 11 |
+
for line in f:
|
| 12 |
+
id, wav_path = line.strip().split(" ", 1) # 只根据第一个空格切分
|
| 13 |
+
wav_files.append((id, wav_path))
|
| 14 |
+
return wav_files
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
def save_results(results, output_file: str):
|
| 18 |
+
"""将推理结果保存到指定的文件中,格式为 'key text' 每行一条。"""
|
| 19 |
+
with open(output_file, 'w') as f:
|
| 20 |
+
for result in results:
|
| 21 |
+
key = result.get("key", "")
|
| 22 |
+
text = result.get("text", "")
|
| 23 |
+
f.write(f"{key} {text}\n")
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
def main():
|
| 27 |
+
# 解析命令行参数
|
| 28 |
+
parser = argparse.ArgumentParser(description="Run speech recognition inference")
|
| 29 |
+
parser.add_argument('--model', type=str, required=True, help="Model name or path")
|
| 30 |
+
parser.add_argument('--wav_scp_file', type=str, required=True, help="Path to wav.scp file")
|
| 31 |
+
parser.add_argument('--output_dir', type=str, required=True, help="Directory to save inference results")
|
| 32 |
+
parser.add_argument('--device', type=str, default="cpu", choices=["cpu", "cuda"], help="Device to run inference on")
|
| 33 |
+
parser.add_argument('--output_file', type=str, required=True, help="File to save the inference results")
|
| 34 |
+
|
| 35 |
+
args = parser.parse_args()
|
| 36 |
+
|
| 37 |
+
# 初始化模型
|
| 38 |
+
print(f"Initializing model {args.model}...")
|
| 39 |
+
model = AutoModel(model=args.model, device=args.device)
|
| 40 |
+
|
| 41 |
+
# 读取 wav.scp 文件
|
| 42 |
+
wav_files = read_wav_scp(args.wav_scp_file)
|
| 43 |
+
|
| 44 |
+
# 存储所有推理结果
|
| 45 |
+
all_results = []
|
| 46 |
+
|
| 47 |
+
# 遍历每个音频文件并进行推理
|
| 48 |
+
for id, wav_path in wav_files:
|
| 49 |
+
print(f"正在处理音频文件 {id}: {wav_path}")
|
| 50 |
+
res = model.generate(wav_path)
|
| 51 |
+
print(f"推理结果: {res}")
|
| 52 |
+
|
| 53 |
+
if res:
|
| 54 |
+
# 提取推理结果中的 key 和 text
|
| 55 |
+
key = id
|
| 56 |
+
text = res[0].get("text", "")
|
| 57 |
+
all_results.append({"key": key, "text": text})
|
| 58 |
+
|
| 59 |
+
# 将推理结果保存到文件
|
| 60 |
+
save_results(all_results, args.output_file)
|
| 61 |
+
print(f"推理结果已保存到 {args.output_file}")
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
if __name__ == "__main__":
|
| 65 |
+
main()
|
infer_qwen2.5omni.py
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from qwen_omni_utils import process_mm_info
|
| 2 |
+
import torch
|
| 3 |
+
from transformers import Qwen2_5OmniForConditionalGeneration, Qwen2_5OmniProcessor
|
| 4 |
+
import librosa
|
| 5 |
+
import os
|
| 6 |
+
from io import BytesIO
|
| 7 |
+
from urllib.request import urlopen
|
| 8 |
+
import argparse
|
| 9 |
+
# @title inference function
|
| 10 |
+
def inference(audio_path,model,processor,prompt, sys_prompt):
|
| 11 |
+
messages = [
|
| 12 |
+
{"role": "system", "content": [{"type": "text", "text": sys_prompt}]},
|
| 13 |
+
{"role": "user", "content": [
|
| 14 |
+
{"type": "audio", "audio": audio_path},
|
| 15 |
+
{"type": "text", "text": prompt},
|
| 16 |
+
]
|
| 17 |
+
},
|
| 18 |
+
]
|
| 19 |
+
text = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
| 20 |
+
audios, images, videos = process_mm_info(messages, use_audio_in_video=True)
|
| 21 |
+
inputs = processor(text=text, audio=audios, images=images, videos=videos, return_tensors="pt", padding=True, use_audio_in_video=True)
|
| 22 |
+
inputs = inputs.to(model.device).to(model.dtype)
|
| 23 |
+
|
| 24 |
+
output = model.generate(**inputs, use_audio_in_video=True, return_audio=False, thinker_max_new_tokens=256, thinker_do_sample=False)
|
| 25 |
+
|
| 26 |
+
text = processor.batch_decode(output, skip_special_tokens=True, clean_up_tokenization_spaces=False)
|
| 27 |
+
return text
|
| 28 |
+
|
| 29 |
+
def transcribe(wavs_path, out_path, gpu_id, model):
|
| 30 |
+
os.environ["CUDA_VISIBLE_DEVICES"] = str(gpu_id)
|
| 31 |
+
model_path = model
|
| 32 |
+
model = Qwen2_5OmniForConditionalGeneration.from_pretrained(
|
| 33 |
+
model_path,
|
| 34 |
+
torch_dtype=torch.bfloat16,
|
| 35 |
+
device_map="auto",
|
| 36 |
+
)
|
| 37 |
+
prompt = "请将这段中文语音转换为纯文本,去掉标点符号。"
|
| 38 |
+
processor = Qwen2_5OmniProcessor.from_pretrained(model_path)
|
| 39 |
+
with open(wavs_path, "r") as f_in, open(out_path, "w") as f_out:
|
| 40 |
+
for line in f_in:
|
| 41 |
+
utt, path = line.strip().split(" ", maxsplit=1)
|
| 42 |
+
try:
|
| 43 |
+
response=inference(path,model,processor, prompt=prompt, sys_prompt="You are a speech recognition model.")
|
| 44 |
+
except Exception as e:
|
| 45 |
+
print(f"Inference failed: {str(e)}")
|
| 46 |
+
response="None"
|
| 47 |
+
text = response[0].strip()
|
| 48 |
+
lines = text.strip().splitlines()
|
| 49 |
+
text = lines[-1]
|
| 50 |
+
print(f"[{utt}] >>> {text}")
|
| 51 |
+
f_out.write(f"{utt} {text}\n")
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
|
| 56 |
+
if __name__ == "__main__":
|
| 57 |
+
parser = argparse.ArgumentParser()
|
| 58 |
+
parser.add_argument("--wavs_path", type=str)
|
| 59 |
+
parser.add_argument("--out_path", type=str)
|
| 60 |
+
parser.add_argument("--gpu", type=int, default=0)
|
| 61 |
+
parser.add_argument("--model", type=str)
|
| 62 |
+
args = parser.parse_args()
|
| 63 |
+
transcribe(
|
| 64 |
+
wavs_path=args.wavs_path,
|
| 65 |
+
out_path=args.out_path,
|
| 66 |
+
gpu_id=args.gpu,
|
| 67 |
+
model=args.model
|
| 68 |
+
)
|