Finding papers by meaning

These two models turn scientific sentences and paragraphs into 768-dimensional vectors. Encode a question and a collection of abstracts, then compare their embeddings to rank candidate papers by semantic similarity. Each input produces a vector that can be stored in a search index; the models do not generate an answer or a summary.

The releases share a Sentence Transformers interface and mean pooling over token representations. Their backbones differ: the DistilBERT configuration identifies distilbert-base-uncased, while the DistilRoBERTa configuration identifies distilroberta-base. Both have six transformer layers, twelve attention heads, and a hidden dimension of 768.

Training on generated questions

The DistilBERT model card and DistilRoBERTa model card describe training on question–abstract pairs from the arXiv generated-query corpus. Both record one training epoch, batches of 64, and MultipleNegativesRankingLoss with cosine similarity and a scale of 20. The optimizer was AdamW at a learning rate of 2e-5, with linear warmup and weight decay of 0.01.

The cards credit Matthew Kenney, 2023, and retain the original ArtifactAI names in their examples. The download links point to the current AlgorithmicResearchGroup repositories. Both model releases specify Apache 2.0 licensing.

Working with the embeddings

Load either repository with SentenceTransformer and call encode() on a list of strings. A direct Transformers implementation needs the tokenizer, the encoder, and attention-mask-aware mean pooling; the cards include that alternative. Padding tokens should not contribute to the average.

Both saved Sentence Transformers configurations limit an input to 350 tokens, even though the underlying encoders support longer sequences. Full papers therefore need an explicit passage-splitting or truncation strategy. Keep the same model and preprocessing for queries and indexed passages.

The cards document training settings but do not publish numerical retrieval scores or a controlled comparison between the two variants. They provide a starting point for scientific search, with retrieval quality to be measured against the queries and relevance judgments of the intended collection.

Get the resource