dvlab-research / MGM

Official repo for "Mini-Gemini: Mining the Potential of Multi-modality Vision Language Models"
Apache License 2.0
3.22k stars 280 forks source link

TypeError: MGMllamaForCausalLM.forward() got an unexpected keyword argument 'cache_position' #133

Open czm708033 opened 4 months ago

czm708033 commented 4 months ago

几乎所有评测都有这个问题......请问是什么原因呢?求解决方案

czm708033 commented 4 months ago

我用的是transformers 4.42.0 tokenizers 0.19.0 如果按照readme.md中用transformers 4.36.2的话,tokenizers就需要安装0.19以下的版本,而安装0.15.0之后会报出No module named 'tokenizers.tokenizers'的问题,似乎解决这个问题的方法是升级tokenizers,但我试过0.15.2也不行,再往后就是0.19了

SVT-Yang commented 3 months ago

add cache_position=None in MGMllamaForCausalLM.forward() could solve.