releases.shpreview

2.6.2

$npx -y @buildinternet/releases show rel_VvUmQM8uIAPLW9K6rJsSB

What's new?

๐Ÿ“ New task: Document Question Answering

Document Question Answering is the task of answering questions based on an image of a document. Document Question Answering models take a (document, question) pair as input and return an answer in natural language. Check out the docs for more info!

image

<details> <summary> Example code </summary>
// npm i @xenova/transformers
import { pipeline } from '@xenova/transformers';

let image = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/invoice.png';
let question = 'What is the invoice number?';

// Create document question answering pipeline
let qa_pipeline = await pipeline('document-question-answering', 'Xenova/donut-base-finetuned-docvqa');

// Run the pipeline
let output = await qa_pipeline(image, question);
// [{ answer: 'us-001' }]
</details>

๐Ÿค– New models

๐Ÿ’ป New example application

๐Ÿ› Misc. improvements

Full Changelog: https://github.com/xenova/transformers.js/compare/2.6.1...2.6.2

Fetched April 7, 2026