ibm-granite/granite-4.0-h-small 🔢📝❓✓ → 📝

⭐ Official ▶️ 4.5K runs 📅 Sep 2025 ⚙️ Cog 0.16.7 🔗 GitHub ⚖️ License
code-generation function-calling multilingual text-generation text-translation tool-calling

About

Granite-4.0-H-Small is a 32B parameter long-context instruct model finetuned from Granite-4.0-H-Small-Base using a combination of open source instruction datasets with permissive license and internally collected synthetic datasets.

Example Output

Prompt:

"What is Pi?"

Output

Pi (π) is a mathematical constant that represents the ratio of a circle's circumference to its diameter. It is an irrational number, which means it cannot be expressed as a simple fraction and its decimal representation goes on forever without repeating.

The value of pi is approximately 3.14159, but it has been calculated to trillions of digits beyond the decimal point. For most practical purposes, using pi to a few decimal places (such as 3.14159 or 3.14) is sufficient.

Pi is used in various mathematical and scientific calculations, including:

  1. Geometry: Calculating the circumference, area, and volume of circles, spheres, and cylinders.

  2. Trigonometry: Defining the sine, cosine, and tangent functions.

  3. Calculus: In integrals and series expansions.

  4. Physics: Describing wave motion, oscillations, and circular motion.

  5. Engineering: Designing structures and systems involving circular or spherical components.

The symbol π was first used to represent this constant by Welsh mathematician William Jones in 1706, and it was later popularized by Swiss mathematician Leonhard Euler.

Performance Metrics

3.97s Prediction Time
753.37s Total Time
All Input Parameters
{
  "stop": [],
  "tools": [],
  "top_k": 50,
  "top_p": 0.9,
  "prompt": "What is Pi?",
  "stream": false,
  "messages": [],
  "documents": [],
  "min_tokens": 0,
  "temperature": 0.6,
  "presence_penalty": 0,
  "frequency_penalty": 0,
  "chat_template_kwargs": {},
  "add_generation_prompt": true
}
Input Parameters
seed Type: integer
Random seed. Leave unspecified to randomize the seed.
stop Type: arrayDefault:
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:
Tools for request. Passed to the chat template.
top_k Type: integerDefault: 50
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: 0.9
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: string
Completion API user prompt.
stream Type: booleanDefault: false
Request streaming response. Defaults to False.
messages Type: arrayDefault:
Chat completion API messages.
documents Type: arrayDefault:
Documents for request. Passed to the chat template.
max_tokens Type: integer
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: 0
The value used to modulate the next token probabilities.
tool_choice Type: string
Tool choice for request. If the choice is a specific function, this should be specified as a JSON string.
chat_template Type: string
A template to format the prompt with. If not specified, the chat template provided by the model will be used.
system_prompt Type: string
Completion API system prompt. The chat template provides a good default.
response_format Type: object
An object specifying the format that the model must output.
presence_penalty Type: numberDefault: 0
Presence penalty
frequency_penalty Type: numberDefault: 0
Frequency penalty
chat_template_kwargs Type: objectDefault: [object Object]
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: integer
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: arrayItems Type: string

Example Execution Logs
INFO 09-25 18:36:18 [logger.py:40] Received request cmpl-1-0: prompt: None, params: SamplingParams(n=1, presence_penalty=0.0, frequency_penalty=0.0, repetition_penalty=1.0, temperature=0.6, top_p=0.9, top_k=50, min_p=0.0, seed=None, stop=[], stop_token_ids=[], bad_words=[], include_stop_str_in_output=False, ignore_eos=False, max_tokens=512, min_tokens=0, logprobs=None, prompt_logprobs=None, skip_special_tokens=True, spaces_between_special_tokens=True, truncate_prompt_tokens=None, guided_decoding=None, extra_args=None), prompt_token_ids: None, prompt_embeds shape: None, lora_request: None.
DEBUG 09-25 18:36:22 [predict.py:558] finish_reason=stop response_text=Pi (π) is a mathematical constant that represents the ratio of a circle's circumference to its diameter. It is an irrational number, which means it cannot be expressed as a simple fraction and its decimal representation goes on forever without repeating.

The value of pi is approximately 3.14159, but it has been calculated to trillions of digits beyond the decimal point. For most practical purposes, using pi to a few decimal places (such as 3.14159 or 3.14) is sufficient.

Pi is used in various mathematical and scientific calculations, including:

1. Geometry: Calculating the circumference, area, and volume of circles, spheres, and cylinders.

2. Trigonometry: Defining the sine, cosine, and tangent functions.

3. Calculus: In integrals and series expansions.

4. Physics: Describing wave motion, oscillations, and circular motion.

5. Engineering: Designing structures and systems involving circular or spherical components.

The symbol π was first used to represent this constant by Welsh mathematician William Jones in 1706, and it was later popularized by Swiss mathematician Leonhard Euler.
INFO 09-25 18:36:22 [predict.py:569] Generation took 3.89s
DEBUG 09-25 18:36:22 [predict.py:572] prompt_tokens=12, completion_tokens=232, total_tokens=244
/srv/r8/monobase/cog/latest/cogletlatest-python3.12/lib/python3.12/site-packages/coglet/scope.py:35: ExperimentalFeatureWarning: current_scope is an experimental internal function. It may change or be removed without warning.
  warnings.warn(
INFO 09-25 18:36:22 [predict.py:585] predict() complete
Version Details
Version ID
79cd422742e4dbd543569aae06db8d5c55bc932153501c2f1bd6213e78cd427d
Version Created
October 7, 2025
Run on Replicate →