Project Beatrice commited on
Commit
6aa5c42
·
1 Parent(s): e23c2d1

Update README

Browse files
Files changed (1) hide show
  1. README.md +176 -195
README.md CHANGED
@@ -1,199 +1,180 @@
1
  ---
2
  library_name: transformers
3
- tags: []
 
 
 
4
  ---
5
 
6
- # Model Card for Model ID
7
-
8
- <!-- Provide a quick summary of what the model is/does. -->
9
-
10
-
11
-
12
- ## Model Details
13
-
14
- ### Model Description
15
-
16
- <!-- Provide a longer summary of what this model is. -->
17
-
18
- This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
19
-
20
- - **Developed by:** [More Information Needed]
21
- - **Funded by [optional]:** [More Information Needed]
22
- - **Shared by [optional]:** [More Information Needed]
23
- - **Model type:** [More Information Needed]
24
- - **Language(s) (NLP):** [More Information Needed]
25
- - **License:** [More Information Needed]
26
- - **Finetuned from model [optional]:** [More Information Needed]
27
-
28
- ### Model Sources [optional]
29
-
30
- <!-- Provide the basic links for the model. -->
31
-
32
- - **Repository:** [More Information Needed]
33
- - **Paper [optional]:** [More Information Needed]
34
- - **Demo [optional]:** [More Information Needed]
35
-
36
- ## Uses
37
-
38
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
39
-
40
- ### Direct Use
41
-
42
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
43
-
44
- [More Information Needed]
45
-
46
- ### Downstream Use [optional]
47
-
48
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
49
-
50
- [More Information Needed]
51
-
52
- ### Out-of-Scope Use
53
-
54
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
55
-
56
- [More Information Needed]
57
-
58
- ## Bias, Risks, and Limitations
59
-
60
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
61
-
62
- [More Information Needed]
63
-
64
- ### Recommendations
65
-
66
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
67
-
68
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
69
-
70
- ## How to Get Started with the Model
71
-
72
- Use the code below to get started with the model.
73
-
74
- [More Information Needed]
75
-
76
- ## Training Details
77
-
78
- ### Training Data
79
-
80
- <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
81
-
82
- [More Information Needed]
83
-
84
- ### Training Procedure
85
-
86
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
87
-
88
- #### Preprocessing [optional]
89
-
90
- [More Information Needed]
91
-
92
-
93
- #### Training Hyperparameters
94
-
95
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
96
-
97
- #### Speeds, Sizes, Times [optional]
98
-
99
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
100
-
101
- [More Information Needed]
102
-
103
- ## Evaluation
104
-
105
- <!-- This section describes the evaluation protocols and provides the results. -->
106
-
107
- ### Testing Data, Factors & Metrics
108
-
109
- #### Testing Data
110
-
111
- <!-- This should link to a Dataset Card if possible. -->
112
-
113
- [More Information Needed]
114
-
115
- #### Factors
116
-
117
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
118
-
119
- [More Information Needed]
120
-
121
- #### Metrics
122
-
123
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
124
-
125
- [More Information Needed]
126
-
127
- ### Results
128
-
129
- [More Information Needed]
130
-
131
- #### Summary
132
-
133
-
134
-
135
- ## Model Examination [optional]
136
-
137
- <!-- Relevant interpretability work for the model goes here -->
138
-
139
- [More Information Needed]
140
-
141
- ## Environmental Impact
142
-
143
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
144
-
145
- Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
146
-
147
- - **Hardware Type:** [More Information Needed]
148
- - **Hours used:** [More Information Needed]
149
- - **Cloud Provider:** [More Information Needed]
150
- - **Compute Region:** [More Information Needed]
151
- - **Carbon Emitted:** [More Information Needed]
152
-
153
- ## Technical Specifications [optional]
154
-
155
- ### Model Architecture and Objective
156
-
157
- [More Information Needed]
158
-
159
- ### Compute Infrastructure
160
-
161
- [More Information Needed]
162
-
163
- #### Hardware
164
-
165
- [More Information Needed]
166
-
167
- #### Software
168
-
169
- [More Information Needed]
170
-
171
- ## Citation [optional]
172
-
173
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
174
-
175
- **BibTeX:**
176
-
177
- [More Information Needed]
178
-
179
- **APA:**
180
-
181
- [More Information Needed]
182
-
183
- ## Glossary [optional]
184
-
185
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
186
-
187
- [More Information Needed]
188
-
189
- ## More Information [optional]
190
-
191
- [More Information Needed]
192
-
193
- ## Model Card Authors [optional]
194
-
195
- [More Information Needed]
196
-
197
- ## Model Card Contact
198
-
199
- [More Information Needed]
 
