Feynman-Grpo-Exp / README.md
prithivMLmods's picture
Update README.md
8713b42 verified
---
license: apache-2.0
datasets:
- openai/gsm8k
language:
- en
base_model:
- Qwen/Qwen2.5-0.5B-Instruct
pipeline_tag: text-generation
library_name: transformers
tags:
- math
- reasoning
- grpo
- trl
- code
---
# **Feynman-Grpo-Exp**
Feynman-Grpo-Exp is based on the Qwen 0.5B modality architecture, designed to enhance the reasoning capabilities of 0.5B-parameter models. It has been fine-tuned using the GRPO trainer on the OpenAI GSM8K dataset for reinforcement learning, improving its ability to handle complex reasoning tasks, multi-step problem-solving, and mathematical challenges. This model excels in chain-of-thought (CoT) reasoning and logical problem-solving, making it suitable for a variety of advanced tasks that require precise and structured outputs.
### **Key Improvements**
1. **Enhanced Knowledge and Expertise**: Strengthened mathematical reasoning, code generation, and problem-solving skills, particularly in scientific and technical domains.
2. **Fine-Tuned Instruction Following**: Optimized for generating structured outputs like JSON and handling long-form text (up to 8K+ tokens).
3. **Greater Adaptability**: Enhanced role-playing capabilities, allowing for better responses to diverse prompts.
4. **Long-Context Support**: Capable of processing up to **64K tokens** and generating up to **4K tokens** per output.
5. **Multilingual Proficiency**: Supports over **29 languages**, including Chinese, English, French, Spanish, Portuguese, German, and more.
### **Quickstart with Transformers**
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "prithivMLmods/Feynman-Grpo-Exp"
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto",
trust_remote_code=True
)
tokenizer = AutoTokenizer.from_pretrained(model_name)
prompt = "Give me a short introduction to large language models."
messages = [
{"role": "system", "content": "You are an advanced AI assistant with expert-level reasoning and knowledge."},
{"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)
```
### **Intended Use**
- **Advanced Reasoning & Context Understanding**: Ideal for logical deduction, multi-step problem-solving, and complex knowledge-based tasks.
- **Mathematical & Scientific Problem-Solving**: Optimized for handling advanced calculations, theorem proving, and scientific queries.
- **Code Generation & Debugging**: Capable of generating and optimizing code across multiple programming languages.
- **Structured Data Analysis**: Processes structured data, including tables, JSON, and other formats, making it well-suited for data-centric tasks.
- **Multilingual Applications**: Proficient in over 29 languages, enabling a global scale for applications.
- **Extended Content Generation**: Supports detailed document writing, research reports, and instructional guides.
### **Limitations**
1. **Computational Requirements**: Despite being a **0.5B-parameter** model, it requires significant computational resources for efficient inference, especially when dealing with long-context processing.
2. **Language-Specific Variability**: Performance may vary across supported languages, with possible challenges for low-resource languages.
3. **Potential Error Accumulation**: Long-text generation can introduce inconsistencies or errors over extended outputs.
4. **Limited Real-World Awareness**: The model's knowledge is restricted to the training data, which may not reflect the most recent events or developments.
5. **Prompt Sensitivity**: Outputs depend heavily on the specificity and clarity of the input prompts.