GPU-Accelerated GPU-Accelerated Large Vocabulary Continuous Speech - - PowerPoint PPT Presentation

gpu accelerated gpu accelerated large vocabulary
SMART_READER_LITE
LIVE PREVIEW

GPU-Accelerated GPU-Accelerated Large Vocabulary Continuous Speech - - PowerPoint PPT Presentation

GPU-Accelerated GPU-Accelerated Large Vocabulary Continuous Speech Recognition Large Vocabulary Continuous Speech Recognition for Scalable Distributed Speech Recognition for Scalable Distributed Speech Recognition Jungsuk Kim


slide-1
SLIDE 1

GPU-Accelerated GPU-Accelerated Large Vocabulary Continuous Speech Recognition Large Vocabulary Continuous Speech Recognition for Scalable Distributed Speech Recognition for Scalable Distributed Speech Recognition Jungsuk ¡Kim ¡ ¡Ian ¡Lane ¡ ¡

Electrical and Computer Engineering Carnegie Mellon University

March 20, 2015 @GTC2015

1

slide-2
SLIDE 2

Carnegie Mellon University

Overview ¡

2

  • Introduc5on ¡
  • Background ¡
  • Weighted ¡Finite ¡State ¡Transducers ¡in ¡Speech ¡Recogni5on ¡
  • Proposed ¡Approach ¡
  • GPU-­‑Accelerated ¡scalable ¡DSR ¡
  • Evalua5on ¡
  • Conclusion ¡
slide-3
SLIDE 3

Carnegie Mellon University

Introduc5on ¡

3

  • Voice interfaces a core technology for User Interaction
  • Mobile devices, Smart TVs, In-Vehicle Systems, …
  • For a captivating User Experience, Voice UI must be:
  • Robust
  • Acoustic robustness à

à Large Acoustic Models

  • Linguistics robustness à

à Large Vocabulary Recognition

  • Responsive
  • Low latency à

à Faster than real-time search

  • Adaptive
  • User and Task adaptation
slide-4
SLIDE 4

Carnegie Mellon University

Introduc5on ¡

4

  • Large models critical for accurate speech recognition:
  • Large acoustic models è

è Tens of Millions of parameters

  • Large vocabulary è

è Millions of words

  • Large language model è

è Billions of n-gram entries (>= 20GB)

  • Examples include:
  • Acoustic modeling for telephony [Mass 2014] or Youtube [Bacchiani 2014]
  • ~200M parameter Deep Neural Networks
  • Language model rescoring for Voice Search [Schalkwyk 2010]
  • 1.2M vocabulary, 5-gram LM, 12.7B n-gram entries
slide-5
SLIDE 5

Carnegie Mellon University

Introduc5on ¡

5

Speech recognition contains many highly parallel tasks

ASR engine designed specifically for GPUs

+ =

Large Models More Accurate

Graphic Processing Units

(SIMT, ~3000 cores, <24GB)

  • ptimized for parallel

computing

slide-6
SLIDE 6

Carnegie Mellon University

Introduc5on ¡

6

Titan X

Maxwell, 3072 cores

Tegra K1

Kepler, 192 cores

Tegra X1

Maxwell, 256 cores

Tesla K40

Kepler, 2880 cores

RTF 0.02 0.01 0.17 0.14 xRT 50X 100X 6X 7X 1hour 72s 36s 612s 504s

  • 1 ¡Million ¡Vocabulary ¡(3-­‑gram) ¡
  • 30 ¡Million ¡parameter ¡Deep ¡Neural ¡Network ¡
slide-7
SLIDE 7

Background ¡

Weighted ¡Finite ¡State ¡Transducers ¡(WFSTs) ¡ in ¡Speech ¡Recogni7on ¡

slide-8
SLIDE 8

Carnegie Mellon University

WFST ¡in ¡Speech ¡Recogni5on ¡

  • “Recognize speech” v.s. “Wreck a nice beach”...
  • Search is performed in 3 phases.
  • Phase 0: Active Set Preparation.
  • Phase 1: Acoustic Score Computation.
  • Phase 2: WFST Search.

