English dnabert_2_117m_ft_hepg2_1kbphg19_dhss_h3k27ac_10xcontrol BertForSequenceClassification from tanoManzo

Description

Pretrained BertForSequenceClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.dnabert_2_117m_ft_hepg2_1kbphg19_dhss_h3k27ac_10xcontrol is a English model originally trained by tanoManzo.

Download Copy S3 URI

How to use

     
documentAssembler = DocumentAssembler() \
    .setInputCol('text') \
    .setOutputCol('document')
    
tokenizer = Tokenizer() \
    .setInputCols(['document']) \
    .setOutputCol('token')

sequenceClassifier  = BertForSequenceClassification.pretrained("dnabert_2_117m_ft_hepg2_1kbphg19_dhss_h3k27ac_10xcontrol","en") \
     .setInputCols(["documents","token"]) \
     .setOutputCol("class")

pipeline = Pipeline().setStages([documentAssembler, tokenizer, sequenceClassifier])
data = spark.createDataFrame([["I love spark-nlp"]]).toDF("text")
pipelineModel = pipeline.fit(data)
pipelineDF = pipelineModel.transform(data)


val documentAssembler = new DocumentAssembler()
    .setInputCols("text")
    .setOutputCols("document")
    
val tokenizer = new Tokenizer()
    .setInputCols(Array("document"))
    .setOutputCol("token")

val sequenceClassifier = BertForSequenceClassification.pretrained("dnabert_2_117m_ft_hepg2_1kbphg19_dhss_h3k27ac_10xcontrol", "en")
    .setInputCols(Array("documents","token")) 
    .setOutputCol("class") 
    
val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, sequenceClassifier))
val data = Seq("I love spark-nlp").toDS.toDF("text")
val pipelineModel = pipeline.fit(data)
val pipelineDF = pipelineModel.transform(data)

Model Information

Model Name: dnabert_2_117m_ft_hepg2_1kbphg19_dhss_h3k27ac_10xcontrol
Compatibility: Spark NLP 5.5.1+
License: Open Source
Edition: Official
Input Labels: [document, token]
Output Labels: [class]
Language: en
Size: 333.8 MB

References

https://huggingface.co/tanoManzo/DNABERT-2-117M_ft_Hepg2_1kbpHG19_DHSs_H3K27AC_10xControl