michaelfeil commited on
Commit
19e3f41
·
1 Parent(s): de68a34

Upload sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2 ctranslate fp16 weights

Browse files
Files changed (2) hide show
  1. README.md +5 -9
  2. model.bin +2 -2
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 EncoderCT2fromHfHub
27
- model = EncoderCT2fromHfHub(
28
- # load in int8 on CUDA
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-16 using
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 unigram.json config_sentence_transformers.json tokenizer.json modules.json README.md tokenizer_config.json sentence_bert_config.json special_tokens_map.json .gitattributes --quantization float16 --trust_remote_code
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:6c59f14a4df4ce59c1b82b6438ba6d3fbf5cb744ec3c9d49efab61cec2ea9425
3
- size 235315884
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:03c883e3ae820352efa7873c2fbd04313278cda250f95ecec5804165ed92dbde
3
+ size 470623404