r eh k:RECOGNIZE/ w[RECOGNIZE]

ax g n ay z

n:NICE/ w[NICE]

ay

a:A/w[A]

p iy ch s

s:SPEECH/ w[SPEECH] k:WRECK/ w[WRECK] b:BEACH/ w[BEACH]

a s

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17/0

ε ε

8

slide-9
SLIDE 9

Carnegie Mellon University

r eh k:RECOGNIZE/ w[RECOGNIZE]

ax g n ay z

n:NICE/ w[NICE]

ay

a:A/w[A]

p iy ch s

s:SPEECH/ w[SPEECH] k:WRECK/ w[WRECK] b:BEACH/ w[BEACH]

a s

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17/0

ε ε

  • Phase 0: Active Set Preparation
  • Collect active hypotheses from previous frame.

9

WFST ¡in ¡Speech ¡Recogni5on ¡

slide-10
SLIDE 10

Carnegie Mellon University

r eh k:RECOGNIZE/ w[RECOGNIZE]

ax g n ay z

n:NICE/ w[NICE]

ay

a:A/w[A]

p iy ch s

s:SPEECH/ w[SPEECH] k:WRECK/ w[WRECK] b:BEACH/ w[BEACH]

a s

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17/0

ε ε

  • Phase 1: Acoustic Score Computation
  • Compute acoustic similarity between given speech and phonetic models

using Deep Neural Network

10

WFST ¡in ¡Speech ¡Recogni5on ¡

slide-11
SLIDE 11

Carnegie Mellon University

r eh k:RECOGNIZE/ w[RECOGNIZE]

ax g n ay z

n:NICE/ w[NICE]

ay

a:A/w[A]

p iy ch s

s:SPEECH/ w[SPEECH] k:WRECK/ w[WRECK] b:BEACH/ w[BEACH]

a s

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17/0

ε ε

  • Phase 2: WFST Search
  • Perform frame synchronous Viterbi beam search on WFST network.
  • If multiple transitions have same next state s, then the most likely (minimum score)

hypothesis is retained (i.e. ¡state ¡12, ¡14, ¡15…)

11

WFST ¡in ¡Speech ¡Recogni5on ¡

slide-12
SLIDE 12

Carnegie Mellon University

r eh k:RECOGNIZE/ w[RECOGNIZE]

ax g n ay z

n:NICE/ w[NICE]

ay

a:A/w[A]

p iy ch s

s:SPEECH/ w[SPEECH] k:WRECK/ w[WRECK] b:BEACH/ w[BEACH]

a s

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17/0

ε ε

  • Iterate these 3 phases until input audio ends.
  • Phase ¡0: ¡Ac7ve ¡Set ¡Prepara7on

12

WFST ¡in ¡Speech ¡Recogni5on ¡

slide-13
SLIDE 13

Carnegie Mellon University

r eh k:RECOGNIZE/ w[RECOGNIZE]

ax g n ay z

n:NICE/ w[NICE]

ay

a:A/w[A]

p iy ch s

s:SPEECH/ w[SPEECH] k:WRECK/ w[WRECK] b:BEACH/ w[BEACH]

a s

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17/0

ε ε

  • Phase ¡1: ¡Acous7c ¡Score ¡Computa7on

13

WFST ¡in ¡Speech ¡Recogni5on ¡

slide-14
SLIDE 14

Carnegie Mellon University

r eh k:RECOGNIZE/ w[RECOGNIZE]

ax g n ay z

n:NICE/ w[NICE]

ay

a:A/w[A]

p iy ch s

s:SPEECH/ w[SPEECH] k:WRECK/ w[WRECK] b:BEACH/ w[BEACH]

a s

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17/0

ε ε

  • Phase ¡2: ¡WFST ¡Search

14

WFST ¡in ¡Speech ¡Recogni5on ¡

slide-15
SLIDE 15

