
# DPO LoRA tune of Solar 10.7B Instruct v1.0

# **Usage Instructions**

This model is pre-trained and is capable of just generating random text. To use it for chatting, you must fine-tune the model first.

### **Version**

Make sure you have the correct version of the transformers library installed:

```sh
pip install transformers==4.35.2
```

### **Loading the Model**

Use the following Python code to load the model:

```python
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("sumo43/SOLAR-10.7B-Instruct-DPO-v1.0")
model = AutoModelForCausalLM.from_pretrained(
    "sumo43/SOLAR-10.7B-Instruct-DPO-v1.0",
    device_map="auto",
    torch_dtype=torch.float16,
)
```

### **Generating Text**

To generate text, use the following Python code:

```python
text = "Hi, my name is "
inputs = tokenizer(text, return_tensors="pt")

outputs = model.generate(**inputs, max_new_tokens=64)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
```
{"license": "cc-by-nc-4.0"}
safetensors license:cc-by-nc-4.0 region:us