Rustamshry commited on
Commit
29c9c92
·
verified ·
1 Parent(s): 16ec7a5

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +66 -172
README.md CHANGED
@@ -15,200 +15,94 @@ tags:
15
  - transformers
16
  ---
17
 
18
- # Model Card for Model ID
19
 
20
- <!-- Provide a quick summary of what the model is/does. -->
 
 
21
 
 
 
22
 
 
23
 
24
- ## Model Details
 
 
25
 
26
- ### Model Description
27
 
28
- <!-- Provide a longer summary of what this model is. -->
 
 
 
 
 
 
 
 
 
29
 
 
30
 
31
 
32
- - **Developed by:** [More Information Needed]
33
- - **Funded by [optional]:** [More Information Needed]
34
- - **Shared by [optional]:** [More Information Needed]
35
- - **Model type:** [More Information Needed]
36
- - **Language(s) (NLP):** [More Information Needed]
37
- - **License:** [More Information Needed]
38
- - **Finetuned from model [optional]:** [More Information Needed]
39
 
40
- ### Model Sources [optional]
41
 
42
- <!-- Provide the basic links for the model. -->
 
43
 
44
- - **Repository:** [More Information Needed]
45
- - **Paper [optional]:** [More Information Needed]
46
- - **Demo [optional]:** [More Information Needed]
47
 
48
- ## Uses
49
 
50
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
 
 
 
51
 
52
- ### Direct Use
53
 
54
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
 
 
 
 
55
 
56
- [More Information Needed]
57
 
58
- ### Downstream Use [optional]
 
 
59
 
60
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
 
 
 
 
 
 
 
 
61
 
62
- [More Information Needed]
 
 
 
 
 
 
 
63
 
64
- ### Out-of-Scope Use
 
 
 
 
 
 
65
 
66
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
67
-
68
- [More Information Needed]
69
-
70
- ## Bias, Risks, and Limitations
71
-
72
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
73
-
74
- [More Information Needed]
75
-
76
- ### Recommendations
77
-
78
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
79
-
80
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
81
-
82
- ## How to Get Started with the Model
83
-
84
- Use the code below to get started with the model.
85
-
86
- [More Information Needed]
87
-
88
- ## Training Details
89
-
90
- ### Training Data
91
-
92
- <!-- 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. -->
93
-
94
- [More Information Needed]
95
-
96
- ### Training Procedure
97
-
98
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
99
-
100
- #### Preprocessing [optional]
101
-
102
- [More Information Needed]
103
-
104
-
105
- #### Training Hyperparameters
106
-
107
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
108
-
109
- #### Speeds, Sizes, Times [optional]
110
-
111
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
112
-
113
- [More Information Needed]
114
-
115
- ## Evaluation
116
-
117
- <!-- This section describes the evaluation protocols and provides the results. -->
118
-
119
- ### Testing Data, Factors & Metrics
120
-
121
- #### Testing Data
122
-
123
- <!-- This should link to a Dataset Card if possible. -->
124
-
125
- [More Information Needed]
126
-
127
- #### Factors
128
-
129
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
130
-
131
- [More Information Needed]
132
-
133
- #### Metrics
134
-
135
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
136
-
137
- [More Information Needed]
138
-
139
- ### Results
140
-
141
- [More Information Needed]
142
-
143
- #### Summary
144
-
145
-
146
-
147
- ## Model Examination [optional]
148
-
149
- <!-- Relevant interpretability work for the model goes here -->
150
-
151
- [More Information Needed]
152
-
153
- ## Environmental Impact
154
-
155
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
156
-
157
- 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).
158
-
159
- - **Hardware Type:** [More Information Needed]
160
- - **Hours used:** [More Information Needed]
161
- - **Cloud Provider:** [More Information Needed]
162
- - **Compute Region:** [More Information Needed]
163
- - **Carbon Emitted:** [More Information Needed]
164
-
165
- ## Technical Specifications [optional]
166
-
167
- ### Model Architecture and Objective
168
-
169
- [More Information Needed]
170
-
171
- ### Compute Infrastructure
172
-
173
- [More Information Needed]
174
-
175
- #### Hardware
176
-
177
- [More Information Needed]
178
-
179
- #### Software
180
-
181
- [More Information Needed]
182
-
183
- ## Citation [optional]
184
-
185
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
186
-
187
- **BibTeX:**
188
-
189
- [More Information Needed]
190
-
191
- **APA:**
192
-
193
- [More Information Needed]
194
-
195
- ## Glossary [optional]
196
-
197
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
198
-
199
- [More Information Needed]
200
-
201
- ## More Information [optional]
202
-
203
- [More Information Needed]
204
-
205
- ## Model Card Authors [optional]
206
-
207
- [More Information Needed]
208
-
209
- ## Model Card Contact
210
-
211
- [More Information Needed]
212
  ### Framework versions