Carnegie Mellon University

r eh k:RECOGNIZE/ w[RECOGNIZE]

ax g n ay z

n:NICE/ w[NICE]

ay

a:A/w[A]

p iy ch s

s:SPEECH/ w[SPEECH] k:WRECK/ w[WRECK] b:BEACH/ w[BEACH]

a s

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17/0

ε ε

  • Phase ¡0: ¡Ac7ve ¡Set ¡Prepara7on

15

WFST ¡in ¡Speech ¡Recogni5on ¡

slide-16
SLIDE 16

Carnegie Mellon University

r eh k:RECOGNIZE/ w[RECOGNIZE]

ax g n ay z

n:NICE/ w[NICE]

ay

a:A/w[A]

p iy ch s

s:SPEECH/ w[SPEECH] k:WRECK/ w[WRECK] b:BEACH/ w[BEACH]

a s

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17/0

ε ε

  • Phase ¡1: ¡Acous7c ¡Score ¡Computa7on

16

WFST ¡in ¡Speech ¡Recogni5on ¡

slide-17
SLIDE 17

Carnegie Mellon University

r eh k:RECOGNIZE/ w[RECOGNIZE]

ax g n ay z

n:NICE/ w[NICE]

ay

a:A/w[A]

p iy ch s

s:SPEECH/ w[SPEECH] k:WRECK/ w[WRECK] b:BEACH/ w[BEACH]

a s

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17/0

ε ε

  • Phase ¡2: ¡WFST ¡Search

17

WFST ¡in ¡Speech ¡Recogni5on ¡

slide-18
SLIDE 18

Carnegie Mellon University

r eh k:RECOGNIZE/ w[RECOGNIZE]

ax g n ay z

n:NICE/ w[NICE]

ay

a:A/w[A]

p iy ch s

s:SPEECH/ w[SPEECH] k:WRECK/ w[WRECK] b:BEACH/ w[BEACH]

a s

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17/0

ε ε

  • Recognized result is an output symbol sequence over the best path.
  • Result: “RECOGNIZE SPEECH”

18

WFST ¡in ¡Speech ¡Recogni5on ¡

slide-19
SLIDE 19

Proposed ¡Approach ¡

GPU-­‑Accelerated ¡Scalable ¡DSR ¡

slide-20
SLIDE 20

Carnegie Mellon University

20

Distributed ¡Speech ¡Recogni5on ¡(DSR) ¡

  • Itera7on ¡control ¡
  • Allocate ¡or ¡deallocate ¡data ¡structures. ¡
  • Terminate ¡decoding ¡task. ¡
  • Feature ¡extrac7on ¡
  • Receive ¡audio ¡and ¡extract ¡feature ¡for ¡

current ¡iteraKon ¡(batch). ¡

  • Speaker ¡dependent ¡adaptaKon. ¡
  • Acous7c ¡score ¡computa7on ¡
  • Deep ¡Neural ¡Network ¡(Forward ¡PropagaKon). ¡
  • Graph ¡search ¡
  • Conduct ¡frame ¡synchronous ¡WFST ¡search. ¡
  • End-­‑of-­‑uSerance ¡detecKon. ¡
  • Post ¡processing ¡
  • Output ¡(LaUce) ¡processing. ¡
  • Sending ¡result ¡back ¡to ¡client. ¡

¡

Feature'Extrac+on'

Audio&Stream-

(1)$Extract$features$ from$ac1ve$audio5 streams$into$stacked$ feature$vector$ Graph'Search' Acous+c'Score' Computa+on' (2)$Stack$incoming$ frames$from$ac1ve$ audio5streams$and$ compute$likelihoods$$ (3)$Conduct$Viterbi$ beam$search$over$ WFST$and$conduct$

  • n5the5fly$rescoring$

Update-hyp.- (0)$Itera1on$control,$ data$prepara1on,$ result$handling.$ Post'Processing' (4)$Send$result$back$

  • ver$TCP/IP,$Data5

