Update README.md
Browse files
README.md
CHANGED
@@ -22,4 +22,71 @@ datasets:
|
|
22 |
- **Trained for 8 Hours on A800 with the Bespoke Stratos 17k Dataset.**
|
23 |
- **10$ Training...I'm actually amazed by the results.**
|
24 |
|
25 |
-
If using this model for Open WebUI here is a simple function to organize the models responses: https://openwebui.com/f/quaz93/phi4_turn_r1_distill_thought_function_v1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
- **Trained for 8 Hours on A800 with the Bespoke Stratos 17k Dataset.**
|
23 |
- **10$ Training...I'm actually amazed by the results.**
|
24 |
|
25 |
+
If using this model for Open WebUI here is a simple function to organize the models responses: https://openwebui.com/f/quaz93/phi4_turn_r1_distill_thought_function_v1
|
26 |
+
|
27 |
+
# Phi4 Turn R1Distill LoRA Adapters
|
28 |
+
|
29 |
+
## Overview
|
30 |
+
These **LoRA adapters** were trained using diverse **reasoning datasets** that incorporate structured **Thought** and **Solution** responses to enhance logical inference. This project was designed to **test the R1 dataset** on **Phi-4**, aiming to create a **lightweight, fast, and efficient reasoning model**.
|
31 |
+
|
32 |
+
All adapters were fine-tuned using an **NVIDIA A800 GPU**, ensuring high performance and compatibility for continued training, merging, or direct deployment.
|
33 |
+
As part of an open-source initiative, all resources are made **publicly available** for unrestricted research and development.
|
34 |
+
|
35 |
+
---
|
36 |
+
|
37 |
+
## LoRA Adapters
|
38 |
+
Below are the currently available LoRA fine-tuned adapters (**as of January 30, 2025**):
|
39 |
+
|
40 |
+
- [Phi4.Turn.R1Distill-Lora1](https://huggingface.co/Quazim0t0/Phi4.Turn.R1Distill-Lora1)
|
41 |
+
- [Phi4.Turn.R1Distill-Lora2](https://huggingface.co/Quazim0t0/Phi4.Turn.R1Distill-Lora2)
|
42 |
+
- [Phi4.Turn.R1Distill-Lora3](https://huggingface.co/Quazim0t0/Phi4.Turn.R1Distill-Lora3)
|
43 |
+
- [Phi4.Turn.R1Distill-Lora4](https://huggingface.co/Quazim0t0/Phi4.Turn.R1Distill-Lora4)
|
44 |
+
- [Phi4.Turn.R1Distill-Lora5](https://huggingface.co/Quazim0t0/Phi4.Turn.R1Distill-Lora5)
|
45 |
+
- [Phi4.Turn.R1Distill-Lora6](https://huggingface.co/Quazim0t0/Phi4.Turn.R1Distill-Lora6)
|
46 |
+
- [Phi4.Turn.R1Distill-Lora7](https://huggingface.co/Quazim0t0/Phi4.Turn.R1Distill-Lora7)
|
47 |
+
- [Phi4.Turn.R1Distill-Lora8](https://huggingface.co/Quazim0t0/Phi4.Turn.R1Distill-Lora8)
|
48 |
+
|
49 |
+
---
|
50 |
+
|
51 |
+
## GGUF Full & Quantized Models
|
52 |
+
To facilitate broader testing and real-world inference, **GGUF Full and Quantized versions** have been provided for evaluation on **Open WebUI** and other LLM interfaces.
|
53 |
+
|
54 |
+
### **Version 1**
|
55 |
+
- [Phi4.Turn.R1Distill.Q8_0](https://huggingface.co/Quazim0t0/Phi4.Turn.R1Distill.Q8_0)
|
56 |
+
- [Phi4.Turn.R1Distill.Q4_k](https://huggingface.co/Quazim0t0/Phi4.Turn.R1Distill.Q4_k)
|
57 |
+
- [Phi4.Turn.R1Distill.16bit](https://huggingface.co/Quazim0t0/Phi4.Turn.R1Distill.16bit)
|
58 |
+
|
59 |
+
### **Version 1.1**
|
60 |
+
- [Phi4.Turn.R1Distill_v1.1_Q4_k](https://huggingface.co/Quazim0t0/Phi4.Turn.R1Distill_v1.1_Q4_k)
|
61 |
+
|
62 |
+
### **Version 1.2**
|
63 |
+
- [Phi4.Turn.R1Distill_v1.2_Q4_k](https://huggingface.co/Quazim0t0/Phi4.Turn.R1Distill_v1.2_Q4_k)
|
64 |
+
|
65 |
+
### **Version 1.3**
|
66 |
+
- [Phi4.Turn.R1Distill_v1.3_Q4_k-GGUF](https://huggingface.co/Quazim0t0/Phi4.Turn.R1Distill_v1.3_Q4_k-GGUF)
|
67 |
+
|
68 |
+
### **Version 1.4**
|
69 |
+
- [Phi4.Turn.R1Distill_v1.4_Q4_k-GGUF](https://huggingface.co/Quazim0t0/Phi4.Turn.R1Distill_v1.4_Q4_k-GGUF)
|
70 |
+
|
71 |
+
### **Version 1.5**
|
72 |
+
- [Phi4.Turn.R1Distill_v1.5_Q4_k-GGUF](https://huggingface.co/Quazim0t0/Phi4.Turn.R1Distill_v1.5_Q4_k-GGUF)
|
73 |
+
|
74 |
+
---
|
75 |
+
|
76 |
+
## Usage
|
77 |
+
|
78 |
+
### **Loading LoRA Adapters with `transformers` and `peft`**
|
79 |
+
To load and apply the LoRA adapters on Phi-4, use the following approach:
|
80 |
+
|
81 |
+
```python
|
82 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
83 |
+
from peft import PeftModel
|
84 |
+
|
85 |
+
base_model = "microsoft/Phi-4"
|
86 |
+
lora_adapter = "Quazim0t0/Phi4.Turn.R1Distill-Lora1"
|
87 |
+
|
88 |
+
tokenizer = AutoTokenizer.from_pretrained(base_model)
|
89 |
+
model = AutoModelForCausalLM.from_pretrained(base_model)
|
90 |
+
model = PeftModel.from_pretrained(model, lora_adapter)
|
91 |
+
|
92 |
+
model.eval()
|