Using this Chinese model
This model runs on python locally, the output is correct, but from spaGO is not.
Similar to #101, but I cannot find the bool parameter for QA,
how to turn off output is forced to be a distribution (sum must be 1), whereas with Python, the output is free?
server := bert.NewServer(model)
answers := s.model.Answer(body.Question, body.Passage)
Translated QA:
Context: My name is Clara, I live in Berkeley
Q: what is my name?
A: Clara
Output is supposed to be
克拉拉
but got
{
"answers": [
{
"text": "我叫克拉拉,我住在伯克利。",
"start": 0,
"end": 13,
"confidence": 0.2547743
},
{
"text": "住在伯克利。",
"start": 7,
"end": 13,
"confidence": 0.22960596
},
{
"text": "我叫克拉拉,我住",
"start": 0,
"end": 8,
"confidence": 0.1548344
}
],
"took": 1075
}
./bert-server server --repo=~/.spago --model=luhua/chinese_pretrain_mrc_roberta_wwm_ext_large --tls-disable
PASSAGE="我叫克拉拉,我住在伯克利。"
QUESTION1="我的名字是什么?"
curl -k -d '{"question": "'"$QUESTION1"'", "passage": "'"$PASSAGE"'"}' -H "Content-Type: application/json" "http://127.0.0.1:1987/answer?pretty"
Using this Chinese model
This model runs on python locally, the output is correct, but from spaGO is not.
Similar to #101, but I cannot find the bool parameter for QA,
how to turn off
output is forced to be a distribution (sum must be 1), whereas with Python, the output is free?Translated QA:
Context: My name is Clara, I live in Berkeley
Q: what is my name?
A: Clara
Output is supposed to be
克拉拉but got
./bert-server server --repo=~/.spago --model=luhua/chinese_pretrain_mrc_roberta_wwm_ext_large --tls-disable