A YANG module comes with its own revision history and has rules for backward compatibility.
However, it is also interesting to have a way to model sets of YANG models. This can be useful in determining which set of models are supported in an implementation. This is where the YANG library becomes very useful. This allows a way of tracking which set of YANG modules are supported on a particular server.