Skip to content

最好还是配上对应的json #1

Closed
@bojone

Description

@bojone

解压后发现没有json文件,而不少框架都是根据json文件来读取模型基本结构的,建议还是配上。

比如small版

{
  "attention_probs_dropout_prob": 0.1,
  "directionality": "bidi",
  "hidden_act": "gelu",
  "hidden_dropout_prob": 0.1,
  "hidden_size": 256,
  "initializer_range": 0.02,
  "intermediate_size": 1024,
  "max_position_embeddings": 512,
  "num_attention_heads": 4,
  "num_hidden_layers": 12,
  "pooler_fc_size": 768,
  "pooler_num_attention_heads": 12,
  "pooler_num_fc_layers": 3,
  "pooler_size_per_head": 128,
  "pooler_type": "first_token_transform",
  "type_vocab_size": 2,
  "vocab_size": 21128,
  "embedding_size": 128
}

还有,不知道为啥ckpt的命名不加上ckpt...

最后,最新版bert4keras(0.6.4)已经能加载electra了,只需要在build_transformer_model里边传入model='electra',欢迎用bert4keras调用哈哈~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions