Update README.md
Browse files
README.md
CHANGED
|
@@ -1,202 +1,120 @@
|
|
| 1 |
---
|
| 2 |
base_model: unsloth/Qwen3-0.6B
|
| 3 |
library_name: peft
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
---
|
| 5 |
|
| 6 |
# Model Card for Model ID
|
| 7 |
|
| 8 |
-
<!-- Provide a quick summary of what the model is/does. -->
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
## Model Details
|
| 13 |
|
| 14 |
### Model Description
|
| 15 |
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
-
- **Developed by:**
|
| 21 |
-
- **
|
| 22 |
-
- **Shared by [optional]:** [More Information Needed]
|
| 23 |
-
- **Model type:** [More Information Needed]
|
| 24 |
-
- **Language(s) (NLP):** [More Information Needed]
|
| 25 |
- **License:** [More Information Needed]
|
| 26 |
-
- **Finetuned from model
|
| 27 |
-
|
| 28 |
-
### Model Sources [optional]
|
| 29 |
|
| 30 |
-
<!-- Provide the basic links for the model. -->
|
| 31 |
-
|
| 32 |
-
- **Repository:** [More Information Needed]
|
| 33 |
-
- **Paper [optional]:** [More Information Needed]
|
| 34 |
-
- **Demo [optional]:** [More Information Needed]
|
| 35 |
|
| 36 |
## Uses
|
| 37 |
|
| 38 |
-
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
| 39 |
-
|
| 40 |
### Direct Use
|
| 41 |
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
[More Information Needed]
|
| 45 |
-
|
| 46 |
-
### Downstream Use [optional]
|
| 47 |
|
| 48 |
-
|
| 49 |
|
| 50 |
-
|
| 51 |
|
| 52 |
### Out-of-Scope Use
|
| 53 |
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
[More Information Needed]
|
| 57 |
|
| 58 |
## Bias, Risks, and Limitations
|
| 59 |
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
[More Information Needed]
|
| 63 |
-
|
| 64 |
-
### Recommendations
|
| 65 |
-
|
| 66 |
-
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
| 67 |
|
| 68 |
-
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
| 69 |
|
| 70 |
## How to Get Started with the Model
|
| 71 |
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
### Training Data
|
| 79 |
-
|
| 80 |
-
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
| 81 |
-
|
| 82 |
-
[More Information Needed]
|
| 83 |
-
|
| 84 |
-
### Training Procedure
|
| 85 |
-
|
| 86 |
-
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
| 87 |
-
|
| 88 |
-
#### Preprocessing [optional]
|
| 89 |
-
|
| 90 |
-
[More Information Needed]
|
| 91 |
|
| 92 |
|
| 93 |
-
|
| 94 |
|
| 95 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
|
| 97 |
-
|
| 98 |
|
| 99 |
-
|
| 100 |
|
| 101 |
-
|
|
|
|
|
|
|
| 102 |
|
| 103 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 104 |
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
[More Information Needed]
|
| 114 |
|
| 115 |
-
|
| 116 |
|
| 117 |
-
|
|
|
|
| 118 |
|
| 119 |
-
|
| 120 |
|
| 121 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 122 |
|
| 123 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
| 124 |
|
| 125 |
-
[More Information Needed]
|
| 126 |
|
| 127 |
### Results
|
| 128 |
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
#### Summary
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
## Model Examination [optional]
|
| 136 |
-
|
| 137 |
-
<!-- Relevant interpretability work for the model goes here -->
|
| 138 |
-
|
| 139 |
-
[More Information Needed]
|
| 140 |
-
|
| 141 |
-
## Environmental Impact
|
| 142 |
-
|
| 143 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
| 144 |
-
|
| 145 |
-
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
| 146 |
-
|
| 147 |
-
- **Hardware Type:** [More Information Needed]
|
| 148 |
-
- **Hours used:** [More Information Needed]
|
| 149 |
-
- **Cloud Provider:** [More Information Needed]
|
| 150 |
-
- **Compute Region:** [More Information Needed]
|
| 151 |
-
- **Carbon Emitted:** [More Information Needed]
|
| 152 |
-
|
| 153 |
-
## Technical Specifications [optional]
|
| 154 |
-
|
| 155 |
-
### Model Architecture and Objective
|
| 156 |
-
|
| 157 |
-
[More Information Needed]
|
| 158 |
-
|
| 159 |
-
### Compute Infrastructure
|
| 160 |
-
|
| 161 |
-
[More Information Needed]
|
| 162 |
-
|
| 163 |
-
#### Hardware
|
| 164 |
-
|
| 165 |
-
[More Information Needed]
|
| 166 |
-
|
| 167 |
-
#### Software
|
| 168 |
-
|
| 169 |
-
[More Information Needed]
|
| 170 |
-
|
| 171 |
-
## Citation [optional]
|
| 172 |
-
|
| 173 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
| 174 |
-
|
| 175 |
-
**BibTeX:**
|
| 176 |
-
|
| 177 |
-
[More Information Needed]
|
| 178 |
-
|
| 179 |
-
**APA:**
|
| 180 |
-
|
| 181 |
-
[More Information Needed]
|
| 182 |
-
|
| 183 |
-
## Glossary [optional]
|
| 184 |
-
|
| 185 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
| 186 |
-
|
| 187 |
-
[More Information Needed]
|
| 188 |
-
|
| 189 |
-
## More Information [optional]
|
| 190 |
-
|
| 191 |
-
[More Information Needed]
|
| 192 |
-
|
| 193 |
-
## Model Card Authors [optional]
|
| 194 |
-
|
| 195 |
-
[More Information Needed]
|
| 196 |
-
|
| 197 |
-
## Model Card Contact
|
| 198 |
|
| 199 |
-
[More Information Needed]
|
| 200 |
### Framework versions
|
| 201 |
|
| 202 |
- PEFT 0.14.0
|
|
|
|
| 1 |
---
|
| 2 |
base_model: unsloth/Qwen3-0.6B
|
| 3 |
library_name: peft
|
| 4 |
+
license: mit
|
| 5 |
+
datasets:
|
| 6 |
+
- unsloth/OpenMathReasoning-mini
|
| 7 |
+
- mlabonne/FineTome-100k
|
| 8 |
+
language:
|
| 9 |
+
- en
|
| 10 |
+
pipeline_tag: question-answering
|
| 11 |
+
tags:
|
| 12 |
+
- Math
|
| 13 |
---
|
| 14 |
|
| 15 |
# Model Card for Model ID
|
| 16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
### Model Description
|
| 19 |
|
| 20 |
+
This model is fine-tuned version of Qwen/Qwen3-0.6B using the Unsloth library and LoRA for parameter-efficient training.
|
| 21 |
+
This model is trained on two datasets:
|
| 22 |
+
- unsloth/OpenMathReason-mini — for enhancing mathematical reasoning skills.
|
| 23 |
+
- mlabonne/FineTome-100k — to improve general conversational abilities.
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
+
- **Developed by:** Rustam Shiriyev
|
| 28 |
+
- **Language(s) (NLP):** English
|
|
|
|
|
|
|
|
|
|
| 29 |
- **License:** [More Information Needed]
|
| 30 |
+
- **Finetuned from model:** unsloth/Qwen3-0.6B
|
|
|
|
|
|
|
| 31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
## Uses
|
| 34 |
|
|
|
|
|
|
|
| 35 |
### Direct Use
|
| 36 |
|
| 37 |
+
This model can be used as a lightweight assistant capable of solving basic to intermediate math problems (OpenMathReason tasks).
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
|
| 39 |
+
### Downstream Use
|
| 40 |
|
| 41 |
+
- Can be integrated into educational chatbots for STEM learning.
|
| 42 |
|
| 43 |
### Out-of-Scope Use
|
| 44 |
|
| 45 |
+
- Not suitable for high-stakes decision-making.
|
|
|
|
|
|
|
| 46 |
|
| 47 |
## Bias, Risks, and Limitations
|
| 48 |
|
| 49 |
+
- Mathematical reasoning is limited to the scope of the OpenMathReason-mini dataset.
|
| 50 |
+
- Conversational quality may degrade with complex or multi-turn inputs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
|
|
|
|
| 52 |
|
| 53 |
## How to Get Started with the Model
|
| 54 |
|
| 55 |
+
```python
|
| 56 |
+
from transformers import TextStreamer
|
| 57 |
+
from huggingface_hub import login
|
| 58 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 59 |
+
from peft import PeftModel
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
|
| 61 |
|
| 62 |
+
login(token="")
|
| 63 |
|
| 64 |
+
tokenizer = AutoTokenizer.from_pretrained("unsloth/Qwen3-0.6B",)
|
| 65 |
+
base_model = AutoModelForCausalLM.from_pretrained(
|
| 66 |
+
"unsloth/Qwen3-0.6B",
|
| 67 |
+
device_map="auto", token=""
|
| 68 |
+
)
|
| 69 |
|
| 70 |
+
model = PeftModel.from_pretrained(base_model,"Rustamshry/Qwen3-0.6B-OpenMathReason")
|
| 71 |
|
| 72 |
+
question = "Solve (x + 2)^2 = 0"
|
| 73 |
|
| 74 |
+
messages = [
|
| 75 |
+
{"role" : "user", "content" : question}
|
| 76 |
+
]
|
| 77 |
|
| 78 |
+
text = tokenizer.apply_chat_template(
|
| 79 |
+
messages,
|
| 80 |
+
tokenize = False,
|
| 81 |
+
add_generation_prompt = True,
|
| 82 |
+
enable_thinking = True,
|
| 83 |
+
)
|
| 84 |
|
| 85 |
+
_ = model.generate(
|
| 86 |
+
**tokenizer(text, return_tensors = "pt").to(model.device),
|
| 87 |
+
max_new_tokens = 2048,
|
| 88 |
+
temperature = 0.6, top_p = 0.95, top_k = 20,
|
| 89 |
+
streamer = TextStreamer(tokenizer, skip_prompt = True),
|
| 90 |
+
)
|
| 91 |
+
```
|
| 92 |
+
## Training Details
|
|
|
|
| 93 |
|
| 94 |
+
### Training Data
|
| 95 |
|
| 96 |
+
- unsloth/OpenMathReason-mini: 10k+ instruction-following examples focused on math.
|
| 97 |
+
- mlabonne/FineTome-100k: 100k examples of diverse, high-quality chat data.
|
| 98 |
|
| 99 |
+
### Training Procedure
|
| 100 |
|
| 101 |
+
- batch size=8,
|
| 102 |
+
- gradient accumulation steps=2,
|
| 103 |
+
- optimizer=adamw_torch,
|
| 104 |
+
- learning rate=2e-5,
|
| 105 |
+
- warmup steps=100,
|
| 106 |
+
- fp16=True,
|
| 107 |
+
- dataloader_num_workers=16,
|
| 108 |
+
- num_train_epochs=1,
|
| 109 |
+
- weight_decay=0.01,
|
| 110 |
+
- lr_scheduler_type = "linear"
|
| 111 |
|
|
|
|
| 112 |
|
|
|
|
| 113 |
|
| 114 |
### Results
|
| 115 |
|
| 116 |
+
- Loss Value > 0.56
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 117 |
|
|
|
|
| 118 |
### Framework versions
|
| 119 |
|
| 120 |
- PEFT 0.14.0
|