Instructions to use zhihan1996/DNA_bert_6 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zhihan1996/DNA_bert_6 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="zhihan1996/DNA_bert_6", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("zhihan1996/DNA_bert_6", trust_remote_code=True) model = AutoModelForMaskedLM.from_pretrained("zhihan1996/DNA_bert_6", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
Since the recent update, AutoModel for any DNA_bert model does not work anymore
#4
by Gback - opened
I have used AutoModels and DNA_bert before (a few months ago) without any problems.
However, now all AutoModels fail to load with the error:
"Unrecognized configuration class <class 'transformers_modules.zhihan1996.DNA_bert_6.6af99bac8f2aada050efd70285c526b151ecd360.configuration_bert.BertConfig'> for this kind of AutoModel: TFAutoModelForSequenceClassification"
It seems that the current config is not recognized as BertConfig.
Is it possible to fix this issue, or make the old version (with the old config) accessible?
Thanks for raising the issue and for your interest in this work. It works now.