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

Offen
#105 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
25/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Ruhig
Tech-Stack
cpp

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
C++
Sterne
1.2k
Forks
80
Ø Merge
4 T. 20 Std.
Gemergte PRs (30 T.)
2

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus Anbeeld/beellama.cpp

Alle Issues in Anbeeld/beellama.cpp

Ähnliche Issues

Weitere Issues zu C++

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.