collec1on.$ Itera+on'Control'

slide-21
SLIDE 21

Carnegie Mellon University

21

Producer/Consumer ¡design ¡paOern ¡

Producer-Consumer multi-threaded model

  • Master/Slave ¡paSern. ¡
  • Decuple ¡processes ¡that ¡produce ¡and ¡

consume ¡data ¡at ¡different ¡rates. ¡

  • Advantages: ¡ ¡
  • Enhanced ¡data ¡sharing ¡
  • Processes ¡can ¡run ¡in ¡different ¡speeds. ¡
  • Buffered ¡communicaKon ¡between ¡
  • processes. ¡

¡

slide-22
SLIDE 22

Carnegie Mellon University

22

Architecture ¡1 ¡(Naïve) ¡

Feature'Extrac+on'

Audio&Stream-1-(A1)- Audio&Stream-N-(AN)- ….-

(1)$Extract$features$ from$ac1ve$audio5 streams$into$stacked$ feature$vector$ Graph'Search' Acous+c'Score' Computa+on' (2)$Stack$incoming$ frames$from$ac1ve$ audio5streams$and$ compute$likelihoods$$ (3)$Conduct$Viterbi$ beam$search$over$ WFST$and$conduct$

  • n5the5fly$rescoring$

Update-hyp.-(H1)- ….- Update-hyp.-(HN)- DFFT'Transform' And'Filterbanks' Acous+c'Model' Decoding'Graph' Language'Model' Shared-data-

  • structures-and-models-

Consumer'thread'(T1)' QUEUE' Producer'thread'

Itera+on'Control' Consumer-thread-

….- QUEUE'

(0)$Itera1on$control,$ data$prepara1on,$ result$handling.$ Feature'Extrac+on' Graph'Search' Acous+c'Score' Computa+on' Consumer'thread'(TN)' Feature'Extrac+on' Graph'Search' Acous+c'Score' Computa+on' Post'Processing' Post'Processing' Post'Processing' (4)$Send$result$back$

  • ver$TCP/IP,$Data5

collec1on.$

slide-23
SLIDE 23

Carnegie Mellon University

23

Architecture ¡1 ¡(Naïve) ¡

  • Pros. ¡
  • Maximum ¡decoding ¡performance. ¡
  • Simple ¡thread ¡management. ¡
  • Cons. ¡
  • Low ¡throughput ¡and ¡GPU ¡uKlizaKon ¡if ¡batch ¡size ¡is ¡small. ¡
  • Number ¡of ¡consumer ¡threads ¡can ¡be ¡limited ¡by ¡GPU ¡(by ¡maximum ¡

inflight ¡kernels) ¡

  • Not ¡suitable ¡for ¡many ¡CPU ¡+ ¡single ¡GPU ¡configuraKon. ¡

¡

slide-24
SLIDE 24

Carnegie Mellon University

24

Architecture ¡2 ¡

(1)$Extract$features$ from$ac1ve$audio5 streams$into$stacked$ feature$vector$ (2)$Stack$incoming$ frames$from$ac1ve$ audio5streams$and$ compute$likelihoods$$ (3)$Conduct$Viterbi$ beam$search$over$ WFST$and$conduct$

  • n5the5fly$rescoring$

Update'hyp.'(H1)' ….' Update'hyp.'(HN)' DFFT$Transform$ And$Filterbanks$ Acous6c$Model$ Decoding$Graph$ Language$Model$ QUEUE$ QUEUE$ Audio5Stream'1'(A1)' Audio5Stream'N'(AN)' ….' Shared'data' 'structures'and'models' QUEUE$ Producer$threads$

Feature$Extrac6on$ Consumer'thread' Acous6c$Score$ Computa6on$ Consumer'thread' Graph$Search$ Consumer'thread'

….' ….'

….' Acous6c$Score$ Computa6on$ Consumer'thread' Graph$Search$ Consumer'thread' Graph$Search$ Consumer'thread' (0)$Itera1on$control,$ data$prepara1on.$ Itera6on$Control$ Consumer'thread'

