Language Model Decoding as Direct Metrics Optimization