Instructions to use kornwtp/ConGen-BERT-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use kornwtp/ConGen-BERT-base with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("kornwtp/ConGen-BERT-base") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Transformers
How to use kornwtp/ConGen-BERT-base with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("kornwtp/ConGen-BERT-base") model = AutoModel.from_pretrained("kornwtp/ConGen-BERT-base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download tokenizer_config.json from kornwtp/ConGen-BERT-base: direct link, hf CLI and curl.
- Browser
- Download file 314 Bytes
-
https://huggingface.co/kornwtp/ConGen-BERT-base/resolve/main/tokenizer_config.json
- Command line
-
hf download hf://kornwtp/ConGen-BERT-base/tokenizer_config.json
-
curl -L -o tokenizer_config.json https://huggingface.co/kornwtp/ConGen-BERT-base/resolve/main/tokenizer_config.json
314 Bytes
| {"do_lower_case": true, "unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]", "tokenize_chinese_chars": true, "strip_accents": null, "special_tokens_map_file": null, "name_or_path": "pretrianed_models/bert-base-uncased", "tokenizer_class": "BertTokenizer"} |