GRMM is a toolkit for performing inference and learning in graphical models of arbitrary structure. Its main features are:

GRMM supports arbitrary factor graphs, which subsume both Markov random fields and Bayesian networks.
It includes efficient implementations of several inference algorithms, including junction tree, belief propagation, and Gibbs sampling. All inference algorithms work for factors of any size (not just pairwise). [Developer's Guide]

GRMM is implemented as an add-on package to MALLET. It makes heavy use of MALLET's data structures and optimization facilities. Its name stands for GRaphical Models in Mallet. It has been developed for several years, and results from GRMM have been used in several papers. It is written by Charles Sutton.

—

The toolkit is Open Source Software, and is released under the
Common Public License.
You are welcome to use the code under the terms of the licence for
research or commercial purposes, however please acknowledge its use
with a citation: