lixiangchun commited on
Commit
3910ab9
·
1 Parent(s): cc5b5fa

commit from lixc

Browse files
Files changed (3) hide show
  1. README.md +16 -0
  2. config.json +26 -0
  3. pytorch_model.bin +3 -0
README.md ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ ```python
4
+ from transformers import PreTrainedTokenizerFast, BertForMaskedLM
5
+ tokenizer = PreTrainedTokenizerFast.from_pretrained("lixiangchun/transcriptome_iseeek_13millioncells_128tokens")
6
+ iseeek = BertForMaskedLM.from_pretrained("lixiangchun/transcriptome_iseeek_13millioncells_128tokens")
7
+
8
+ a = ["B2M MTRNR2L8 UBC FOS TMSB4X UBB FTH1 IFITM1 TPT1 FTL DUSP1", "KRT14 MTRNR2L8 KRT6A B2M GAPDH S100A8 S100A9 KRT5"]
9
+ batch = tokenizer(a, max_length=128, truncation=True, padding=True, return_tensors="pt")
10
+ out = iseeek.bert(**batch)
11
+
12
+ # [CLS] representation
13
+ feature = last_hidden_state[:,0,:]
14
+
15
+ ```
16
+
config.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "/mnt/ssd2/ai/gene_expression/bert/bert_gene_mlm",
3
+ "architectures": [
4
+ "BertForMaskedLM"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "classifier_dropout": null,
8
+ "gradient_checkpointing": false,
9
+ "hidden_act": "gelu",
10
+ "hidden_dropout_prob": 0.1,
11
+ "hidden_size": 576,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 1536,
14
+ "layer_norm_eps": 1e-12,
15
+ "max_position_embeddings": 384,
16
+ "model_type": "bert",
17
+ "num_attention_heads": 8,
18
+ "num_hidden_layers": 8,
19
+ "pad_token_id": 3,
20
+ "position_embedding_type": "absolute",
21
+ "torch_dtype": "float32",
22
+ "transformers_version": "4.10.0",
23
+ "type_vocab_size": 2,
24
+ "use_cache": true,
25
+ "vocab_size": 20706
26
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fc8f82423612e372ddcd26ead16df7b2543749e7569b3d455c0e4793fe7ac548
3
+ size 149381452