• nicole pardal's avatar
    embeddings: modified batch size (#13429) · 3475d915
    nicole pardal authored
    
    
    This PR detects embedding models and sets batch_size = context_size so the full input fits in a single batch.
    Previously, if batch size was smaller than the input, tokens could be split across batches and cause a SIGTRAP crash.
    This change ensures all tokens stay in one batch and prevents crashes.
    Fixes: #12938 #13054
    Co-authored-by: default avatarJesse Gross <jesse@ollama.com>
    3475d915
server.go 53.8 KB