← Back to all generators

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

SeedSystem PromptMax TokensTop-P

Cost

Community model (estimated from hardware time)

Input Parameters

add_generation_promptboolean

Add generation prompt. Passed to the chat template. Defaults to True.

Default: true
chat_templatestring

A template to format the prompt with. If not specified, the chat template provided by the model will be used.

chat_template_kwargsobject

Additional arguments to be passed to the chat template.

documentsarray

Documents for request. Passed to the chat template.

frequency_penaltynumber

Frequency penalty

include_reasoningboolean

Include reasoning content in the response.

Default: true
max_completion_tokensinteger

An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens.

max_tokensinteger

max_tokens is deprecated in favor of the max_completion_tokens field.

messagesarray

Chat completion API messages.

min_tokensinteger

The minimum number of tokens the model should generate as output.

Default: 0
presence_penaltynumber

Presence penalty

promptstring

Completion API user prompt.

reasoning_effortstring

Constrains effort on reasoning.

noneminimallowmediumhighxhighmax
repetition_penaltynumber

Repetition penalty

response_formatobject

An object specifying the format that the model must output.

seedinteger

Random seed. Leave unspecified to randomize the seed.

stoparray

A list of sequences to stop generation at. For example, ["<end>","<stop>"] will stop generation at the first instance of "<end>" or "<stop>".

streamboolean

Request streaming response.

system_promptstring

Completion API system prompt. The chat template provides a good default.

temperaturenumber

The value used to modulate the next token probabilities.

tool_choicestring

Tool choice for request. If the choice is a specific function, this should be specified as a JSON string.

toolsarray

Tools for request. Passed to the chat template.

top_kinteger

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_pnumber

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).

Version: b202257e3e8eUpdated: 9/20/20267.4K runs