PaddlePaddle / PaddleNLP

👑 Easy-to-use and powerful NLP and LLM library with 🤗 Awesome model zoo, supporting wide-range of NLP tasks from research to industrial applications, including 🗂Text Classification, 🔍 Neural Search, ❓ Question Answering, ℹ️ Information Extraction, 📄 Document Intelligence, 💌 Sentiment Analysis etc.
https://paddlenlp.readthedocs.io
Apache License 2.0
12.17k stars 2.94k forks source link

层次分类模型,预训练后,checkpoint文件夹是空的 #8286

Closed RyanOvO closed 7 months ago

RyanOvO commented 7 months ago

请提出你的问题

现象: 预训练后,生成的checkpoint文件夹内文件不齐全。

截图: image

运行日志: /mnt/workspace/demos/PaddleNLP-develop/applications/text_classification/hierarchical> python train.py \ --dataset_dir "data" \ --device "gpu" \ --max_seq_length 128 \ --model_name "ernie-3.0-medium-zh" \ --batch_size 32 \ --early_stop \ --epochs 100 /home/pai/lib/python3.11/site-packages/_distutils_hack/init.py:33: UserWarning: Setuptools is replacing distutils. warnings.warn("Setuptools is replacing distutils.") [2024-04-18 16:47:31,683] [ INFO] - We are using (<class 'paddlenlp.transformers.ernie.tokenizer.ErnieTokenizer'>, False) to load 'ernie-3.0-medium-zh'. [2024-04-18 16:47:31,683] [ INFO] - Already cached /root/.paddlenlp/models/ernie-3.0-medium-zh/ernie_3.0_medium_zh_vocab.txt [2024-04-18 16:47:31,706] [ INFO] - tokenizer config file saved in /root/.paddlenlp/models/ernie-3.0-medium-zh/tokenizer_config.json [2024-04-18 16:47:31,706] [ INFO] - Special tokens file saved in /root/.paddlenlp/models/ernie-3.0-medium-zh/special_tokens_map.json [2024-04-18 16:47:31,707] [ INFO] - We are using <class 'paddlenlp.transformers.ernie.modeling.ErnieForSequenceClassification'> to load 'ernie-3.0-medium-zh'. [2024-04-18 16:47:31,708] [ INFO] - Already cached /root/.paddlenlp/models/ernie-3.0-medium-zh/model_state.pdparams [2024-04-18 16:47:31,708] [ INFO] - Loading weights file model_state.pdparams from cache at /root/.paddlenlp/models/ernie-3.0-medium-zh/model_state.pdparams [2024-04-18 16:47:32,212] [ INFO] - Loaded weights file from disk, setting weights to model. W0418 16:47:32.216168 1276 gpu_resources.cc:119] Please NOTE: device: 0, GPU Compute Capability: 7.0, Driver API Version: 11.8, Runtime API Version: 11.8 W0418 16:47:32.217109 1276 gpu_resources.cc:164] device: 0, cuDNN Version: 8.9. [2024-04-18 16:47:34,664] [ WARNING] - Some weights of the model checkpoint at ernie-3.0-medium-zh were not used when initializing ErnieForSequenceClassification: ['ernie.encoder.layers.6.linear1.bias', 'ernie.encoder.layers.6.linear1.weight', 'ernie.encoder.layers.6.linear2.bias', 'ernie.encoder.layers.6.linear2.weight', 'ernie.encoder.layers.6.norm1.bias', 'ernie.encoder.layers.6.norm1.weight', 'ernie.encoder.layers.6.norm2.bias', 'ernie.encoder.layers.6.norm2.weight', 'ernie.encoder.layers.6.self_attn.k_proj.bias', 'ernie.encoder.layers.6.self_attn.k_proj.weight', 'ernie.encoder.layers.6.self_attn.out_proj.bias', 'ernie.encoder.layers.6.self_attn.out_proj.weight', 'ernie.encoder.layers.6.self_attn.q_proj.bias', 'ernie.encoder.layers.6.self_attn.q_proj.weight', 'ernie.encoder.layers.6.self_attn.v_proj.bias', 'ernie.encoder.layers.6.self_attn.v_proj.weight']

w5688414 commented 7 months ago

请问你的paddle和paddlenlp的环境是什么?另外,f1 score为什么是0?

RyanOvO commented 7 months ago

请问你的paddle和paddlenlp的环境是什么?另外,f1 score为什么是0?

好的,我检查下,应该是我自己没有设置好数据集,感谢。