You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import whisper
import os
import time
from faster_whisper import WhisperModel, BatchedInferencePipeline
test_file = 'audio.mp3'
devices = [ 'cpu' ]#, 'cuda' ]
model_list = [ 'medium', 'large-v2', 'large-v3', 'turbo' ]
compute_types = [ 'int8_float32', 'float32' ] #, 'int8_float16', 'float16', 'bfloat16' ]
print('faster_whisper implementations')
for y in devices:
for i in model_list:
for x in compute_types:
model = WhisperModel(i, device=y, compute_type=x)
batched_model = BatchedInferencePipeline(model=model)
duration_sum = 0
start = time.time()
segments, info = batched_model.transcribe(test_file, language='ru', task='transcribe', batch_size=16)
end = time.time()
duration_sum = duration_sum + end - start
print("{} - quant {} for {} model with fp16 costs {:.2f}s".format(y, x, i, duration_sum))
del model
#########################
print('whisper implementations')
device = torch.device('cpu')
model_list = [ 'medium', 'large-v2', 'large-v3', 'turbo' ]
fp16_bool = [True, False]
for i in model_list:
for k in fp16_bool:
model = whisper.load_model(name=i, device=device)
duration_sum = 0
audio = whisper.load_audio('audio.mp3')
start = time.time()
result = model.transcribe(audio, language='en', task='transcribe', fp16=k)
end = time.time()
duration_sum = duration_sum + end - start
print("{} model with fp16 {} costs {:.2f}s".format(i, k, duration_sum))
del model
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Why is performance on an AMD processor half as good as on an Intel processor?
After all, AMD processor is more productive by all parameters.
Testing performance on Intel and AMD processors, bench parameters:
Main:
OS - Windows Server 2022
Hypervisor - VMware ESXi 7.0 U3
Stand01:
CPU - AMD EPYC 9374F, 4 vCPU
RAM - 32 Gb
Stand02:
CPU - Intel Xeon Gold 6354, 4 vCPU
RAM - 32 Gb
Results:
Model | AMD | Intel
medium | 41.46s | 24.92s
large-v2 | 96.58s | 50.47s
large-v3 | 87.21s | 44.89s
turbo | 108.06s | 51.17s
Beta Was this translation helpful? Give feedback.
All reactions