DNAMotifTokenizer is a tokenizer designed for DNA sequence modeling. Unlike traditional k-mer tokenizers that rely on fixed-length subwords, this tokenizer incorporates motif-level information to preserve biologically meaningful units in DNA. By aligning tokenization with biological motifs, the model aims to improve the interpretability and biological awareness of downstream genomic language models.
1from transformers import AutoTokenizer, AutoModel
2model_name = 'Anonymous-843q0u4q08/DNAMotifTokenizer'
3model = AutoModel.from_pretrained(model_name)
1python run_pretrain_nocache_wandb.py \
2 --output_dir $output \
3 --model_type=motifBert \
4 --tokenizer_name=motif \
5 --config_name=$config_dir/config.json \
6 --project_name=DNAMotifTokenizer \
7 --do_train \
8 --train_data_file=None \
9 --train_data_path=${data_dir} \
10 --train_data_prefix=all_tokenized_train_ \
11 --do_eval \
12 --eval_data_file=${data_dir}/all_tokenized_val_00.txt \
13 --mlm \
14 --gradient_accumulation_steps 1 \
15 --per_gpu_train_batch_size 96 \
16 --per_gpu_eval_batch_size 96 \
17 --save_steps 1000 \
18 --save_total_limit 10 \
19 --max_steps 200000 \
20 --evaluate_during_training \
21 --logging_steps 1000 \
22 --line_by_line \
23 --learning_rate 4e-5 \
24 --block_size 512 \
25 --adam_epsilon 1e-6 \
26 --weight_decay 0.01 \
27 --beta1 0.9 \
28 --beta2 0.98 \
29 --mlm_probability 0.15 \
30 --warmup_steps 10000 \
31 --n_process 8 \
32 --overwrite_output_dir