fix memory check

This commit is contained in:
Michael Yang
2023-10-12 09:34:16 -07:00
parent d790bf9916
commit 92189a5855
4 changed files with 27 additions and 18 deletions

View File

@@ -509,7 +509,7 @@ type PredictRequest struct {
Stop []string `json:"stop,omitempty"`
}
const maxBufferSize = 512 * 1000 // 512KB
const maxBufferSize = 512 * format.KiloByte
func (llm *llama) Predict(ctx context.Context, prevContext []int, prompt string, fn func(api.GenerateResponse)) error {
prevConvo, err := llm.Decode(ctx, prevContext)