Skip to content

Dataset · sentence-transformers

Millions of comment-code pairs for embeddings

sentence-transformers/codesearchnet

1 to 10 million pairs of text descriptions and code snippets across various programming languages.

What's inside

A large text corpus from the CodeSearchNet collection containing 1 to 10 million records. It includes pairs of string values: an English text comment (comment column) and its corresponding code snippet in various programming languages (code column). The dataset is prepared for direct use with the Sentence Transformers library.

What you can do with it

  • Training embedding models for semantic codebase search
  • Training models to match text queries with code snippets
Tasks
Embeddings, Sentence similarity
Languages
English
Size
1M–10M rows
Downloads this month
587
Likes
20

Models trained on it

How to load it

from datasets import load_dataset

ds = load_dataset("sentence-transformers/codesearchnet")