Git Product home page Git Product logo

glm-iprompt's Introduction

GLM-iprompt

Apply Iprompt on GLM with innovative new methods!

Currently support Chinese QA, English QA (Open Domain) and Chinese poem generation.

Preparation

make sure you have installed necessary packages like Pytorch and SwissArmyTransformer (and maybe others like jsonlines).

pip install SwissArmyTransformer==0.1.2

Run (Assuming using GPU:0)

Chinese QA:

bash generate_qa.sh config/model_glm_10B_chinese.sh 0

Chinese poem:

bash generate_pms_iprompt.sh config/model_glm_10B_chinese.sh 0

English QA:

bash generate_qa_eng.sh config/model_glm_10B.sh 0

Please set up the path of the model correctly in config.

Download Pretrained Models

Model(English): See GLM repo (https://github.com/THUDM/GLM) The 10b model gives the best performance on a single gpu.

Model(Chinese): Please contact [email protected] to apply. The 10b model gives the best performance on a single gpu.

Update(1.21,2021): Poem-specific model is now available. Please contact [email protected] to apply.

English Sample:

  Question: What causes the fall of Rome?
  Answer: Economic/Financial collapse and invasion by Huns.
  Question: What causes the fall of USA?
  Answer: 
  The cause can be seen from the following graph. It shows that USA is in fact falling down. One should notice the change in USA's position over the last few decades, since these changes ultimately lead up to its eventual collapse! USA is typically at the center in 1960, has moved to North-West in 1980 and now to South East from 2003! In case when US begins to move South-Eastwards, it will become a threat for its enemies like Iran and Russia, and hence a great source of worry to USA itself. Hence the fear is clear at this point, on which both former superpower sides of world who semblance with Iran & China are hell-bent! So it can safely be said that forces which have been against USA have now begun to push USA in one direction or another and thus leading towards its ultimate fall!With the fall of Ukraine & bankruptcy of EU-stand, things are going to get worse & worse for USA as well. America is suffering from 'Chrysler syndrome-2', where the big brands deplete and breakdown rapidly! Thanks God that good old brains behind various schemes & efforts of self destruction (such as Obamacare) did not succeed! Without them 'Socialism Of The Absurd' would have taken place in USA a long back!

Analyses revealed that positions of lesson objects in relation retain for underlines lifetime much more than for courses! Thus America will continue to hold itself together as well as NZ seems to be capable till 2040! This indicates that only gradual fall of America will occur after that period. USA will lose some market share from China and come second to Europe in terms of GDP after 2030.

Question: How can I keep my hair strong?

Answer: 
  Hair care is not about preventing damage, but promoting strength and maintaining your natural shape.

Here are two tips to keep your hair strong: cleanse it and condition it. Regular deep conditioning of the scalp will help lock in moisture and eliminate frizz. And I generally recommend gentle shampoos with no harsh or drying ingredients such as alcohol, sodium lauryl sulfate or oils. Conditioning regularly with a rich moisturizing treatment will soothe any rough spots, improve shine and retain strength by retaining hair's inherent moisture - around 85% is lost due to over-styling.

These tips should only be used every couple of weeks - hair needs time to rebalance itself after regular cleansing. Each one of our products can detoxify the scalp for a month, and then lubricate it again in order keep it strong. For hair that is frizzy or lacks volume or itchy scalps use Vidal Sassoon's Advanced Deep Moisturizing Shampoo. It is the only salon-formulated shampoo to retain solace between strand breakage and breakage after intense styling and chemical treatments, stops splits and breaks when applied regularly to the scalp and hair, neutralize free radical organisms responsible for frequent ageing, restore the natural glow of hair and support oily/dry hair.

References

GLM:https://github.com/THUDM/GLM

All NLP Tasks Are Generation Tasks: A General Pretraining Framework

Zhengxiao Du, Yujie Qian, Xiao Liu, Ming Ding, Jiezhong Qiu, Zhilin Yang, Jie Tang

iPrompt: https://github.com/THUDM/iPrompt

Controllable Generation from Pre-Trained Language Models via Inverse Prompting

Xu Zou, Da Yin, Qingyang Zhong, Hongxia Yang, Zhilin Yang, Jie Tang

glm-iprompt's People

Contributors

aviczhl2 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.