zjunlp / KnowPrompt

[WWW 2022] KnowPrompt: Knowledge-aware Prompt-tuning with Synergistic Optimization for Relation Extraction
MIT License
194 stars 34 forks source link

chinese fields #23

Closed githubgtl closed 11 months ago

githubgtl commented 1 year ago

I want to change English roberta model to chinese roberta,the data processed module showed that use_bert is ture,so the dataset return batch that is analysed by 5 variables to express, I don't find any module to accept the batch

githubgtl commented 1 year ago

I change it returns 4 variables,the progress can run normally but loss = nan and f1=0

githubgtl commented 1 year ago

maybe the true label is compeletly different from predicted labels, loss is very big

njcx-ai commented 1 year ago

Thanks for your attention. Perhaps you can try starting with Chinese BERT and simultaneously check for any discrepancies between the logits and labels.

githubgtl commented 1 year ago

Thanks for your attention. Perhaps you can try starting with Chinese BERT and simultaneously check for any discrepancies between the logits and labels.

I have change the model but the loss is still nan,should I change the relation in the dataset into english

njcx-ai commented 1 year ago

Change the relation in the dataset into English would result in a semantic mismatch. You can utilize the debug mode of an IDE to troubleshoot and identify the issue.

githubgtl commented 1 year ago

Change the relation in the dataset into English would result in a semantic mismatch. You can utilize the debug mode of an IDE to troubleshoot and identify the issue.

thank you for your reply, I fix the question which loss is nan but the best is only 40%

zxlzr commented 1 year ago

Hi, if you are using only few-shot samples, you should try to run experiment multiple times to obtain the average results, and the hyperparameter and data selection is is also very sensitive to the performance.

You can also try the code here https://github.com/zjunlp/LREBench, in which we have already tried the Chinese datasets.

githubgtl commented 1 year ago

thanks, I just download the LRE projects and run it , I found almost every epoch is f1=0.00ckpt, does your data appear this performance?

githubgtl commented 1 year ago

by the way ,the loss gets smaller and smaller,but eval_f1 is 0.00

xxupiano commented 1 year ago

Hello, what's the dataset and the dataset size you used? Maybe the dataset size is such small that the model can not study them well.

githubgtl commented 1 year ago

I use the same dataset as your readme refers

githubgtl commented 1 year ago

but train dataset is 6000 picked by your dataset

xxupiano commented 1 year ago

Can you provide which dataset you used and which script you ran?

zxlzr commented 12 months ago

Have you solved your issues?

githubgtl commented 11 months ago

Have you solved your issues?

sorry , I just see this email, I solve it , thank you very much