llm icon indicating copy to clipboard operation
llm copied to clipboard

Perplexity can/will segfault over large input sizes

Open philpax opened this issue 2 years ago • 3 comments

The newly-added perplexity will segfault with large enough input. This is likely because the current implementation of the LLaMA model isn't really set up to handle going over context, and updating it (#210) should fix this.

The other models segfault too (from a quick test), but perplexity is primarily useful for comparing against llama.cpp, so I'm not as fussed. It would be nice to figure this out at some point, though.

philpax avatar May 20 '23 21:05 philpax

Just a heads-up: updating LLaMA did not in fact fix this. We have other bugs we need to fix here, but the segfault is within ggml, so it's harder to track down.

philpax avatar Jun 18 '23 21:06 philpax

Note: https://github.com/rustformers/llm/pull/362 (context size change) affects this issue due to this line:

https://github.com/rustformers/llm/blob/16522344477a0f8d4140a5f6a80fe446d6fc7795/crates/llm-base/src/inference_session.rs#L504

stevietrouble avatar Jul 12 '23 03:07 stevietrouble

Good catch! That almost certainly fixes this. Need to retest...

philpax avatar Jul 12 '23 07:07 philpax