….' QUEUE$

(4)$Send$result$back$

  • ver$TCP/IP,$Data5

collec1on.$ Post$Processing$ Consumer'thread' ….'

slide-25
SLIDE 25

Carnegie Mellon University

25

Architecture ¡2 ¡

  • Pros. ¡
  • More ¡scalable ¡and ¡configurable ¡structure. ¡
  • Can ¡assign ¡more ¡threads ¡to ¡boSleneck ¡phase. ¡
  • interleaving ¡frames ¡from ¡mulKple ¡tasks. ¡
  • Can ¡achieve ¡maximum ¡uKlizaKon ¡of ¡GPU. ¡
  • Cons. ¡
  • Complex ¡threads ¡configuraKon. ¡
  • More ¡queuing ¡overheads ¡
  • Expected ¡relaKvely ¡higher ¡latency ¡compared ¡to ¡“structure ¡1” ¡

¡

slide-26
SLIDE 26

Evalua5on ¡Results ¡

GPU-­‑Accelerated ¡Scalable ¡DSR ¡

slide-27
SLIDE 27

Carnegie Mellon University

27

Evalua5on ¡Setup ¡

  • Language ¡Model: ¡ ¡
  • 1 ¡Million ¡Vocab. ¡3-­‑gram ¡(10.1M ¡n-­‑gram) ¡
  • Acous5c ¡Model: ¡ ¡
  • DNN: ¡(in) ¡253 ¡X ¡2048 ¡X ¡2048 ¡X ¡2048 ¡X ¡2048 ¡X ¡2048 ¡X ¡3432 ¡(out) ¡
  • Feature ¡type: ¡ ¡
  • 23th ¡Filterbank ¡coefficient ¡with ¡CMVN ¡
  • Evalua5on ¡Set: ¡ ¡
  • WSJ ¡eval92 ¡(20K, ¡333 ¡uSs.) ¡
  • PlaUorm: ¡
  • ¡Core ¡i7-­‑2600K ¡+ ¡NVIDIA ¡Tesla ¡K40 ¡

¡

slide-28
SLIDE 28

Carnegie Mellon University

28

Evalua5on ¡Results ¡

0.04 0.17 0.36 0.53 0.71 0.89 1.07 1.25 0.07 0.16 0.31 0.43 0.58 0.73 0.86 1.01 1.14

0.2 0.4 0.6 0.8 1 1.2 1.4 5 10 15 20 25 30 35 40

Real Time Factor (RTF) Number of Clients (Concurrent Access) GPU-STD3 (Architecture 1) GPU-STD3 (Architecture 2)

real-time (RTF=1)

  • GPU ¡only ¡configura7on ¡(G1, ¡G2): ¡1 ¡Tesla ¡K40. ¡
  • Architecture ¡2 ¡improves ¡speed ¡by ¡0.24 ¡RTF ¡(N=35) ¡
  • “Architecture ¡2” ¡processes ¡35 ¡concurrent ¡audio ¡streams ¡in ¡real-­‑Kme. ¡ ¡

WER: 6.7%

G1 G2 Iteration control 1 1 ASR decoder 2* Feature extraction 1 Acoustic score comp. 1* Graph search 2* Post processing 2

* use GPU

27

slide-29
SLIDE 29

Carnegie Mellon University

29

Evalua5on ¡Results ¡

0.04 0.17 0.36 0.53 0.71 0.89 1.07 1.25 0.07 0.16 0.31 0.43 0.58 0.73 0.86 1.01 1.14 0.18 0.17 0.18 0.22 0.27 0.33 0.39 0.46 0.53 0.99

0.2 0.4 0.6 0.8 1 1.2 1.4 10 20 30 40 50 60 70 80

Real Time Factor (RTF) Number of Clients (Concurrent Access) GPU-STD3 (Architecture 1) GPU-STD3 (Architecture 2) HYBRID-STD3 (Architecture 2)

