104 lines
4.4 KiB
Markdown
104 lines
4.4 KiB
Markdown
---
|
|
license: apache-2.0
|
|
pipeline_tag: text-generation
|
|
datasets:
|
|
- madrylab/gsm8k-platinum
|
|
tags:
|
|
- sft
|
|
- text-generation-inference
|
|
- math
|
|
- vLLM
|
|
- trl
|
|
library_name: transformers
|
|
language:
|
|
- en
|
|
base_model:
|
|
- prithivMLmods/Porpoise-Opus-14B-Exp
|
|
---
|
|
|
|

|
|
|
|
# **Nu2-Lupi-Qwen-14B**
|
|
|
|
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.
|
|
|
|
## **Key Improvements**
|
|
1. **Enhanced Mathematical Proficiency**: The model excels in solving complex mathematical problems, including algebra, calculus, and number theory.
|
|
2. **Advanced Reasoning Capabilities**: Optimized for step-by-step problem-solving, enabling clear and logical explanations for mathematical queries.
|
|
3. **Improved Instruction Following**: Capable of understanding and executing multi-step instructions with precision, ensuring structured and coherent outputs.
|
|
4. **Long-Context Support**: Supports up to 128K tokens for input context and can generate up to 8K tokens in a single output, making it ideal for detailed problem breakdowns.
|
|
5. **Multilingual Mathematical Reasoning**: Supports over 29 languages, including English, Chinese, French, Spanish, Portuguese, German, Italian, Russian, Japanese, Korean, Vietnamese, Thai, Arabic, and more.
|
|
|
|
## **Quickstart with transformers**
|
|
|
|
Here is a code snippet with `apply_chat_template` to show you how to load the tokenizer and model and generate content:
|
|
|
|
```python
|
|
from transformers import AutoModelForCausalLM, AutoTokenizer
|
|
|
|
model_name = "prithivMLmods/Nu2-Lupi-Qwen-14B"
|
|
|
|
model = AutoModelForCausalLM.from_pretrained(
|
|
model_name,
|
|
torch_dtype="auto",
|
|
device_map="auto"
|
|
)
|
|
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
|
|
|
prompt = "Solve the equation: 3x + 5 = 14."
|
|
messages = [
|
|
{"role": "system", "content": "You are a mathematical reasoning assistant."},
|
|
{"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]
|
|
```
|
|
|
|
## **Intended Use**
|
|
1. **Mathematical Reasoning and Problem-Solving**:
|
|
Fine-tuned for high-precision mathematical problem-solving, including algebra, geometry, calculus, and logic puzzles.
|
|
|
|
2. **Educational and Academic Assistance**:
|
|
Ideal for students, educators, and researchers looking for structured explanations and step-by-step solutions.
|
|
|
|
3. **Conversational AI with Mathematical Focus**:
|
|
Supports intelligent chatbot applications that require mathematical comprehension and dynamic response generation.
|
|
|
|
4. **Data Science and Analytical Processing**:
|
|
Capable of analyzing mathematical datasets, generating structured numerical insights, and assisting with automation.
|
|
|
|
5. **Long-Form Mathematical Content Generation**:
|
|
Can generate detailed problem breakdowns, mathematical reports, and research-based content with high coherence.
|
|
|
|
## **Limitations**
|
|
1. **Hardware Requirements**:
|
|
Requires high-memory GPUs or TPUs due to its large parameter size and long-context support.
|
|
|
|
2. **Potential Bias in Responses**:
|
|
While fine-tuned for accuracy, outputs may still reflect biases present in training data.
|
|
|
|
3. **Inconsistent Creative Outputs**:
|
|
May generate varying results when handling abstract or theoretical mathematical concepts.
|
|
|
|
4. **Limited Real-World Awareness**:
|
|
Does not have access to real-time mathematical discoveries beyond its training cutoff.
|
|
|
|
5. **Error Propagation in Extended Outputs**:
|
|
Minor calculation errors in early steps may affect overall problem solutions in long-form responses.
|
|
|
|
6. **Prompt Sensitivity**:
|
|
The effectiveness of responses may depend on how well the mathematical problem is structured within the input prompt. |