Get desktop application:
View/edit binary Protocol Buffers messages
Returns the score (e.g., log pplx) given the text.
If `prefix` is not empty, it will be prepended to `suffix`, but the score will be calculated only on `suffix`.
Returns generated texts using the text prefix in the request.
Returns a stream of generated texts using the text prefix in the request.
Returns a text embedding given the text.
Returns the score and gradients given the text.
Map of gradients of tensors keyed by tensor name.
Used in:
The decoded text. Depending on the servable model params, the result may or may not include the input prefix text in SamplingDecodeRequest. See DecodeHParams in servable_lm_model_param.py.
Used as request type in: LMService.Generate, LMService.GenerateStream
The prefix text.
Usage example: results = [""] * num_of_samples scores = [0.0] * num_of_samples for response in range(get_streaming_responses()): for i, item in enumerate(response.items): results[i] = results[i][:item.prefix_len] + item.text scores[i] = item.score[0] results[i] and scores[i] will contain the fully decoded text and score for the ith item.
Used in:
The decoded text. This contains new, incrementally decoded text not included in the result accumulated so far.
How many leading characters in the result accumulated so far should prefix the `text` field above.
The final response in a stream is required to contain scores for each fully decoded item. TODO(b/286079331): Remove this field.
Various scores corresponding to each stream item (e.g. log_prob or scores for attributes such safety, quality, etc.).
Each response message represents one incremental decoding result in a streaming of results.
Used as response type in: LMService.GenerateStream, vertex.PredictionService.PredictStreamed
Each item corresponds to one of several possible decoded suffixes. The server decides on the order of these items. In other words, the order is not guaranteed to be stable between responses.
Used in: