Instructions to use Taykhoom/RNAErnie with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Taykhoom/RNAErnie with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="Taykhoom/RNAErnie", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForMaskedLM model = AutoModelForMaskedLM.from_pretrained("Taykhoom/RNAErnie", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Fix model correctness and Hugging Face compatibility
Browse filesFiles changed (2)
- README.md+1-2
- modeling_rnaernie.py+5-1
157 unmodified lines158159160161162163164165157 unmodified lines## CreditsOriginal model and code by Wang et al. Source: [GitHub](https://github.com/CatIIIIIIII/RNAErnie).The HF conversion code was authored primarily by [Claude Code](https://claude.ai/code)and reviewed manually by Taykhoom Dalal.## License157 unmodified lines158159160161162163164157 unmodified lines## CreditsOriginal model and code by Wang et al. Source: [GitHub](https://github.com/CatIIIIIIII/RNAErnie).Hugging Face port maintained by Taykhoom Dalal.## License
399 unmodified lines400401402403404405406399 unmodified linesloss = F.cross_entropy(logits.view(-1, self.config.vocab_size), labels.view(-1), ignore_index=-100)if not return_dict:output = (logits,) + outputs[2:]return (loss,) + output if loss is not None else outputreturn MaskedLMOutput(399 unmodified lines400401402403404405406407408409410399 unmodified linesloss = F.cross_entropy(logits.view(-1, self.config.vocab_size), labels.view(-1), ignore_index=-100)if not return_dict:output = (logits,)if output_hidden_states:output += (outputs.hidden_states,)if output_attentions:output += (outputs.attentions,)return (loss,) + output if loss is not None else outputreturn MaskedLMOutput(
README.md+1-2
modeling_rnaernie.py+5-1