We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
想在本地部署翻译模型,在 Fengshenbang-LM\fengshen\models\deltalm 目录下,执行的代码为官方例子 from modeling_deltalm import DeltalmForConditionalGeneration from transformers import AutoTokenizer
model = DeltalmForConditionalGeneration.from_pretrained("IDEA-CCNL/Randeng-Deltalm-362M-Zh-En") tokenizer = AutoTokenizer.from_pretrained("microsoft/infoxlm-base")
text = "尤其在夏天,如果你决定徒步穿越雨林,就需要小心蚊子。"
inputs = tokenizer(text, max_length=512, return_tensors="pt")
generate_ids = model.generate(inputs["input_ids"], max_length=512) tokenizer.batch_decode(generate_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0]
from modeling_deltalm import DeltalmForConditionalGeneration报错 ImportError: attempted relative import with no known parent package
谢谢
The text was updated successfully, but these errors were encountered:
pip install -e . 先安装下试试
Sorry, something went wrong.
Randeng-Deltalm-362M-En-Zh 不是 Randeng-Deltalm-362M-En-Zn
Randeng-Deltalm-362M-En-Zh
Randeng-Deltalm-362M-En-Zn
No branches or pull requests
想在本地部署翻译模型,在 Fengshenbang-LM\fengshen\models\deltalm 目录下,执行的代码为官方例子
from modeling_deltalm import DeltalmForConditionalGeneration
from transformers import AutoTokenizer
model = DeltalmForConditionalGeneration.from_pretrained("IDEA-CCNL/Randeng-Deltalm-362M-Zh-En")
tokenizer = AutoTokenizer.from_pretrained("microsoft/infoxlm-base")
text = "尤其在夏天,如果你决定徒步穿越雨林,就需要小心蚊子。"
inputs = tokenizer(text, max_length=512, return_tensors="pt")
generate_ids = model.generate(inputs["input_ids"], max_length=512)
tokenizer.batch_decode(generate_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0]
from modeling_deltalm import DeltalmForConditionalGeneration报错
ImportError: attempted relative import with no known parent package
谢谢
The text was updated successfully, but these errors were encountered: