浏览代码

Restore system prompt on requests and default `num_keep` to `0`

Jeffrey Morgan 1 年之前
父节点
当前提交
17678b7225
共有 2 个文件被更改,包括 3 次插入1 次删除
  1. 1 1
      api/types.go
  2. 2 0
      llm/llama.go

+ 1 - 1
api/types.go

@@ -293,7 +293,7 @@ func DefaultOptions() Options {
 	return Options{
 	return Options{
 		// options set on request to runner
 		// options set on request to runner
 		NumPredict:       -1,
 		NumPredict:       -1,
-		NumKeep:          4,
+		NumKeep:          0,
 		Temperature:      0.8,
 		Temperature:      0.8,
 		TopK:             40,
 		TopK:             40,
 		TopP:             0.9,
 		TopP:             0.9,

+ 2 - 0
llm/llama.go

@@ -529,6 +529,8 @@ func (llm *llama) Predict(ctx context.Context, prevContext []int, prompt string,
 		"stop":              llm.Stop,
 		"stop":              llm.Stop,
 	}
 	}
 
 
+	fmt.Println(request)
+
 	// Handling JSON marshaling with special characters unescaped.
 	// Handling JSON marshaling with special characters unescaped.
 	buffer := &bytes.Buffer{}
 	buffer := &bytes.Buffer{}
 	enc := json.NewEncoder(buffer)
 	enc := json.NewEncoder(buffer)