
# Reconcile the Irreconcilable

<!-- Provide a quick summary of what the model is/does. -->

This model tries to reconcile the views of Hegel and Ayn Rand on a given philosophical topic.

## Model Details

### Model Description

<!-- Provide a longer summary of what this model is. -->
The purpose of the model is to give the views of Hegel and Ayn Rand on a
given philosophical topic.  Then it is supposed to write a paragraph reconciling
their (most likely contrary) views.
The model was multitasked fine-tuned on [bloomz-3b](https://huggingface.co/bigscience/bloomz-3b).
Data for the fine-tuning was generated using chatGPT GPT-4.


- **Developed by:** [Neil Tedeschi](https://huggingface.co/ntedeschi)
- **Training dataset:** [reconcile_the_irreconcilable](https://huggingface.co/datasets/ntedeschi/reconcile_the_irreconcilable)
- **Language(s) (NLP):** [bloomz-3b](https://huggingface.co/bigscience/bloomz-3b)


## Direct Use

I am not sure how to get the model to work on this site.  So, annoyingly, you
need to cut and paste the following code into a notebook.

1.  Download the adapter and connect with base model.

```
import torch
from peft import PeftModel, PeftConfig
from transformers import AutoModelForCausalLM, AutoTokenizer

peft_model_id = "ntedeschi/reconcile_the_irreconcilable"
config = PeftConfig.from_pretrained(peft_model_id)
model = AutoModelForCausalLM.from_pretrained(config.base_model_name_or_path, return_dict=True, load_in_8bit=False, device_map='auto')
tokenizer = AutoTokenizer.from_pretrained(config.base_model_name_or_path)

# Load the Lora model
model = PeftModel.from_pretrained(model, peft_model_id)
```

2. Set up prompt and query function:
```
from IPython.display import display, Markdown

def make_inference(topic):
  batch = tokenizer(
      f"### INSTRUCTION\nBelow is a philosophy topic. Please write Hegel's view on the topic, Ayn Rand's view \
      on the topic and a reconciliation of their views. \
      \n\n### Topic:\n{topic}\n \
      \n\n### Hegel:\n \
      \n\n### Ayn Rand:\n \
      \n\n### Reconciliation:\n",
      return_tensors='pt'
  )


  with torch.cuda.amp.autocast():
    output_tokens = model.generate(**batch, max_new_tokens=512)

  display(Markdown((tokenizer.decode(output_tokens[0], skip_special_tokens=True))))
```

3.  Make the inference by giving a philosophy topic.  For example,

```
philosophy_topic = "Mind body dualism"
make_inference(philosophy_topic)
```


{}
region:us
TAGS
#region-us 


# Reconcile the Irreconcilable



This model tries to reconcile the views of Hegel and Ayn Rand on a given philosophical topic.

## Model Details

### Model Description


The purpose of the model is to give the views of Hegel and Ayn Rand on a
given philosophical topic.  Then it is supposed to write a paragraph reconciling
their (most likely contrary) views.
The model was multitasked fine-tuned on bloomz-3b.
Data for the fine-tuning was generated using chatGPT GPT-4.


- Developed by: Neil Tedeschi
- Training dataset: reconcile_the_irreconcilable
- Language(s) (NLP): bloomz-3b


## Direct Use

I am not sure how to get the model to work on this site.  So, annoyingly, you
need to cut and paste the following code into a notebook.

1.  Download the adapter and connect with base model.



2. Set up prompt and query function:


3.  Make the inference by giving a philosophy topic.  For example,




# Reconcile the Irreconcilable



This model tries to reconcile the views of Hegel and Ayn Rand on a given philosophical topic. ## Model Details ### Model Description


The purpose of the model is to give the views of Hegel and Ayn Rand on a
given philosophical topic.  Then it is supposed to write a paragraph reconciling
their (most likely contrary) views.
The model was multitasked fine-tuned on bloomz-3b.
Data for the fine-tuning was generated using chatGPT GPT-4.


- Developed by: Neil Tedeschi
- Training dataset: reconcile_the_irreconcilable
- Language(s) (NLP): bloomz-3b ## Direct Use

I am not sure how to get the model to work on this site.  So, annoyingly, you
need to cut and paste the following code into a notebook.

1.  Download the adapter and connect with base model.



2. Set up prompt and query function:


3.  Make the inference by giving a philosophy topic.  For example,
TAGS
#region-us 
 # Reconcile the Irreconcilable



This model tries to reconcile the views of Hegel and Ayn Rand on a given philosophical topic. ## Model Details ### Model Description


The purpose of the model is to give the views of Hegel and Ayn Rand on a
given philosophical topic.  Then it is supposed to write a paragraph reconciling
their (most likely contrary) views.
The model was multitasked fine-tuned on bloomz-3b.
Data for the fine-tuning was generated using chatGPT GPT-4.


- Developed by: Neil Tedeschi
- Training dataset: reconcile_the_irreconcilable
- Language(s) (NLP): bloomz-3b ## Direct Use

I am not sure how to get the model to work on this site.  So, annoyingly, you
need to cut and paste the following code into a notebook.

1.  Download the adapter and connect with base model.



2. Set up prompt and query function:


3.  Make the inference by giving a philosophy topic.  For example,