Predict missing words in a sentence for tasks like text completion, language modeling, and text generation.

Quickstart

Predict Missing Words

Send a masked sentence to a model to predict the missing word.

import Bytez from "bytez.js";

const client = new Bytez("YOUR_BYTEZ_KEY_HERE");
const model = client.model("almanach/camembert-base");

const inputText = "The capital of France is <mask>.";

const { error, output: sequenceObjects } = await model.run(inputText);

if (error) {
  console.error("Error:", error);
} else {
  sequenceObjects.forEach(({ sequence, score, token, token_str }) => {
    console.log({ sequence, score, token, token_str });
  });
}

Demo