I had great success with Justin Domke JGMT . It is written in C ++ and can be used from Matlab. I would recommend you take a look at this library first.
There are many other options: CRFSuite , which is written in C ++, but easily accessible from Python, etc.
CRF ++, ++ Python Ruby.