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

未关闭
#105 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
冷清
技术栈
cpp

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
C++
星标
1.2k
派生
80
平均合并
4 天 20 小时
30 天内合并 PR
2

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Anbeeld/beellama.cpp 的其他 Issue

查看 Anbeeld/beellama.cpp 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。