|
--- |
|
tags: |
|
- question-answering |
|
- transformers.js |
|
- onnx |
|
- distilbert |
|
- quantized |
|
- spanish |
|
license: other |
|
--- |
|
|
|
# distilbert-base-spanish-uncased-finetuned-qa-mlqa-onnx |
|
|
|
## Model Description |
|
Spanish DistilBERT model fine-tuned for question answering on the MLQA dataset, exported to ONNX and quantized for use with Transformers.js. |
|
|
|
## Files |
|
- `config.json` |
|
- `tokenizer.json` |
|
- `tokenizer_config.json` |
|
- `vocab.txt` |
|
- `onnx/model_quantized.onnx` |
|
|
|
## Live Demo |
|
This model is deployed in production at [plaudere.com](https://plaudere.com/spaces) as part of a bilingual Question Answering system. |
|
Visitors can seamlessly switch between the Spanish QnA model (this one) and an English QnA model via the website’s language selector. |
|
You can see both models in action by requesting support directly on the site. |
|
|
|
For a guided experience, explore this Plaudere article: |
|
[AI Assistance with QnA Models](https://plaudere.com/spaces/plaudere-engineering-9a39cf/ai-assistance-with-qna-models-c40255) |
|
It demonstrates how the author integrated QnA models into a real-world application on the Plaudere website. |
|
Here, you can interact with the agent, ask questions in English about the article itself, and watch it respond in real time. |
|
|
|
## Usage in Transformers.js |
|
```javascript |
|
import { pipeline } from '@xenova/transformers'; |
|
|
|
// Load the Spanish QA pipeline |
|
pipeline('question-answering', 'jestevesv/distilbert-base-spanish-uncased-finetuned-qa-mlqa-onnx', { quantized: true }) |
|
.then(qa => qa( |
|
'¿Cuál es la capital de Francia?', |
|
'La capital de Francia es París.' |
|
)) |
|
.then(result => console.log(result)) |
|
.catch(err => console.error(err)); |