In this model, states are allowed to have different stationary frequencies, and exchangeability rates between states are equal. Its only argument, baseFrequencies, codes for said stationary frequencies. While this is usually used for DNA (and therefore has four states), the function can take any number of states, and therefore be used for many other applications (such as aminoacid or morphological evolution).
The F81 rate matrix elements will be of the form:
Q[i, j] = c * baseFrequencies[j]
where c is a constant needed to normalize the average rate to 1
# stationary base frequencies
baseFrequencies ~ dnDirichlet(v(1,1,1,1))
# create an F81 rate matrix
Q := fnF81(baseFrequencies)