starcoder2 icon indicating copy to clipboard operation
starcoder2 copied to clipboard

ImportError: cannot import name 'top_k_top_p_filtering' from 'transformers'

Open gabriel-gubert opened this issue 11 months ago • 0 comments
trafficstars

Starting from transformers>=4.39.0, the top_k_top_p_filtering method is DEPRECATED. transformers<4.39.0 has this method. However, for transformers<4.39.0, one gets "ValueError: The checkpoint you are trying to load has model type starcoder2 but Transformers does not recognize this architecture. This could be because of an issue with the checkpoint, or because your version of Transformers is out of date."

gabriel-gubert avatar Nov 26 '24 14:11 gabriel-gubert