SPECTER2 base (allenai/specter2_base) converted to MLX safetensors format for use with mlx-swift / MLXEmbedders on Apple Silicon.
License: Apache 2.0 (inherited from allenai/specter2_base)
What it is
SPECTER2 is a 12-layer BERT-base model trained by Allen AI on 6M scientific paper citation triplets. It produces 768-dimensional sentence embeddings optimised for scientific text similarity β significantly outperforming general-purpose embedders (all-MiniLM, Apple NL embedding) on academic content.
Input format: "title [SEP] abstract" β feed title and abstract concatenated with a [SEP] token.
Files
File
Description
model.safetensors
Float16 weights (~220 MB), keys remapped to MLX BERT convention
When weights are stored as float16, the attention mask must be cast to float16 before the mx.log() additive-mask conversion or MLX's scaled_dot_product_attention will raise a dtype mismatch: