Instructions to use huggingface/CodeBERTa-small-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use huggingface/CodeBERTa-small-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="huggingface/CodeBERTa-small-v1")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("huggingface/CodeBERTa-small-v1") model = AutoModelForMaskedLM.from_pretrained("huggingface/CodeBERTa-small-v1", 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( "huggingface/CodeBERTa-small-v1", 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…083d545
-
Add TF weights (#1)
- Add TF weights (fd24e75d62070a4767d5f11d78d64b17874da063) Co-authored-by: Joao Gante <joaogante@users.noreply.huggingface.co>e93b589
-
upload flax model
e54a68e -
allow flax
b711e0a
-
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/huggingface/CodeBERTa-small-v1/README.mda46768e
-
Update config.json
9b9b744
-
Update config.json
661f3c7 -
Update pytorch_model.bin
77e2b26 -
Update config.json
bf1a11a -
Update merges.txt
0fbb8c6 -
Update tokenizer_config.json
e79af75 -
Update vocab.json
5a2e962 -
initial commit
fe737c8