Skip to content

Commit a531a77

Browse files
committed
♻️ Forgot the common-definitions.json :)
1 parent 8703d33 commit a531a77

File tree

1 file changed

+30
-19
lines changed

1 file changed

+30
-19
lines changed

packages/tasks/src/tasks/common-definitions.json

Lines changed: 30 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@
3232
"description": "The corresponding probability."
3333
}
3434
},
35-
"required": ["label", "score"]
35+
"required": [
36+
"label",
37+
"score"
38+
]
3639
},
3740
"GenerationParameters": {
3841
"title": "GenerationParameters",
@@ -43,67 +46,75 @@
4346
"type": "number",
4447
"description": "The value used to modulate the next token probabilities."
4548
},
46-
"topK": {
49+
"top_k": {
4750
"type": "integer",
4851
"description": "The number of highest probability vocabulary tokens to keep for top-k-filtering."
4952
},
50-
"topP": {
53+
"top_p": {
5154
"type": "number",
5255
"description": "If set to float < 1, only the smallest set of most probable tokens with probabilities that add up to top_p or higher are kept for generation."
5356
},
54-
"typicalP": {
57+
"typical_p": {
5558
"type": "number",
5659
"description": " Local typicality measures how similar the conditional probability of predicting a target token next is to the expected conditional probability of predicting a random token next, given the partial text already generated. If set to float < 1, the smallest set of the most locally typical tokens with probabilities that add up to typical_p or higher are kept for generation. See [this paper](https://hf.co/papers/2202.00666) for more details."
5760
},
58-
"epsilonCutoff": {
61+
"epsilon_cutoff": {
5962
"type": "number",
6063
"description": "If set to float strictly between 0 and 1, only tokens with a conditional probability greater than epsilon_cutoff will be sampled. In the paper, suggested values range from 3e-4 to 9e-4, depending on the size of the model. See [Truncation Sampling as Language Model Desmoothing](https://hf.co/papers/2210.15191) for more details."
6164
},
62-
"etaCutoff": {
65+
"eta_cutoff": {
6366
"type": "number",
6467
"description": "Eta sampling is a hybrid of locally typical sampling and epsilon sampling. If set to float strictly between 0 and 1, a token is only considered if it is greater than either eta_cutoff or sqrt(eta_cutoff) * exp(-entropy(softmax(next_token_logits))). The latter term is intuitively the expected next token probability, scaled by sqrt(eta_cutoff). In the paper, suggested values range from 3e-4 to 2e-3, depending on the size of the model. See [Truncation Sampling as Language Model Desmoothing](https://hf.co/papers/2210.15191) for more details."
6568
},
66-
"maxLength": {
69+
"max_length": {
6770
"type": "integer",
6871
"description": "The maximum length (in tokens) of the generated text, including the input."
6972
},
70-
"maxNewTokens": {
73+
"max_new_tokens": {
7174
"type": "integer",
7275
"description": "The maximum number of tokens to generate. Takes precedence over maxLength."
7376
},
74-
"minLength": {
77+
"min_length": {
7578
"type": "integer",
7679
"description": "The minimum length (in tokens) of the generated text, including the input."
7780
},
78-
"minNewTokens": {
81+
"min_new_tokens": {
7982
"type": "integer",
8083
"description": "The minimum number of tokens to generate. Takes precedence over maxLength."
8184
},
82-
"doSample": {
85+
"do_sample": {
8386
"type": "boolean",
8487
"description": "Whether to use sampling instead of greedy decoding when generating new tokens."
8588
},
86-
"earlyStopping": {
89+
"early_stopping": {
8790
"description": "Controls the stopping condition for beam-based methods.",
88-
"oneOf": [{ "type": "boolean" }, { "const": "never", "type": "string" }]
89-
},
90-
"numBeams": {
91+
"oneOf": [
92+
{
93+
"type": "boolean"
94+
},
95+
{
96+
"const": "never",
97+
"type": "string"
98+
}
99+
]
100+
},
101+
"num_beams": {
91102
"type": "integer",
92103
"description": "Number of beams to use for beam search."
93104
},
94-
"numBeamGroups": {
105+
"num_beam_groups": {
95106
"type": "integer",
96107
"description": "Number of groups to divide num_beams into in order to ensure diversity among different groups of beams. See [this paper](https://hf.co/papers/1610.02424) for more details."
97108
},
98-
"penaltyAlpha": {
109+
"penalty_alpha": {
99110
"type": "number",
100111
"description": "The value balances the model confidence and the degeneration penalty in contrastive search decoding."
101112
},
102-
"useCache": {
113+
"use_cache": {
103114
"type": "boolean",
104115
"description": "Whether the model should use the past last key/values attentions to speed up decoding"
105116
}
106117
}
107118
}
108119
}
109-
}
120+
}

0 commit comments

Comments
 (0)