real-time (RTF=1)

  • Hybrid ¡configura7on ¡(H2): ¡1 ¡GPU ¡+ ¡2 ¡CPU ¡(16 ¡cores). ¡
  • “Architecture ¡2” ¡processes ¡80 ¡concurrent ¡audio ¡streams ¡in ¡real-­‑Kme. ¡ ¡

¡ G1 G2 H2 Iteration control 1 1 1 ASR decoder 2 Feature extraction 1 2 Acoustic score comp. 1* 1* Graph search 2* 12 Post processing 1 2

* use GPU

slide-30
SLIDE 30

Conclusion ¡

GPU-­‑Accelerated ¡Scalable ¡DSR ¡

slide-31
SLIDE 31

Carnegie Mellon University

31

Conclusions ¡

¡• Proposed ¡scalable ¡and ¡configurable ¡DSR ¡server ¡architecture. ¡

  • “Architecture ¡2” ¡was ¡able ¡to ¡process ¡… ¡
  • 40 ¡concurrent ¡audio ¡streams ¡in ¡real-­‑Kme ¡with ¡1 ¡GPU ¡(K40c) ¡
  • 80 ¡concurrent ¡audio ¡streams ¡in ¡real-­‑Kme ¡with ¡1 ¡GPU ¡+ ¡16 ¡CPU ¡cores. ¡
  • Performance ¡can ¡be ¡improved ¡further ¡
  • Lock-­‑free ¡task ¡queue. ¡
  • OpKmal ¡/ ¡AdapKve ¡Thread ¡configuraKon. ¡
  • Smart ¡task ¡scheduling. ¡
slide-32
SLIDE 32

References ¡

slide-33
SLIDE 33

Carnegie Mellon University

References ¡

33

[Mass, 2010] Andrew L. Maas, Awni Y. Hannun, Christopher T. Lengerich, Peng Qi, Daniel Jurafsky, and Andrew Y. Ng. ” Increasing Deep Neural Network Acoustic Model Size for Large Vocabulary Continuous Speech Recognition”, ArXiv: 1406.7806 [cs.CL], 2010 [Schalkwyk, 2010] J. Schalkwyk, D. Beeferman, F.Beaufays, B. Byrne, C.chelba, M. Cohen, M. Kamvar, and B. Stropek, Google Search by Voice: A case study, Springer, 2010 [Bacchiani, 2014] M. Bacchiani, David Rybach, “Context Dependent State Tying For Speech Recognition Using Deep Neural Network Acoustic Models,” in Proc. ICASSP, 2014, pp.230-234. [Mohri, 2002] M. Mohri, F. Pereira, and M. Riley, “Weighted Finite-State Transducers in Speech Recognition,” Computer Speech and Language, vol. 16, no. 1, pp. 69-88, 2002 [Kanthak, 2002] S. Kanthak, H. Ney, M. Riley, and M. Mohri. A comparison of two LVR search optimization techniques. In

  • Proc. ICSLP, pp. 1309-1312, 2002.

[Chong, 2009] J. Chong, E. Gonina, Y. Yi, and K. Keutzer, “A Fully Data Parallel WFST-based Large Vocabulary Continuous Speech Recognition on a Graphix Processing Unit,” in Proc. Interspeech, Sep. 2009, pp. 1183-1186. [Ljolje, 1999] A. Ljolje, F. Pereira, and M. Riley, “Efficient general lattice generation and rescoring,” in Proc. Eurospeech, 1999 [Hori, 2007] T.Hori,C.Hori,Y.Minami,andA.Nakamura,“EfficientWFST-BasedOne- Pass Decoding With On-The-Fly Hypothesis Rescoring in Extremely Large Vocabulary Continuous Speech Recognition,” Audio, Speech, and Language Processing, IEEE Transactions on, vol. 15, no. 4, pp. 1352 –1365, may 2007.

slide-34
SLIDE 34

Q&A ¡

Thank ¡you ¡for ¡your ¡aQen7on. ¡