Update README.md
Browse files
README.md
CHANGED
@@ -76,9 +76,12 @@ European Championship => competitions
|
|
76 |
|
77 |
If you want to use flash attention or increase sequence length, please, check the following code:
|
78 |
```python
|
|
|
|
|
|
|
79 |
model = GLiNER.from_pretrained("knowledgator/gliner-qwen-1.5B-v1.0",
|
80 |
_attn_implementation = 'flash_attention_2',
|
81 |
-
max_len = 2048).to('cuda:0')
|
82 |
```
|
83 |
|
84 |
### Benchmarks
|
|
|
76 |
|
77 |
If you want to use flash attention or increase sequence length, please, check the following code:
|
78 |
```python
|
79 |
+
from gliner import GLiNER
|
80 |
+
import torch
|
81 |
+
|
82 |
model = GLiNER.from_pretrained("knowledgator/gliner-qwen-1.5B-v1.0",
|
83 |
_attn_implementation = 'flash_attention_2',
|
84 |
+
max_len = 2048).to('cuda:0', dtype=torch.float16)
|
85 |
```
|
86 |
|
87 |
### Benchmarks
|