Skip to content

What does the prompt context mean? #1838

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

You must be logged in to vote

The main example/common part is complicated code designed to handle a bunch of features at the same time. I can't really tell specifically what it does, or what every variable is for. (Not because I don't want to, but I didn't write it and haven't interacted with it much). You'll have to figure that out yourself.

"State" exists in a number of places. Something like keeping track of how many tokens have been evaluated is a type of state. There are also tensors (in the context) for holding the model's actual state (you could call that its short term memory).

don't we also need to clear out ctx?

The point of that code isn't to just completely reset the state, like you'd restarted the progr…

Replies: 6 comments 9 replies

Comment options

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

@KerfuffleV2
Comment options

Comment options

You must be logged in to vote
3 replies
@KerfuffleV2
Comment options

@siddhsql
Comment options

@KerfuffleV2
Comment options

Comment options

You must be logged in to vote
3 replies
@KerfuffleV2
Comment options

Answer selected by SlyEcho
@aehlke
Comment options

@KerfuffleV2
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@aehlke
Comment options

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
4 participants