
JetBrains/Mellum2-12B-A2.5B-Instruct
A post-trained MoE assistant model (64 experts, 8 active/token), mixing sliding-window/full attention, 131,072-token context.
Mellum2 Instruct is a post-trained assistant model trained by JetBrains.
The model uses a Mixture-of-Experts architecture with 64 experts and activates 8 experts per token. It uses a combination of sliding-window and full attention layers, with a context length of 131,072 tokens.
It is produced from Mellum2-12B-A2.5B-Base by supervised fine-tuning followed by reinforcement learning with verifiable rewards (RLVR) on math, executable coding, tool use, instruction following, reasoning, and knowledge tasks. Mellum2 Instruct answers directly, without an externalized chain of thought.
Input
# You can use this model with any of the OpenAI clients in any language!
# Simply change the API Key to get started
from openai import OpenAI
model_url = "" # Copy in from API pane in Baseten model dashboard
client = OpenAI(
api_key = "BASETEN_API_KEY",
base_url = model_url
)
response = client.chat.completions.create(
model = "JetBrains/Mellum2-12B-A2.5B-Instruct",
messages = [{"role":"user","content":"Write a Python function to reverse a string."}],
)
print(response.to_json())Output
{
"choices": [
{
"finish_reason": "stop",
"index": 0,
"logprobs": null,
"message": {
"content": "To reverse a string in Python, we can utilize string slicing with a step of -1. This approach efficiently creates a new string with characters in reverse order.\n\n```python\ndef reverse_string(s):\n return s[::-1]\n```\n\n**Explanation:**\n- The slice `[::-1]` starts at the end of the string and moves backwards, effectively reversing the string.\n- This method works for any string input, including empty strings and single-character strings.\n- The original string remains unchanged, as strings in Python are immutable.\n\n**Example Usage:**\n```python\nprint(reverse_string(\"hello\")) # Output: \"olleh\"\nprint(reverse_string(\"Python\")) # Output: \"nohtyP\"\nprint(reverse_string(\"\")) # Output: \"\"\n```",
"refusal": null,
"role": "assistant",
"annotations": null,
"audio": null,
"function_call": null,
"tool_calls": [],
"reasoning": null
},
"stop_reason": null,
"token_ids": null,
"routed_experts": null
}
],
"created": 0,
"model": "JetBrains/Mellum2-12B-A2.5B-Instruct",
"object": "chat.completion",
"usage": {
"completion_tokens": 179,
"prompt_tokens": 19,
"total_tokens": 198,
"prompt_tokens_details": null
},
"prompt_logprobs": null,
"prompt_token_ids": null,
"prompt_text": null,
"kv_transfer_params": null
}