bhavinjawade
commited on
Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
datasets:
|
4 |
+
- Intel/orca_dpo_pairs
|
5 |
+
---
|
6 |
+
|
7 |
+
## SOLAR-10B-OrcaDPO-Jawade
|
8 |
+
|
9 |
+
### Overview
|
10 |
+
This model card is instruction finetuned version of `upstage/SOLAR-10.7B-Instruct-v1.0` model. Trained on the Intel DPO Orca dataset using LoRA. Though it should be noted SOLAR-10.7B paper states that the
|
11 |
+
original model for alignment was trained on Intel ORCA DPO pairs. Retraining using DPO and LoRA shows slight (<1%) improvement on OpenLLM Leaderboard benchmarks against `SOLAR 10.7B-Instruct` and significant over `SOLAR 10.7B`
|
12 |
+
|
13 |
+
![model_card_image](SOLAR_ORCA.png)
|
14 |
+
|
15 |
+
## How to Use This Model
|
16 |
+
|
17 |
+
To use the model `bhavinjawade/SOLAR-10B-OrcaDPO-Jawade`, follow these steps:
|
18 |
+
|
19 |
+
1. **Import and Load the Model and Tokenizer**
|
20 |
+
Begin by importing the model and tokenizer. Load them using the `from_pretrained` method.
|
21 |
+
|
22 |
+
```python
|
23 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
24 |
+
model = AutoModelForCausalLM.from_pretrained("bhavinjawade/SOLAR-10B-OrcaDPO-Jawade")
|
25 |
+
tokenizer = AutoTokenizer.from_pretrained("bhavinjawade/SOLAR-10B-OrcaDPO-Jawade")
|
26 |
+
```
|
27 |
+
|
28 |
+
2. **Format the Prompt**
|
29 |
+
Format the chat input as a list of messages, each with a role ('system' or 'user') and content.
|
30 |
+
|
31 |
+
```python
|
32 |
+
message = [
|
33 |
+
{"role": "system", "content": "You are a helpful assistant chatbot."},
|
34 |
+
{"role": "user", "content": "Is the universe real? or is it a simulation? whats your opinion?"}
|
35 |
+
]
|
36 |
+
prompt = tokenizer.apply_chat_template(message, add_generation_prompt=True, tokenize=False)
|
37 |
+
```
|
38 |
+
|
39 |
+
3. **Create a Pipeline**
|
40 |
+
Set up a pipeline for text generation with the loaded model and tokenizer.
|
41 |
+
|
42 |
+
```python
|
43 |
+
pipeline = transformers.pipeline(
|
44 |
+
"text-generation",
|
45 |
+
model=model,
|
46 |
+
tokenizer=tokenizer
|
47 |
+
)
|
48 |
+
```
|
49 |
+
|
50 |
+
4. **Generate Text**
|
51 |
+
Use the pipeline to generate a sequence of text based on the prompt. You can adjust parameters like temperature and top_p for different styles of responses.
|
52 |
+
|
53 |
+
```python
|
54 |
+
sequences = pipeline(
|
55 |
+
prompt,
|
56 |
+
do_sample=True,
|
57 |
+
temperature=0.7,
|
58 |
+
top_p=0.9,
|
59 |
+
num_return_sequences=1,
|
60 |
+
max_length=200,
|
61 |
+
)
|
62 |
+
print(sequences[0]['generated_text'])
|
63 |
+
```
|
64 |
+
|
65 |
+
This setup allows you to utilize the capabilities of the **bhavinjawade/SOLAR-10B-OrcaDPO-Jawade** model for generating responses to chat inputs.
|
66 |
+
|
67 |
+
### License
|
68 |
+
- **Type**: MIT License
|
69 |
+
- **Details**: This license permits reuse, modification, and distribution for both private and commercial purposes under the terms of the MIT License.
|
70 |
+
|
71 |
+
### Model Details
|
72 |
+
- **Model Name**: SOLAR-10.7B-Instruct-v1.0
|
73 |
+
- **Organization**: Upstage
|
74 |
+
- **Training Dataset**: Intel/orca_dpo_pairs
|
75 |
+
- **Technique Used**: LoRA (Low-Rank Adaptation)
|
76 |
+
|
77 |
+
### Contact Information
|
78 |
+
- https://bhavinjawade.github.io
|