File size: 2,894 Bytes
decde52
 
 
 
 
 
 
 
 
8ae04bc
 
4eb4e46
 
 
 
 
 
f4cd216
 
 
 
 
620f480
20ae56f
 
620f480
252c420
620f480
 
1fcb45b
 
 
 
252c420
 
 
 
 
 
 
 
 
 
4201c09
252c420
 
41ebdc7
79b8cb1
d820a1d
41ebdc7
620f480
41ebdc7
620f480
 
11fef9b
41ebdc7
74e6efc
620f480
74e6efc
 
c239150
 
620f480
 
c239150
11fef9b
620f480
82543d0
0a6706b
82543d0
0a6706b
 
e668bad
82543d0
 
4201c09
82543d0
 
 
4201c09
82543d0
d3912e6
da03abc
 
 
82543d0
010d36d
82543d0
0a6706b
 
010d36d
82543d0
010d36d
82543d0
0a6706b
82543d0
010d36d
82543d0
0a6706b
da03abc
 
 
 
 
 
620f480
 
 
 
11fef9b
620f480
11fef9b
620f480
11fef9b
3d36478
11fef9b
 
620f480
 
 
11fef9b
620f480
11fef9b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
---
title: README
emoji: πŸ‘
colorFrom: gray
colorTo: pink
sdk: static
pinned: false
---

# Whisper Fine-Tuning Event πŸ€—

----------------------------------------------------------------
 Whisper Fine-Tuning Event
----------------------------------------------------------------

https://github.com/huggingface/community-events/blob/main/whisper-fine-tuning-event/README.md

----------------------------------------------------------------
 Sign in to Lambdalabs
----------------------------------------------------------------

https://cloud.lambdalabs.com/instances

and create a new instance with a A100 GPU without disk storage

----------------------------------------------------------------
  Log in to Huggingface
----------------------------------------------------------------

```
pip install git+https://github.com/huggingface/transformers
```

```
git config --global credential.helper store
huggingface-cli login
```

#### Provide Huggingface access token for your account

https://huggingface.co/settings/tokens

----------------------------------------------------------------
 Clone Whisper train project for run scripts
----------------------------------------------------------------

```
git clone https://huggingface.co/bjelkenhed/whisper-train-ts
```

----------------------------------------------------------------
 Install requirements and python libraries
----------------------------------------------------------------

```
sudo apt-get install git-lfs
```

```
pip install --pre --force-reinstall torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/nightly/cu117

pip install -r whisper-medium/requirements.txt

python -c "import torch; print(torch.cuda.is_available())"

```


----------------------------------------------------------------
 Create and clone Huggingface model repository
----------------------------------------------------------------

Create a new model named whisper-small-sv (change to your selected name in following sections)

```
huggingface-cli repo create whisper-medium-ts-sv
```

```
git clone https://huggingface.co/bjelkenhed/whisper-medium-ts-sv

cd whisper-medium-ts-sv
git lfs install
```

----------------------------------------------------------------
 Copy runscripts to model 
----------------------------------------------------------------

```
cp ~/whisper-small/run.sh ~/whisper-small/run_speech_recognition_seq2seq_streaming.py .
```

or

```
cp ~/whisper-medium/run.sh ~/whisper-medium/run_speech_recognition_seq2seq_streaming.py .
```

or

```
cp ~/whisper-large/run.sh ~/whisper-large/run_speech_recognition_seq2seq_streaming.py .
```

----------------------------------------------------------------
  Start training
----------------------------------------------------------------

```
tmux new -s mysession
```

```
bash run.sh
```


# To resume session

```
tmux a -t mysession
```