提交 3f270a2f 编写于 作者: xujinanne's avatar xujinanne

Merge branch 'elmo' of https://github.com/JesseyXujin/models into elmo

<h1 align="center">ELMO</h1>
## 介绍
ELMO(Embeddings from Language Models)是一种新型深度语境化词表征,可对词进行复杂特征(如句法和语义)和词在语言语境中的变化进行建模(即对多义词进行建模)。该模型支持多卡训练,训练速度比主流实现快约1倍, 验证在中文词法分析任务上f1值提升0.68%。
ELMO(Embeddings from Language Models)是一种新型深度语境化词表征,可对词进行复杂特征(如句法和语义)和词在语言语境中的变化进行建模(即对多义词进行建模)。PaddlePaddle版本该模型支持多卡训练,训练速度比主流实现快约1倍, 验证在中文词法分析任务上f1值提升0.68%。
ELMO在大语料上以language model为训练目标,训练出bidirectional LSTM模型,利用LSTM产生词语的表征, 对下游NLP任务(如问答、分类、命名实体识别等)进行微调。
......@@ -20,9 +20,7 @@ glob
## 预训练模型
预训练模型要点:
1. 把文档文件切分成句子。并基于词表(参考vocabulary_min5k.txt)对句子进行切词。把文件切分成训练集trainset和测试集testset。
1. 把文档文件切分成句子,并基于词表(参考vocabulary_min5k.txt)对句子进行切词。把文件切分成训练集trainset和测试集testset。
```
本 书 介绍 了 中国 经济 发展 的 内外 平衡 问题 、 亚洲 金融 危机 十 周年 回顾 与 反思 、 实践 中 的 城乡 统筹 发展 、 未来 十 年 中国 需要 研究 的 重大 课题 、 科学 发展 与 新型 工业 化 等 方面 。
......@@ -51,7 +49,7 @@ export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7
1. 下载ELMO Paddle官方发布Checkout文件
PaddlePaddle官方发布Checkout文件下载地址[https://dureader.gz.bcebos.com/elmo/elmo_chinese_checkpoint.tar.gz]
[PaddlePaddle官方发布Checkout文件下载地址](https://dureader.gz.bcebos.com/elmo/elmo_chinese_checkpoint.tar.gz)
2. 在train部分中加载ELMO checkpoint文件
......@@ -89,4 +87,4 @@ word_embedding=layers.concat(input=[elmo_enc, word_embedding], axis=1)
## 参考论文
《Deep contextualized word representations》[https://arxiv.org/abs/1802.05365]
[Deep contextualized word representations](https://arxiv.org/abs/1802.05365)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册