Commit
·
0249feb
1
Parent(s):
b81617a
Upload intfloat/e5-small-v2 ctranslate fp16 weights
Browse files
README.md
CHANGED
|
@@ -2615,13 +2615,9 @@ pip install hf-hub-ctranslate2>=2.10.0 ctranslate2>=3.16.0
|
|
| 2615 |
# from transformers import AutoTokenizer
|
| 2616 |
model_name = "michaelfeil/ct2fast-e5-small-v2"
|
| 2617 |
|
| 2618 |
-
from hf_hub_ctranslate2 import
|
| 2619 |
-
model =
|
| 2620 |
-
|
| 2621 |
-
model_name_or_path=model_name,
|
| 2622 |
-
device="cuda",
|
| 2623 |
-
compute_type="float16",
|
| 2624 |
-
# tokenizer=AutoTokenizer.from_pretrained("{ORG}/{NAME}")
|
| 2625 |
)
|
| 2626 |
embeddings = model.encode(
|
| 2627 |
["I like soccer", "I like tennis", "The eiffel tower is in Paris"],
|
|
@@ -2639,9 +2635,9 @@ and [hf-hub-ctranslate2>=2.10.0](https://github.com/michaelfeil/hf-hub-ctranslat
|
|
| 2639 |
- `compute_type=int8_float16` for `device="cuda"`
|
| 2640 |
- `compute_type=int8` for `device="cpu"`
|
| 2641 |
|
| 2642 |
-
Converted on 2023-06-
|
| 2643 |
```
|
| 2644 |
-
ct2-transformers-converter --model intfloat/e5-small-v2 --output_dir ~/tmp-ct2fast-e5-small-v2 --force --copy_files tokenizer.json README.md
|
| 2645 |
```
|
| 2646 |
|
| 2647 |
# Licence and other remarks:
|
|
|
|
| 2615 |
# from transformers import AutoTokenizer
|
| 2616 |
model_name = "michaelfeil/ct2fast-e5-small-v2"
|
| 2617 |
|
| 2618 |
+
from hf_hub_ctranslate2 import CT2SentenceTransformer
|
| 2619 |
+
model = CT2SentenceTransformer(
|
| 2620 |
+
model_name, compute_type="int8_float16", device="cuda"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2621 |
)
|
| 2622 |
embeddings = model.encode(
|
| 2623 |
["I like soccer", "I like tennis", "The eiffel tower is in Paris"],
|
|
|
|
| 2635 |
- `compute_type=int8_float16` for `device="cuda"`
|
| 2636 |
- `compute_type=int8` for `device="cpu"`
|
| 2637 |
|
| 2638 |
+
Converted on 2023-06-18 using
|
| 2639 |
```
|
| 2640 |
+
ct2-transformers-converter --model intfloat/e5-small-v2 --output_dir ~/tmp-ct2fast-e5-small-v2 --force --copy_files tokenizer.json README.md special_tokens_map.json vocab.txt tokenizer_config.json .gitattributes --trust_remote_code
|
| 2641 |
```
|
| 2642 |
|
| 2643 |
# 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:a201dec3f480d71769e0126bc25d0da451185a75f654d1ece99a26be83dd02aa
|
| 3 |
+
size 133448364
|