Run this model with HF Jobs

Run Xenova/esm2_t6_8M_UR50D_sequence_classifier_v1 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/Xenova/esm2_t6_8M_UR50D_sequence_classifier_v1. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/Xenova/esm2_t6_8M_UR50D_sequence_classifier_v1 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

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).

Downloads last month
74
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Xenova/esm2_t6_8M_UR50D_sequence_classifier_v1