Position-based Scaled Gradient for Model Quantization and Pruning