Update README.md
Browse files
README.md
CHANGED
@@ -108,24 +108,6 @@ print(tokenizer.decode(outputs[0]))
|
|
108 |
|
109 |
</details>
|
110 |
|
111 |
-
<details>
|
112 |
-
<summary> Click to expand </summary>
|
113 |
-
|
114 |
-
```python
|
115 |
-
# pip install accelerate
|
116 |
-
from transformers import AutoTokenizer, AutoModelForCausalLM
|
117 |
-
|
118 |
-
tokenizer = AutoTokenizer.from_pretrained("tiiuae/falcon-mamba-7b")
|
119 |
-
model = AutoModelForCausalLM.from_pretrained("tiiuae/falcon-mamba-7b", device_map="auto")
|
120 |
-
|
121 |
-
input_text = "Question: How many hours in one day? Answer: "
|
122 |
-
input_ids = tokenizer(input_text, return_tensors="pt").input_ids.to("cuda")
|
123 |
-
|
124 |
-
outputs = model.generate(input_ids)
|
125 |
-
print(tokenizer.decode(outputs[0]))
|
126 |
-
```
|
127 |
-
|
128 |
-
</details>
|
129 |
|
130 |
### Running the model on a GPU using different precisions
|
131 |
|
|
|
108 |
|
109 |
</details>
|
110 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
|
112 |
### Running the model on a GPU using different precisions
|
113 |
|