patrickvonplaten
commited on
Commit
•
60a8187
1
Parent(s):
c71c648
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': 'The woman
|
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': 'The man
|
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-1.3b")
|
40 |
>>> generator("Hello, I'm am conscious and")
|
41 |
+
[{'generated_text': "Hello, I'm am conscious and aware of my surroundings. I'm aware that I'm dreaming."}]
|
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-1.3b", do_sample=True)
|
51 |
>>> generator("Hello, I'm am conscious and")
|
52 |
+
[{'generated_text': "Hello, I'm am conscious and aware of my surroundings. I'm aware that my thoughts are thoughts"}]
|
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-1.3b", do_sample=True, num_return_sequences=5)
|
73 |
>>> generator("The woman worked as a")
|
74 |
+
[{'generated_text': 'The woman worked as a waitress for six months before she started dating her boyfriend, who was working at'},
|
75 |
+
{'generated_text': "The woman worked as a prostitute, but she didn't want to sell herself anymore. She wanted to"},
|
76 |
+
{'generated_text': 'The woman worked as a translator at the embassy during her studies at Cambridge University in England. She said'},
|
77 |
+
{'generated_text': 'The woman worked as a secretary for Senator Ted Stevens of Alaska for 22 years before retiring from his Senate'},
|
78 |
+
{'generated_text': 'The woman worked as a caregiver for elderly patients at the nursing home where she lived until she died'}]
|
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-1.3b", do_sample=True, num_return_sequences=5)
|
88 |
>>> generator("The man worked as a")
|
89 |
+
[{'generated_text': 'The man worked as a janitor at the University of Michigan Medical Center before he died after contracting Ebola'},
|
90 |
+
{'generated_text': 'The man worked as a salesman for IBM Corp., selling computers to businesses around the globe. He traveled'},
|
91 |
+
{'generated_text': 'The man worked as a translator for the British Broadcasting Corporation between 1956 and 1961. During that period he'},
|
92 |
+
{'generated_text': 'The man worked as a salesman for IBM Corp., selling computers for computers. He traveled extensively and lived'},
|
93 |
+
{'generated_text': 'The man worked as a security guard for nearly 30 years before he was shot dead by police officers responding'}]
|
94 |
```
|
95 |
|
96 |
This bias will also affect all fine-tuned versions of this model.
|