-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(model): add text generation task (#136)
Because - support text generation task This commit - add text generation task input/output definitions
- Loading branch information
Showing
3 changed files
with
94 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
syntax = "proto3"; | ||
|
||
package vdp.model.v1alpha; | ||
|
||
// Google api | ||
import "google/api/field_behavior.proto"; | ||
|
||
// TextGenerationInput represents the input of text generation task | ||
message TextGenerationInput { | ||
// The prompt text | ||
string prompt = 1 [ (google.api.field_behavior) = REQUIRED ]; | ||
// The maximum number of tokens for model to generate | ||
optional int64 output_len = 2 [ (google.api.field_behavior) = OPTIONAL ]; | ||
// The words not to avoid being generated by the model | ||
optional string bad_words_list = 3 [ (google.api.field_behavior) = OPTIONAL ]; | ||
// The trigger words to stop generation | ||
optional string stop_words_list = 4 [ (google.api.field_behavior) = OPTIONAL ]; | ||
// Top k for sampling | ||
optional int64 topk = 5 [ (google.api.field_behavior) = OPTIONAL ]; | ||
// The seed | ||
optional int64 seed = 6 [ (google.api.field_behavior) = OPTIONAL ]; | ||
} | ||
|
||
// TextGenerationOutput represents the output of text generation task | ||
message TextGenerationOutput { | ||
// The text generated by the model | ||
string text = 1 [ (google.api.field_behavior) = OUTPUT_ONLY ]; | ||
} |