ONNX Model Zoo

Xenova/esm2_t6_8M_UR50D_sequence_classifier_v1

By Xenova · ↓ 12 · ♥ 0 · Updated 2025-07-11

What's in this repo

This page lists the files in Xenova/esm2_t6_8M_UR50D_sequence_classifier_v1, including model.onnx, model_bnb4.onnx, model_fp16.onnx and more.

  • 8 ONNX models (.onnx files)
  • 14 files, including 8 .onnx, 4 .json, 1 .md
  • Last updated 2025-07-11

ONNX files

File Size Download
onnx/model.onnx — Download
onnx/model_bnb4.onnx — Download
onnx/model_fp16.onnx — Download
onnx/model_int8.onnx — Download
onnx/model_q4.onnx — Download
onnx/model_q4f16.onnx — Download
onnx/model_quantized.onnx — Download
onnx/model_uint8.onnx — Download

How to use

These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.

README

https://huggingface.co/AmelieSchreiber/esm2_t6_8M_UR50D_sequence_classifier_v1 with ONNX weights to be compatible with Transformers.js.

Usage (Transformers.js)

If you haven't already, you can install the Transformers.js JavaScript library from NPM using:

npm i @huggingface/transformers

Example: Protein sequence classification w/ Xenova/esm2_t6_8M_UR50D_sequence_classifier_v1.

import { pipeline } from '@huggingface/transformers';

// Create text classification pipeline
const classifier = await pipeline('text-classification', 'Xenova/esm2_t6_8M_UR50D_sequence_classifier_v1');

// Suppose these are your new sequences that you want to classify
// Additional Family 0: Enzymes
const new_sequences_0 = [
    'ACGYLKTPKLADPPVLRGDSSVTKAICKPDPVLEK',
    'GVALDECKALDYLPGKPLPMDGKVCQCGSKTPLRP',
    'VLPGYTCGELDCKPGKPLPKCGADKTQVATPFLRG',
    'TCGALVQYPSCADPPVLRGSDSSVKACKKLDPQDK',
    'GALCEECKLCPGADYKPMDGDRLPAAATSKTRPVG',
    'PAVDCKKALVYLPKPLPMDGKVCRGSKTPKTRPYG',
    'VLGYTCGALDCKPGKPLPKCGADKTQVATPFLRGA',
    'CGALVQYPSCADPPVLRGSDSSVKACKKLDPQDKT',
    'ALCEECKLCPGADYKPMDGDRLPAAATSKTRPVGK',
    'AVDCKKALVYLPKPLPMDGKVCRGSKTPKTRPYGR',
]

// Additional Family 1: Receptor Proteins
const new_sequences_1 = [
    'VGQRFYGGRQKNRHCELSPLPSACRGSVQGALYTD',
    'KDQVLTVPTYACRCCPKMDSKGRVPSTLRVKSARS',
    'PLAGVACGRGLDYRCPRKMVPGDLQVTPATQRPYG',
    'CGVRLGYPGCADVPLRGRSSFAPRACMKKDPRVTR',
    'RKGVAYLYECRKLRCRADYKPRGMDGRRLPKASTT',
    'RPTGAVNCKQAKVYRGLPLPMMGKVPRVCRSRRPY',
    'RLDGGYTCGQALDCKPGRKPPKMGCADLKSTVATP',
    'LGTCRKLVRYPQCADPPVMGRSSFRPKACCRQDPV',
    'RVGYAMCSPKLCSCRADYKPPMGDGDRLPKAATSK',
    'QPKAVNCRKAMVYRPKPLPMDKGVPVCRSKRPRPY',
]

// Additional Family 2: Structural Proteins
const new_sequences_2 = [
    'VGKGFRYGSSQKRYLHCQKSALPPSCRRGKGQGSAT',
    'KDPTVMTVGTYSCQCPKQDSRGSVQPTSRVKTSRSK',
    'PLVGKACGRSSDYKCPGQMVSGGSKQTPASQRPSYD',
    'CGKKLVGYPSSKADVPLQGRSSFSPKACKKDPQMTS',
    'RKGVASLYCSSKLSCKAQYSKGMSDGRSPKASSTTS',
    'RPKSAASCEQAKSYRSLSLPSMKGKVPSKCSRSKRP',
    'RSDVSYTSCSQSKDCKPSKPPKMSGSKDSSTVATPS',
    'LSTCSKKVAYPSSKADPPSSGRSSFSMKACKKQDPPV',
    'RVGSASSEPKSSCSVQSYSKPSMSGDSSPKASSTSK',
    'QPSASNCEKMSSYRPSLPSMSKGVPSSRSKSSPPYQ',
]

// Merge all sequences
const new_sequences = [...new_sequences_0, ...new_sequences_1, ...new_sequences_2];

// Get the predicted class for each sequence
const predictions = await classifier(new_sequences);

// Output the predicted class for each sequence
for (let i = 0; i < predictions.length; ++i) {
    console.log(`Sequence: ${new_sequences[i]}, Predicted class: '${predictions[i].label}'`)
}
// Sequence: ACGYLKTPKLADPPVLRGDSSVTKAICKPDPVLEK, Predicted class: 'Enzymes'
// ... (truncated)
// Sequence: AVDCKKALVYLPKPLPMDGKVCRGSKTPKTRPYGR, Predicted class: 'Enzymes'
// Sequence: VGQRFYGGRQKNRHCELSPLPSACRGSVQGALYTD, Predicted class: 'Receptor Proteins'
// ... (truncated)
// Sequence: QPKAVNCRKAMVYRPKPLPMDKGVPVCRSKRPRPY, Predicted class: 'Receptor Proteins'
// Sequence: VGKGFRYGSSQKRYLHCQKSALPPSCRRGKGQGSAT, Predicted class: 'Structural Proteins'
// ... (truncated)
// Sequence: QPSASNCEKMSSYRPSLPSMSKGVPSSRSKSSPPYQ, Predicted class: 'Structural Proteins'

Note: Having a separate repo for ONNX weights is intended to be a temporary solution until WebML gains more traction. If you would like to make your models web-ready, we recommend converting to ONNX using 🤗 Optimum and structuring your repo like this one (with ONNX weights located in a subfolder named onnx).

Model info

zero-shot-classification transformers.js
transformers.js onnx esm text-classification zero-shot-classification base_model:AmelieSchreiber/esm2_t6_8M_UR50D_sequence_classifier_v1 base_model:quantized:AmelieSchreiber/esm2_t6_8M_UR50D_sequence_classifier_v1 region:us
↓ 12 ♥ 0

Created: 2023-12-10

Updated: 2025-07-11

View on Hugging Face

Files (14)

.gitattributes
README.md
config.json
onnx/model.onnx ONNX
onnx/model_bnb4.onnx ONNX
onnx/model_fp16.onnx ONNX
onnx/model_int8.onnx ONNX
onnx/model_q4.onnx ONNX
onnx/model_q4f16.onnx ONNX
onnx/model_quantized.onnx ONNX
onnx/model_uint8.onnx ONNX
quantize_config.json
tokenizer.json
tokenizer_config.json

Related models