初始化项目,由ModelHub XC社区提供模型
Model: BGI-HangzhouAI/Genos-m Source: Original Platform
This commit is contained in:
55
.gitattributes
vendored
Normal file
55
.gitattributes
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.arrow filter=lfs diff=lfs merge=lfs -text
|
||||
*.bin filter=lfs diff=lfs merge=lfs -text
|
||||
*.bin.* filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.ftz filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.h5 filter=lfs diff=lfs merge=lfs -text
|
||||
*.joblib filter=lfs diff=lfs merge=lfs -text
|
||||
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
||||
*.model filter=lfs diff=lfs merge=lfs -text
|
||||
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
||||
*.onnx filter=lfs diff=lfs merge=lfs -text
|
||||
*.ot filter=lfs diff=lfs merge=lfs -text
|
||||
*.parquet filter=lfs diff=lfs merge=lfs -text
|
||||
*.pb filter=lfs diff=lfs merge=lfs -text
|
||||
*.pt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pth filter=lfs diff=lfs merge=lfs -text
|
||||
*.rar filter=lfs diff=lfs merge=lfs -text
|
||||
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
||||
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
||||
*.tflite filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zstandard filter=lfs diff=lfs merge=lfs -text
|
||||
*.tfevents* filter=lfs diff=lfs merge=lfs -text
|
||||
*.db* filter=lfs diff=lfs merge=lfs -text
|
||||
*.ark* filter=lfs diff=lfs merge=lfs -text
|
||||
**/*ckpt*data* filter=lfs diff=lfs merge=lfs -text
|
||||
**/*ckpt*.meta filter=lfs diff=lfs merge=lfs -text
|
||||
**/*ckpt*.index filter=lfs diff=lfs merge=lfs -text
|
||||
|
||||
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
||||
*.gguf* filter=lfs diff=lfs merge=lfs -text
|
||||
*.ggml filter=lfs diff=lfs merge=lfs -text
|
||||
*.llamafile* filter=lfs diff=lfs merge=lfs -text
|
||||
*.pt2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
||||
*.npy filter=lfs diff=lfs merge=lfs -text
|
||||
*.npz filter=lfs diff=lfs merge=lfs -text
|
||||
*.pickle filter=lfs diff=lfs merge=lfs -text
|
||||
*.pkl filter=lfs diff=lfs merge=lfs -text
|
||||
*.tar filter=lfs diff=lfs merge=lfs -text
|
||||
*.wasm filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
||||
|
||||
model-00001-of-00004.safetensors filter=lfs diff=lfs merge=lfs -text
|
||||
|
||||
model-00002-of-00004.safetensors filter=lfs diff=lfs merge=lfs -text
|
||||
|
||||
model-00003-of-00004.safetensors filter=lfs diff=lfs merge=lfs -text
|
||||
|
||||
model-00004-of-00004.safetensors filter=lfs diff=lfs merge=lfs -text
|
||||
53
README.md
Normal file
53
README.md
Normal file
@@ -0,0 +1,53 @@
|
||||
---
|
||||
license: apache-2.0
|
||||
language:
|
||||
- dna
|
||||
tags:
|
||||
- biology
|
||||
- genomics
|
||||
- microbe
|
||||
- dna-language-model
|
||||
- mixture-of-experts
|
||||
- metagenomics
|
||||
library_name: transformers
|
||||
---
|
||||
|
||||
# Genos-m
|
||||
|
||||
Genos-m is a foundation model for human-associated microbial genomes. It is trained to model microbial DNA sequences at single-nucleotide resolution and supports ultra-long genomic contexts up to one million tokens.
|
||||
|
||||
For instructions, details, benchmarks, and examples, please refer to Genos-m GitHub and paper.
|
||||
## Model Specification
|
||||
|
||||
| Specification | Genos-m-4.7B |
|
||||
| --- | --- |
|
||||
| Total parameters | 4.7B |
|
||||
| Activated parameters | 0.33B |
|
||||
| Architecture type | MoE |
|
||||
| Number of experts | 32 |
|
||||
| Selected experts per token | 2 |
|
||||
| Number of layers | 12 |
|
||||
| Attention hidden size | 1024 |
|
||||
| Number of attention heads | 16 |
|
||||
| Query groups | 8 |
|
||||
| MoE hidden size per expert | 4096 |
|
||||
| Vocabulary size | 128 padded |
|
||||
| Context length | up to 1M |
|
||||
| Training objective | next-token prediction |
|
||||
|
||||
## Training Data
|
||||
|
||||
Genos-m was pretrained on curated microbial genome resources, including GTDB R220 representative prokaryotic genomes, public human-associated microbial genomes, in-house high-quality human gut MAGs, and UHGV human gut phage genomes. The final pre-training corpus contains approximately 1.2T tokens and covers 186 phyla, 3,448 families, and 69,056 species. Within this corpus, the retained human-associated prokaryotic subset covers 45 phyla, 585 families, and 12,273 species across major human microbial habitats, including the gut, oral cavity, skin, respiratory tract, and female reproductive tract.
|
||||
|
||||
## Checkpoints
|
||||
|
||||
- HF-Transformers checkpoint: [BGI-HangzhouAI/Genos-m-4.7B](https://huggingface.co/BGI-HangzhouAI/Genos-m-4.7B)
|
||||
- Megatron-LM checkpoint: [BGI-HangzhouAI/Genos-m-Megatron-4.7B](https://huggingface.co/BGI-HangzhouAI/Genos-m-Megatron-4.7B)
|
||||
|
||||
## License
|
||||
|
||||
Genos-m model and code are released under the Apache License 2.0.
|
||||
|
||||
## Contact
|
||||
|
||||
For questions and suggestions, please open an issue.
|
||||
33
config.json
Normal file
33
config.json
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"architectures": [
|
||||
"MixtralForCausalLM"
|
||||
],
|
||||
"attention_dropout": 0.0,
|
||||
"bos_token_id": 1,
|
||||
"dtype": "float32",
|
||||
"eos_token_id": 2,
|
||||
"head_dim": null,
|
||||
"hidden_act": "silu",
|
||||
"hidden_size": 1024,
|
||||
"initializer_range": 0.02,
|
||||
"intermediate_size": 4096,
|
||||
"iter": 213247,
|
||||
"max_position_embeddings": 1048576,
|
||||
"model_type": "mixtral",
|
||||
"num_attention_heads": 16,
|
||||
"num_experts_per_tok": 2,
|
||||
"num_hidden_layers": 12,
|
||||
"num_key_value_heads": 8,
|
||||
"num_local_experts": 32,
|
||||
"output_router_logits": false,
|
||||
"pad_token_id": 3,
|
||||
"rms_norm_eps": 1e-05,
|
||||
"rope_theta": 50000000,
|
||||
"router_aux_loss_coef": 0.01,
|
||||
"router_jitter_noise": 0.0,
|
||||
"sliding_window": null,
|
||||
"tie_word_embeddings": false,
|
||||
"transformers_version": "4.56.2",
|
||||
"use_cache": true,
|
||||
"vocab_size": 256
|
||||
}
|
||||
1
configuration.json
Normal file
1
configuration.json
Normal file
@@ -0,0 +1 @@
|
||||
{"framework": "pytorch", "task": "text-generation", "allow_remote": true}
|
||||
7
generation_config.json
Normal file
7
generation_config.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"_from_model_config": true,
|
||||
"bos_token_id": 1,
|
||||
"eos_token_id": 2,
|
||||
"pad_token_id": 3,
|
||||
"transformers_version": "4.56.2"
|
||||
}
|
||||
3
model-00001-of-00004.safetensors
Normal file
3
model-00001-of-00004.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4ad16e0bfc2df35e298be4f968becfcf4d751ce67e58d05f554a9ff0ea6b5078
|
||||
size 4984471728
|
||||
3
model-00002-of-00004.safetensors
Normal file
3
model-00002-of-00004.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:47056b11ecccc1061cacb0b34e62146220021e2ae72777a32ec495398ebd852b
|
||||
size 4987485840
|
||||
3
model-00003-of-00004.safetensors
Normal file
3
model-00003-of-00004.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:dd3ec47a1ff0f35fe81c34cca1a4b14a03f2fa3b4c72417fa331c5d05e26d5a8
|
||||
size 4987485840
|
||||
3
model-00004-of-00004.safetensors
Normal file
3
model-00004-of-00004.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c134a2a5b60482c81fc5ee1b6e8470da342456068045555bcbf48b9b52b91e02
|
||||
size 4522836008
|
||||
1247
model.safetensors.index.json
Normal file
1247
model.safetensors.index.json
Normal file
File diff suppressed because it is too large
Load Diff
12
special_tokens_map.json
Normal file
12
special_tokens_map.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"additional_special_tokens": [
|
||||
"<EOD>"
|
||||
],
|
||||
"bos_token": "<s>",
|
||||
"cls_token": "<CLS>",
|
||||
"eos_token": "</s>",
|
||||
"mask_token": "<MASK>",
|
||||
"pad_token": "<pad>",
|
||||
"sep_token": "<SEP>",
|
||||
"unk_token": "<unk>"
|
||||
}
|
||||
158
tokenizer.json
Normal file
158
tokenizer.json
Normal file
@@ -0,0 +1,158 @@
|
||||
{
|
||||
"version": "1.0",
|
||||
"truncation": null,
|
||||
"padding": null,
|
||||
"added_tokens": [
|
||||
{
|
||||
"id": 0,
|
||||
"content": "<unk>",
|
||||
"single_word": false,
|
||||
"lstrip": false,
|
||||
"rstrip": false,
|
||||
"normalized": false,
|
||||
"special": true
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"content": "<s>",
|
||||
"single_word": false,
|
||||
"lstrip": false,
|
||||
"rstrip": false,
|
||||
"normalized": false,
|
||||
"special": true
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"content": "</s>",
|
||||
"single_word": false,
|
||||
"lstrip": false,
|
||||
"rstrip": false,
|
||||
"normalized": false,
|
||||
"special": true
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"content": "<pad>",
|
||||
"single_word": false,
|
||||
"lstrip": false,
|
||||
"rstrip": false,
|
||||
"normalized": false,
|
||||
"special": true
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"content": "<mask>",
|
||||
"single_word": false,
|
||||
"lstrip": false,
|
||||
"rstrip": false,
|
||||
"normalized": false,
|
||||
"special": true
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"content": "<cls>",
|
||||
"single_word": false,
|
||||
"lstrip": false,
|
||||
"rstrip": false,
|
||||
"normalized": false,
|
||||
"special": true
|
||||
},
|
||||
{
|
||||
"id": 14,
|
||||
"content": "<sep>",
|
||||
"single_word": false,
|
||||
"lstrip": false,
|
||||
"rstrip": false,
|
||||
"normalized": false,
|
||||
"special": true
|
||||
},
|
||||
{
|
||||
"id": 16,
|
||||
"content": "<eod>",
|
||||
"single_word": false,
|
||||
"lstrip": false,
|
||||
"rstrip": false,
|
||||
"normalized": false,
|
||||
"special": true
|
||||
}
|
||||
],
|
||||
"normalizer": null,
|
||||
"pre_tokenizer": null,
|
||||
"post_processor": null,
|
||||
"decoder": null,
|
||||
"model": {
|
||||
"type": "Unigram",
|
||||
"unk_id": 0,
|
||||
"vocab": [
|
||||
[
|
||||
"<unk>",
|
||||
0.0
|
||||
],
|
||||
[
|
||||
"<s>",
|
||||
0.0
|
||||
],
|
||||
[
|
||||
"</s>",
|
||||
0.0
|
||||
],
|
||||
[
|
||||
"<pad>",
|
||||
0.0
|
||||
],
|
||||
[
|
||||
"<mask>",
|
||||
0.0
|
||||
],
|
||||
[
|
||||
"C",
|
||||
0.0
|
||||
],
|
||||
[
|
||||
"G",
|
||||
0.0
|
||||
],
|
||||
[
|
||||
"T",
|
||||
0.0
|
||||
],
|
||||
[
|
||||
"A",
|
||||
0.0
|
||||
],
|
||||
[
|
||||
"N",
|
||||
0.0
|
||||
],
|
||||
[
|
||||
"@",
|
||||
0.0
|
||||
],
|
||||
[
|
||||
"#",
|
||||
0.0
|
||||
],
|
||||
[
|
||||
"U",
|
||||
0.0
|
||||
],
|
||||
[
|
||||
"<cls>",
|
||||
0.0
|
||||
],
|
||||
[
|
||||
"<sep>",
|
||||
0.0
|
||||
],
|
||||
[
|
||||
"▁",
|
||||
0.0
|
||||
],
|
||||
[
|
||||
"<eod>",
|
||||
0.0
|
||||
]
|
||||
],
|
||||
"byte_fallback": false
|
||||
}
|
||||
}
|
||||
82
tokenizer_config.json
Normal file
82
tokenizer_config.json
Normal file
@@ -0,0 +1,82 @@
|
||||
{
|
||||
"added_tokens_decoder": {
|
||||
"0": {
|
||||
"content": "<unk>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"1": {
|
||||
"content": "<s>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"2": {
|
||||
"content": "</s>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"3": {
|
||||
"content": "<pad>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"4": {
|
||||
"content": "<mask>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"13": {
|
||||
"content": "<cls>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"14": {
|
||||
"content": "<sep>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"16": {
|
||||
"content": "<eod>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
}
|
||||
},
|
||||
"additional_special_tokens": [
|
||||
"<eod>"
|
||||
],
|
||||
"bos_token": "<s>",
|
||||
"clean_up_tokenization_spaces": false,
|
||||
"cls_token": "<cls>",
|
||||
"eos_token": "</s>",
|
||||
"extra_special_tokens": {},
|
||||
"mask_token": "<mask>",
|
||||
"model_max_length": 1000000000000000019884624838656,
|
||||
"pad_token": "<pad>",
|
||||
"sep_token": "<sep>",
|
||||
"tokenizer_class": "PreTrainedTokenizer",
|
||||
"unk_token": "<unk>"
|
||||
}
|
||||
Reference in New Issue
Block a user