Feature Extraction
sentence-transformers
Safetensors
Transformers
French
camembert
sentence-similarity
Eval Results (legacy)
text-embeddings-inference
Instructions to use h4c5/sts-camembert-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use h4c5/sts-camembert-base with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("h4c5/sts-camembert-base") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Transformers
How to use h4c5/sts-camembert-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="h4c5/sts-camembert-base")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("h4c5/sts-camembert-base") model = AutoModel.from_pretrained("h4c5/sts-camembert-base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download tokenizer_config.json from h4c5/sts-camembert-base: direct link, hf CLI and curl.
- Browser
- Download file 1.76 kB
-
https://huggingface.co/h4c5/sts-camembert-base/resolve/8ab00180762f2d442d49f7e022f943db7b0a7a4a/tokenizer_config.json
- Command line
-
hf download hf://h4c5/sts-camembert-base@8ab00180762f2d442d49f7e022f943db7b0a7a4a/tokenizer_config.json
-
curl -L -o tokenizer_config.json https://huggingface.co/h4c5/sts-camembert-base/resolve/8ab00180762f2d442d49f7e022f943db7b0a7a4a/tokenizer_config.json
1.76 kB
| { | |
| "added_tokens_decoder": { | |
| "0": { | |
| "content": "<s>NOTUSED", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "1": { | |
| "content": "<pad>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "2": { | |
| "content": "</s>NOTUSED", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "4": { | |
| "content": "<unk>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "5": { | |
| "content": "<s>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "6": { | |
| "content": "</s>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "32004": { | |
| "content": "<mask>", | |
| "lstrip": true, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "32005": { | |
| "content": "<unk>NOTUSED", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| } | |
| }, | |
| "additional_special_tokens": [ | |
| "<s>NOTUSED", | |
| "</s>NOTUSED", | |
| "<unk>NOTUSED" | |
| ], | |
| "bos_token": "<s>", | |
| "clean_up_tokenization_spaces": true, | |
| "cls_token": "<s>", | |
| "eos_token": "</s>", | |
| "mask_token": "<mask>", | |
| "model_max_length": 512, | |
| "pad_token": "<pad>", | |
| "sep_token": "</s>", | |
| "tokenizer_class": "CamembertTokenizer", | |
| "unk_token": "<unk>" | |
| } | |