GERM
收藏资源简介:
GERM是一个具有强大压缩性能和快速适应性的基因组基础模型,旨在解决计算资源稀缺的挑战。该模型通过消除影响低秩适应和后训练量化的异常值来提高效率和鲁棒性。通过在预训练和微调过程中去除异常值,GERM加快了适应速度,降低了计算成本,并增强了量化鲁棒性。此外,GERM-T策略在异常值免费框架内采用小步持续学习,利用原始检查点避免从头开始重新训练。实验结果表明,GERM在微调方面比基线模型提高了37.98%,在量化方面提高了64.34%,平均峰度降低了92.14%,最大无穷范数降低了82.77%。与领先的方法相比,GERM始终提供卓越的性能,为资源受限环境中的基因组建模提供了一个实用的解决方案。
GERM is a genomic foundation model with strong compression performance and rapid adaptability, designed to address the challenge of scarce computational resources. This model enhances efficiency and robustness by eliminating outliers that impede low-rank adaptation and post-training quantization. By removing outliers during both pre-training and fine-tuning stages, GERM accelerates adaptation speed, reduces computational costs, and boosts quantization robustness. Furthermore, the GERM-T strategy adopts small-step continuous learning within the outlier-free framework, utilizing original checkpoints to avoid retraining from scratch. Experimental results demonstrate that GERM outperforms baseline models by 37.98% in fine-tuning, 64.34% in quantization tasks, achieves a 92.14% reduction in average kurtosis, and an 82.77% reduction in maximum infinity norm. Compared with state-of-the-art methods, GERM consistently delivers superior performance, offering a practical solution for genomic modeling in resource-constrained environments.
GERM 数据集概述
1. 数据集简介
- 名称:GERM (Genomic Foundation Model)
- 目的:提升基因组分析的效率和适应性
- 基础模型:基于DNABERT-2构建
- 核心创新:
- 采用无异常值层替代标准注意力机制
- 改进低秩适应和量化鲁棒性
- 集成QLoRA和LoFTQ进行高效低秩适应
- 结合异常值抑制、OmniQuant和SmoothQuant实现稳健量化
2. 数据集内容
- 官方实现:包含论文《Fast and Low-Cost Genomic Foundation Models via Outlier Removal》的官方实现
- 量化适配:
outlier_suppressionomniquantsmoothquant
- 微调代码:
- 全微调
- LoRA
- QLoRA
- LoftQ
- 预训练代码:
- 标准预训练
- 无异常值预训练
- 异常值测试代码:包含测试异常值的脚本和工具
3. 环境配置
- Python版本:3.8
- 安装命令: bash conda create -n germ python=3.8 conda activate germ pip install -r requirements.txt
4. 预训练
-
无异常值预训练: bash torchrun --nproc_per_node=4 run_mlm.py [参数列表]
-
标准预训练: bash sh run_pretrain.sh
5. 微调
-
全微调: bash sh finetune/scripts/full/run.sh
-
LoRA: bash sh finetune/scripts/lora/run.sh
-
QLoRA: bash sh finetune/scripts/qlora4/run.sh
-
LoftQ: bash sh finetune/scripts/loftq/run.sh
6. 量化方法
-
outlier_suppression:
- 配置文件:
config.yaml - 运行命令: bash cd outlier_suppression/exp/bert_ptq/twc_fine_gamma/dnabert sh run.sh
- 配置文件:
-
Smoothquant:
-
生成激活尺度: bash cd smoothquant/examples sh act_pipe.sh
-
执行量化: bash sh ppl_pipe.sh
-
-
Omniquant:
-
获取尺度和偏移: bash cd omniquant/OmniQuant/scripts sh act_pipe.sh
-
执行量化: bash sh run.sh
-
7. 评估
-
运行命令: bash sh run.sh
-
量化选项:
--n_bits n--n_bits_act n--quantize
8. 引用
-
引用格式:
to be filled
9. 致谢
- DNABERT-2
- HyenaDNA
- SmoothQuant
- OutEffHop
- OmniQuant
- Outlier Suppression
- LoftQ
- Nucleotide Transformers

- 1Fast and Low-Cost Genomic Foundation Models via Outlier Removal西北大学 · 2025年



