hayooucom
/
code-model2
- Public
- 688 runs
Run hayooucom/code-model2 with an API
Use one of our client libraries to get started quickly. Clicking on a library will take you to the Playground tab where you can tweak different inputs, see the results, and copy the corresponding code to use in your own project.
Input schema
The fields you can use to run this model with an API. If you don't give a value for a field its default value will be used.
Field | Type | Default value | Description |
---|---|---|---|
prompt |
string
|
hello ,who are you?
|
Text prompt to send to the model.
|
max_new_tokens |
integer
|
200
Min: 1 Max: 64000 |
Maximum number of tokens to generate. A word is generally 2-3 tokens.
|
max_tokens |
integer
|
64000
Min: 1 Max: 64000 |
Maximum number of tokens all. A word is generally 2-3 tokens.
|
temperature |
number
|
0.1
Max: 5 |
Adjusts randomness of outputs, greater than 1 is random and 0 is deterministic.
|
top_p |
number
|
1
Min: 0.01 Max: 1 |
When decoding text, samples from the top p percentage of most likely tokens; lower to ignore less likely tokens.
|
top_k |
integer
|
1
|
When decoding text, samples from the top k most likely tokens; lower to ignore less likely tokens.
|
repetition_penalty |
number
|
1.1
Min: 0.01 Max: 10 |
Penalty for repeated words in generated text; 1 is no penalty, values greater than 1 discourage repetition, less than 1 encourage it.
|
system_prompt |
string
|
You are a helpful AI assistant.
|
System prompt.
|
seed |
integer
|
The seed for the random number generator
|
{
"type": "object",
"title": "Input",
"properties": {
"seed": {
"type": "integer",
"title": "Seed",
"x-order": 8,
"description": "The seed for the random number generator"
},
"top_k": {
"type": "integer",
"title": "Top K",
"default": 1,
"x-order": 5,
"description": "When decoding text, samples from the top k most likely tokens; lower to ignore less likely tokens."
},
"top_p": {
"type": "number",
"title": "Top P",
"default": 1,
"maximum": 1,
"minimum": 0.01,
"x-order": 4,
"description": "When decoding text, samples from the top p percentage of most likely tokens; lower to ignore less likely tokens."
},
"prompt": {
"type": "string",
"title": "Prompt",
"default": "hello ,who are you?",
"x-order": 0,
"description": "Text prompt to send to the model."
},
"max_tokens": {
"type": "integer",
"title": "Max Tokens",
"default": 64000,
"maximum": 64000,
"minimum": 1,
"x-order": 2,
"description": "Maximum number of tokens all. A word is generally 2-3 tokens."
},
"temperature": {
"type": "number",
"title": "Temperature",
"default": 0.1,
"maximum": 5,
"minimum": 0,
"x-order": 3,
"description": "Adjusts randomness of outputs, greater than 1 is random and 0 is deterministic."
},
"system_prompt": {
"type": "string",
"title": "System Prompt",
"default": "You are a helpful AI assistant.",
"x-order": 7,
"description": "System prompt."
},
"max_new_tokens": {
"type": "integer",
"title": "Max New Tokens",
"default": 200,
"maximum": 64000,
"minimum": 1,
"x-order": 1,
"description": "Maximum number of tokens to generate. A word is generally 2-3 tokens."
},
"repetition_penalty": {
"type": "number",
"title": "Repetition Penalty",
"default": 1.1,
"maximum": 10,
"minimum": 0.01,
"x-order": 6,
"description": "Penalty for repeated words in generated text; 1 is no penalty, values greater than 1 discourage repetition, less than 1 encourage it."
}
}
}
Output schema
The shape of the response you’ll get when you run this model with an API.
{
"type": "array",
"items": {
"type": "string"
},
"title": "Output",
"x-cog-array-type": "iterator",
"x-cog-array-display": "concatenate"
}