Code Monkey home page Code Monkey logo

Comments (1)

yym6472 avatar yym6472 commented on July 29, 2024

Since the sentence-transformers library supports training with CPU only, our main.py can also run under the CPU-only setting.

To run without GPU, try:

  1. Prepare conda virtual environment and install the required libraries:
    conda create -n consert-cpuonly python=3.6  # create virtual environment
    conda install pytorch=1.6 cpuonly  # install pytorch-cpu
    pip install transformers==3.4.0 sentence-transformers==0.3.9 tensorboardX==2.1 pandas==1.1.5 sentencepiece==0.1.85 matplotlib  # install other dependencies
    
  2. Download the data and pre-trained language model (detailed in README.md)
  3. Run the script as in README.md, but without --use_apex_amp and --apex_amp_opt_level O1 arguments:
    python3 main.py --no_pair --seed 1 --batch_size 96 --max_seq_length 64 --evaluation_steps 200 --add_cl --cl_loss_only --cl_rate 0.15 --temperature 0.1 --learning_rate 0.0000005 --train_data stssick --num_epochs 10 --da_final_1 feature_cutoff --da_final_2 shuffle --cutoff_rate_final_1 0.2 --model_name_or_path ./bert-base-uncased/ --model_save_path ./output/unsup-base-feature_cutoff-shuffle --force_del --no_dropout --patience 10
    

from consert.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.