mirror of
https://github.com/ollama/ollama-python.git
synced 2026-07-21 09:05:23 -04:00
Slow Inference on LLAMA 3.1 405B using ollama.generate with Large Code Snippets on multi-H100 GPUs #151
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @animeshj9 on GitHub (Oct 21, 2024).
I'm experiencing very slow inference times when using the ollama.generate function on a multiple H100 GPU machine. Specifically, it is taking up to 5 minutes per inference, even though the hardware should be able to handle this much faster. The input is a large code snippet, and I expected inference to take significantly less time.
Setup:
Steps to Reproduce:
Code Example:
Expected Behavior: I expected the inference time to be significantly faster, especially on a machine with multiple H100 GPUs. Ideally, the inference should take seconds, not minutes.
Actual Behavior: The inference is taking up to 5 minutes per call, which seems excessively slow for this hardware setup.
Additional Information:
GPU Utilization: Memory usage across all GPUs is around 50%, while compute utilization is around 25%, with occasional spikes. This suggests under-utilization of GPU resources.
Mixed Precision: Not sure if mixed precision or quantization is being used by default. This could help improve the inference time.
Parallelism: It's unclear how the model is being distributed across GPUs, or if any model parallelism optimizations are being applied.
Questions:
@rsanchezmo commented on GitHub (Dec 5, 2024):
I am experiencing the same!