abetlen / abetlen/llama-cpp-python

How to use GPU?

Đang mở
#576 21 bình luận 0 reaction 0 người được giao Xem trên GitHub
build hardware
Ngôn ngữ chính
Python
Star
10.6k
Fork
1.4k
Chỉ số merge pull request
Chỉ số pull request đang chờ

Mô tả

I run llama cpp python on my new PC which has a built in RTX 3060 with 12GB VRAM
This is my code:
```
from llama_cpp import Llama
llm = Llama(model_path="./wizard-mega-13B.ggmlv3.q4_0.bin", n_ctx=2048)
def generate(params):
print(params["promt"])
output = llm(params["promt"], max_tokens=params["max_tokens"], stop=params["stop"], echo=params["echo"])
```

This code works and I get the results that I want but the inference is terribly slow. for a few tokens it takes up to 10 seconds. How do I minimize this time? I dont think my GPU is doing the heavy lifting here...

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.