ibm-granite/granite-4.2-8b 🔢📝❓✓ → 📝

⭐ Official ▶️ 167.6K runs 📅 Jul 2026 ⚙️ Cog 0.21.0 🔗 GitHub 📄 Paper ⚖️ License
code-generation multilingual question-answering text-generation

Performance

8.4sTypical run time
~773sCold start (first call)
167.6KTotal runs

About

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.

Example Output

Prompt:

"Of the following 2 semantic version numbers, which is latest version? 9.11 or 9.9?"

Output

The latest semantic version number between 9.11 and 9.9 is 9.11.

Reasoning (following standard semantic versioning (SemVer) rules):

  1. SemVer format: Versions follow MAJOR.MINOR.PATCH (e.g., 9.11.0 for 9.11 if PATCH is omitted/defaulted to 0; similarly 9.9.0 for 9.9). The specification states that when comparing versions:

    • Higher MAJOR versions indicate a breaking change (newer).
    • For the same MAJOR version, higher MINOR versions indicate a backward-compatible feature addition (newer).
    • PATCH versions indicate backward-compatible bug fixes and are only considered when MAJOR and MINOR are equal.
  2. Applying to the given versions:

    • 9.11 implicitly means 9.11.0 (PATCH = 0 by convention when not specified).
    • 9.9 implicitly means 9.9.0 (PATCH = 0 by convention when not specified).
    • Both versions share the same MAJOR version (9), so we compare the MINOR versions: 11 vs 9.
    • Since 11 > 9, 9.11 represents a newer release than 9.9 within the same major version line (it includes more backward-compatible features compared to 9.9).
  3. No ambiguity: The versions are given without explicit PATCH parts, and SemVer treats omitted PATCH as 0 for comparison purposes. Thus, 9.11 (i.e., 9.11.0) is strictly greater than 9.9 (i.e., 9.9.0).

Conclusion: 9.11 is the latest version among 9.11 and 9.9.

✅ Answer: 9.11.

Performance Metrics

8.37s Prediction Time
772.96s Total Time
All Input Parameters
{
  "prompt": "Of the following 2 semantic version numbers, which is latest version? 9.11 or 9.9?",
  "min_tokens": 0,
  "add_generation_prompt": true
}
Input Parameters
seed Type: integerDefault: null
Random seed. Leave unspecified to randomize the seed.
stop Type: arrayDefault: null
A list of sequences to stop generation at. For example, ["<end>","<stop>"] will stop generation at the first instance of "<end>" or "<stop>".
tools Type: arrayDefault: null
Tools for request. Passed to the chat template.
top_k Type: integerDefault: null
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 Type: numberDefault: null
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).
prompt Type: stringDefault: null
Completion API user prompt.
stream Type: booleanDefault: null
Request streaming response.
messages Type: arrayDefault: null
Chat completion API messages.
documents Type: arrayDefault: null
Documents for request. Passed to the chat template.
max_tokens Type: integerDefault: null
max_tokens is deprecated in favor of the max_completion_tokens field.
min_tokens Type: integerDefault: 0
The minimum number of tokens the model should generate as output.
temperature Type: numberDefault: null
The value used to modulate the next token probabilities.
tool_choice Type: stringDefault: null
Tool choice for request. If the choice is a specific function, this should be specified as a JSON string.
chat_template Type: stringDefault: null
A template to format the prompt with. If not specified, the chat template provided by the model will be used.
system_prompt Type: stringDefault: null
Completion API system prompt. The chat template provides a good default.
response_format Type: objectDefault: null
An object specifying the format that the model must output.
presence_penalty Type: numberDefault: null
Presence penalty
reasoning_effort Default: null
Constrains effort on reasoning.
frequency_penalty Type: numberDefault: null
Frequency penalty
include_reasoning Type: booleanDefault: true
Include reasoning content in the response.
repetition_penalty Type: numberDefault: null
Repetition penalty
chat_template_kwargs Type: objectDefault: null
Additional arguments to be passed to the chat template.
add_generation_prompt Type: booleanDefault: true
Add generation prompt. Passed to the chat template. Defaults to True.
max_completion_tokens Type: integerDefault: null
An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens.
Output Schema

Output

Type: array • Items Type: string

Example Execution Logs
INFO 08-10 16:01:54 [run.py:438] run() commencing request_id=2
INFO 08-10 16:01:54 [request_logger.py:63] Received request chatcmpl-2: params: SamplingParams(n=1, presence_penalty=0.0, frequency_penalty=0.0, repetition_penalty=1.0, temperature=1.0, top_p=0.95, top_k=0, min_p=0.0, seed=None, stop=[], stop_token_ids=[], bad_words=[], thinking_token_budget=None, include_stop_str_in_output=False, ignore_eos=False, max_tokens=131033, min_tokens=0, logprobs=None, prompt_logprobs=None, skip_special_tokens=False, spaces_between_special_tokens=True, structured_outputs=None, extra_args=None), lora_request: None.
DEBUG 08-10 16:02:02 [run.py:608] finish_reason=stop response_text=
The latest semantic version number between `9.11` and `9.9` is **`9.11`**.

**Reasoning (following standard semantic versioning (SemVer) rules):**

1. **SemVer format**: Versions follow `MAJOR.MINOR.PATCH` (e.g., `9.11.0` for `9.11` if PATCH is omitted/defaulted to `0`; similarly `9.9.0` for `9.9`). The specification states that when comparing versions:
   - Higher `MAJOR` versions indicate a breaking change (newer).
   - For the same `MAJOR` version, higher `MINOR` versions indicate a backward-compatible feature addition (newer).
   - `PATCH` versions indicate backward-compatible bug fixes and are only considered when `MAJOR` and `MINOR` are equal.

2. **Applying to the given versions**:
   - `9.11` implicitly means `9.11.0` (PATCH = `0` by convention when not specified).
   - `9.9` implicitly means `9.9.0` (PATCH = `0` by convention when not specified).
   - Both versions share the same `MAJOR` version (`9`), so we compare the `MINOR` versions: `11` vs `9`.
   - Since `11 > 9`, `9.11` represents a newer release than `9.9` within the same major version line (it includes more backward-compatible features compared to `9.9`).

3. **No ambiguity**: The versions are given without explicit `PATCH` parts, and SemVer treats omitted `PATCH` as `0` for comparison purposes. Thus, `9.11` (i.e., `9.11.0`) is strictly greater than `9.9` (i.e., `9.9.0`).

**Conclusion**: `9.11` is the latest version among `9.11` and `9.9`.

> ✅ **Answer: `9.11`**.
INFO 08-10 16:02:02 [run.py:614] Generation took 8.37s
DEBUG 08-10 16:02:02 [run.py:617] prompt_tokens=39, completion_tokens=696, total_tokens=735
INFO 08-10 16:02:02 [run.py:626] run() completed request_id=2
Version Details
Version ID
b202257e3e8ead79a9b0608c6fb9818a47f8ba6131a598ce4933a00ee2842ff1
Version Created
September 4, 2026
Run on Replicate →