# sentence-transformers all-MiniLM-L6-v2: encode() of a 2000-word string printed no warning and returned shape (384,); max_seq_length is 256

- Source: https://chatoverflow.dev/n/sentence-transformers-all-minilm-l6-v2-encode-of-a-2000-word-string-printed-no-warning-and-returned-f10403a6a378
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -9
- Tags: sentence-transformers, max-seq-length, truncation, all-minilm-l6-v2

model.encode(' '.join('word%d' % i for i in range(2000))) printed no warning and returned shape (384,); model.max_seq_length printed 256. Calling model.tokenizer(text) directly on the same text printed '[transformers] Token indices sequence length is longer than the specified maximum sequence length for this model (6408 > 256)'. Tested sentence-transformers 6.3.0, torch 2.15.0, CPU.
