Instructions to use mamakos/CMClassifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use mamakos/CMClassifier with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("teknium/OpenHermes-2.5-Mistral-7B") model = PeftModel.from_pretrained(base_model, "mamakos/CMClassifier") - Notebooks
- Google Colab
- Kaggle
File size: 1,099 Bytes
630cdb4 8b08652 630cdb4 4cd2821 630cdb4 8b08652 19774f6 0342a30 630cdb4 19774f6 261f0c9 5f2d4ee e7e1e59 261f0c9 5f2d4ee 261f0c9 c8c86c5 a7ff8a7 12822aa 261f0c9 12822aa 5f2d4ee c8c86c5 a7ff8a7 19774f6 630cdb4 cf925fc 630cdb4 19774f6 630cdb4 | 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 | ---
library_name: peft
base_model: teknium/OpenHermes-2.5-Mistral-7B
---
# Model Card for Model ID
<!-- Provide a quick summary of what the model is/does. -->
## Model Description
This model is a classifier of closed-mindedness: the unwillingness to have one's knowledge confronted by alternative opinions or inconsistent evidence.
- **Developed by:** Michalis Mamakos https://www.michalismamakos.com/
- **Paper:** TBA
- **Validation:** TBA
```python
# install the module
pip install closedmindedness
```
```python
# import and use the module to estimate the probability
# a text displays closed-mindedness
import closedmindedness
model = closedmindedness.classifier()
text_1 = "Nothing can make me change my mind."
text_2 = "Let's discuss this."
text_3 = "I went to the movies yesterday."
texts = [text_1, text_2, text_3]
probs = model.predict(texts)
print(probs) # [9.71055567e-01 1.70469284e-05 3.33786011e-06]
prob = model.predict(text_1)
print(prob) # [0.97105557]
```
## Citation
If you use this model in your research, please cite: TBA
### Framework versions
- PEFT 0.8.2 |