Edit model card

https://huggingface.co/alchemab/antiberta2 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 @xenova/transformers

Example: Masked language modelling with Xenova/antiberta2.

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

// Create a masked language modelling pipeline
const pipe = await pipeline('fill-mask', 'Xenova/antiberta2');

const output = await pipe('Ḣ Q V Q ... C A [MASK] D ... T V S S');
console.log(output);
// [
//   {
//     score: 0.48774364590644836,
//     token: 19,
//     token_str: 'R',
//     sequence: 'Ḣ Q V Q C A R D T V S S'
//   },
//   {
//     score: 0.2768442928791046,
//     token: 18,
//     token_str: 'Q',
//     sequence: 'Ḣ Q V Q C A Q D T V S S'
//   },
//   ...
// ]

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
7
Inference Examples
Inference API (serverless) does not yet support transformers.js models for this pipeline type.

Model tree for Xenova/antiberta2

Quantized
(1)
this model