t

com.johnsnowlabs.nlp

HasGeneratorProperties

trait HasGeneratorProperties extends AnyRef

Parameters to configure beam search text generation.

Self Type
HasGeneratorProperties with ParamsAndFeaturesWritable
Linear Supertypes
AnyRef, Any
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. HasGeneratorProperties
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. val beamSize: IntParam

    Beam size for the beam search algorithm (Default: 4)

  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  7. val doSample: BooleanParam

    Whether or not to use sampling, use greedy decoding otherwise (Default: false)

  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. def getBeamSize: Int

  12. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. def getDoSample: Boolean

  14. def getMaxOutputLength: Int

  15. def getMinOutputLength: Int

  16. def getNReturnSequences: Int

  17. def getNoRepeatNgramSize: Int

  18. def getRandomSeed: Option[Long]

  19. def getRepetitionPenalty: Double

  20. def getTask: Option[String]

  21. def getTemperature: Double

  22. def getTopK: Int

  23. def getTopP: Double

  24. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  25. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  26. val maxInputLength: IntParam

    max length of the input sequence (Default: 0)

  27. val maxOutputLength: IntParam

    Maximum length of the sequence to be generated (Default: 20)

  28. val minOutputLength: IntParam

    Minimum length of the sequence to be generated (Default: 0)

  29. val nReturnSequences: IntParam

    The number of sequences to return from the beam search.

  30. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  31. val noRepeatNgramSize: IntParam

    If set to int > 0, all ngrams of that size can only occur once (Default: 0)

  32. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  33. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  34. val randomSeed: Option[Long]

    Optional Random seed for the model.

    Optional Random seed for the model. Needs to be of type Int.

  35. val repetitionPenalty: DoubleParam

    The parameter for repetition penalty (Default: 1.0).

    The parameter for repetition penalty (Default: 1.0). 1.0 means no penalty. See this paper for more details.

  36. def setBeamSize(beamNum: Int): HasGeneratorProperties.this

  37. def setDoSample(value: Boolean): HasGeneratorProperties.this

  38. def setMaxInputLength(value: Int): HasGeneratorProperties.this
  39. def setMaxOutputLength(value: Int): HasGeneratorProperties.this

  40. def setMinOutputLength(value: Int): HasGeneratorProperties.this

  41. def setNReturnSequences(beamNum: Int): HasGeneratorProperties.this

  42. def setNoRepeatNgramSize(value: Int): HasGeneratorProperties.this

  43. def setRandomSeed(value: Long): HasGeneratorProperties.this

  44. def setRepetitionPenalty(value: Double): HasGeneratorProperties.this

  45. def setTask(value: String): HasGeneratorProperties.this

  46. def setTemperature(value: Double): HasGeneratorProperties.this

  47. def setTopK(value: Int): HasGeneratorProperties.this

  48. def setTopP(value: Double): HasGeneratorProperties.this

  49. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  50. val task: Param[String]

    Set transformer task, e.g.

    Set transformer task, e.g. "summarize:" (Default: "").

  51. val temperature: DoubleParam

    The value used to module the next token probabilities (Default: 1.0)

  52. def toString(): String
    Definition Classes
    AnyRef → Any
  53. val topK: IntParam

    The number of highest probability vocabulary tokens to keep for top-k-filtering (Default: 50)

  54. val topP: DoubleParam

    If set to float < 1.0, only the most probable tokens with probabilities that add up to topP or higher are kept for generation (Default: 1.0)

  55. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  56. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  57. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AnyRef

Inherited from Any

getParam

param

setParam

Ungrouped