模型:
Hubert(Hidden-Unit BERT)是Facebook提出的语音表示学习模型。与传统的语音识别模型不同,Hubert使用自监督学习方法直接从原始波形中学习音频信号。
该研究使用谷歌的TPU Research Cloud (TRC)在云TPU上进行了训练。
| Base | Large | ||
| CNN Encoder | strides | 5, 2, 2, 2, 2, 2, 2 | |
| kernel width | 10, 3, 3, 3, 3, 2, 2 | ||
| channel | 512 | ||
| Transformer Encoder | Layer | 12 | 24 |
| embedding dim | 768 | 1024 | |
| inner FFN dim | 3072 | 4096 | |
| attention heads | 8 | 16 | |
| Projection | dim | 256 | 768 |
| Params | 95M | 317M |
import torch
from transformers import HubertModel
model = HubertModel.from_pretrained("team-lucid/hubert-base-korean")
wav = torch.ones(1, 16000)
outputs = model(wav)
print(f"Input: {wav.shape}") # [1, 16000]
print(f"Output: {outputs.last_hidden_state.shape}") # [1, 49, 768]
import jax.numpy as jnp
from transformers import FlaxAutoModel
model = FlaxAutoModel.from_pretrained("team-lucid/hubert-base-korean", trust_remote_code=True)
wav = jnp.ones((1, 16000))
outputs = model(wav)
print(f"Input: {wav.shape}") # [1, 16000]
print(f"Output: {outputs.last_hidden_state.shape}") # [1, 49, 768]
该模型使用韩国智能信息社会推进院和科学技术信息通信部的支持构建,从 자유대화 음성(일반남여) , 다화자 음성합성 데이터 和 방송 콘텐츠 대화체 음성인식 데이터 中提取了约4000小时进行训练。
类似于 원 논문 ,首先基于MFCC训练了基础模型,然后进行了500个簇的k-means聚类,再次训练了基础模型和大型模型。
训练超参数| Hyperparameter | Base | Large |
|---|---|---|
| Warmup Steps | 32,000 | 32,000 |
| Learning Rates | 5e-4 | 1.5e-3 |
| Batch Size | 128 | 128 |
| Weight Decay | 0.01 | 0.01 |
| Max Steps | 400,000 | 400,000 |
| Learning Rate Decay | 0.1 | 0.1 |
| A d a m β 1 Adam\beta_1 A d a m β 1 | 0.9 | 0.9 |
| A d a m β 2 Adam\beta_2 A d a m β 2 | 0.99 | 0.99 |