Skip to content

Is there anyway to save context for the model ? #2110

Closed Answered by KerfuffleV2
mdrokz asked this question in Q&A
Discussion options

You must be logged in to vote

so basically i can load prompts from db

Well, not directly: llama.cpp (currently) only loads the cached prompts from binary files.

My advice is to start out playing around with the commandline options I mentioned so you understand how the prompt cache works. After that, you can start thinking about how to interface with a DB.

Probably the approach that makes the most sense is to leave the cached prompts as files and use the DB to index rather than trying to actually the data inside the DB. Note also that the files can get quite large. The size is basically proportional to the context size: with 16bit memory (the default) I believe 2,048 tokens will end up with a 1GB file. Most of the ti…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@mdrokz
Comment options

@KerfuffleV2
Comment options

Answer selected by mdrokz
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants