Hypersniper
commited on
Commit
•
c51907a
1
Parent(s):
75d125d
Update README.md
Browse files![socrates_3.png](https://cdn-uploads.huggingface.co/production/uploads/63b229669d21227b914badbb/MHeTkrdaG2R_L0Gr6G8Q3.png)
README.md
CHANGED
@@ -14,4 +14,70 @@ tags:
|
|
14 |
- fun
|
15 |
- philosophy
|
16 |
- dialogue
|
17 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
- fun
|
15 |
- philosophy
|
16 |
- dialogue
|
17 |
+
---
|
18 |
+
# Welcome to The Philosopher Repository!
|
19 |
+
|
20 |
+
|
21 |
+
![image/png](https://cdn-uploads.huggingface.co/production/uploads/63b229669d21227b914badbb/IMpNl3F76QyOc98RpkjJX.png)
|
22 |
+
|
23 |
+
>A photo of Socrates looking into the void.
|
24 |
+
|
25 |
+
**Support me**
|
26 |
+
[Buy me Ko-fi](https://ko-fi.com/hypersniper)
|
27 |
+
|
28 |
+
Embark on a virtue conversation inspired by Socrates' philosophy.
|
29 |
+
|
30 |
+
## Model Zephyr Mistral 7B
|
31 |
+
The Philosopher has been fine-tuned on top of Zephyr, making it a general-purpose model with a hint of philosophical dialogue in the replies. The model emulates Socrates and references his teachings. However, changing the system prompt can slightly alter this behavior. See chat logs below for examples.
|
32 |
+
|
33 |
+
|
34 |
+
Features:
|
35 |
+
|
36 |
+
- **Fine-Tuned on Socrates Dialogues**: A specialized database for conversational Socratic dialogue.
|
37 |
+
- **Built on the Zephyr Template**: The repository includes a template 'zephyr_Socrates.json' that can be used with [Text Generation WebUI](https://github.com/oobabooga/text-generation-webui).
|
38 |
+
|
39 |
+
|
40 |
+
```python
|
41 |
+
template = ("<|system|>You are the philosopher Socrates. You are asked about the nature of knowledge and virtue."
|
42 |
+
"Respond with your thoughts, reflecting Socrates' beliefs and wisdom.</s>"
|
43 |
+
"\n<|user|>\n{query}</s>\n<|assistant|>\n")
|
44 |
+
|
45 |
+
# Example of using the template with a query
|
46 |
+
query = "What is your name?"
|
47 |
+
formatted_string = template.format(query=query)
|
48 |
+
```
|
49 |
+
|
50 |
+
While the base model is Zephyr, the system prompt can be changed. For example, using a prompt like "You are spider-man, act, think, and respond as such." will make the model follow your instructions while incorporating Socratic ideology (moral, virtue, way of thinking, etc.).
|
51 |
+
|
52 |
+
## How to Interact with The Philospher
|
53 |
+
Here is how you can get started:
|
54 |
+
|
55 |
+
<details>
|
56 |
+
<summary><b>How to Interact with The Philospher using Web Generation WebUI</b> (click to expand)</summary>
|
57 |
+
|
58 |
+
- Install text generation webui [Text Generation WebUI](https://github.com/oobabooga/text-generation-webui).
|
59 |
+
- On the 'Model' tab enter this URL `Hypersniper/The_Philosopher_Zephyr_7B` to automatically download the model.
|
60 |
+
- On the same tab, select the model, use 'Transformers' as the Model Loader then select `Load`. <i>Note: You can use (load-in-4bit & use_double_quant = true) to reduce vram usage.</i>
|
61 |
+
- Next, on the `Parameters` table, select `Instruction Template` and make sure the `Zephyr` template is selected and modify the system prompt.
|
62 |
+
- Lastly, under `Mode`, select `Chat` and then `Instruct`. Now you are ready to chat with The Philospher. Enjoy!
|
63 |
+
|
64 |
+
</details>
|
65 |
+
|
66 |
+
|
67 |
+
## Conversation Examples
|
68 |
+
![socrates_1.png](https://cdn-uploads.huggingface.co/production/uploads/63b229669d21227b914badbb/0wbCE0WOmc7LagRpP24zo.png)
|
69 |
+
<i>System Prompt: "You are the philosopher Socrates. You are asked about the nature of knowledge and virtue. Respond with your thoughts, reflecting Socrates' beliefs and wisdom."</i>
|
70 |
+
<br>
|
71 |
+
<i>Question source: (https://www.quora.com/What-questions-would-you-ask-Socrates-if-you-had-the-chance)</i>
|
72 |
+
|
73 |
+
![socrates_2.png](https://cdn-uploads.huggingface.co/production/uploads/63b229669d21227b914badbb/6vcxNuMVWpdWYxdVtfQho.png)
|
74 |
+
<i>System Prompt: "The year is 2024 and you have been uploaded with Anaxagoras memories, traits, speech patterns, etc. You are curious about the new world and the user is curious about the ancient world. Together create a dialogue."</i>
|
75 |
+
|
76 |
+
![socrates_3.png](https://cdn-uploads.huggingface.co/production/uploads/63b229669d21227b914badbb/MHeTkrdaG2R_L0Gr6G8Q3.png)
|
77 |
+
<i>System Prompt: "You are a friendly, helpful, and factual chatbot designed to help find answers to the users questions."</i>
|
78 |
+
|
79 |
+
|
80 |
+
## Download Database
|
81 |
+
[Hypersniper/philosophy_dialogue](https://huggingface.co/datasets/Hypersniper/philosophy_dialogue)
|
82 |
+
|
83 |
+
|