Package: openchat
OpenChat: Easy to use opensource chatting framework via neural networks____   ____   ______ _   __   ______ __  __ ___   ______
  / __ \ / __ \ / ____// | / /  / ____// / / //   | /_  __/
 / / / // /_/ // __/  /  |/ /  / /    / /_/ // /| |  / /   
/ /_/ // ____// /___ / /|  /  / /___ / __  // ___ | / /    
\____//_/    /_____//_/ |_/   \____//_/ /_//_/  |_|/_/OpenChat is easy to use opensource chatting framework.OpenChat supports 40+ dialogue model based on neural networks.You can talk with AI withonly one line of code.Installationpip install openchatSupported ModelsOpenChat supports 40+ dialogue models based on neural networks.Use these names as parametermodel='name'when you createOpenChat.Click here if you want to check supported models.GPT-Neogptneo.smallgptneo.mediumgptneo.largegptneo.xlargeBlenderblender.smallblender.mediumblender.largeblender.xlargeblender.xxlargeDialoGPTdialogpt.smalldialogpt.mediumdialogpt.largeDodecathlondodecathlon.all_tasks_mtdodecathlon.convai2dodecathlon.wizard_of_wikipediadodecathlon.empathetic_dialoguesdodecathlon.eli5dodecathlon.redditdodecathlon.twitterdodecathlon.ubuntudodecathlon.image_chatdodecathlon.cornell_moviedodecathlon.light_dialogdodecathlon.daily_dialogRedditreddit.xlargereddit.xxlargeSafetysafety.offensivesafety.sensitiveUnlikelihoodunlikelihood.wizard_of_wikipedia.context_and_labelunlikelihood.wizard_of_wikipedia.contextunlikelihood.wizard_of_wikipedia.labelunlikelihood.convai2.context_and_labelunlikelihood.convai2.contextunlikelihood.convai2.labelunlikelihood.convai2.vocab.alpha.1e-0unlikelihood.convai2.vocab.alpha.1e-1unlikelihood.convai2.vocab.alpha.1e-2unlikelihood.convai2.vocab.alpha.1e-3unlikelihood.eli5.context_and_labelunlikelihood.eli5.contextunlikelihood.eli5.labelWizard of Wikipediawizard_of_wikipedia.end2end_generatorUsageJust import and create a object. That's all.>>>fromopenchatimportOpenChat>>>OpenChat(model="blender.medium",device="cpu")Set paramdevice='cuda'If you want to use GPU acceleration.>>>fromopenchatimportOpenChat>>>OpenChat(model="blender.medium",device="cuda")Set**kwargsif you want to change decoding options.method (str): one of["greedy", "beam", "top_k", "nucleus"],num_beams (int): size of beam searchtop_k (int): K value for top-k samplingtop_p: (float): P value for nucleus samplingno_repeat_ngram_size (int): beam search n-gram blocking size for removing repetition,length_penalty (float): length penalty (1.0=None, UP=Longer, DOWN=Shorter)Decoding options must bekeyword argumentnotpositional argument.>>>fromopenchatimportOpenChat>>>OpenChat(...model="blender.medium",...device="cpu",...method="top_k",...top_k=20,...no_repeat_ngram_size=3,...length_penalty=0.6,...)Forsafety.offensivemodel, parametermethodmust be one of["both", "string-match", "bert"]>>>fromopenchatimportOpenChat>>>OpenChat(...model="safety.offensive",...device="cpu"...method="both"# ---> both, string-match, bert...)Special Tasks1. GPT-NeoThe GPT-Neo model was released in the EleutherAI/gpt-neo repository.It is a GPT2 like causal language model trained on the Pile dataset.Openchat supports the above Prompt based dialogues via GPT-Neo.Below models provides custom prompt setting. (*means all models)gptneo.*2. ConvAI2ConvAI2 is one of the most famous conversational AI challenges about a persona.Openchat provides custom persona setting like above image.Below models provides custom perona setting. (*means all models)blender.*dodecathlon.convai2unlikelihood.convai2.*3. Wizard of WikipediaWizard of wikipedia is one of most famous knowledge grounded dialogue dataset.Openchat provides custom topic setting like above image.Below models provides custom topic setting. (*means all models)wizard_of_wikipedia.end2end_generatordodecathlon.wizard_of_wikipediaunlikelihood.wizard_of_wikipedia.*4. Safety AgentsOpenchat provides a dialog safety model to help you design conversation model.Below models provides dialog safety features.safety.offensive: offensive words classificationsafety.sensitive: sensitive topic classificationUpdate planOpenchat is not a finished, but a growing library.I plan to add the following features in the near future.Plan by versions.v1.0: Supporthuggingface transformersfor DialoGPT and Blender.v1.1: Supportparlaifor various dialogue generation tasks.v1.2: Supportpytorch-lightningfor fine-tuning using GPU & TPU.v1.3: Supportdeepspeedfor huge model inference like Reddit 9.4B.v1.4: Add Retrieval-based dialogue models.v1.5: Addnon-parlaimodels (e.g. Baidu PLATO-2, ...)v1.6: Easy deployment to messengers (e.g. Facebook, Whatsapp, ...)v1.7: Support database (e.g. PostgreSQL, MySQL, ...)LicenseCopyright 2021 Hyunwoong Ko.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.