huggingface / huggingface/transformers.js

Converted QA model answers in lower case, original model does not. What am I doing wrong?

Open
#623 0 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
JavaScript
Stars
16.3k
Forks
1.2k
Avg merge
6d 2h
Merged PRs (30d)
6

Description

### Question

I have converted [deutsche-telekom/electra-base-de-squad2](https://huggingface.co/deutsche-telekom/electra-base-de-squad2) to ONNX using ```python -m scripts.convert --quantize --model_id deutsche-telekom/electra-base-de-squad2```. The ONNX model, used with the same code, yields returns in lower case, whereas the original model returns the answer respecting case sensitivity. I noticed that the ```tokenizer_config.json" in the original model contains ```"do_lower_case": false```. But even setting this to ```true``` before converting does not work. What am I dpoing wrong?

Code is straight forward:

```javascript
import { pipeline } from '@xenova/transformers';
const pipe = await pipeline('question-answering', 'conventic/electra-base-de-squad2-onnx');
const context = "";
const question = "";
const out = await pipe(question, context);
console.log(out);
´´´

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.