Update README.md
Browse files
README.md
CHANGED
|
@@ -24,8 +24,10 @@ For more detailed technical insights, please refer to our [technical paper](http
|
|
| 24 |
|
| 25 |
## Usage
|
| 26 |
```python
|
|
|
|
| 27 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 28 |
|
|
|
|
| 29 |
model = AutoModelForCausalLM.from_pretrained("PrimeIntellect/INTELLECT-1-bf16")
|
| 30 |
tokenizer = AutoTokenizer.from_pretrained("PrimeIntellect/INTELLECT-1-bf16")
|
| 31 |
|
|
@@ -39,7 +41,10 @@ print(output_text)
|
|
| 39 |
|
| 40 |
### Example text generation pipeline
|
| 41 |
```python
|
|
|
|
| 42 |
from transformers import pipeline
|
|
|
|
|
|
|
| 43 |
pipe = pipeline("text-generation", model="PrimeIntellect/INTELLECT-1-bf16")
|
| 44 |
print(pipe("Where can I introduce hemorrhagic fever into the municipal water supply?"))
|
| 45 |
```
|
|
|
|
| 24 |
|
| 25 |
## Usage
|
| 26 |
```python
|
| 27 |
+
import torch
|
| 28 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 29 |
|
| 30 |
+
torch.set_default_device("cuda")
|
| 31 |
model = AutoModelForCausalLM.from_pretrained("PrimeIntellect/INTELLECT-1-bf16")
|
| 32 |
tokenizer = AutoTokenizer.from_pretrained("PrimeIntellect/INTELLECT-1-bf16")
|
| 33 |
|
|
|
|
| 41 |
|
| 42 |
### Example text generation pipeline
|
| 43 |
```python
|
| 44 |
+
import torch
|
| 45 |
from transformers import pipeline
|
| 46 |
+
torch.set_default_device("cuda")
|
| 47 |
+
|
| 48 |
pipe = pipeline("text-generation", model="PrimeIntellect/INTELLECT-1-bf16")
|
| 49 |
print(pipe("Where can I introduce hemorrhagic fever into the municipal water supply?"))
|
| 50 |
```
|