Skip to content

Conversation

@xenova
Copy link
Collaborator

@xenova xenova commented Nov 16, 2024

This means we can run the new CamemBERT 2.0 models

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

// Create a question-answering pipeline
const answerer = await pipeline('question-answering', 'onnx-community/camembertv2-base-fquad');

// Generate a response
const question = 'Quelle est la capitale de la France ?';
const context = 'La capitale de la France est Paris.';
const result = await answerer(question, context);
console.log(result); // { answer: 'Paris', score: 0.9173286837656189 }

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@xenova xenova merged commit 7c1bde9 into main Nov 16, 2024
4 checks passed
@xenova xenova deleted the add-camembertv2 branch July 10, 2025 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants