Vertex AI v1 API - Class SpeculativeDecodingSpec.Types.NgramSpeculation (3.25.0)
public sealed class SpeculativeDecodingSpec.Types.NgramSpeculation : IMessage<SpeculativeDecodingSpec.Types.NgramSpeculation>, IEquatable<SpeculativeDecodingSpec.Types.NgramSpeculation>, IDeepCloneable<SpeculativeDecodingSpec.Types.NgramSpeculation>, IBufferMessage, IMessage
Reference documentation and code samples for the Vertex AI v1 API class SpeculativeDecodingSpec.Types.NgramSpeculation.
N-Gram speculation works by trying to find matching tokens in the
previous prompt sequence and use those as speculation for generating
new tokens.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-09-01 UTC."],[],[]]