Different Input Lengths
#9
by
ShivanshMathur007
- opened
Can anyone describe the difference between max_pos_embeddings=512(config.json) , max_seq_length=128(sentence_bert_config.json), model_max_length=512(tokenizer_config.json).
Also how can I set these values by using langchain.
Hello!
The 512 values are defined by the MiniLM base model, whereas 128 is the maximum sequence length that was used when finetuning the model to be an embedding model. As a result, 128 is the recommended maximum sequence length (after which you'll get much worse embeddings), and 512 is the maximum sequence length after which the model will simply crash.
I'm not sure how to set these values in LangChain.
- Tom Aarsen