Instructions to use Alibaba-NLP/gte-en-mlm-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Alibaba-NLP/gte-en-mlm-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="Alibaba-NLP/gte-en-mlm-base")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("Alibaba-NLP/gte-en-mlm-base") model = AutoModelForMaskedLM.from_pretrained("Alibaba-NLP/gte-en-mlm-base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
β οΈ DO NOT MERGE: feat(transformers): Add native Transformers config
What does this PR do?
β Sets model_type from new to gte and adds rope_parameters, so the checkpoint loads directly with AutoModel / AutoConfig in Transformers π€ without trust_remote_code. rope_scaling, rope_theta and auto_map are left untouched, so nothing changes for anyone on an older version.
β Transformers support is being added in https://github.com/huggingface/transformers/pull/48416
β β οΈ This PR is a draft; please do not merge it until the Transformers PR above has landed π€
Produced by?
β rope_parameters is the standardised form of the existing rope_theta. This checkpoint leaves rope_scaling at null, so the standardised form is a plain default rope with the same base.
β Outputs are reproduced against the original implementation on this checkpoint (max relative difference 8.9e-07), and the checkpoint is covered by the parity harness in the Transformers PR.
Closing in favour of #3, which is a draft so it cannot be merged before the Transformers PR lands π€