The University of Massachusetts Amherst will temporarily divert funds to help fill in potential gaps from federal cuts.