Optimus Reasoning
Collection
14b, 7b reasoning models
•
5 items
•
Updated
•
7
Megatron-Opus-14B-Exp is based on the Qwen 2.5 14B modality architecture, designed to enhance the reasoning capabilities of 14B-parameter models. It has been fine-tuned on a Synthetic dataset entries based on one half of Qwen’s QWQ and DeepSeek R1, further optimizing its chain-of-thought (CoT) reasoning and logical problem-solving abilities. The model demonstrates significant improvements in context understanding, structured data processing, and long-context comprehension, making it ideal for complex reasoning tasks, instruction-following, and text generation.
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "prithivMLmods/Megatron-Opus-14B-Exp"
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto",
trust_remote_code=True
)
tokenizer = AutoTokenizer.from_pretrained(model_name)
prompt = "Explain the concept of logical reasoning in AI."
messages = [
{"role": "system", "content": "You are an expert AI assistant specialized in reasoning and logic."},
{"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
generated_ids = model.generate(
**model_inputs,
max_new_tokens=512
)
generated_ids = [
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
]
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
print(response)
Base model
Qwen/Qwen2.5-14B