Update README.md
Browse files
README.md
CHANGED
@@ -72,7 +72,9 @@ European Championship => competitions
|
|
72 |
|
73 |
If you want to use flash attention or increase sequence length, please, check the following code:
|
74 |
```python
|
75 |
-
model = GLiNER.from_pretrained("knowledgator/gliner-bi-llama-v1.0",
|
|
|
|
|
76 |
```
|
77 |
|
78 |
If you have a large amount of entities and want to pre-embed them, please, refer to the following code snippet:
|
|
|
72 |
|
73 |
If you want to use flash attention or increase sequence length, please, check the following code:
|
74 |
```python
|
75 |
+
model = GLiNER.from_pretrained("knowledgator/gliner-bi-llama-v1.0",
|
76 |
+
_attn_implementation = 'flash_attention_2',
|
77 |
+
max_len = 2048).to('cuda:0')
|
78 |
```
|
79 |
|
80 |
If you have a large amount of entities and want to pre-embed them, please, refer to the following code snippet:
|