File size: 5,174 Bytes
2531621 6ce07b8 dc7dd47 6ce07b8 2531621 ccda873 6ce07b8 ccda873 2531621 ccda873 2531621 ccda873 2531621 ccda873 2531621 ccda873 6ce07b8 2531621 6ce07b8 2531621 ccda873 2531621 ccda873 2531621 ccda873 2531621 6ce07b8 2531621 39e4a93 2531621 6ce07b8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 |
---
license: apache-2.0
datasets:
- kanhatakeyama/wizardlm8x22b-logical-math-coding-sft
base_model:
- unsloth/Llama-3.2-1B-Instruct
pipeline_tag: text-generation
library_name: transformers
tags:
- llm
- maths
- coding
- reasoning
- tech
- unsloth
- trl
- sft
---
# LLaMA-3.2-1B-Instruct Fine-Tuned Model
**Model Card for Hugging Face Repository**
---
## Model Summary
This is a fine-tuned version of the **LLaMA-3.2-1B-Instruct** model. Fine-tuned using the `kanhatakeyama/wizardlm8x22b-logical-math-coding-sft` dataset, this model is specialized in **logical reasoning**, **mathematical problem-solving**, and **coding tasks**. Training was performed using **Unsloth** on Google Colab, optimized for performance and usability.
---
## Model Details
- **Model Name**: LLaMA-3.2-1B-Instruct (Fine-tuned)
- **Base Model**: LLaMA-3.2-1B-Instruct
- **Fine-Tuning Dataset**: `kanhatakeyama/wizardlm8x22b-logical-math-coding-sft`
- **Fine-Tuning Framework**: Unsloth
- **Parameters**: 1 Billion
- **Domain**: Logical Reasoning, Mathematics, Coding
- **Tags**: `llama`, `fine-tuning`, `instruction-following`, `math`, `coding`, `logical-reasoning`, `unsloth`
---
## Fine-Tuning Dataset
The fine-tuning dataset, `kanhatakeyama/wizardlm8x22b-logical-math-coding-sft`, is curated for advanced reasoning tasks. It contains:
- Logical reasoning scenarios
- Step-by-step mathematical solutions
- Complex code generation and debugging examples
**Dataset Link**: [kanhatakeyama/wizardlm8x22b-logical-math-coding-sft](https://huggingface.co/datasets/kanhatakeyama/wizardlm8x22b-logical-math-coding-sft)
---
## Intended Use
This model is ideal for tasks such as:
1. **Logical Problem Solving**: Derive conclusions and explanations for logical questions.
2. **Mathematics**: Solve algebra, calculus, and other mathematical problems.
3. **Coding**: Generate, debug, and explain programming code in various languages.
4. **Instruction-Following**: Handle user queries with clear and concise answers.
### Example Applications:
- AI tutors
- Logical reasoning assistants
- Math-solving bots
- Code generation and debugging tools
---
## Usage
### Installation
To use this model, install the required dependencies:
```bash
pip install transformers datasets torch accelerate
```
### Loading the Model
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
# Load the fine-tuned model and tokenizer
model_name = "ai-nexuz/llama-3.2-1b-instruct-fine-tuned"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)
```
### Generating Outputs
```python
prompt = "Solve this equation: 2x + 3 = 7. Find x."
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_length=100)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
```
---
## Model Training
### Hardware
- **Platform**: Google Colab Pro
- **GPU**: NVIDIA Tesla T4
### Training Configuration
- **Batch Size**: 32
- **Epochs**: 1
### Frameworks Used
- **Unsloth**: For efficient training
- **Hugging Face Transformers**: For model and tokenizer handling
---
## Limitations
While this model is highly proficient in logical reasoning, mathematics, and coding tasks, there are some limitations:
- May produce inaccurate results for ambiguous or poorly-defined prompts.
- Performance may degrade for highly specialized or niche coding languages.
---
## Deployment
### Using Gradio for Web UI
```bash
pip install gradio
```
```python
import gradio as gr
def generate_response(prompt):
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_length=200)
return tokenizer.decode(outputs[0], skip_special_tokens=True)
gr.Interface(fn=generate_response, inputs="text", outputs="text").launch()
```
### Hugging Face Inference API
This model can also be accessed using the Hugging Face Inference API for hosted deployment:
```python
from transformers import pipeline
pipe = pipeline("text-generation", model="ai-nexuz/llama-3.2-1b-instruct-fine-tuned")
result = pipe("Explain the concept of recursion in programming.")
print(result)
```
---
## Acknowledgements
This fine-tuning work was made possible by:
- **Hugging Face** for their exceptional library and dataset hosting.
- **Unsloth** for providing an efficient fine-tuning framework.
- **Google Colab** for GPU resources.
---
## Citation
If you use this model in your research or project, please cite it as:
```
@model{llama31b_instruct_finetuned,
title={Fine-Tuned LLaMA-3.2-1B-Instruct},
author={Your Name},
year={2024},
url={https://huggingface.co/your-huggingface-repo/llama-3.2-1b-instruct-finetuned},
}
```
---
## Licensing
This model is released under the **Apache 2.0 License**. See `LICENSE` for details.
---
**Tags**:
`llama` `fine-tuning` `math` `coding` `logical-reasoning` `instruction-following` `transformers`
**Summary**:
A fine-tuned version of LLaMA-3.2-1B-Instruct specializing in logical reasoning, math problem-solving, and code generation. Perfect for AI-driven tutoring, programming assistance, and logical problem-solving tasks. |