Instructions to use InstaDeepAI/NTv3_pretrained with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use InstaDeepAI/NTv3_pretrained with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="InstaDeepAI/NTv3_pretrained", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("InstaDeepAI/NTv3_pretrained", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
fix: rebuild the rotary frequencies per call so transformers 5 cannot zero them
#1
by Yanisadel - opened
transformers >= 5 refills non-persistent buffers with torch.empty after loading, so inv_freq came back as zeros on every NTv3 model: rotary disabled, no error, logits off by up to 248 on NTv3_pretrained. The frequencies are now computed in the forward.
Verified: NTv3_pretrained under transformers 5.17 is bitwise identical to 4.57.1; the three annotation models reproduce jax_model/roundtrip_fixture.npz under both (max abs <= 4.6e-05, 100% argmax). Generated by ntv3_huggingface/build_hf_modeling_files.py, genomix-research commit f5936eb5f9.
Yanisadel changed pull request status to merged