shibing624 / text2vec

text2vec, text to vector. 文本向量表征工具,把文本转化为向量矩阵,实现了Word2Vec、RankBM25、Sentence-BERT、CoSENT等文本表征、文本相似度计算模型,开箱即用。
https://pypi.org/project/text2vec/
Apache License 2.0
4.39k stars 392 forks source link

Text Matching task: error: unrecognized arguments: --fp16 #119

Closed rangehow closed 1 year ago

rangehow commented 1 year ago

Describe the Question

求助,在readme的脚本里我看到了一个CUDA_VISIBLE_DEVICES=0,1 torchrun --nproc_per_node 2 training_sup_text_matching_model_mydata.py --do_train --do_predict --output_dir outputs/STS-B-text2vec-macbert-v1 --batch_size 64 --fp16 --data_parallel 但是当我运行这个指令的时候,--fp16弹出了错误,如题所示,应该怎么解决呢?

shibing624 commented 1 year ago

fixed,如果GPU机器支持bf16,可以加上bf16的参数。