Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
Signed-off-by: mudler <[email protected]>
  • Loading branch information
mudler committed Oct 7, 2023
1 parent 948fdec commit 1d2ac38
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions llama_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ Do a simple math calculation: How much is 2+2?
testModelPath,
llama.EnableF16Memory,
llama.SetContext(128),
llama.EnableEmbeddings,
llama.SetGPULayers(10),
)
Expect(err).ToNot(HaveOccurred())
Expand All @@ -114,8 +113,12 @@ Do a simple math calculation: How much is 2+2?

model, err := getModel()
text, err := model.Predict(`[INST] Answer to the following question:
how much is 2+2?
[/INST]`)
Do a simple math calculation: How much is 2+2?
[/INST]`,
SetTemperature(1.0),
SetTopP(0.8),
SetTopK(40),
)
Expect(err).ToNot(HaveOccurred(), text)
Expect(text).To(ContainSubstring("4"), text)
})
Expand Down

0 comments on commit 1d2ac38

Please sign in to comment.