Error when loading model KeyError: 'qwen2'

#11
by longluu - opened

Hi, thanks for publishing this model and its performance is quite impressive. When I tried to load the model using sentence-transformers, it returns this error "KeyError: 'qwen2'". Do you have any insights on that? Thanks.

Hello!
I'm not 100% sure what's causing this, but I have two ideas:

  1. Make sure to add trust_remote_code=True when loading the model via Sentence Transformers (see also the usage snippet).
  2. Consider upgrading the transformers version, e.g. pip install -U transformers (and then perhaps also sentence-transformers if it introduces new issues)

  • Tom Aarsen

Sign up or log in to comment