Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SpeculativeDecodingSpec
- Inherits:
-
Object
- Object
- Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SpeculativeDecodingSpec
- 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
Configuration for Speculative Decoding.
Instance Attribute Summary collapse
-
#draft_model_speculation ⇒ Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SpeculativeDecodingSpecDraftModelSpeculation
Draft model speculation works by using the smaller model to generate candidate tokens for speculative decoding.
-
#ngram_speculation ⇒ Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SpeculativeDecodingSpecNgramSpeculation
N-Gram speculation works by trying to find matching tokens in the previous prompt sequence and use those as speculation for generating new tokens.
-
#speculative_token_count ⇒ Fixnum
The number of speculative tokens to generate at each step.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudAiplatformV1SpeculativeDecodingSpec
constructor
A new instance of GoogleCloudAiplatformV1SpeculativeDecodingSpec.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudAiplatformV1SpeculativeDecodingSpec
Returns a new instance of GoogleCloudAiplatformV1SpeculativeDecodingSpec.
35365 35366 35367 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 35365 def initialize(**args) update!(**args) end |
Instance Attribute Details
#draft_model_speculation ⇒ Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SpeculativeDecodingSpecDraftModelSpeculation
Draft model speculation works by using the smaller model to generate candidate
tokens for speculative decoding.
Corresponds to the JSON property draftModelSpeculation
35352 35353 35354 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 35352 def draft_model_speculation @draft_model_speculation end |
#ngram_speculation ⇒ Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SpeculativeDecodingSpecNgramSpeculation
N-Gram speculation works by trying to find matching tokens in the previous
prompt sequence and use those as speculation for generating new tokens.
Corresponds to the JSON property ngramSpeculation
35358 35359 35360 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 35358 def ngram_speculation @ngram_speculation end |
#speculative_token_count ⇒ Fixnum
The number of speculative tokens to generate at each step.
Corresponds to the JSON property speculativeTokenCount
35363 35364 35365 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 35363 def speculative_token_count @speculative_token_count end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
35370 35371 35372 35373 35374 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 35370 def update!(**args) @draft_model_speculation = args[:draft_model_speculation] if args.key?(:draft_model_speculation) @ngram_speculation = args[:ngram_speculation] if args.key?(:ngram_speculation) @speculative_token_count = args[:speculative_token_count] if args.key?(:speculative_token_count) end |