213
 
214
  - PEFT 0.15.2
 
15
  - transformers
16
  ---
17
 
 
18
 
19
+ <p align="center">
20
+ <img src="https://www.templetonprize.org/wp-content/uploads/2020/01/plantinga_gallery_1.jpg" style="width: 350px; height:500px;"/>
21
+ </p>
22
 
23
+ <h2 style="font-size: 32px; text-align: center;"> Plantinga-RL</h2>
24
+ <p style="font-size: 21px; text-align: center;">A Lightweight Language Model</p>
25
 
26
+ <h3 style="font-size: 21px; color: #2980b9;">Model Description 📝</h3>
27
 
28
+ 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.
29
+ 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.
30
+ It is particularly effective in addressing philosophical questions in metaphysics, epistemology, ethics, and the philosophy of mind, offering both clarity and depth in reasoning.
31
 
32
+ <h3 style="font-size: 21px; color: #2980b9;">Key Features ✨</h3>
33
 
34
+ * **Architecture**: Transformer-based language model 🏗️
35
+ * **Training Data**: Philosophy-focused dataset covering multiple branches of philosophy and structured philosophical Q&A. 📚
36
+ * **Developed by**: Rustam Shiriyev
37
+ * **Language(s)**: English
38
+ * **License**: MIT
39
+ * **Fine-Tuning Method**: GRPO with LoRA
40
+ * **Domain**: Philosophy
41
+ * **Finetuned from model**: unsloth/Qwen2.5-0.5B-Instruct
42
+ * **Model name**: The model’s name was inspired by Alvin Plantinga, one of the most influential philosophers of the 21st century.
43
+ * **Dataset**: jilp00/YouToks-Instruct-Philosophy
44
 
45
+ <h3 style="font-size: 21px; color: #2980b9;">Intended Use</h3>
46
 
47
 
48
+ * Generating clear and concise explanations of philosophical concepts. 🏆
49
+ * Providing structured responses to philosophical questions. 🎯
50
+ * Assisting students, researchers, and enthusiasts in exploring philosophical arguments.⚡
 
 
 
 
51
 
52
+ <h3 style="font-size: 21px; color: #2980b9;">Limitations ⚠️</h3>
53
 
54
+ * While fine-tuned on philosophy, the model may still occasionally generate hallucinations or less precise interpretations of highly nuanced philosophical arguments.
55
+ * The model does not replace expert human philosophical judgment.
56
 
 
 
 
57
 
58
+ <h3 style="font-size: 21px; color: #2980b9;">How to Get Started with the Model 💻</h3>
59
 
60
+ ```python
61
+ from huggingface_hub import login
62
+ from transformers import AutoTokenizer, AutoModelForCausalLM
63
+ from peft import PeftModel
64
 
65
+ login(token="")
66
 
67
+ tokenizer = AutoTokenizer.from_pretrained("unsloth/Qwen2.5-0.5B-Instruct",)
68
+ base_model = AutoModelForCausalLM.from_pretrained(
69
+ "unsloth/Qwen2.5-0.5B-Instruct",
70
+ device_map={"": 0}, token=""
71
+ )
72
 
73
+ model = PeftModel.from_pretrained(base_model,"Rustamshry/Plantinga-RL")
74
 
75
+ question = """
76
+ In the philosophical discussion comparing the mind to harmony, what is the core argument, and why could it imply that the mind is destructible?
77
+ """
78
 
79
+ system = """
80
+ Respond in the following format:
81
+ <reasoning>
82
+ ...
83
+ </reasoning>
84
+ <answer>
85
+ ...
86
+ </answer>
87
+ """
88
 
89
+ messages = [
90
+ {"role" : "system", "content" : system},
91
+ {"role" : "user", "content" : question}
92
+ ]
93
+ text = tokenizer.apply_chat_template(
94
+ messages,
95
+ tokenize = False,
96
+ )
97
 
98
+ from transformers import TextStreamer
99
+ _ = model.generate(
100
+ **tokenizer(text, return_tensors = "pt").to("cuda"),
101
+ max_new_tokens = 2000,
102
+ streamer = TextStreamer(tokenizer, skip_prompt = True),
103
+ )
104
+ ```
105
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
  ### Framework versions
107
 
108
  - PEFT 0.15.2