first commit
Browse files- README.md +62 -0
- config.json +71 -0
- fairseq/model.pt +3 -0
- pytorch_model.bin +3 -0
- rinna.png +0 -0
README.md
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language: ja
|
3 |
+
datasets:
|
4 |
+
- reazon-research/reazonspeech
|
5 |
+
tags:
|
6 |
+
- hubert
|
7 |
+
- speech
|
8 |
+
license: apache-2.0
|
9 |
+
---
|
10 |
+
|
11 |
+
# japanese-hubert-base
|
12 |
+
|
13 |
+
![rinna-icon](./rinna.png)
|
14 |
+
|
15 |
+
This is a Japanese HuBERT (Hidden Unit Bidirectional Encoder Representations from Transformers) model trained by [rinna Co., Ltd.](https://rinna.co.jp/)
|
16 |
+
|
17 |
+
This model was traind using a large-scale Japanese audio dataset, [ReazonSpeech](https://huggingface.co/datasets/reazon-research/reazonspeech) corpus.
|
18 |
+
|
19 |
+
## How to use the model
|
20 |
+
|
21 |
+
```python
|
22 |
+
import torch
|
23 |
+
from transformers import HubertModel
|
24 |
+
|
25 |
+
model = HubertModel.from_pretrained("rinna/japanese-hubert-base")
|
26 |
+
model.eval()
|
27 |
+
|
28 |
+
wav_input_16khz = torch.randn(1, 10000)
|
29 |
+
outputs = model(wav_input_16khz)
|
30 |
+
print(f"Input: {wav_input_16khz.size()}") # [1, 10000]
|
31 |
+
print(f"Output: {outputs.last_hidden_state.size()}") # [1, 31, 768]
|
32 |
+
```
|
33 |
+
|
34 |
+
## Model summary
|
35 |
+
|
36 |
+
The model architecture is the same as the [original HuBERT base model](https://huggingface.co/facebook/hubert-base-ls960), which contains 12 transformer layers with 8 attention heads.
|
37 |
+
The model was trained using code from the [official repository](https://github.com/facebookresearch/fairseq/tree/main/examples/hubert), and the detailed training configuration can be found in the same repository and the [original paper](https://ieeexplore.ieee.org/document/9585401).
|
38 |
+
|
39 |
+
A fairseq checkpoint file can also be available [here](https://huggingface.co/rinna/japanese-hubert-base/tree/main/fairseq).
|
40 |
+
|
41 |
+
## Training
|
42 |
+
|
43 |
+
The model was trained on approximately 19,000 hours of [ReazonSpeech](https://huggingface.co/datasets/reazon-research/reazonspeech) corpus.
|
44 |
+
|
45 |
+
## License
|
46 |
+
|
47 |
+
[The Apache 2.0 license](https://www.apache.org/licenses/LICENSE-2.0)
|
48 |
+
|
49 |
+
|
50 |
+
## Citation
|
51 |
+
```bibtex
|
52 |
+
@article{hubert2021hsu,
|
53 |
+
author={Hsu, Wei-Ning and Bolte, Benjamin and Tsai, Yao-Hung Hubert and Lakhotia, Kushal and Salakhutdinov, Ruslan and Mohamed, Abdelrahman},
|
54 |
+
journal={IEEE/ACM Transactions on Audio, Speech, and Language Processing},
|
55 |
+
title={HuBERT: Self-Supervised Speech Representation Learning by Masked Prediction of Hidden Units},
|
56 |
+
year={2021},
|
57 |
+
volume={29},
|
58 |
+
number={},
|
59 |
+
pages={3451-3460},
|
60 |
+
doi={10.1109/TASLP.2021.3122291}
|
61 |
+
}
|
62 |
+
```
|
config.json
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"activation_dropout": 0.1,
|
3 |
+
"apply_spec_augment": true,
|
4 |
+
"architectures": [
|
5 |
+
"HubertModel"
|
6 |
+
],
|
7 |
+
"attention_dropout": 0.1,
|
8 |
+
"bos_token_id": 1,
|
9 |
+
"classifier_proj_size": 256,
|
10 |
+
"conv_bias": false,
|
11 |
+
"conv_dim": [
|
12 |
+
512,
|
13 |
+
512,
|
14 |
+
512,
|
15 |
+
512,
|
16 |
+
512,
|
17 |
+
512,
|
18 |
+
512
|
19 |
+
],
|
20 |
+
"conv_kernel": [
|
21 |
+
10,
|
22 |
+
3,
|
23 |
+
3,
|
24 |
+
3,
|
25 |
+
3,
|
26 |
+
2,
|
27 |
+
2
|
28 |
+
],
|
29 |
+
"conv_stride": [
|
30 |
+
5,
|
31 |
+
2,
|
32 |
+
2,
|
33 |
+
2,
|
34 |
+
2,
|
35 |
+
2,
|
36 |
+
2
|
37 |
+
],
|
38 |
+
"ctc_loss_reduction": "sum",
|
39 |
+
"ctc_zero_infinity": false,
|
40 |
+
"do_stable_layer_norm": false,
|
41 |
+
"eos_token_id": 2,
|
42 |
+
"feat_extract_activation": "gelu",
|
43 |
+
"feat_extract_norm": "group",
|
44 |
+
"feat_proj_dropout": 0.0,
|
45 |
+
"feat_proj_layer_norm": true,
|
46 |
+
"final_dropout": 0.1,
|
47 |
+
"hidden_act": "gelu",
|
48 |
+
"hidden_dropout": 0.1,
|
49 |
+
"hidden_size": 768,
|
50 |
+
"initializer_range": 0.02,
|
51 |
+
"intermediate_size": 3072,
|
52 |
+
"layer_norm_eps": 1e-05,
|
53 |
+
"layerdrop": 0.1,
|
54 |
+
"mask_feature_length": 10,
|
55 |
+
"mask_feature_min_masks": 0,
|
56 |
+
"mask_feature_prob": 0.0,
|
57 |
+
"mask_time_length": 10,
|
58 |
+
"mask_time_min_masks": 2,
|
59 |
+
"mask_time_prob": 0.05,
|
60 |
+
"model_type": "hubert",
|
61 |
+
"num_attention_heads": 12,
|
62 |
+
"num_conv_pos_embedding_groups": 16,
|
63 |
+
"num_conv_pos_embeddings": 128,
|
64 |
+
"num_feat_extract_layers": 7,
|
65 |
+
"num_hidden_layers": 12,
|
66 |
+
"pad_token_id": 0,
|
67 |
+
"torch_dtype": "float32",
|
68 |
+
"transformers_version": "4.28.1",
|
69 |
+
"use_weighted_layer_sum": false,
|
70 |
+
"vocab_size": 32
|
71 |
+
}
|
fairseq/model.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dade3cf824ae0d214f7de8b73e70bae7c101e81f12d93577c4760bf516db4063
|
3 |
+
size 378888853
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6c023ccb71e4c2b5a324c94fc5ebe12403d3081c5f370df229892419996fd113
|
3 |
+
size 377554841
|
rinna.png
ADDED