Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SpeculativeDecodingSpecNgramSpeculation
- Inherits:
-
Object
- Object
- Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SpeculativeDecodingSpecNgramSpeculation
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/aiplatform_v1/classes.rb,
lib/google/apis/aiplatform_v1/representations.rb,
lib/google/apis/aiplatform_v1/representations.rb
Overview
N-Gram speculation works by trying to find matching tokens in the previous prompt sequence and use those as speculation for generating new tokens.
Instance Attribute Summary collapse
-
#ngram_size ⇒ Fixnum
The number of last N input tokens used as ngram to search/match against the previous prompt sequence.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudAiplatformV1SpeculativeDecodingSpecNgramSpeculation
constructor
A new instance of GoogleCloudAiplatformV1SpeculativeDecodingSpecNgramSpeculation.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudAiplatformV1SpeculativeDecodingSpecNgramSpeculation
Returns a new instance of GoogleCloudAiplatformV1SpeculativeDecodingSpecNgramSpeculation.
33846 33847 33848 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 33846 def initialize(**args) update!(**args) end |
Instance Attribute Details
#ngram_size ⇒ Fixnum
The number of last N input tokens used as ngram to search/match against the
previous prompt sequence. This is equal to the N in N-Gram. The default value
is 3 if not specified.
Corresponds to the JSON property ngramSize
33844 33845 33846 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 33844 def ngram_size @ngram_size end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
33851 33852 33853 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 33851 def update!(**args) @ngram_size = args[:ngram_size] if args.key?(:ngram_size) end |