Feature Request: Any chance we could get system prompt caching in this fork?

Đang mở
#105 2 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
25/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
cpp
Lĩnh vực
backend, machine-learning

Hướng nghiên cứu

The request describes caching a fixed system prompt to avoid reprocessing it across sessions and points to CachyLLama for inspiration, but names no files, tests, or entry points. Start by reading that project’s caching implementation and this fork’s prompt and cache handling; define what should be cached and how cache reuse behaves, then add tests showing repeated sessions avoid reprocessing while producing the expected output.

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

Mô tả

enhancement
Prerequisites
  • I am running the latest code. Mention the version if possible as well.
  • I carefully followed the README.md.
  • I searched using keywords relevant to my issue to make sure that I am creating a new issue that is not already open (or closed).
  • I reviewed the Discussions, and have a new and useful enhancement to share.
Feature Description

This fork has some caching features that caught my eyes:
https://github.com/fewtarius/CachyLLama
I particularly desire the system prompt caching because it affect every new session in agentic coding.
Hard cache the system prompt section and never let go as it always need to be used when using coding agents.

Motivation

I saw the reprocessing of the first 20K context happening very often. (Qwen-code CLI initial prompt with some setup is 20K large.) I noticed that even if I run a small task and start another new session, it still do the 20K re-processing for about 15s~20s.
Since the system prompt for each session is basically fixed. Imo, it is worth it for caching it even if just in RAM and don't persist across restart. Multiple of 15s adds up and lots of time can be saved.

Possible Implementation

Can reference to the CachyLLama project for inspiration.

Ngôn ngữ chính
C++
Star
1.2k
Fork
80
Merge trung bình
4 ngày 20 giờ
Pull request đã merge (30 ngày)
2

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

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 Anbeeld/beellama.cpp

Tất cả issue của Anbeeld/beellama.cpp

Issue tương tự

Thêm issue về C++

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.