Instructions to use microsoft/codebert-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use microsoft/codebert-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="microsoft/codebert-base")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("microsoft/codebert-base") model = AutoModel.from_pretrained("microsoft/codebert-base", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
Commit History
-
Add exported openvino model 'openvino_model_qint8_quantized.xml'
Verified signatureHello! *This pull request has been automatically generated from the [`export_static_quantized_openvino_model`](https://sbert.net/docs/package_reference/util.html#sentence_transformers.backend.export_static_quantized_openvino_model) function from the Sentence Transformers library.* ## Config ```python OVQuantizationConfig( quant_method=<OVQuantizationMethod.DEFAULT: 'default'> ) ``` ## Tip: Consider testing this pull request before merging by loading the model from this PR with the `revision` argument: ```python from sentence_transformers import SentenceTransformer # TODO: Fill in the PR number pr_number = 2 model = SentenceTransformer( "microsoft/codebert-base", revision=f"refs/pr/{pr_number}", backend="openvino", model_kwargs={"file_name": "openvino_model_qint8_quantized.xml"}, ) # Verify that everything works as expected embeddings = model.encode(["The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium."]) print(embeddings.shape) simi…38b29ff
-
Addition of Rust model
3b0952f
-
upload flax model
3a68f56 -
allow flax
3ff5798
-
Migrate model card from transformers-repo
Read announcement at https://discuss.huggingface.co/t/announcement-all-model-cards-will-be-migrated-to-hf-co-model-repos/2755 Original file history: https://github.com/huggingface/transformers/commits/master/model_cards/microsoft/codebert-base/README.mdaa14b80
-
Update tf_model.h5
0fef132 -
Update vocab.json
b5e9225 -
Update pytorch_model.bin
9bc0ec8 -
Update merges.txt
8b0f31a -
Update config.json
5319141 -
Update special_tokens_map.json
1a3831e -
Update tokenizer_config.json
0047fa0 -
Update merges.txt
ffc990b -
Update config.json
09a9eff -
Update special_tokens_map.json
8d2ad35 -
Update tokenizer_config.json
dedb8f2 -
initial commit
93d55bc