Nu2-Lupi-Qwen-14B is based on the Qwen 2.5 14B modality architecture, designed to enhance mathematical reasoning capabilities. This model is optimized for complex problem-solving, logical deduction, and multi-step mathematical reasoning. It has been fine-tuned using the gsm8k-platinum dataset to improve accuracy, structured responses, and contextual understanding in mathematical domains.
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model_name = "prithivMLmods/Nu2-Lupi-Qwen-14B"
4
5model = AutoModelForCausalLM.from_pretrained(
6 model_name,
7 torch_dtype="auto",
8 device_map="auto"
9)
10tokenizer = AutoTokenizer.from_pretrained(model_name)
11
12prompt = "Solve the equation: 3x + 5 = 14."
13messages = [
14 {"role": "system", "content": "You are a mathematical reasoning assistant."},
15 {"role": "user", "content": prompt}
16]
17text = tokenizer.apply_chat_template(
18 messages,
19 tokenize=False,
20 add_generation_prompt=True
21)
22model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
23
24generated_ids = model.generate(
25 **model_inputs,
26 max_new_tokens=512
27)
28generated_ids = [
29 output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
30]
31
32response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
-
Mathematical Reasoning and Problem-Solving:
Fine-tuned for high-precision mathematical problem-solving, including algebra, geometry, calculus, and logic puzzles.
-
Educational and Academic Assistance:
Ideal for students, educators, and researchers looking for structured explanations and step-by-step solutions.
-
Conversational AI with Mathematical Focus:
Supports intelligent chatbot applications that require mathematical comprehension and dynamic response generation.
-
Data Science and Analytical Processing:
Capable of analyzing mathematical datasets, generating structured numerical insights, and assisting with automation.
-
Long-Form Mathematical Content Generation:
Can generate detailed problem breakdowns, mathematical reports, and research-based content with high coherence.
-
Hardware Requirements:
Requires high-memory GPUs or TPUs due to its large parameter size and long-context support.
-
Potential Bias in Responses:
While fine-tuned for accuracy, outputs may still reflect biases present in training data.
-
Inconsistent Creative Outputs:
May generate varying results when handling abstract or theoretical mathematical concepts.
-
Limited Real-World Awareness:
Does not have access to real-time mathematical discoveries beyond its training cutoff.
-
Error Propagation in Extended Outputs:
Minor calculation errors in early steps may affect overall problem solutions in long-form responses.
-
Prompt Sensitivity:
The effectiveness of responses may depend on how well the mathematical problem is structured within the input prompt.