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.19k stars 2.95k forks source link

[Question]: ALBERT文档API中会返回hidden_states, attentions,我这里却是hidden_states=None, attentions=None #7533

Closed wangbofan closed 9 months ago

wangbofan commented 1 year ago

请提出你的问题

import paddle from paddlenlp.transformers import AlbertModel, AlbertTokenizer

tokenizer = AlbertTokenizer.from_pretrained('albert-base-v1') model = AlbertModel.from_pretrained('albert-base-v1')

inputs = tokenizer("Welcome to use PaddlePaddle and PaddleNLP!i like ball") inputs = {k:paddle.to_tensor([v]) for (k, v) in inputs.items()} output = model(**inputs,return_dict=True) output ....................29857466, -0.08089331]]), hidden_states=None, attentions=None) hidden_states和hidden_states一直显示为None

github-actions[bot] commented 10 months ago

This issue is stale because it has been open for 60 days with no activity. 当前issue 60天内无活动,被标记为stale。

github-actions[bot] commented 9 months ago

This issue was closed because it has been inactive for 14 days since being marked as stale. 当前issue 被标记为stale已有14天,即将关闭。

JasonCZH4 commented 5 months ago

你好,请问你的问题解决了吗,我也遇到这个问题了