Commit
·
19e3f41
1
Parent(s):
de68a34
Upload sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2 ctranslate fp16 weights
Browse files
README.md
CHANGED
@@ -23,13 +23,9 @@ pip install hf-hub-ctranslate2>=2.10.0 ctranslate2>=3.16.0
|
|
23 |
# from transformers import AutoTokenizer
|
24 |
model_name = "michaelfeil/ct2fast-paraphrase-multilingual-MiniLM-L12-v2"
|
25 |
|
26 |
-
from hf_hub_ctranslate2 import
|
27 |
-
model =
|
28 |
-
|
29 |
-
model_name_or_path=model_name,
|
30 |
-
device="cuda",
|
31 |
-
compute_type="float16",
|
32 |
-
# tokenizer=AutoTokenizer.from_pretrained("{ORG}/{NAME}")
|
33 |
)
|
34 |
embeddings = model.encode(
|
35 |
["I like soccer", "I like tennis", "The eiffel tower is in Paris"],
|
@@ -47,9 +43,9 @@ and [hf-hub-ctranslate2>=2.10.0](https://github.com/michaelfeil/hf-hub-ctranslat
|
|
47 |
- `compute_type=int8_float16` for `device="cuda"`
|
48 |
- `compute_type=int8` for `device="cpu"`
|
49 |
|
50 |
-
Converted on 2023-06-
|
51 |
```
|
52 |
-
ct2-transformers-converter --model sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2 --output_dir ~/tmp-ct2fast-paraphrase-multilingual-MiniLM-L12-v2 --force --copy_files
|
53 |
```
|
54 |
|
55 |
# Licence and other remarks:
|
|
|
23 |
# from transformers import AutoTokenizer
|
24 |
model_name = "michaelfeil/ct2fast-paraphrase-multilingual-MiniLM-L12-v2"
|
25 |
|
26 |
+
from hf_hub_ctranslate2 import CT2SentenceTransformer
|
27 |
+
model = CT2SentenceTransformer(
|
28 |
+
model_name, compute_type="int8_float16", device="cuda"
|
|
|
|
|
|
|
|
|
29 |
)
|
30 |
embeddings = model.encode(
|
31 |
["I like soccer", "I like tennis", "The eiffel tower is in Paris"],
|
|
|
43 |
- `compute_type=int8_float16` for `device="cuda"`
|
44 |
- `compute_type=int8` for `device="cpu"`
|
45 |
|
46 |
+
Converted on 2023-06-18 using
|
47 |
```
|
48 |
+
ct2-transformers-converter --model sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2 --output_dir ~/tmp-ct2fast-paraphrase-multilingual-MiniLM-L12-v2 --force --copy_files tokenizer.json sentence_bert_config.json README.md modules.json special_tokens_map.json config_sentence_transformers.json tokenizer_config.json unigram.json .gitattributes --trust_remote_code
|
49 |
```
|
50 |
|
51 |
# Licence and other remarks:
|
model.bin
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:03c883e3ae820352efa7873c2fbd04313278cda250f95ecec5804165ed92dbde
|
3 |
+
size 470623404
|