From BERT to LLMs: Comparing and Understanding Chinese Classifier Prediction in Language Models