ibm-granite/granite-4.1-8b 🔢📝❓✓ → 📝
Performance
About
Granite-4.1-8B is a 8B parameter long-context instruct model finetuned from Granite-4.1-8B-Base using a combination of open source instruction datasets with permissive license and internally collected synthetic datasets.
Example Output
"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, meaning 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 decimal places for various computational purposes.
Key points about pi:
Irrationality: Pi cannot be exactly expressed as a fraction of two integers. Its decimal expansion is infinite and non-repeating.
Symbol: The symbol π was first used to represent this constant by Welsh mathematician William Jones in 1706, and it was popularized by Swiss mathematician Leonhard Euler.
Approximations: Common approximations include 22/7 and 3.14, though these are not exact. More precise approximations are used in calculations requiring higher accuracy.
Applications: Pi is fundamental in many areas of mathematics, including geometry (for calculating areas and volumes of circles and spheres), trigonometry, and calculus. It also appears in various formulas across physics, engineering, and statistics.
Historical significance: The concept of pi has been studied for thousands of years, with ancient civilizations like the Babylonians and Egyptians having approximations of it. Archimedes of Syracuse is credited with one of the first rigorous calculations of pi.
Computational challenges: Calculating pi to high precision has been a challenge and a benchmark for computational algorithms and supercomputers. As of 2023, pi has been computed to over 100 trillion digits.
Pi's ubiquity in mathematics and science makes it one of the most well-known and studied constants in all of mathematics.
Performance Metrics
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,
"chat_template_kwargs": {},
"add_generation_prompt": true
}
Input Parameters
- seed
- Random seed. Leave unspecified to randomize the seed.
- stop
- A list of sequences to stop generation at. For example, ["<end>","<stop>"] will stop generation at the first instance of "<end>" or "<stop>".
- tools
- Tools for request. Passed to the chat template.
- top_k
- 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
- 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
- Completion API user prompt.
- stream
- Request streaming response.
- messages
- Chat completion API messages.
- documents
- Documents for request. Passed to the chat template.
- max_tokens
- max_tokens is deprecated in favor of the max_completion_tokens field.
- min_tokens
- The minimum number of tokens the model should generate as output.
- temperature
- The value used to modulate the next token probabilities.
- tool_choice
- Tool choice for request. If the choice is a specific function, this should be specified as a JSON string.
- chat_template
- A template to format the prompt with. If not specified, the chat template provided by the model will be used.
- system_prompt
- Completion API system prompt. The chat template provides a good default.
- response_format
- An object specifying the format that the model must output.
- presence_penalty
- Presence penalty
- frequency_penalty
- Frequency penalty
- repetition_penalty
- Repetition penalty
- chat_template_kwargs
- Additional arguments to be passed to the chat template.
- add_generation_prompt
- Add generation prompt. Passed to the chat template. Defaults to True.
- max_completion_tokens
- 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
Example Execution Logs
INFO 04-22 18:53:44 [predict.py:428] predict() commencing request_id=2 INFO 04-22 18:53:44 [logger.py:63] Received request cmpl-2-0: params: SamplingParams(n=1, presence_penalty=0.0, frequency_penalty=0.0, repetition_penalty=1.0, temperature=0.0, top_p=1.0, 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=512, min_tokens=0, logprobs=None, prompt_logprobs=None, skip_special_tokens=True, spaces_between_special_tokens=True, structured_outputs=None, extra_args=None), lora_request: None. DEBUG 04-22 18:53:48 [predict.py:614] 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, meaning 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 decimal places for various computational purposes. Key points about pi: 1. **Irrationality**: Pi cannot be exactly expressed as a fraction of two integers. Its decimal expansion is infinite and non-repeating. 2. **Symbol**: The symbol π was first used to represent this constant by Welsh mathematician William Jones in 1706, and it was popularized by Swiss mathematician Leonhard Euler. 3. **Approximations**: Common approximations include 22/7 and 3.14, though these are not exact. More precise approximations are used in calculations requiring higher accuracy. 4. **Applications**: Pi is fundamental in many areas of mathematics, including geometry (for calculating areas and volumes of circles and spheres), trigonometry, and calculus. It also appears in various formulas across physics, engineering, and statistics. 5. **Historical significance**: The concept of pi has been studied for thousands of years, with ancient civilizations like the Babylonians and Egyptians having approximations of it. Archimedes of Syracuse is credited with one of the first rigorous calculations of pi. 6. **Computational challenges**: Calculating pi to high precision has been a challenge and a benchmark for computational algorithms and supercomputers. As of 2023, pi has been computed to over 100 trillion digits. Pi's ubiquity in mathematics and science makes it one of the most well-known and studied constants in all of mathematics. INFO 04-22 18:53:48 [predict.py:625] Generation took 4.24s DEBUG 04-22 18:53:48 [predict.py:628] prompt_tokens=12, completion_tokens=355, total_tokens=367 INFO 04-22 18:53:48 [predict.py:638] predict() complete
Version Details
- Version ID
a26487d16449b2481fc268509e6b7a076d9258d8ac45a34f41e5c0fbf6c228b8- Version Created
- May 26, 2026