ibm-granite/granite-4.2-8b
Granite-4.2-8B is the mid-size reasoning model in the Granite 4.2 family. It delivers strong performance on reasoning-intensive tasks by leveraging built-in <think>...</think> chain-of-thought.
Capabilities
Cost
Community model (estimated from hardware time)
Input Parameters
| Name | Type | Description | Default | Constraints |
|---|---|---|---|---|
add_generation_prompt | boolean | Add generation prompt. Passed to the chat template. Defaults to True. | true | — |
chat_template | string | A template to format the prompt with. If not specified, the chat template provided by the model will be used. | — | — |
chat_template_kwargs | object | Additional arguments to be passed to the chat template. | — | — |
documents | array | Documents for request. Passed to the chat template. | — | — |
frequency_penalty | number | Frequency penalty | — | — |
include_reasoning | boolean | Include reasoning content in the response. | true | — |
max_completion_tokens | integer | An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. | — | — |
max_tokens | integer | max_tokens is deprecated in favor of the max_completion_tokens field. | — | — |
messages | array | Chat completion API messages. | — | — |
min_tokens | integer | The minimum number of tokens the model should generate as output. | 0 | — |
presence_penalty | number | Presence penalty | — | — |
prompt | string | Completion API user prompt. | — | — |
reasoning_effort | string | Constrains effort on reasoning. | — | noneminimallowmediumhighxhighmax |
repetition_penalty | number | Repetition penalty | — | — |
response_format | object | An object specifying the format that the model must output. | — | — |
seed | integer | Random seed. Leave unspecified to randomize the seed. | — | — |
stop | array | A list of sequences to stop generation at. For example, ["<end>","<stop>"] will stop generation at the first instance of "<end>" or "<stop>". | — | — |
stream | boolean | Request streaming response. | — | — |
system_prompt | string | Completion API system prompt. The chat template provides a good default. | — | — |
temperature | number | The value used to modulate the next token probabilities. | — | — |
tool_choice | string | Tool choice for request. If the choice is a specific function, this should be specified as a JSON string. | — | — |
tools | array | Tools for request. Passed to the chat template. | — | — |
top_k | integer | The number of highest probability tokens to consider for generating " "the output. If > 0, only keep the top k tokens with highest probability " "(top-k filtering). | — | — |
top_p | number | A probability threshold for generating the output. If < 1.0, only keep " "the top tokens with cumulative probability >= top_p (nucleus filtering). " "Nucleus filtering is described in Holtzman et al. (http://arxiv.org/abs/1904.09751). | — | — |
add_generation_promptbooleanAdd generation prompt. Passed to the chat template. Defaults to True.
truechat_templatestringA template to format the prompt with. If not specified, the chat template provided by the model will be used.
chat_template_kwargsobjectAdditional arguments to be passed to the chat template.
documentsarrayDocuments for request. Passed to the chat template.
frequency_penaltynumberFrequency penalty
include_reasoningbooleanInclude reasoning content in the response.
truemax_completion_tokensintegerAn upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens.
max_tokensintegermax_tokens is deprecated in favor of the max_completion_tokens field.
messagesarrayChat completion API messages.
min_tokensintegerThe minimum number of tokens the model should generate as output.
0presence_penaltynumberPresence penalty
promptstringCompletion API user prompt.
reasoning_effortstringConstrains effort on reasoning.
repetition_penaltynumberRepetition penalty
response_formatobjectAn object specifying the format that the model must output.
seedintegerRandom seed. Leave unspecified to randomize the seed.
stoparrayA list of sequences to stop generation at. For example, ["<end>","<stop>"] will stop generation at the first instance of "<end>" or "<stop>".
streambooleanRequest streaming response.
system_promptstringCompletion API system prompt. The chat template provides a good default.
temperaturenumberThe value used to modulate the next token probabilities.
tool_choicestringTool choice for request. If the choice is a specific function, this should be specified as a JSON string.
toolsarrayTools for request. Passed to the chat template.
top_kintegerThe number of highest probability tokens to consider for generating " "the output. If > 0, only keep the top k tokens with highest probability " "(top-k filtering).
top_pnumberA probability threshold for generating the output. If < 1.0, only keep " "the top tokens with cumulative probability >= top_p (nucleus filtering). " "Nucleus filtering is described in Holtzman et al. (http://arxiv.org/abs/1904.09751).
b202257e3e8eUpdated: 9/20/20267.4K runs
cinemasetfree