Package com.google.cloud.aiplatform.v1
Class SpeculativeDecodingSpec
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.aiplatform.v1.SpeculativeDecodingSpec
- All Implemented Interfaces:
SpeculativeDecodingSpecOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
@Generated
public final class SpeculativeDecodingSpec
extends com.google.protobuf.GeneratedMessage
implements SpeculativeDecodingSpecOrBuilder
Configuration for Speculative Decoding.Protobuf type
google.cloud.aiplatform.v1.SpeculativeDecodingSpec- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classConfiguration for Speculative Decoding.static final classDraft model speculation works by using the smaller model to generate candidate tokens for speculative decoding.static interfacestatic final classN-Gram speculation works by trying to find matching tokens in the previous prompt sequence and use those as speculation for generating new tokens.static interfacestatic enumNested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message, T extends Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage
com.google.protobuf.AbstractMessage.BuilderParentNested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic SpeculativeDecodingSpecstatic final com.google.protobuf.Descriptors.Descriptordraft model speculation.draft model speculation.N-Gram speculation.N-Gram speculation.com.google.protobuf.Parser<SpeculativeDecodingSpec>intintThe number of speculative tokens to generate at each step.booleandraft model speculation.inthashCode()booleanN-Gram speculation.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleannewBuilder(SpeculativeDecodingSpec prototype) protected SpeculativeDecodingSpec.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static SpeculativeDecodingSpecparseDelimitedFrom(InputStream input) static SpeculativeDecodingSpecparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static SpeculativeDecodingSpecparseFrom(byte[] data) static SpeculativeDecodingSpecparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static SpeculativeDecodingSpecparseFrom(com.google.protobuf.ByteString data) static SpeculativeDecodingSpecparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static SpeculativeDecodingSpecparseFrom(com.google.protobuf.CodedInputStream input) static SpeculativeDecodingSpecparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static SpeculativeDecodingSpecparseFrom(InputStream input) static SpeculativeDecodingSpecparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static SpeculativeDecodingSpecparseFrom(ByteBuffer data) static SpeculativeDecodingSpecparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<SpeculativeDecodingSpec>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessage
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
DRAFT_MODEL_SPECULATION_FIELD_NUMBER
public static final int DRAFT_MODEL_SPECULATION_FIELD_NUMBER- See Also:
-
NGRAM_SPECULATION_FIELD_NUMBER
public static final int NGRAM_SPECULATION_FIELD_NUMBER- See Also:
-
SPECULATIVE_TOKEN_COUNT_FIELD_NUMBER
public static final int SPECULATIVE_TOKEN_COUNT_FIELD_NUMBER- See Also:
-
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage
-
getSpeculationCase
- Specified by:
getSpeculationCasein interfaceSpeculativeDecodingSpecOrBuilder
-
hasDraftModelSpeculation
public boolean hasDraftModelSpeculation()draft model speculation.
.google.cloud.aiplatform.v1.SpeculativeDecodingSpec.DraftModelSpeculation draft_model_speculation = 2;- Specified by:
hasDraftModelSpeculationin interfaceSpeculativeDecodingSpecOrBuilder- Returns:
- Whether the draftModelSpeculation field is set.
-
getDraftModelSpeculation
draft model speculation.
.google.cloud.aiplatform.v1.SpeculativeDecodingSpec.DraftModelSpeculation draft_model_speculation = 2;- Specified by:
getDraftModelSpeculationin interfaceSpeculativeDecodingSpecOrBuilder- Returns:
- The draftModelSpeculation.
-
getDraftModelSpeculationOrBuilder
draft model speculation.
.google.cloud.aiplatform.v1.SpeculativeDecodingSpec.DraftModelSpeculation draft_model_speculation = 2;- Specified by:
getDraftModelSpeculationOrBuilderin interfaceSpeculativeDecodingSpecOrBuilder
-
hasNgramSpeculation
public boolean hasNgramSpeculation()N-Gram speculation.
.google.cloud.aiplatform.v1.SpeculativeDecodingSpec.NgramSpeculation ngram_speculation = 3;- Specified by:
hasNgramSpeculationin interfaceSpeculativeDecodingSpecOrBuilder- Returns:
- Whether the ngramSpeculation field is set.
-
getNgramSpeculation
N-Gram speculation.
.google.cloud.aiplatform.v1.SpeculativeDecodingSpec.NgramSpeculation ngram_speculation = 3;- Specified by:
getNgramSpeculationin interfaceSpeculativeDecodingSpecOrBuilder- Returns:
- The ngramSpeculation.
-
getNgramSpeculationOrBuilder
N-Gram speculation.
.google.cloud.aiplatform.v1.SpeculativeDecodingSpec.NgramSpeculation ngram_speculation = 3;- Specified by:
getNgramSpeculationOrBuilderin interfaceSpeculativeDecodingSpecOrBuilder
-
getSpeculativeTokenCount
public int getSpeculativeTokenCount()The number of speculative tokens to generate at each step.
int32 speculative_token_count = 1;- Specified by:
getSpeculativeTokenCountin interfaceSpeculativeDecodingSpecOrBuilder- Returns:
- The speculativeTokenCount.
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static SpeculativeDecodingSpec parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static SpeculativeDecodingSpec parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static SpeculativeDecodingSpec parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static SpeculativeDecodingSpec parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static SpeculativeDecodingSpec parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static SpeculativeDecodingSpec parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static SpeculativeDecodingSpec parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static SpeculativeDecodingSpec parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static SpeculativeDecodingSpec parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static SpeculativeDecodingSpec parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected SpeculativeDecodingSpec.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-