Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,110 @@
|
|
| 1 |
-
---
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: transformers
|
| 3 |
+
tags:
|
| 4 |
+
- math
|
| 5 |
+
- lora
|
| 6 |
+
- science
|
| 7 |
+
- chemistry
|
| 8 |
+
- biology
|
| 9 |
+
- code
|
| 10 |
+
- text-generation-inference
|
| 11 |
+
- unsloth
|
| 12 |
+
- llama
|
| 13 |
+
license: apache-2.0
|
| 14 |
+
datasets:
|
| 15 |
+
- HuggingFaceTB/smoltalk
|
| 16 |
+
language:
|
| 17 |
+
- en
|
| 18 |
+
- de
|
| 19 |
+
- es
|
| 20 |
+
- fr
|
| 21 |
+
- it
|
| 22 |
+
- pt
|
| 23 |
+
- hi
|
| 24 |
+
- th
|
| 25 |
+
base_model:
|
| 26 |
+
- meta-llama/Llama-3.2-3B-Instruct
|
| 27 |
+
pipeline_tag: text-generation
|
| 28 |
+
---
|
| 29 |
+
|
| 30 |
+

|
| 31 |
+
|
| 32 |
+
You can use ChatML & Alpaca format.
|
| 33 |
+
|
| 34 |
+
You can chat with the model via this [space](https://huggingface.co/spaces/suayptalha/Chat-with-FastLlama).
|
| 35 |
+
|
| 36 |
+
**Overview:**
|
| 37 |
+
|
| 38 |
+
FastLlama-3.2-3B-Instruct is a highly optimized version of the Llama-3.2-3B-Instruct model with the MetaMathQA-50k subset of HuggingFaceTB/smoltalk. Designed for superior performance in constrained environments, it combines speed, compactness, and high accuracy. This version has been fine-tuned using the MetaMathQA-50k section of the HuggingFaceTB/smoltalk dataset to enhance its mathematical reasoning and problem-solving abilities.
|
| 39 |
+
|
| 40 |
+
**Features:**
|
| 41 |
+
|
| 42 |
+
Lightweight and Fast: Optimized to deliver Llama-class capabilities with reduced computational overhead.
|
| 43 |
+
|
| 44 |
+
Fine-Tuned for Math Reasoning: Utilizes MetaMathQA-50k for better handling of complex mathematical problems and logical reasoning tasks.
|
| 45 |
+
|
| 46 |
+
Instruction-Tuned: Pre-trained on instruction-following tasks, making it robust in understanding and executing detailed queries.
|
| 47 |
+
|
| 48 |
+
Versatile Use Cases: Suitable for educational tools, tutoring systems, or any application requiring mathematical reasoning.
|
| 49 |
+
|
| 50 |
+
**Performance Highlights:**
|
| 51 |
+
|
| 52 |
+
Smaller Footprint: The model delivers comparable results to larger counterparts while operating efficiently on smaller hardware.
|
| 53 |
+
|
| 54 |
+
Enhanced Accuracy: Demonstrates improved performance on mathematical QA benchmarks.
|
| 55 |
+
|
| 56 |
+
Instruction Adherence: Retains high fidelity in understanding and following user instructions, even for complex queries.
|
| 57 |
+
|
| 58 |
+
**Loading the Model:**
|
| 59 |
+
```py
|
| 60 |
+
import torch
|
| 61 |
+
from transformers import pipeline
|
| 62 |
+
|
| 63 |
+
model_id = "suayptalha/FastLlama-3.2-3B-Instruct"
|
| 64 |
+
pipe = pipeline(
|
| 65 |
+
"text-generation",
|
| 66 |
+
model=model_id,
|
| 67 |
+
device_map="auto",
|
| 68 |
+
)
|
| 69 |
+
messages = [
|
| 70 |
+
{"role": "system", "content": "You are a friendly assistant named FastLlama."},
|
| 71 |
+
{"role": "user", "content": "Who are you?"},
|
| 72 |
+
]
|
| 73 |
+
outputs = pipe(
|
| 74 |
+
messages,
|
| 75 |
+
max_new_tokens=256,
|
| 76 |
+
)
|
| 77 |
+
print(outputs[0]["generated_text"][-1])
|
| 78 |
+
```
|
| 79 |
+
|
| 80 |
+
**Dataset:**
|
| 81 |
+
|
| 82 |
+
Dataset: MetaMathQA-50k
|
| 83 |
+
|
| 84 |
+
The MetaMathQA-50k subset of HuggingFaceTB/smoltalk was selected for fine-tuning due to its focus on mathematical reasoning, multi-step problem-solving, and logical inference. The dataset includes:
|
| 85 |
+
|
| 86 |
+
Algebraic problems
|
| 87 |
+
|
| 88 |
+
Geometric reasoning tasks
|
| 89 |
+
|
| 90 |
+
Statistical and probabilistic questions
|
| 91 |
+
|
| 92 |
+
Logical deduction problems
|
| 93 |
+
|
| 94 |
+
**Model Fine-Tuning:**
|
| 95 |
+
|
| 96 |
+
Fine-tuning was conducted using the following configuration:
|
| 97 |
+
|
| 98 |
+
Learning Rate: 2e-4
|
| 99 |
+
|
| 100 |
+
Epochs: 1
|
| 101 |
+
|
| 102 |
+
Optimizer: AdamW
|
| 103 |
+
|
| 104 |
+
Framework: Unsloth
|
| 105 |
+
|
| 106 |
+
**License:**
|
| 107 |
+
|
| 108 |
+
This model is licensed under the Apache 2.0 License. See the LICENSE file for details.
|
| 109 |
+
|
| 110 |
+
<a href="https://www.buymeacoffee.com/suayptalha" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a>
|