Skip to content

Commit

Permalink
updated python default params
Browse files Browse the repository at this point in the history
changed test to slow test
  • Loading branch information
prabod committed Jan 23, 2024
1 parent 46e8f15 commit c0b2c4f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions python/sparknlp/annotator/seq2seq/llama2_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,9 @@ def __init__(self, classname="com.johnsnowlabs.nlp.annotators.seq2seq.LLAMA2Tran
minOutputLength=0,
maxOutputLength=20,
doSample=False,
temperature=1.0,
temperature=0.6,
topK=50,
topP=1.0,
topP=0.9,
repetitionPenalty=1.0,
noRepeatNgramSize=0,
ignoreTokenIds=[],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import org.scalatest.flatspec.AnyFlatSpec

class LLAMA2TestSpec extends AnyFlatSpec {

"llama-7b" should "should handle temperature=0 correctly and not crash when predicting more than 1 element with doSample=True" taggedAs FastTest in {
"llama-7b" should "should handle temperature=0 correctly and not crash when predicting more than 1 element with doSample=True" taggedAs SlowTest in {
// Even tough the Paper states temperature in interval [0,1), using temperature=0 will result in division by 0 error.
// Also DoSample=True may result in infinities being generated and distFiltered.length==0 which results in exception if we don't return 0 instead internally.
val testData = ResourceHelper.spark
Expand Down

0 comments on commit c0b2c4f

Please sign in to comment.