Coder Social home page Coder Social logo

msp's Introduction

First, you need to download the corresponding model from Hugging Face and store it in the ./model folder. Then, modify the model path in the files fewshot.py and openprompt/pipline_base.py.

Example shell scripts:

python fewshot.py --result_file ./output_fewshot.txt --dataset cn_clickbait --template_id 0 --seed 123 --shot 10 --verbalizer manual

You can also run the entire model by executing autorun.py:

python autorun.py

To Run with Your Own Dataset

  1. Format your dataset to match the style we provided and split it into training and testing sets.
  2. In the scripts/TextClassification directory, create the necessary files, including verbalizer.txt and template.txt, following our examples. Please ensure the categories in the verbalizer.txt file match those in your dataset.
  3. Modify openprompt/data_utils/text_classification_dataset.py according to the data processing functions we provided.

Our dataset is stored in /datasets/TextClassification, but due to the large number of images, we are unable to upload the entire dataset to GitHub. If you need the complete dataset, please contact me via email, and I will send it to you through other means. My email is: [email protected]

msp's People

Watchers

 avatar

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.