Upload README.md
Browse files
README.md
CHANGED
|
@@ -1,22 +1,144 @@
|
|
| 1 |
---
|
| 2 |
-
base_model: unsloth/llama-3.2-3b-instruct-bnb-4bit
|
| 3 |
-
tags:
|
| 4 |
-
- text-generation-inference
|
| 5 |
-
- transformers
|
| 6 |
-
- unsloth
|
| 7 |
-
- llama
|
| 8 |
-
- gguf
|
| 9 |
license: apache-2.0
|
| 10 |
language:
|
| 11 |
-
- en
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
---
|
| 13 |
|
| 14 |
-
|
| 15 |
|
| 16 |
-
|
| 17 |
-
- **License:** apache-2.0
|
| 18 |
-
- **Finetuned from model :** unsloth/llama-3.2-3b-instruct-bnb-4bit
|
| 19 |
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
-
|
|
|
|
| 1 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
license: apache-2.0
|
| 3 |
language:
|
| 4 |
+
- en
|
| 5 |
+
tags:
|
| 6 |
+
- text-generation-inference
|
| 7 |
+
- transformers
|
| 8 |
+
- unsloth
|
| 9 |
+
- llama
|
| 10 |
+
- gguf
|
| 11 |
+
library_name: transformers
|
| 12 |
+
pipeline_tag: text-generation
|
| 13 |
+
datasets:
|
| 14 |
+
- Rimyy/problemMath-Llama3.5K
|
| 15 |
+
base_model: unsloth/llama-3.2-3b-instruct-bnb-4bit
|
| 16 |
+
model_name: llama-3.2-3b-instruct-bnb-4bit-math-gguf
|
| 17 |
+
---
|
| 18 |
+
|
| 19 |
+
# ๐งฎ LLaMA 3.2 3B Instruct (Unsloth 4-bit) โ Finetuned on Rimyy/problemMath-Llama3.5K (GGUF)
|
| 20 |
+
|
| 21 |
+
This model is a **4-bit GGUF** variant of [`unsloth/llama-3.2-3b-instruct-bnb-4bit`](https://huggingface.co/unsloth/llama-3.2-3b-instruct-bnb-4bit), fine-tuned on [`Rimyy/problemMath-Llama3.5K`](https://huggingface.co/datasets/Rimyy/problemMath-Llama3.5K), a high-quality dataset of math reasoning and problem-solving questions. The model is tailored for **math instruction**, **step-by-step reasoning**, and educational applications.
|
| 22 |
+
|
| 23 |
+
> ๐จ Designed to reason, not just regurgitate. Small model, big brain.
|
| 24 |
+
|
| 25 |
+
---
|
| 26 |
+
|
| 27 |
+
## ๐ง Model Details
|
| 28 |
+
|
| 29 |
+
| Feature | Value |
|
| 30 |
+
|-------------------|-----------------------------------------------------------------------|
|
| 31 |
+
| Base | [`unsloth/llama-3.2-3b-instruct-bnb-4bit`](https://huggingface.co/unsloth/llama-3.2-3b-instruct-bnb-4bit) |
|
| 32 |
+
| Finetuned Dataset | [`Rimyy/problemMath-Llama3.5K`](https://huggingface.co/datasets/Rimyy/problemMath-Llama3.5K) |
|
| 33 |
+
| Quantization | 4-bit GGUF (compatible with llama.cpp/text-generation-webui) |
|
| 34 |
+
| Format | GGUF |
|
| 35 |
+
| Language | English |
|
| 36 |
+
| Instruction Tuned | โ
Yes |
|
| 37 |
+
|
| 38 |
+
---
|
| 39 |
+
|
| 40 |
+
## ๐ Dataset: `Rimyy/problemMath-Llama3.5K`
|
| 41 |
+
|
| 42 |
+
- ~3.5K math word problems and reasoning tasks
|
| 43 |
+
- Emphasizes chain-of-thought (CoT) explanations
|
| 44 |
+
- Covers arithmetic, algebra, and word problems
|
| 45 |
+
- Aligns with OpenAI-style "question โ step-by-step answer" format
|
| 46 |
+
|
| 47 |
+
---
|
| 48 |
+
|
| 49 |
+
## ๐ง Quick Usage Example (llama.cpp)
|
| 50 |
+
|
| 51 |
+
```bash
|
| 52 |
+
./main -m llama-3.2-3b-math.gguf --prompt "### Question: What is the value of x if x + 3 = 7?
|
| 53 |
+
### Answer:"
|
| 54 |
+
```
|
| 55 |
+
|
| 56 |
+
Expected output:
|
| 57 |
+
```
|
| 58 |
+
To solve for x, subtract 3 from both sides of the equation:
|
| 59 |
+
x + 3 = 7
|
| 60 |
+
x = 7 - 3
|
| 61 |
+
x = 4
|
| 62 |
+
|
| 63 |
+
Answer: 4
|
| 64 |
+
```
|
| 65 |
+
|
| 66 |
+
---
|
| 67 |
+
|
| 68 |
+
## ๐งช Usage in Python
|
| 69 |
+
|
| 70 |
+
```python
|
| 71 |
+
from llama_cpp import Llama
|
| 72 |
+
|
| 73 |
+
llm = Llama(
|
| 74 |
+
model_path="llama-3.2-3b-instruct-math.q4_K.gguf",
|
| 75 |
+
n_ctx=2048,
|
| 76 |
+
n_gpu_layers=32, # adjust based on your GPU
|
| 77 |
+
)
|
| 78 |
+
|
| 79 |
+
prompt = (
|
| 80 |
+
"### Question: If a rectangle has length 10 and width 5, what is its area?
|
| 81 |
+
"
|
| 82 |
+
"### Answer:"
|
| 83 |
+
)
|
| 84 |
+
response = llm(prompt)
|
| 85 |
+
print(response["choices"][0]["text"])
|
| 86 |
+
```
|
| 87 |
+
|
| 88 |
+
---
|
| 89 |
+
|
| 90 |
+
## ๐ฆ Applications
|
| 91 |
+
|
| 92 |
+
- ๐ค Math tutoring agents
|
| 93 |
+
- ๐ AI-driven educational platforms
|
| 94 |
+
- ๐งฉ RAG pipelines for mathematical queries
|
| 95 |
+
- ๐ Automated solution generators
|
| 96 |
+
|
| 97 |
+
---
|
| 98 |
+
|
| 99 |
+
## โ ๏ธ Limitations
|
| 100 |
+
|
| 101 |
+
- Occasional step hallucinations
|
| 102 |
+
- Not optimized for LaTeX-heavy symbolic math
|
| 103 |
+
- May struggle on very long multi-step problems
|
| 104 |
+
|
| 105 |
+
---
|
| 106 |
+
|
| 107 |
+
## ๐ Qualitative Benchmark
|
| 108 |
+
|
| 109 |
+
| Task Type | Performance |
|
| 110 |
+
|-------------------|--------------------|
|
| 111 |
+
| Simple Arithmetic | โ
Excellent |
|
| 112 |
+
| One-Step Algebra | โ
Strong |
|
| 113 |
+
| Multi-Step CoT | โ ๏ธ Good (some drift)|
|
| 114 |
+
| Logic Puzzles | โ ๏ธ Mixed |
|
| 115 |
+
|
| 116 |
+
> ๐ Quantitative benchmarks forthcoming.
|
| 117 |
+
|
| 118 |
---
|
| 119 |
|
| 120 |
+
## ๐ Citation
|
| 121 |
|
| 122 |
+
If you use this model, please cite:
|
|
|
|
|
|
|
| 123 |
|
| 124 |
+
```bibtex
|
| 125 |
+
@misc{rimyy2025math,
|
| 126 |
+
author = {Rimyy},
|
| 127 |
+
title = {ProblemMath-Llama3.5K: A Dataset for Math Problem Solving},
|
| 128 |
+
year = {2025},
|
| 129 |
+
url = {https://huggingface.co/datasets/Rimyy/problemMath-Llama3.5K}
|
| 130 |
+
}
|
| 131 |
+
```
|
| 132 |
+
|
| 133 |
+
---
|
| 134 |
+
|
| 135 |
+
## ๐ Acknowledgements
|
| 136 |
+
|
| 137 |
+
- **Meta** for LLaMA 3.
|
| 138 |
+
- **Unsloth** for the 4-bit instruct base.
|
| 139 |
+
- **Rimyy** for an excellent math dataset.
|
| 140 |
+
- **llama.cpp & GGUF** community for stellar tooling.
|
| 141 |
+
|
| 142 |
+
---
|
| 143 |
|
| 144 |
+
๐ข *Small enough to run on your laptop, smart enough to teach algebra.*
|