transformers icon indicating copy to clipboard operation
transformers copied to clipboard

fp16 is not work

Open zsk423200 opened this issue 7 years ago • 1 comments

GPU:v100

run run_glue.py with the command in the README:

python ./examples/run_glue.py \
    --model_type bert \
    --model_name_or_path bert-base-uncased \
    --task_name $TASK_NAME \
    --do_train \
    --do_eval \
    --do_lower_case \
    --data_dir $GLUE_DIR/$TASK_NAME \
    --max_seq_length 128 \
    --per_gpu_eval_batch_size=8   \
    --per_gpu_train_batch_size=8   \
    --learning_rate 2e-5 \
    --num_train_epochs 3.0 \
    --output_dir /tmp/$TASK_NAME/

and i also run with --fp16, but spend the same time and gpu memory, why fp16 does not work

zsk423200 avatar Jul 23 '19 11:07 zsk423200

Duplicate of #868

thomwolf avatar Jul 23 '19 15:07 thomwolf