Feature Extraction
sentence-transformers
Safetensors
code
bert
code-search
code-retrieval
text-embeddings-inference
Instructions to use thinkingdbx/codebert-permissive-embed with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use thinkingdbx/codebert-permissive-embed with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("thinkingdbx/codebert-permissive-embed") 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] - Notebooks
- Google Colab
- Kaggle
Stage-2 code embedding model: permissive-only corpus, function-level contrastive tuning
c3ebc49 verified Download benchmark.json from thinkingdbx/codebert-permissive-embed: direct link, hf CLI and curl.
- Browser
- Download file 1.95 kB
-
https://huggingface.co/thinkingdbx/codebert-permissive-embed/resolve/659aa368beb6ce51f53fefdbc034c1e05a5b8f7d/benchmark.json
- Command line
-
hf download hf://thinkingdbx/codebert-permissive-embed@659aa368beb6ce51f53fefdbc034c1e05a5b8f7d/benchmark.json
-
curl -L -o benchmark.json https://huggingface.co/thinkingdbx/codebert-permissive-embed/resolve/659aa368beb6ce51f53fefdbc034c1e05a5b8f7d/benchmark.json
1.95 kB
| { | |
| "name": "CoIR (NDCG@10)", | |
| "tasks": { | |
| "CodeSearchNet-go": 68.71, | |
| "CodeSearchNet-javascript": 50.41, | |
| "CodeSearchNet-ruby": 56.52, | |
| "CodeSearchNet-python": 87.84, | |
| "CodeSearchNet-php": 53.36, | |
| "synthetic-text2sql": 35.73, | |
| "codefeedback-mt": 21.78, | |
| "codefeedback-st": 48.58, | |
| "codetrans-dl": 24.12, | |
| "cosqa": 25.95, | |
| "stackoverflow-qa": 55.35, | |
| "apps": 2.83 | |
| }, | |
| "baselines": { | |
| "v1 (file-level pairs)": { | |
| "stackoverflow-qa": 58.4, | |
| "cosqa": 20.91, | |
| "apps": 3.08, | |
| "codetrans-dl": 28.14, | |
| "CodeSearchNet-ruby": 40.68, | |
| "CodeSearchNet-javascript": 38.73, | |
| "CodeSearchNet-go": 53.43, | |
| "CodeSearchNet-java": 37.87 | |
| }, | |
| "BM25": { | |
| "cosqa": 13.96, | |
| "stackoverflow-qa": 56.8, | |
| "codetrans-dl": 50.13 | |
| }, | |
| "UniXcoder": { | |
| "cosqa": 25.14, | |
| "stackoverflow-qa": 44.67, | |
| "codetrans-dl": 41.82 | |
| }, | |
| "GTE-Base": { | |
| "cosqa": 30.24, | |
| "stackoverflow-qa": 62.71, | |
| "codetrans-dl": 33.81 | |
| }, | |
| "E5-Base": { | |
| "cosqa": 32.59, | |
| "stackoverflow-qa": 86.86, | |
| "codetrans-dl": 62.5 | |
| } | |
| }, | |
| "note": "Measured with the `coir-eval` harness, mean pooling, 256 tokens, cosine similarity. `v1` is the previous version of this model, run on the same machine with the same harness; blanks are tasks that version did not complete before its spot instance was preempted.\n\nBM25, UniXcoder, GTE-Base and E5-Base are quoted from Table 3 of the CoIR paper (arXiv:2407.02883v3). That table reports CodeSearchNet as one aggregate across six languages, while the figures here are per language, so those rows are left blank rather than compared to something they are not.\n\n**No benchmark average is quoted.** Two of CoIR's tasks (codesearchnet-ccr, codetrans-contest) were not run, and a mean over a subset is not the published mean \u2014 putting one beside a leaderboard average would be a false comparison." | |
| } |