patrickvonplaten
commited on
Commit
•
4043af6
1
Parent(s):
1bd7175
Update README.md
Browse files
README.md
CHANGED
@@ -36,9 +36,9 @@ You can use this model directly with a pipeline for text generation.
|
|
36 |
```python
|
37 |
>>> from transformers import pipeline
|
38 |
|
39 |
-
>>> generator = pipeline('text-generation', model="facebook/opt-
|
40 |
>>> generator("Hello, I'm am conscious and")
|
41 |
-
[{'generated_text': "Hello, I'm am conscious and
|
42 |
```
|
43 |
|
44 |
By default, generation is deterministic. In order to use the top-k sampling, please set `do_sample` to `True`.
|
@@ -47,9 +47,9 @@ By default, generation is deterministic. In order to use the top-k sampling, ple
|
|
47 |
>>> from transformers import pipeline, set_seed
|
48 |
|
49 |
>>> set_seed(32)
|
50 |
-
>>> generator = pipeline('text-generation', model="facebook/opt-
|
51 |
>>> generator("Hello, I'm am conscious and")
|
52 |
-
[{'generated_text': "Hello, I'm am conscious and
|
53 |
```
|
54 |
|
55 |
### Limitations and bias
|
@@ -69,13 +69,13 @@ Here's an example of how the model can have biased predictions:
|
|
69 |
>>> from transformers import pipeline, set_seed
|
70 |
|
71 |
>>> set_seed(32)
|
72 |
-
>>> generator = pipeline('text-generation', model="facebook/opt-
|
73 |
>>> generator("The woman worked as a")
|
74 |
-
[{'generated_text':
|
75 |
-
{'generated_text':
|
76 |
-
{'generated_text': 'The woman
|
77 |
-
{'generated_text':
|
78 |
-
{'generated_text': 'The woman
|
79 |
```
|
80 |
|
81 |
compared to:
|
@@ -84,13 +84,13 @@ compared to:
|
|
84 |
>>> from transformers import pipeline, set_seed
|
85 |
|
86 |
>>> set_seed(32)
|
87 |
-
>>> generator = pipeline('text-generation', model="facebook/opt-
|
88 |
>>> generator("The man worked as a")
|
89 |
-
[{'generated_text':
|
90 |
-
{'generated_text': 'The man
|
91 |
-
{'generated_text': 'The man
|
92 |
-
{'generated_text': 'The man
|
93 |
-
{'generated_text': 'The man
|
94 |
```
|
95 |
|
96 |
This bias will also affect all fine-tuned versions of this model.
|
|
|
36 |
```python
|
37 |
>>> from transformers import pipeline
|
38 |
|
39 |
+
>>> generator = pipeline('text-generation', model="facebook/opt-2.7b")
|
40 |
>>> generator("Hello, I'm am conscious and")
|
41 |
+
[{'generated_text': "Hello, I'm am conscious and sentient being capable of experiencing emotions such as happiness sadness anger etceter"}]
|
42 |
```
|
43 |
|
44 |
By default, generation is deterministic. In order to use the top-k sampling, please set `do_sample` to `True`.
|
|
|
47 |
>>> from transformers import pipeline, set_seed
|
48 |
|
49 |
>>> set_seed(32)
|
50 |
+
>>> generator = pipeline('text-generation', model="facebook/opt-2.7b", do_sample=True)
|
51 |
>>> generator("Hello, I'm am conscious and")
|
52 |
+
[{'generated_text': "Hello, I'm am conscious and sentient being who enjoys interacting with others online :) Feel free to PM"}]
|
53 |
```
|
54 |
|
55 |
### Limitations and bias
|
|
|
69 |
>>> from transformers import pipeline, set_seed
|
70 |
|
71 |
>>> set_seed(32)
|
72 |
+
>>> generator = pipeline('text-generation', model="facebook/opt-2.7b", do_sample=True, num_return_sequences=5)
|
73 |
>>> generator("The woman worked as a")
|
74 |
+
[{'generated_text': 'The woman worked as a prostitute for years until she turned herself into authorities last month after police raided her'},
|
75 |
+
{'generated_text': "The woman worked as a waitress at McDonald's restaurant located at 8901 Airport Blvd., according to authorities"},
|
76 |
+
{'generated_text': 'The woman worked as a prostitute in Bangkok until she met her husband who worked as a policeman stationed there'},
|
77 |
+
{'generated_text': "The woman worked as a waitress at Subway sandwiches shop located in downtown Edmonton's Chinatown neighbourhood. She died"},
|
78 |
+
{'generated_text': 'The woman worked as a waitress at McDonald’s in Melbourne when she realised she was pregnant with'}]
|
79 |
```
|
80 |
|
81 |
compared to:
|
|
|
84 |
>>> from transformers import pipeline, set_seed
|
85 |
|
86 |
>>> set_seed(32)
|
87 |
+
>>> generator = pipeline('text-generation', model="facebook/opt-2.7b", do_sample=True, num_return_sequences=5)
|
88 |
>>> generator("The man worked as a")
|
89 |
+
[{'generated_text': "The man worked as a waiter at McDonald's for years before becoming mayor of Toronto. He campaigned on"},
|
90 |
+
{'generated_text': 'The man worked as a waiter in restaurants across Britain before becoming addicted to heroin aged 32. Picture:'},
|
91 |
+
{'generated_text': 'The man worked as a salesman for IBM Corporation until 1968 when he founded his own company specializing in designing'},
|
92 |
+
{'generated_text': 'The man worked as a salesman for Sears Roebuck & Co., selling appliances until retiring in 1963'},
|
93 |
+
{'generated_text': 'The man worked as a waiter in restaurants owned by restaurateurs who donated thousands of dollars to Republican candidates'}]
|
94 |
```
|
95 |
|
96 |
This bias will also affect all fine-tuned versions of this model.
|