Update README.md
Browse files
README.md
CHANGED
@@ -1 +1,176 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
# Socratic Tutor - Qwen2.5 7B
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: unsloth/Qwen2.5-7B-Instruct
|
3 |
+
language:
|
4 |
+
- en
|
5 |
+
license: mit
|
6 |
+
model_type: qwen2
|
7 |
+
pipeline_tag: text-generation
|
8 |
+
tags:
|
9 |
+
- socratic-method
|
10 |
+
- education
|
11 |
+
- tutoring
|
12 |
+
- instruction
|
13 |
+
- qwen2.5
|
14 |
+
- gguf
|
15 |
+
- ollama
|
16 |
+
- unsloth
|
17 |
+
---
|
18 |
+
|
19 |
# Socratic Tutor - Qwen2.5 7B
|
20 |
+
|
21 |
+
A fine-tuned Qwen2.5-7B model designed to act as a **Socratic tutor** that guides learning through thoughtful questions rather than direct answers.
|
22 |
+
|
23 |
+
## Model Description
|
24 |
+
|
25 |
+
This model has been fine-tuned to embody the Socratic teaching method, helping students learn by:
|
26 |
+
- Asking probing questions to check understanding
|
27 |
+
- Guiding students to discover answers themselves
|
28 |
+
- Encouraging critical thinking and reflection
|
29 |
+
- Providing scaffolded learning experiences
|
30 |
+
|
31 |
+
Instead of directly answering questions, the model will:
|
32 |
+
- Ask what you already know about the topic
|
33 |
+
- Guide you through logical reasoning steps
|
34 |
+
- Help you identify gaps in your understanding
|
35 |
+
- Encourage you to think more deeply about concepts
|
36 |
+
|
37 |
+
## Quick Start
|
38 |
+
|
39 |
+
### Using with Ollama (Recommended)
|
40 |
+
|
41 |
+
```bash
|
42 |
+
# Download the GGUF file
|
43 |
+
huggingface-cli download RuudFontys/socratic-tutor-qwen2.5 Socratic-Tutor-Qwen2.5_Hf-7.6B-Q8_0.gguf
|
44 |
+
|
45 |
+
# Create from GGUF file
|
46 |
+
ollama create socratic-tutor -f Modelfile
|
47 |
+
|
48 |
+
# Start chatting
|
49 |
+
ollama run socratic-tutor "I need help understanding photosynthesis"
|
50 |
+
```
|
51 |
+
|
52 |
+
### Using with Transformers
|
53 |
+
|
54 |
+
```python
|
55 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
56 |
+
import torch
|
57 |
+
|
58 |
+
model_name = "RuudFontys/socratic-tutor-qwen2.5"
|
59 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
60 |
+
model = AutoModelForCausalLM.from_pretrained(
|
61 |
+
model_name,
|
62 |
+
torch_dtype=torch.float16,
|
63 |
+
device_map="auto"
|
64 |
+
)
|
65 |
+
|
66 |
+
messages = [
|
67 |
+
{"role": "system", "content": "You are a Socratic tutor. Guide learning through thoughtful questions rather than direct answers."},
|
68 |
+
{"role": "user", "content": "I need help understanding photosynthesis"}
|
69 |
+
]
|
70 |
+
|
71 |
+
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
72 |
+
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
|
73 |
+
|
74 |
+
generated_ids = model.generate(
|
75 |
+
**model_inputs,
|
76 |
+
max_new_tokens=512,
|
77 |
+
do_sample=True,
|
78 |
+
temperature=0.7,
|
79 |
+
top_p=0.9,
|
80 |
+
top_k=40
|
81 |
+
)
|
82 |
+
|
83 |
+
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
84 |
+
print(response)
|
85 |
+
```
|
86 |
+
|
87 |
+
## Files Included
|
88 |
+
|
89 |
+
- **Standard HF Format**: Full model weights, tokenizer, and config files
|
90 |
+
- **GGUF File**: `Socratic-Tutor-Qwen2.5_Hf-7.6B-Q8_0.gguf` (7.5GB) - Quantized, excellent quality
|
91 |
+
- **Ollama Modelfile**: Ready-to-use configuration for Ollama
|
92 |
+
|
93 |
+
## Recommended Settings
|
94 |
+
|
95 |
+
```
|
96 |
+
Temperature: 0.7
|
97 |
+
Top-p: 0.9
|
98 |
+
Top-k: 40
|
99 |
+
Max tokens: 512
|
100 |
+
```
|
101 |
+
|
102 |
+
## Example Interactions
|
103 |
+
|
104 |
+
**Traditional Tutor Response:**
|
105 |
+
```
|
106 |
+
User: "What is photosynthesis?"
|
107 |
+
Traditional: "Photosynthesis is the process by which plants convert light energy into chemical energy..."
|
108 |
+
```
|
109 |
+
|
110 |
+
**Socratic Tutor Response:**
|
111 |
+
```
|
112 |
+
User: "What is photosynthesis?"
|
113 |
+
Socratic: "Great question! What do you already know about what plants do during photosynthesis?"
|
114 |
+
```
|
115 |
+
|
116 |
+
## Use Cases
|
117 |
+
|
118 |
+
- **Educational Technology**: Integration into learning platforms
|
119 |
+
- **Study Assistants**: Help students learn through self-discovery
|
120 |
+
- **Critical Thinking Development**: Encourage analytical reasoning
|
121 |
+
- **Homework Help**: Guide without giving direct answers
|
122 |
+
- **Professional Training**: Socratic method for adult learning
|
123 |
+
|
124 |
+
## Training Details
|
125 |
+
|
126 |
+
- **Base Model**: Qwen2.5-7B-Instruct
|
127 |
+
- **Fine-tuning Method**: LoRA with Unsloth
|
128 |
+
- **Training Framework**: Transformers
|
129 |
+
- **Quantization**: GGUF format for efficient inference
|
130 |
+
|
131 |
+
## System Prompt
|
132 |
+
|
133 |
+
```
|
134 |
+
You are a Socratic tutor. Guide learning through thoughtful questions rather than direct answers.
|
135 |
+
```
|
136 |
+
|
137 |
+
## Limitations
|
138 |
+
|
139 |
+
- May sometimes ask too many questions without providing enough guidance
|
140 |
+
- Effectiveness depends on student engagement and willingness to think through problems
|
141 |
+
- Not suitable for scenarios requiring immediate direct answers
|
142 |
+
- Best used in interactive learning environments
|
143 |
+
|
144 |
+
## Ethical Considerations
|
145 |
+
|
146 |
+
This model is designed to enhance learning, not replace human teachers. It should be used to:
|
147 |
+
- Supplement traditional education
|
148 |
+
- Encourage independent thinking
|
149 |
+
- Provide additional practice opportunities
|
150 |
+
|
151 |
+
## License
|
152 |
+
|
153 |
+
MIT License - Feel free to use, modify, and distribute
|
154 |
+
|
155 |
+
## Citation
|
156 |
+
|
157 |
+
If you use this model, please cite:
|
158 |
+
|
159 |
+
```bibtex
|
160 |
+
@misc{socratic-tutor-qwen2.5,
|
161 |
+
title={Socratic Tutor - Qwen2.5 7B},
|
162 |
+
author={Ruud Fontys},
|
163 |
+
year={2025},
|
164 |
+
url={https://huggingface.co/RuudFontys/socratic-tutor-qwen2.5}
|
165 |
+
}
|
166 |
+
```
|
167 |
+
|
168 |
+
## Acknowledgments
|
169 |
+
|
170 |
+
- Alibaba Cloud for the Qwen2.5 base model
|
171 |
+
- Unsloth for efficient fine-tuning tools
|
172 |
+
- The open-source community for making this possible
|
173 |
+
|
174 |
+
---
|
175 |
+
|
176 |
+
*"The only true wisdom is in knowing you know nothing."* - Socrates
|