File size: 3,715 Bytes
aadaeaa
 
 
16ec7a5
 
 
 
 
a6a9eb5
16ec7a5
 
 
 
8d81dac
16ec7a5
92d5e66
aadaeaa
 
 
05c0c11
29c9c92
 
aadaeaa
29c9c92
 
aadaeaa
29c9c92
aadaeaa
29c9c92
 
 
aadaeaa
29c9c92
aadaeaa
29c9c92
 
 
 
 
 
 
 
 
 
aadaeaa
29c9c92
aadaeaa
 
29c9c92
 
 
aadaeaa
29c9c92
aadaeaa
29c9c92
 
aadaeaa
 
29c9c92
aadaeaa
29c9c92
 
 
 
aadaeaa
29c9c92
aadaeaa
29c9c92
 
 
 
 
aadaeaa
29c9c92
aadaeaa
29c9c92
 
 
aadaeaa
29c9c92
 
 
 
 
 
 
 
 
aadaeaa
29c9c92
 
 
 
 
 
 
 
aadaeaa
29c9c92
 
 
 
 
 
 
aadaeaa
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
---
base_model: unsloth/Qwen2.5-0.5B-Instruct
library_name: peft
license: mit
datasets:
- jilp00/YouToks-Instruct-Philosophy
language:
- en
pipeline_tag: text-generation
tags:
- philosophy
- unsloth
- trl
- lora
- transformers
- grpo 
---


<p align="center">
  <img src="https://www.templetonprize.org/wp-content/uploads/2020/01/plantinga_gallery_1.jpg" style="width: 350px; height:500px;"/> 
</p>

<h2 style="font-size: 32px; text-align: center;"> Plantinga-RL</h2>
<p style="font-size: 21px; text-align: center;">A Lightweight Language Model</p>

<h3 style="font-size: 21px; color: #2980b9;">Model Description 📝</h3>

Plantinga-RL is a fine-tuned version of Qwen2.5-0.5B-Instruct, trained specifically on philosophical texts. The model specializes in understanding and generating responses related to complex philosophical concepts, arguments, and debates.
It not only provides accurate explanations, thoughtful analyses, and context-aware answers, but also performs structured reasoning—breaking down arguments, evaluating premises, and drawing logical conclusions.
It is particularly effective in addressing philosophical questions in metaphysics, epistemology, ethics, and the philosophy of mind, offering both clarity and depth in reasoning.

<h3 style="font-size: 21px; color: #2980b9;">Key Features ✨</h3>

* **Architecture**: Transformer-based language model 🏗️
* **Training Data**: Philosophy-focused dataset covering multiple branches of philosophy and structured philosophical Q&A. 📚
* **Developed by**: Rustam Shiriyev
* **Language(s)**: English
* **License**: MIT
* **Fine-Tuning Method**: GRPO with LoRA 
* **Domain**: Philosophy
* **Finetuned from model**: unsloth/Qwen2.5-0.5B-Instruct
* **Model name**: The model’s name was inspired by Alvin Plantinga, one of the most influential philosophers of the 21st century.
* **Dataset**: jilp00/YouToks-Instruct-Philosophy

<h3 style="font-size: 21px; color: #2980b9;">Intended Use</h3>


* Generating clear and concise explanations of philosophical concepts. 🏆
* Providing structured responses to philosophical questions. 🎯
* Assisting students, researchers, and enthusiasts in exploring philosophical arguments.⚡

<h3 style="font-size: 21px; color: #2980b9;">Limitations ⚠️</h3>

* While fine-tuned on philosophy, the model may still occasionally generate hallucinations or less precise interpretations of highly nuanced philosophical arguments.
* The model does not replace expert human philosophical judgment.


<h3 style="font-size: 21px; color: #2980b9;">How to Get Started with the Model 💻</h3>

```python
from huggingface_hub import login
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel

login(token="")

tokenizer = AutoTokenizer.from_pretrained("unsloth/Qwen2.5-0.5B-Instruct",)
base_model = AutoModelForCausalLM.from_pretrained(
    "unsloth/Qwen2.5-0.5B-Instruct",
    device_map={"": 0}, token=""
)

model = PeftModel.from_pretrained(base_model,"Rustamshry/Plantinga-RL")

question = """
In the philosophical discussion comparing the mind to harmony, what is the core argument, and why could it imply that the mind is destructible?
"""

system = """
Respond in the following format:
<reasoning>
...
</reasoning>
<answer>
...
</answer>
"""

messages = [
    {"role" : "system", "content" : system},
    {"role" : "user",   "content" : question}
]
text = tokenizer.apply_chat_template(
    messages,
    tokenize = False,
)

from transformers import TextStreamer
_ = model.generate(
    **tokenizer(text, return_tensors = "pt").to("cuda"),
    max_new_tokens = 2000,
    streamer = TextStreamer(tokenizer, skip_prompt = True),
)
```

### Framework versions

- PEFT 0.15.2