update
Browse files- README.md +28 -0
- config.json +28 -0
- flax_model.msgpack +3 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +1 -0
- tokenizer_config.json +1 -0
- vocab.txt +0 -0
README.md
CHANGED
@@ -1,3 +1,31 @@
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
---
|
4 |
+
|
5 |
+
|
6 |
+
|
7 |
+
|
8 |
+
|
9 |
+
|
10 |
+
|
11 |
+
[千言—AdvertiseGen广告文案生成数据集](https://www.luge.ai/#/luge/dataDetail?id=9)
|
12 |
+
|
13 |
+
> 仅支持.bin(pytorch)
|
14 |
+
|
15 |
+
在该千言数据集微调了5个epoch,
|
16 |
+
|
17 |
+
```python
|
18 |
+
input_text = '类型#裙*材质#针织*风格#简约*风格#青春*风格#清新*风格#性感*图案#条纹*图案#撞色*裙下摆#开叉*裙长#连衣裙*裙款式#拼接*裙款式#吊带'
|
19 |
+
|
20 |
+
output_text = gen_ads(input_text)
|
21 |
+
output_text = output_text.replace(' ', '')
|
22 |
+
output_text = output_text[len(input_text):]
|
23 |
+
output_text
|
24 |
+
```
|
25 |
+
|
26 |
+
输出
|
27 |
+
|
28 |
+
```python
|
29 |
+
output_text='夏天穿的针织衫,搭配简约上衣+牛仔裙,一下子就活泼起来了好吧,就这么简约的蓝色衬托出女性优雅的气质,搭出一派优雅女人味,让人印象深刻哦~好了,今天是秋天来了,天气凉了,是不是该穿上针织呢,秋天会是一个充满阳光的日子呢?让我们一起去看看今天的穿搭吧!首先是白色风衣,其次是棉质风衣。在秋天我们应该穿丝缎或者花边,这种比较清新的风格一定不会让人觉得很成熟,而且又是简约款式,显得自然、有气质。再就是皮草风衣啦,一件白皮草+一件牛仔+两件棉纱的搭配就很潮'
|
30 |
+
```
|
31 |
+
|
config.json
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"activation_function": "gelu_new",
|
3 |
+
"architectures": [
|
4 |
+
"GPT2LMHeadModel"
|
5 |
+
],
|
6 |
+
"attn_pdrop": 0.1,
|
7 |
+
"embd_pdrop": 0.1,
|
8 |
+
"gradient_checkpointing": false,
|
9 |
+
"initializer_range": 0.02,
|
10 |
+
"layer_norm_epsilon": 1e-05,
|
11 |
+
"model_type": "gpt2",
|
12 |
+
"n_ctx": 1024,
|
13 |
+
"n_embd": 768,
|
14 |
+
"n_head": 12,
|
15 |
+
"n_inner": null,
|
16 |
+
"n_layer": 12,
|
17 |
+
"n_positions": 1024,
|
18 |
+
"output_past": true,
|
19 |
+
"resid_pdrop": 0.1,
|
20 |
+
"task_specific_params": {
|
21 |
+
"text-generation": {
|
22 |
+
"do_sample": true,
|
23 |
+
"max_length": 320
|
24 |
+
}
|
25 |
+
},
|
26 |
+
"tokenizer_class": "BertTokenizer",
|
27 |
+
"vocab_size": 21128
|
28 |
+
}
|
flax_model.msgpack
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4666386645774dbe82957ac3fab025e49604413933736ddba622dd1ed27907fc
|
3 |
+
size 408279832
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:eb49f34ea90374c1870748c82e41542fc65b28a2a383577d30b7e81e392f4c06
|
3 |
+
size 420920105
|
special_tokens_map.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]"}
|
tokenizer_config.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"do_lower_case": false, "unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]", "tokenize_chinese_chars": true, "strip_accents": null, "model_max_length": 1024}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|