# \[ANN\] HMMGradients.jl

**URL:** <https://discourse.julialang.org/t/ann-hmmgradients-jl/54542>\
**Category:** Package Announcements\
**Created:** [February 3, 2021, 3:55pm UTC](https://discourse.julialang.org/t/ann-hmmgradients-jl/54542 "2021-02-03T15:55:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nantonel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nantonel/32/2889_2.png) [@nantonel](https://discourse.julialang.org/u/nantonel)\
**Post date:** [February 3, 2021, 3:55pm UTC](https://discourse.julialang.org/t/ann-hmmgradients-jl/54542/1 "2021-02-03T15:55:00Z")

</div>

I’m happy to announce [HMMGradients.jl](https://github.com/idiap/HMMGradients.jl)! This package makes it possible to use gradient descent optimization to learn the parameters of Hidden Markov Models (HMMs). These optimization techniques allow the use of _deep neural networks_ within HMMs as generally adopted by modern speech recognition systems.

Formally, HMMGradients.jl extends [ChainRulesCore.jl](https://github.com/JuliaDiff/ChainRulesCore.jl) making it possible to train HMM models using the automatic differentiation frameworks of Julia, for example using [Zygote](https://github.com/FluxML/Zygote.jl) and machine learning libraries like [Flux](https://github.com/FluxML/Flux.jl). Numerical stable algorithms to compute forward, backward and posterior probabilities of HMMs are also provided. The [documentation](https://idiap.github.io/HMMGradients.jl/dev/) explains the basic concepts of HMMs and introduces the procedures for training them. This software package can be for speech recognition tasks and for other applications where HMM are useful such as alignment of bio-sequences and protein folding to cite only a few.

---

<div class="post-metadata">

**Author:** ![gdalle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdalle/32/224680_2.png) [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Post date:** [August 6, 2022, 9:51am UTC](https://discourse.julialang.org/t/ann-hmmgradients-jl/54542/2 "2022-08-06T09:51:23Z")

</div>

I’m a little late to the party but your package is awesome! Exactly what I was looking for. Do you mind if I adapt it for HMMs which are not time-homogeneous (i.e. where the transitions and emissions change at each step)?

---

<div class="post-metadata">

**Author:** ![Jack](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jack/32/17406_2.png) [@Jack](https://discourse.julialang.org/u/Jack)\
**Post date:** [January 11, 2023, 7:54am UTC](https://discourse.julialang.org/t/ann-hmmgradients-jl/54542/3 "2023-01-11T07:54:27Z")

</div>

Thank you for the awesome package!  
Possible to pipe to use GPU for extra performance boost? Looks like the main challenge is to implement `ChainRulesCore.rrule` functions on CuArrays.
