Home > Article > Technology peripherals > Deployment of domestic ChatGPT only requires 6G of video memory! The ChatYuan model is open for download: the industry’s first functional dialogue open source Chinese large model
Some time ago, Yuanyu Intelligent Development Team trained a functional dialogue large model ChatYuan similar to ChatGPT, and opened a trial interface in the web version.
Now you can also deploy a ChatYuan on your own machine!
The model can be used in question and answer scenarios, and can conduct dialogues and various generation tasks based on context, including creative writing. It can also answer questions in fields such as law and COVID-19.
And supports zero-sample learning in all Chinese tasks. Users can use it by providing prompts. It supports nearly 30 kinds of Chinese tasks under the categories of text generation, information extraction and understanding. .
ChatYuan is further trained based on PromptCLUE-large combined with hundreds of millions of functional question and answer and multi-round dialogue data. The model parameters are 770 million, the video memory is about 6G, and a civilian graphics card can be loaded and used. , the model is currently open for download.
PromptCLUE is pre-trained on 100 billion token Chinese corpus, has learned a total of 1.5 trillion Chinese tokens, and conducted Prompt task-based training on hundreds of tasks.
For understanding tasks, such as classification, sentiment analysis, extraction, etc., the label system can be customized; for a variety of generation tasks, sampling can be freely generated.
1. Github
##Project address: https://github.com/clue-ai/ChatYuan
2. Huggingface
Project address: https://huggingface.co/ClueAI/ChatYuan- large-v1
#3. ModelScope
## Project address: https://modelscope.cn/models/ ClueAI/ChatYuan-largeLoad model:
Using models for predictive inference methods:
##4. PaddlePaddle
##Project address: https://aistudio.baidu.com /aistudio/projectdetail/5404182
Model address: https://huggingface.co/ClueAI/ChatYuan-large-v1-paddle
1. Organize the data
Organize the data into a unified format, which consists of two parts: input ( Input) and output (Output).
For a single round of question and answer or generation:
Input: task description input text
Output: The text that the system needs to predict, such as the content after "Xiaoyuan" in the figure below.
For multiple rounds of dialogue:
Input: Enter the text above the task description
Output: The text that the system needs to predict, such as the content after "Xiaoyuan" in the figure below.
Single round dialogue data format:
##Multiple rounds of dialogue data format:
##2. Training model
For training code, please refer to:
Use pCLUE data set for training, prediction and Effect verification, pytorch implementation - online colab.
Github project: https://colab.research.google.com/drive/1lEyFhEfoc-5Z5xqpEKkZt_iMaojH1MP_ ?usp=sharingFor example
==========Example 1======= ===
##User:What can you do
Xiao Yuan:
Hello! I am Yuanyu AI. I can answer your questions, write articles, assignments, translate, and I can also provide you with information on issues in the legal and other fields.
==========Example 2==========
User:
Write a poem about winter
Xiao Yuan:
The winter night is quiet and cold,
Clouds are floating in the sky,
On the frozen white snow,
Cold like snow.
Snowflakes melt into ice,
Like those snowflakes falling,
In the cold winter ,
Feel the joy of spring.
In the winter,
the wind and snow gradually subsided,
there was silence,
Bring happiness and warmth home.
==========Example 3==========
User:
During the internship in the preschool education major, there will be problems with students. Please propose improvement measures. 800 words
Xiao Yuan:
In the internship of preschool education majors, there will be some problems with students. , such as students' lack of professional knowledge, lack of cooperation awareness, lack of basic sense of responsibility, etc., we need to take measures to solve these problems.
First of all, during the internship process, we need to cultivate students' team awareness, strengthen cooperation between students and teachers, strengthen communication with parents, and improve their communication skills. In addition, we also need to strengthen students' independence, let students learn to think independently, learn to communicate with teachers and parents, and cultivate their independence.
In addition, in daily work, we must also provide students with appropriate opportunities and opportunities to have more contact with society and participate in more social activities, deepening their understanding of society and school. Understand and cultivate their initiative, positive and innovative spirit.
Finally, we also need to pay attention to the problems that students have during internships, especially students’ lack of cooperation, dependence, not knowing how to share, procrastination, etc. These students should cause us Pay attention to it and formulate reasonable improvement measures to improve these problems.
ChatYuan is a model obtained by further training based on PromptCLUE. It removes text understanding and information extraction tasks, and strengthens the learning and training of question and answer, dialogue and various generative tasks; The addition of anti-interference data allows the model to ignore irrelevant context when necessary; the addition of learning from user feedback data enables the model to not only have certain general language understanding capabilities and specific task generation capabilities, but also better respond to user intentions. .
The learning process of PromptCLUE
The current version can carry out question and answer, dialogue and various creative writing or text generation. Compared with the online version, its intention understanding and generation capabilities still have a lot of room for improvement in some situations; it also cannot achieve reasoning well. or complex tasks. The existing version will then be further improved based on feedback.
The above is the detailed content of Deployment of domestic ChatGPT only requires 6G of video memory! The ChatYuan model is open for download: the industry’s first functional dialogue open source Chinese large model. For more information, please follow other related articles on the PHP Chinese website!