More granular selection of which hardware to use for what task

Đang mở
#48 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
30/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
ai, backend-api-design

Hướng nghiên cứu

Issue không nêu tên các tệp, bài kiểm thử hoặc entry point. Trước tiên, hãy xác định các entry point của SDK dùng để khởi chạy mô hình và cấu hình suy luận, sau đó xác định xem có hỗ trợ bố trí CPU/GPU riêng cho quá trình xử lý Main, Speculative và Context hay không; công việc được xem là hoàn tất nếu bao gồm các tùy chọn điều khiển bố trí được yêu cầu và chẩn đoán Speculative Decoding, hoặc một tập con có phạm vi được xác định rõ ràng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Would it be possible to add a way to launch/use a model with this configuration?

  • Run Main Model inference on CPU (RAM)
  • Run Speculative Model on CPU (RAM)
  • Run initial context processing on GPU, then move it to CPU (RAM) as well (or only leave this on the GPU if that wouldn’t work)
  • Same for the Speculative Model; however, its context size and potential speedup of computation is (probably) negligible.

I am asking because in my testing the speed is fine when running everything on CPU (RAM), including speculative decoding—except for the initial context processing. This step requires a relatively low amount of VRAM but is orders of magnitude faster when computed on the GPU.

Also, as a somewhat unrelated sidenote: I am achieving much higher speeds with these speculative decoding settings (using llama 3.3 70B Q4_K_M with llama 3.2 1B Q8_0, with similar results for other main model sizes):

  • Probability: 0.9
  • Min: 0
  • Max: 5
  • Tokens matched: ≥ ~35%
  • Speedup: ~1.33x

It would be handy if you could further display all tokens for speculative decoding—both those wasted and those used—along with their respective probabilities, in some kind of debug view to fine-tune the process. Alternatively, an adaptive algorithm could be implemented to determine the best settings either during runtime or as an initial evaluation.

Ngôn ngữ chính
Python
Star
886
Fork
168
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của lmstudio-ai/lmstudio-python

Tất cả issue của lmstudio-ai/lmstudio-python

Issue tương tự

Thêm issue về Python

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.