lightweight-ai
/
prompt
- Public
- 18 runs
Run lightweight-ai/prompt 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
|
Write me a poem about Machine Learning.
|
Prompt to send to the model.
|
max_new_tokens |
integer
|
1024
Min: 1 Max: 2048 |
Maximum number of tokens to generate. A word is generally 2-3 tokens
|
temperature |
number
|
0.6
Min: 0.1 Max: 4 |
Adjusts randomness of outputs, greater than 1 is random and 0 is deterministic, 0.75 is a good starting value.
|
top_p |
number
|
0.9
Min: 0.05 Max: 1 |
When decoding text, samples from the top p percentage of most likely tokens; lower to ignore less likely tokens
|
top_k |
integer
|
50
Min: 1 Max: 1000 |
When decoding text, samples from the top k most likely tokens; lower to ignore less likely tokens
|
repetition_penalty |
number
|
1.2
|
A parameter that controls how repetitive text can be. Lower means more repetitive, while higher means less repetitive. Set to 1.0 to disable.
|
{
"type": "object",
"title": "Input",
"properties": {
"top_k": {
"type": "integer",
"title": "Top K",
"default": 50,
"maximum": 1000,
"minimum": 1,
"x-order": 4,
"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": 0.9,
"maximum": 1,
"minimum": 0.05,
"x-order": 3,
"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": "Write me a poem about Machine Learning.",
"x-order": 0,
"description": "Prompt to send to the model."
},
"temperature": {
"type": "number",
"title": "Temperature",
"default": 0.6,
"maximum": 4,
"minimum": 0.1,
"x-order": 2,
"description": "Adjusts randomness of outputs, greater than 1 is random and 0 is deterministic, 0.75 is a good starting value."
},
"max_new_tokens": {
"type": "integer",
"title": "Max New Tokens",
"default": 1024,
"maximum": 2048,
"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.2,
"minimum": 0,
"x-order": 5,
"description": "A parameter that controls how repetitive text can be. Lower means more repetitive, while higher means less repetitive. Set to 1.0 to disable."
}
}
}
Output schema
The shape of the response you’ll get when you run this model with an API.
Schema
{
"type": "string",
"title": "Output"
}