Downloads · 30 days
0
tuanio/WhisperCTC
WhisperCTC is a summarization model from tuanio. Use it when you need a shorter version of a longer text.
This modelcard aims to be a base template for new models. It has been generated using this raw template.
Downloads · 30 days
0
Access
Public
Updated Jul 6, 2023
Repo size
1.2 GB
Likes
1
Public
Click a slice to open those files.
.ckpt1.2 GB · 100%
From the Hugging Face model README
This modelcard aims to be a base template for new models. It has been generated using this raw template.
class WhisperCTC(nn.Module):
def __init__(
self,
encoder_id: str = "tuanio/whisper-encoder.tiny.en",
dropout: float = 0.1,
vocab_size: int = 47,
):
super().__init__()
self.encoder = WhisperEncoder.from_pretrained(encoder_id)
print("Freezing Whisper Encoder...")
self.encoder._freeze_parameters()
print("Freezed!")
self.lm_head = nn.Sequential(
nn.SiLU(),
nn.Dropout(dropout),
nn.Linear(self.encoder.config.d_model, vocab_size),
)
nn.init.kaiming_uniform_(
self.lm_head[-1].weight, mode="fan_in", nonlinearity="relu"
)
def forward(self, feat: Tensor, attn_mask: Tensor):
enc = self.encoder(
input_features=feat, attention_mask=attn_mask
).last_hidden_state
logits = self.lm_head(enc)
log_probs = nn.functional.log_softmax(logits, dim=-1)
return log_probs
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
Use the code below to get started with the model.
[More Information Needed]
[More Information Needed]
[More Information Needed]
data_cfg:
dataset:
processor:
feat_extractor_id: ${model_cfg.model.encoder_id}
tokenizer_id: ${model_cfg.tokenizer_id}
path:
base:
indict_tts: ../IndicTTS
cv: ../
train:
- train_data/indict_tts_train.jsonl
# - train_data/cv_train.jsonl
test:
- train_data/indict_tts_test.jsonl
# - train_data/cv_test.jsonl
dev:
- train_data/indict_tts_dev.jsonl
# - train_data/cv_dev.jsonl
dataloader:
batch_size: 46
num_workers: 8
pin_memory: True
model_cfg:
tokenizer_id: tuanio/wav2vec2-phoneme-ipa-ctc
model:
dropout: 0.1
encoder_id: tuanio/whisper-encoder.medium.en
optim:
lr: 1.25e-05
betas: [0.9, 0.998]
weight_decay: 0.01
scheduler:
name: linear
total_steps: -1
warmup_ratio: 0.05
interval: step
frequency: 1
trainer_cfg:
log:
wandb: True
logger_wandb:
project: aped_indian-lish
name: whisper-medium-indict-tts-only-from-epoch1
log_model: all
arguments:
accelerator: gpu
devices: -1
max_epochs: 10
log_every_n_steps: 1
enable_checkpointing: True
accumulate_grad_batches: 2
inference_mode: True
gradient_clip_val: 5.0
check_val_every_n_epoch: 1
val_check_interval: null
experiment_cfg:
train: True
valid: True
test: True
ckpt:
resume_ckpt: True
ckpt_path: ckpt/medium.epoch3.ckpt
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
BibTeX:
[More Information Needed]
APA:
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]