cris177 commited on
Commit
4e39ea9
·
verified ·
1 Parent(s): a1186b5

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +238 -3
README.md CHANGED
@@ -1,3 +1,238 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ metrics:
6
+ - accuracy
7
+ pipeline_tag: text-generation
8
+
9
+ model-index:
10
+ - name: Qwen2-Simple-Arguments
11
+ results:
12
+ - task:
13
+ type: text-generation
14
+ dataset:
15
+ name: Argument-parsing
16
+ type: Argument-parsing
17
+ metrics:
18
+ - name: Accuracy
19
+ type: Accuracy
20
+ value: 100
21
+ ---
22
+ # Qwen2 Simple Arguments
23
+
24
+ <!-- Provide a quick summary of what the model is/does. -->
25
+
26
+ This model aims to parse simple english arguments, arguments formed of two premises and a conclusion, including two propositions.
27
+
28
+ ## Model Details
29
+
30
+ ### Model Description
31
+
32
+ <!-- Provide a longer summary of what this model is. -->
33
+
34
+
35
+
36
+ - **Developed by:** Cristian Desivo
37
+ - **Model type:** LLM
38
+ - **Language(s) (NLP):** English
39
+ - **License:** Apache-2.0
40
+ - **Finetuned from model:** Qwen2-0.5b
41
+
42
+ ### Model Sources
43
+
44
+ <!-- Provide the basic links for the model. -->
45
+
46
+ - **Repository:** TBD
47
+ - **Paper:** TBD
48
+ - **Demo:** TBD
49
+
50
+ ## Usage
51
+
52
+ Below we share some code snippets on how to get quickly started with running the model.
53
+
54
+ ### transformers 🤗
55
+ First make sure to pip install -U transformers, then use the code below replacing the `argument` variable for the argument you want to parse:
56
+
57
+ ```python
58
+ from transformers import AutoModelForCausalLM, AutoTokenizer
59
+
60
+ model = AutoModelForCausalLM.from_pretrained("./model_gguf",
61
+ device_map="auto",)
62
+ tokenizer = AutoTokenizer.from_pretrained("./model_gguf")
63
+
64
+ argument = "If it's wednesday it's cold, and it's cold, therefore it's wednesday."
65
+
66
+ instruction = 'Based on the following argument, identify the following elements: premises, conclusion, propositions, type of argument, negation of propositions and validity.'
67
+ alpaca_prompt = """Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
68
+
69
+ ### Instruction:
70
+ {}
71
+
72
+ ### Input:
73
+ {}
74
+
75
+ ### Response:"""
76
+ prompt = alpaca_prompt.format(instruction, argument)
77
+ input_ids = tokenizer(prompt, return_tensors="pt").to("cuda")
78
+
79
+ outputs = model.generate(**input_ids, max_length=1000, num_return_sequences=1)
80
+ print(tokenizer.decode(outputs[0]))
81
+ ```
82
+ Output:
83
+ ```
84
+ Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
85
+
86
+ ### Instruction:
87
+ Based on the following argument, identify the following elements: premises, conclusion, propositions, type of argument, negation of propositions and validity.
88
+
89
+ ### Input:
90
+ If it's wednesday it's cold, and it's cold, therefore it's wednesday.
91
+
92
+ ### Response:
93
+ {"Premise 1": "If it's wednesday it's cold",
94
+ "Premise 2": "It's cold",
95
+ "Conclusion": "It is Wednesday",
96
+ "Proposition 1": "It is Wednesday",
97
+ "Proposition 2": "It is cold",
98
+ "Type of argument": "affirming the consequent",
99
+ "Negation of Proposition 1": "It is not Wednesday",
100
+ "Negation of Proposition 2": "It is not cold",
101
+ "Validity": "false"}<|endoftext|>
102
+ ```
103
+
104
+
105
+ ## Training Details
106
+
107
+ ### Training Data
108
+
109
+ <!-- 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. -->
110
+
111
+ The model was trained on syntethic data, based on the following types of arguments:
112
+ - Modus Ponen
113
+ - Modus Tollen
114
+ - Affirming Consequent
115
+ - Disjunctive Syllogism
116
+ - Denying Antecedent
117
+ - Invalid Conditional Syllogism
118
+
119
+ Each argument was constructed by selecting two random propositions (from a list of 400 propositions that was generated beforehand), choosing a type of argument and combining it all with randomly selected connectors (therefore, since, hence, thus, etc).
120
+
121
+
122
+
123
+ ### Training Procedure
124
+
125
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
126
+
127
+ #### Preprocessing [optional]
128
+
129
+ [More Information Needed]
130
+
131
+
132
+ #### Training Hyperparameters
133
+
134
+ - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
135
+
136
+ #### Speeds, Sizes, Times [optional]
137
+
138
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
139
+
140
+ [More Information Needed]
141
+
142
+ ## Evaluation
143
+
144
+ <!-- This section describes the evaluation protocols and provides the results. -->
145
+
146
+ ### Testing Data, Factors & Metrics
147
+
148
+ #### Testing Data
149
+
150
+ <!-- This should link to a Dataset Card if possible. -->
151
+
152
+ [More Information Needed]
153
+
154
+ #### Factors
155
+
156
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
157
+
158
+ [More Information Needed]
159
+
160
+ #### Metrics
161
+
162
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
163
+
164
+ [More Information Needed]
165
+
166
+ ### Results
167
+
168
+ [More Information Needed]
169
+
170
+ #### Summary
171
+
172
+
173
+
174
+ ## Model Examination [optional]
175
+
176
+ <!-- Relevant interpretability work for the model goes here -->
177
+
178
+ [More Information Needed]
179
+
180
+ ## Environmental Impact
181
+
182
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
183
+
184
+ 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).
185
+
186
+ - **Hardware Type:** [More Information Needed]
187
+ - **Hours used:** [More Information Needed]
188
+ - **Cloud Provider:** [More Information Needed]
189
+ - **Compute Region:** [More Information Needed]
190
+ - **Carbon Emitted:** [More Information Needed]
191
+
192
+ ## Technical Specifications [optional]
193
+
194
+ ### Model Architecture and Objective
195
+
196
+ [More Information Needed]
197
+
198
+ ### Compute Infrastructure
199
+
200
+ [More Information Needed]
201
+
202
+ #### Hardware
203
+
204
+ [More Information Needed]
205
+
206
+ #### Software
207
+
208
+ [More Information Needed]
209
+
210
+ ## Citation [optional]
211
+
212
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
213
+
214
+ **BibTeX:**
215
+
216
+ [More Information Needed]
217
+
218
+ **APA:**
219
+
220
+ [More Information Needed]
221
+
222
+ ## Glossary [optional]
223
+
224
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
225
+
226
+ [More Information Needed]
227
+
228
+ ## More Information [optional]
229
+
230
+ [More Information Needed]
231
+
232
+ ## Model Card Authors [optional]
233
+
234
+ [More Information Needed]
235
+
236
+ ## Model Card Contact
237
+
238
+ [More Information Needed]