Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
## bert-from-bertclip-chinese pretrained model
|
2 |
+
该预训练权重是从BertCLIP预训练模型中单独取出来的Bert的权重,BertCLIP是中文版本的CLIP预训练模型,基于LiT-tuning(Locked-image Text tuning)的策略,
|
3 |
+
使用140万中文图文对数据进行多模态对比学习预训练。
|
4 |
+
|
5 |
+
Github: [CLIP-Chinese](https://github.com/yangjianxin1/CLIP-Chinese)
|
6 |
+
|
7 |
+
Bolg: [CLIP-Chinese:中文多模态对比学习CLIP预训练模型]()
|
8 |
+
|
9 |
+
## Usage
|
10 |
+
可以直接使用Huggingface的BertModel直接加载该预训练权重,进行下游的任务。
|
11 |
+
|
12 |
+
```python
|
13 |
+
from transformers import BertTokenizer, BertModel
|
14 |
+
|
15 |
+
model_name_or_path = 'YeungNLP/bert-from-clip-chinese-1M'
|
16 |
+
tokenizer = BertTokenizer.from_pretrained(model_name_or_path)
|
17 |
+
model = BertModel.from_pretrained(model_name_or_path)
|
18 |
+
```
|