Ahmet Yildirim commited on
Commit
7f9c179
·
1 Parent(s): 4cc5967

- Update readme

Browse files
Files changed (1) hide show
  1. README.md +9 -0
README.md CHANGED
@@ -49,6 +49,15 @@ from transformers import AutoModel
49
  humit_tagger = AutoModel.from_pretrained("Humit-Oslo/humit-tagger-small", trust_remote_code=True)
50
  ```
51
 
 
 
 
 
 
 
 
 
 
52
  ## Functions and parameters
53
 
54
  The model provides two functions: tag and identify\_language.
 
49
  humit_tagger = AutoModel.from_pretrained("Humit-Oslo/humit-tagger-small", trust_remote_code=True)
50
  ```
51
 
52
+ While creating the model, batch\_size and device can be given as parameters:
53
+ ```python
54
+ humit_tagger = AutoModel.from_pretrained("Humit-Oslo/humit-tagger-xs", trust_remote_code=True, batch_size=16, device="cuda")
55
+ ```
56
+
57
+ Here the batch size can be a power of 2, and can be set to higher values, such as 32 or 64, if the model will be loaded on a powerful GPU.
58
+ If the device is not set then the model will try to locate itself on the first CUDA device if it exists, otherwise on CPU.
59
+ A specific device can be set such as "cuda:0" or "cuda:1".
60
+
61
  ## Functions and parameters
62
 
63
  The model provides two functions: tag and identify\_language.