Update README.md
Browse files
README.md
CHANGED
@@ -1,5 +1,58 @@
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
---
|
|
|
|
|
|
|
4 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
---
|
4 |
+
datasets:mlabonne/guanaco-llama2-1k
|
5 |
+
|
6 |
+
pipeline_tag: text-generation
|
7 |
---
|
8 |
+
# bosbos-2-7b|
|
9 |
+
|
10 |
+
<center><img src="https://i.imgur.com/C2x7n2a.png" width="300"></center>
|
11 |
+
|
12 |
+
This is a `llama-2-7b-chat-hf` model fine-tuned using QLoRA (4-bit precision) on the [`mlabonne/guanaco-llama2`](https://huggingface.co/datasets/mlabonne/guanaco-llama2) dataset.
|
13 |
+
|
14 |
+
## 🔧 Training
|
15 |
+
|
16 |
+
It was trained on a Google Colab notebook with a T4 GPU and high RAM.
|
17 |
+
|
18 |
+
## 💻 Usage
|
19 |
+
|
20 |
+
``` python
|
21 |
+
# pip install transformers accelerate
|
22 |
+
|
23 |
+
from transformers import AutoTokenizer
|
24 |
+
import transformers
|
25 |
+
import torch
|
26 |
+
|
27 |
+
model = "bosbos/bosbos-2-7b"
|
28 |
+
prompt = "What is a large language model?"
|
29 |
+
|
30 |
+
tokenizer = AutoTokenizer.from_pretrained(model)
|
31 |
+
pipeline = transformers.pipeline(
|
32 |
+
"text-generation",
|
33 |
+
model=model,
|
34 |
+
torch_dtype=torch.float16,
|
35 |
+
device_map="auto",
|
36 |
+
)
|
37 |
+
|
38 |
+
sequences = pipeline(
|
39 |
+
f'<s>[INST] {prompt} [/INST]',
|
40 |
+
do_sample=True,
|
41 |
+
top_k=10,
|
42 |
+
num_return_sequences=1,
|
43 |
+
eos_token_id=tokenizer.eos_token_id,
|
44 |
+
max_length=200,
|
45 |
+
)
|
46 |
+
for seq in sequences:
|
47 |
+
print(f"Result: {seq['generated_text']}")
|
48 |
+
```
|
49 |
+
|
50 |
+
Output:
|
51 |
+
>"Prédiction" is a noun that refers to the act of making a forecast or an estimate of something that will happen in the future. It can also refer to the result of such a forecast or estimate.
|
52 |
+
|
53 |
+
>For example:
|
54 |
+
>* "La prédiction de la météo est que il va pleuvoir demain." (The weather forecast is that it will rain tomorrow.)
|
55 |
+
>* "La prédiction de la course de chevaux est que le favori va gagner." (The prediction of the horse race is that the favorite will win.)
|
56 |
+
>In English, the word "prediction" is often used in a similar way, but it can also refer to a statement or a prophecy about something that has already happened or is happening.
|
57 |
+
|
58 |
|