Update README.md
Browse files
README.md
CHANGED
@@ -98,7 +98,7 @@ print(sentence_embeddings)
|
|
98 |
from transformers import AutoModel
|
99 |
from torch.nn import DataParallel
|
100 |
|
101 |
-
|
102 |
-
for module_key, module in
|
103 |
-
|
104 |
```
|
|
|
98 |
from transformers import AutoModel
|
99 |
from torch.nn import DataParallel
|
100 |
|
101 |
+
model = AutoModel.from_pretrained("ssmits/Qwen2-7B-embed-base")
|
102 |
+
for module_key, module in model._modules.items():
|
103 |
+
model._modules[module_key] = DataParallel(module)
|
104 |
```
|