1
  ---
2
  library_name: transformers
3
+ license: apache-2.0
4
+ language: ja
5
+ datasets: reazon-research/reazonspeech
6
+ base_model: rinna/japanese-hubert-base
7
  ---
8
 
9
+ # japanese-hubert-base-phoneme-ctc
10
+
11
+ rinna/japanese-hubert-base CTC での日本語音素認識にファインチューニングしたモデルです。
12
+
13
+ ## モデル概要
14
+
15
+ - ReazonSpeech v2 データセットを使用し、pyopenjtalk-plus で生成した音素ラベルを正解と見做して rinna/japanese-hubert-base をファインチューニング
16
+ - 0.3 エポック程度学習したのち、JSUT コーパス (ラベル: https://github.com/sarulab-speech/jsut-label) に対する精度が最も良いチェックポイントを選択
17
+
18
+ ## ハイパーパラメータ
19
+
20
+ * 学習率
21
+ * CTC Head: 2e-5
22
+ * 他: 2e-6
23
+ * バッチサイズ: 32
24
+ * 最大音声サンプル数: 250000
25
+ * 最適化: AdamW
26
+ * betas: (0.9, 0.98)
27
+ * weight_decay: 0.01
28
+ * 学習率スケジューリング: Cosine
29
+ * Warmup ステップ数: 10000
30
+ * 最大ステップ数: 800000
31
+ * ただし、途中で JSUT での精度が改善されなくなったため 200000 ステップで打ち切り
32
+
33
+ ## 使用例
34
+
35
+ ```python
36
+ import librosa
37
+ import numpy as np
38
+ import torch
39
+ from transformers import HubertForCTC, Wav2Vec2Processor
40
+
41
+ MODEL_NAME = "prj-beatrice/japanese-hubert-base-phoneme-ctc"
42
+ model = HubertForCTC.from_pretrained(MODEL_NAME)
43
+ processor = Wav2Vec2Processor.from_pretrained(MODEL_NAME)
44
+
45
+ audio, sr = librosa.load("audio.wav", sr=16000)
46
+ audio = np.concatenate([np.zeros(sr), audio, np.zeros(sr // 2)])
47
+
48
+ inputs = processor(audio, sampling_rate=sr, return_tensors="pt")
49
+ with torch.no_grad():
50
+ outputs = model(**inputs)
51
+ predicted_ids = outputs.logits.argmax(-1)
52
+ phonemes = processor.decode(predicted_ids[0], spaces_between_special_tokens=True)
53
+
54
+ print(phonemes)
55
+ # => "m i z u o m a r e e sh i a k a r a k a w a n a k U t e w a n a r a n a i n o d e s U"
56
+ ```
57
+
58
+ ## 学習環境
59
+
60
+ - A100 80GB
61
+ - Python 3.10.12
62
+
63
+ ```
64
+ absl-py==2.3.0
65
+ accelerate==1.7.0
66
+ aiohappyeyeballs==2.6.1
67
+ aiohttp==3.12.13
68
+ aiosignal==1.3.2
69
+ annotated-types==0.7.0
70
+ async-timeout==5.0.1
71
+ attrs==25.3.0
72
+ audioread==3.0.1
73
+ certifi==2025.6.15
74
+ cffi==1.17.1
75
+ charset-normalizer==3.4.2
76
+ click==8.2.1
77
+ coloredlogs==15.0.1
78
+ coverage==7.9.1
79
+ datasets==3.6.0
80
+ decorator==5.2.1
81
+ dill==0.3.8
82
+ evaluate==0.4.3
83
+ exceptiongroup==1.3.0
84
+ filelock==3.18.0
85
+ flatbuffers==25.2.10
86
+ frozenlist==1.7.0
87
+ fsspec==2025.3.0
88
+ gitdb==4.0.12
89
+ gitpython==3.1.44
90
+ grpcio==1.73.0
91
+ hf-xet==1.1.3
92
+ huggingface-hub==0.33.0
93
+ humanfriendly==10.0
94
+ idna==3.10
95
+ iniconfig==2.1.0
96
+ jinja2==3.1.6
97
+ jiwer==3.1.0
98
+ joblib==1.5.1
99
+ lazy-loader==0.4
100
+ librosa==0.11.0
101
+ llvmlite==0.44.0
102
+ markdown==3.8
103
+ markupsafe==3.0.2
104
+ mpmath==1.3.0
105
+ msgpack==1.1.1
106
+ multidict==6.4.4
107
+ multiprocess==0.70.16
108
+ networkx==3.4.2
109
+ numba==0.61.2
110
+ numpy==2.2.6
111
+ nvidia-cublas-cu12==12.6.4.1
112
+ nvidia-cuda-cupti-cu12==12.6.80
113
+ nvidia-cuda-nvrtc-cu12==12.6.77
114
+ nvidia-cuda-runtime-cu12==12.6.77
115
+ nvidia-cudnn-cu12==9.5.1.17
116
+ nvidia-cufft-cu12==11.3.0.4
117
+ nvidia-cufile-cu12==1.11.1.6
118
+ nvidia-curand-cu12==10.3.7.77
119
+ nvidia-cusolver-cu12==11.7.1.2
120
+ nvidia-cusparse-cu12==12.5.4.2
121
+ nvidia-cusparselt-cu12==0.6.3
122
+ nvidia-nccl-cu12==2.26.2
123
+ nvidia-nvjitlink-cu12==12.6.85
124
+ nvidia-nvtx-cu12==12.6.77
125
+ onnxruntime==1.22.0
126
+ packaging==25.0
127
+ pandas==2.3.0
128
+ platformdirs==4.3.8
129
+ pluggy==1.6.0
130
+ pooch==1.8.2
131
+ propcache==0.3.2
132
+ protobuf==6.31.1
133
+ psutil==7.0.0
134
+ pyarrow==20.0.0
135
+ pycparser==2.22
136
+ pydantic==2.11.7
137
+ pydantic-core==2.33.2
138
+ pygments==2.19.1
139
+ pyopenjtalk-plus==0.4.1.post3
140
+ pytest==8.4.0
141
+ pytest-cov==6.2.1
142
+ python-dateutil==2.9.0.post0
143
+ pytz==2025.2
144
+ pyyaml==6.0.2
145
+ rapidfuzz==3.13.0
146
+ regex==2024.11.6
147
+ requests==2.32.4
148
+ ruff==0.11.13
149
+ safetensors==0.5.3
150
+ scikit-learn==1.7.0
151
+ scipy==1.15.3
152
+ sentry-sdk==2.30.0
153
+ setproctitle==1.3.6
154
+ setuptools==80.9.0
155
+ six==1.17.0
156
+ smmap==5.0.2
157
+ soundfile==0.13.1
158
+ soxr==0.5.0.post1
159
+ sudachidict-core==20250515
160
+ sudachipy==0.6.10
161
+ sympy==1.14.0
162
+ tensorboard==2.19.0
163
+ tensorboard-data-server==0.7.2
164
+ threadpoolctl==3.6.0
165
+ tokenizers==0.21.1
166
+ tomli==2.2.1
167
+ torch==2.7.1
168
+ torchaudio==2.7.1
169
+ tqdm==4.67.1
170
+ transformers==4.52.4
171
+ triton==3.3.1
172
+ typing-extensions==4.14.0
173
+ typing-inspection==0.4.1
174
+ tzdata==2025.2
175
+ urllib3==2.4.0
176
+ wandb==0.20.1
177
+ werkzeug==3.1.3
178
+ xxhash==3.5.0
179
+ yarl==1.20.1
180
+ ```