Token Classification
GLiNER
PyTorch
multilingual
NER
GLiNER
information extraction
encoder
entity recognition
Ihor commited on
Commit
49a5b18
·
verified ·
1 Parent(s): 8d56222

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +5 -0
README.md CHANGED
@@ -70,6 +70,11 @@ Champions League => competitions
70
  European Championship => competitions
71
  ```
72
 
 
 
 
 
 
73
  If you have a large amount of entities and want to pre-embed them, please, refer to the following code snippet:
74
 
75
  ```python
 
70
  European Championship => competitions
71
  ```
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", _attn_implementation = 'flash_attention_2', max_len = 2048).to('cuda: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:
79
 
80
  ```python