Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
models
提交
62eedcf2
M
models
项目概览
PaddlePaddle
/
models
大约 2 年 前同步成功
通知
232
Star
6828
Fork
2962
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
602
列表
看板
标记
里程碑
合并请求
255
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
models
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
602
Issue
602
列表
看板
标记
里程碑
合并请求
255
合并请求
255
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
62eedcf2
编写于
12月 09, 2020
作者:
Z
Zeyu Chen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update readme
上级
cc9c0c25
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
23 addition
and
7 deletion
+23
-7
PaddleNLP/README.md
PaddleNLP/README.md
+23
-7
未找到文件。
PaddleNLP/README.md
浏览文件 @
62eedcf2
...
@@ -37,36 +37,52 @@ pip install paddlenlp==2.0.0a
...
@@ -37,36 +37,52 @@ pip install paddlenlp==2.0.0a
### Quick Dataset Loading
### Quick Dataset Loading
```
python
```
python
train_ds
,
test_ds
=
paddlenlp
.
datasets
.
ChnSentiCorp
.
get_datasets
([
'train'
,
'test'
])
from
paddlenlp.datasets
import
ChnSentiCrop
train_ds
,
test_ds
=
ChnSentiCorp
.
get_datasets
([
'train'
,
'test'
])
```
```
###
Reusable Text Emebd
ding
###
Chinese Text Emebdding Loa
ding
```
python
```
python
from
paddlenlp.embeddings
import
TokenEmbedding
from
paddlenlp.embeddings
import
TokenEmbedding
wordemb
=
TokenEmbedding
(
"word2vec.baike.300d"
)
wordemb
=
TokenEmbedding
(
"word2vec.baike.300d"
)
print
(
wordemb
.
search
(
"中国"
))
print
(
wordemb
.
search
(
"中国"
))
>>>
[
0.260801
0.1047
0.129453
...
0.096542
0.0092513
]
>>>
[
0.260801
,
0.1047
,
0.129453
...
0.096542
,
0.0092513
]
```
### One-Line Classical Model Building
```
python
from
paddlenlp.models
import
Ernie
ernie
=
Ernie
(
Ernie
.
Task
.
SeqCls
)
ernie
.
forward
(
input_ids
,
segment_ids
)
```
```
###
High Quality Chinsese Pre-trained Model
###
Rich Chinsese Pre-trained Models
```
python
```
python
from
paddlenlp.transformers
import
ErnieModel
from
paddlenlp.transformers
import
ErnieModel
,
BertModel
,
RobertaModel
,
ElectraModel
ernie
=
ErnieModel
.
from_pretrained
(
"ernie"
)
ernie
=
ErnieModel
.
from_pretrained
(
'ernie-1.0'
)
sequence_output
,
pooled_output
=
ernie
.
forward
(
input_ids
,
segment_ids
)
bert
=
BertModel
.
from_pretrained
(
'bert-wwm-ext-large'
)
electra
=
ElectraModel
.
from_pretrained
(
'eclectra-chinese'
)
roberta
=
RobertaModel
.
from_pretrained
(
'roberta-wwm-ext'
)
```
```
For more pretrained model selection, please refer to
[
PretrainedModels
](
./paddlenlp/transformers/README.md
)
## Tutorials
## Tutorials
List our notebook tutorials based on AI Studio.
List our notebook tutorials based on AI Studio.
TBD
## Community
## Community
*
SIG for Pretrained Model Contribution
*
SIG for Pretrained Model Contribution
*
SIG for Dataset Integration
*
SIG for Dataset Integration
TBD
## FAQ
## FAQ
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录