ssmits commited on
Commit
963927d
1 Parent(s): a31126a

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -3
README.md CHANGED
@@ -98,7 +98,7 @@ print(sentence_embeddings)
98
  from transformers import AutoModel
99
  from torch.nn import DataParallel
100
 
101
- embedding_model = AutoModel.from_pretrained("ssmits/Qwen2-7B-embed-base")
102
- for module_key, module in embedding_model._modules.items():
103
- embedding_model._modules[module_key] = DataParallel(module)
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
  ```