Full Code of LianjiaTech/BELLE for AI

main 645084d36454 cached
115 files
1.5 MB
617.1k tokens
263 symbols
1 requests
Download .txt
Showing preview only (1,615K chars total). Download the full file or copy to clipboard to get everything.
Repository: LianjiaTech/BELLE
Branch: main
Commit: 645084d36454
Files: 115
Total size: 1.5 MB

Directory structure:
gitextract_ahrom3jo/

├── .gitignore
├── DATA_LICENSE
├── DISCLAIMER
├── HOW_TO_CONTRIBUTE.md
├── LICENSE
├── README.md
├── README_en.md
├── chat/
│   ├── README.md
│   └── README_en.md
├── docker/
│   ├── README.md
│   ├── belle.dockerfile
│   ├── build_dockerfile_upon_transfermers.sh
│   ├── docker_run.sh
│   ├── transformers.dockerfile
│   └── upload_image.sh
├── docs/
│   └── README.md
├── eval/
│   ├── ChatGPT_Score.html
│   ├── README.md
│   ├── README_en.md
│   ├── eval_prompt.json
│   ├── eval_set.json
│   ├── generation_html.py
│   └── template_html/
│       └── ChatGPT_Score.html.temp
├── models/
│   ├── Belle-VL/
│   │   └── README.md
│   ├── README.md
│   ├── README_en.md
│   ├── decrypt.py
│   ├── gptq/
│   │   ├── README.md
│   │   ├── bloom.py
│   │   ├── bloom_inference.py
│   │   ├── datautils.py
│   │   ├── gptq.py
│   │   ├── llama.py
│   │   ├── llama_inference.py
│   │   ├── llama_inference_offload.py
│   │   ├── modelutils.py
│   │   ├── quant.py
│   │   ├── quant_cuda.cpp
│   │   ├── quant_cuda_kernel.cu
│   │   ├── requirements.txt
│   │   ├── setup_cuda.py
│   │   └── test_kernel.py
│   └── notebook/
│       ├── BELLE_INFER_COLAB.ipynb
│       └── README.md
├── requirements.txt
└── train/
    ├── README.md
    ├── README_FT.md
    ├── README_RLHF.md
    ├── README_ZERO_INFERENCE.md
    ├── configs/
    │   ├── accelerate_config_ppo.yaml
    │   ├── accelerate_config_rm.yaml
    │   ├── deepspeed_config.json
    │   ├── deepspeed_config_flops_profile.json
    │   ├── deepspeed_config_ppo.json
    │   ├── deepspeed_config_rm.json
    │   ├── deepspeed_config_stage3.json
    │   ├── deepspeed_config_stage3_dpo.json
    │   ├── deepspeed_config_stage3_flops_profile.json
    │   ├── deepspeed_config_stage3_inference.json
    │   ├── hostfile
    │   ├── lora_config_bloom.json
    │   └── lora_config_llama.json
    ├── docs/
    │   ├── FAQ.md
    │   └── README_en.md
    ├── dschat_train_v1/
    │   ├── FAQ.md
    │   ├── README.md
    │   ├── docker/
    │   │   └── Dockerfile
    │   ├── main.py
    │   ├── prompt_eval.py
    │   ├── reproduce_our_papers/
    │   │   └── Towards Better Instruction Following Language Models for Chinese: Investigating the Impact of Training Data and Evaluation.md
    │   ├── training_scripts/
    │   │   ├── convert_llama_weights_to_hf.py
    │   │   ├── convert_to_conv_data.py
    │   │   ├── single_gpu/
    │   │   │   ├── run_FT.sh
    │   │   │   └── run_LoRA.sh
    │   │   └── single_node/
    │   │       ├── run_FT.sh
    │   │       └── run_LoRA.sh
    │   └── utils/
    │       ├── ds_utils.py
    │       ├── model/
    │       │   └── model_utils.py
    │       ├── module/
    │       │   └── lora.py
    │       └── utils.py
    ├── reproduce_our_papers/
    │   └── Towards Better Instruction Following Language Models for Chinese: Investigating the Impact of Training Data and Evaluation.md
    ├── scripts/
    │   ├── convert_llama_weights_to_hf.py
    │   ├── convert_to_conv_data.py
    │   ├── merge_lora.sh
    │   ├── merge_tokenizers.py
    │   ├── multinode_run.sh
    │   ├── run_dpo.sh
    │   ├── run_inference.sh
    │   ├── run_interface.sh
    │   ├── run_multi_backend.py
    │   ├── run_multi_backend.sh
    │   ├── run_ppo.sh
    │   ├── run_pt.sh
    │   ├── run_rm.sh
    │   ├── run_sft.sh
    │   ├── run_zero_inference.sh
    │   └── run_zero_inference_backend_without_trainer.sh
    └── src/
        ├── dpo_trainer.py
        ├── entry_point/
        │   ├── dpo_train.py
        │   ├── evaluation.ipynb
        │   ├── inference.py
        │   ├── interface.py
        │   ├── ppo_train.py
        │   ├── pt_train.py
        │   ├── rm_train.py
        │   ├── sft_train.py
        │   ├── zero_inference.py
        │   └── zero_inference_backend_without_trainer.py
        ├── merge_llama_with_lora.py
        ├── models/
        │   ├── generation_utils.py
        │   └── llama/
        │       └── modeling_llama.py
        ├── ppo_trainer.py
        ├── sample_generator.py
        ├── trainer.py
        └── utils.py

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitignore
================================================
*.tmp
*.swp
__pycache__
.vscode
regen.json
.ipynb_checkpoints
.idea
saved_models
*.code-workspace
.hypothesis
infer_res
wandb
hf_cache_dir
data

================================================
FILE: DATA_LICENSE
================================================
Attribution License (ODC-By)
PREAMBLE
The Open Data Commons Attribution License is a license agreement intended to allow users to freely share, modify, and use this Database subject only to the attribution requirements set out in Section 4.

Databases can contain a wide variety of types of content (images, audiovisual material, and sounds all in the same database, for example), and so this license only governs the rights over the Database, and not the contents of the Database individually. Licensors may therefore wish to use this license together with another license for the contents.

Sometimes the contents of a database, or the database itself, can be covered by other rights not addressed here (such as private contracts, trademark over the name, or privacy rights / data protection rights over information in the contents), and so you are advised that you may have to consult other documents or clear other rights before doing activities not covered by this License.

The Licensor (as defined below)

and

You (as defined below)

agree as follows:

1.0 DEFINITIONS OF CAPITALISED WORDS
“Collective Database” – Means this Database in unmodified form as part of a collection of independent databases in themselves that together are assembled into a collective whole. A work that constitutes a Collective Database will not be considered a Derivative Database.

“Convey” – As a verb, means Using the Database, a Derivative Database, or the Database as part of a Collective Database in any way that enables a Person to make or receive copies of the Database or a Derivative Database. Conveying does not include interaction with a user through a computer network, or creating and Using a Produced Work, where no transfer of a copy of the Database or a Derivative Database occurs.

“Contents” – The contents of this Database, which includes the information, independent works, or other material collected into the Database. For example, the contents of the Database could be factual data or works such as images, audiovisual material, text, or sounds.

“Database” – A collection of material (the Contents) arranged in a systematic or methodical way and individually accessible by electronic or other means offered under the terms of this License.

“Database Directive” – Means Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended or succeeded.

“Database Right” – Means rights resulting from the Chapter III (“sui generis”) rights in the Database Directive (as amended and as transposed by member states), which includes the Extraction and Re-utilisation of the whole or a Substantial part of the Contents, as well as any similar rights available in the relevant jurisdiction under Section 10.4.

“Derivative Database” – Means a database based upon the Database, and includes any translation, adaptation, arrangement, modification, or any other alteration of the Database or of a Substantial part of the Contents. This includes, but is not limited to, Extracting or Re-utilising the whole or a Substantial part of the Contents in a new Database.

“Extraction” – Means the permanent or temporary transfer of all or a Substantial part of the Contents to another medium by any means or in any form.

“License” – Means this license agreement and is both a license of rights such as copyright and Database Rights and an agreement in contract.

“Licensor” – Means the Person that offers the Database under the terms of this License.

“Person” – Means a natural or legal person or a body of persons corporate or incorporate.

“Produced Work” – a work (such as an image, audiovisual material, text, or sounds) resulting from using the whole or a Substantial part of the Contents (via a search or other query) from this Database, a Derivative Database, or this Database as part of a Collective Database.

“Publicly” – means to Persons other than You or under Your control by either more than 50% ownership or by the power to direct their activities (such as contracting with an independent consultant).

“Re-utilisation” – means any form of making available to the public all or a Substantial part of the Contents by the distribution of copies, by renting, by online or other forms of transmission.

“Substantial” – Means substantial in terms of quantity or quality or a combination of both. The repeated and systematic Extraction or Re-utilisation of insubstantial parts of the Contents may amount to the Extraction or Re-utilisation of a Substantial part of the Contents.

“Use” – As a verb, means doing any act that is restricted by copyright or Database Rights whether in the original medium or any other; and includes without limitation distributing, copying, publicly performing, publicly displaying, and preparing derivative works of the Database, as well as modifying the Database as may be technically necessary to use it in a different mode or format.

“You” – Means a Person exercising rights under this License who has not previously violated the terms of this License with respect to the Database, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation.

Words in the singular include the plural and vice versa.

2.0 WHAT THIS LICENSE COVERS
2.1. Legal effect of this document. This License is:

a. A license of applicable copyright and neighbouring rights;

b. A license of the Database Right; and

c. An agreement in contract between You and the Licensor.

2.2 Legal rights covered. This License covers the legal rights in the Database, including:

a. Copyright. Any copyright or neighbouring rights in the Database. The copyright licensed includes any individual elements of the Database, but does not cover the copyright over the Contents independent of this Database. See Section 2.4 for details. Copyright law varies between jurisdictions, but is likely to cover: the Database model or schema, which is the structure, arrangement, and organisation of the Database, and can also include the Database tables and table indexes; the data entry and output sheets; and the Field names of Contents stored in the Database;

b. Database Rights. Database Rights only extend to the Extraction and Re-utilisation of the whole or a Substantial part of the Contents. Database Rights can apply even when there is no copyright over the Database. Database Rights can also apply when the Contents are removed from the Database and are selected and arranged in a way that would not infringe any applicable copyright; and

c. Contract. This is an agreement between You and the Licensor for access to the Database. In return you agree to certain conditions of use on this access as outlined in this License.

2.3 Rights not covered.

a. This License does not apply to computer programs used in the making or operation of the Database;

b. This License does not cover any patents over the Contents or the Database; and

c. This License does not cover any trademarks associated with the Database.

2.4 Relationship to Contents in the Database. The individual items of the Contents contained in this Database may be covered by other rights, including copyright, patent, data protection, privacy, or personality rights, and this License does not cover any rights (other than Database Rights or in contract) in individual Contents contained in the Database.

For example, if used on a Database of images (the Contents), this License would not apply to copyright over individual images, which could have their own separate licenses, or one single license covering all of the rights over the images.

3.0 RIGHTS GRANTED
3.1 Subject to the terms and conditions of this License, the Licensor grants to You a worldwide, royalty-free, non-exclusive, terminable (but only under Section 9) license to Use the Database for the duration of any applicable copyright and Database Rights. These rights explicitly include commercial use, and do not exclude any field of endeavour. To the extent possible in the relevant jurisdiction, these rights may be exercised in all media and formats whether now known or created in the future.

The rights granted cover, for example:

a. Extraction and Re-utilisation of the whole or a Substantial part of the Contents;

b. Creation of Derivative Databases;

c. Creation of Collective Databases;

d. Creation of temporary or permanent reproductions by any means and in any form, in whole or in part, including of any Derivative Databases or as a part of Collective Databases; and

e. Distribution, communication, display, lending, making available, or performance to the public by any means and in any form, in whole or in part, including of any Derivative Database or as a part of Collective Databases.

3.2 Compulsory license schemes. For the avoidance of doubt:

a. Non-waivable compulsory license schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License;

b. Waivable compulsory license schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor waives the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; and,

c. Voluntary license schemes. The Licensor waives the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License.

3.3 The right to release the Database under different terms, or to stop distributing or making available the Database, is reserved. Note that this Database may be multiple-licensed, and so You may have the choice of using alternative licenses for this Database. Subject to Section 10.4, all other rights not expressly granted by Licensor are reserved.

4.0 CONDITIONS OF USE
4.1 The rights granted in Section 3 above are expressly made subject to Your complying with the following conditions of use. These are important conditions of this License, and if You fail to follow them, You will be in material breach of its terms.

4.2 Notices. If You Publicly Convey this Database, any Derivative Database, or the Database as part of a Collective Database, then You must:

a. Do so only under the terms of this License;

b. Include a copy of this License or its Uniform Resource Identifier (URI) with the Database or Derivative Database, including both in the Database or Derivative Database and in any relevant documentation;

c. Keep intact any copyright or Database Right notices and notices that refer to this License; and

d. If it is not possible to put the required notices in a particular file due to its structure, then You must include the notices in a location (such as a relevant directory) where users would be likely to look for it.

4.3 Notice for using output (Contents). Creating and Using a Produced Work does not require the notice in Section 4.2. However, if you Publicly Use a Produced Work, You must include a notice associated with the Produced Work reasonably calculated to make any Person that uses, views, accesses, interacts with, or is otherwise exposed to the Produced Work aware that Content was obtained from the Database, Derivative Database, or the Database as part of a Collective Database, and that it is available under this License.

a. Example notice. The following text will satisfy notice under Section 4.3:

Contains information from DATABASE NAME which is made available
under the ODC Attribution License.
DATABASE NAME should be replaced with the name of the Database and a hyperlink to the location of the Database. “ODC Attribution License” should contain a hyperlink to the URI of the text of this License. If hyperlinks are not possible, You should include the plain text of the required URI’s with the above notice.

4.4 Licensing of others. You may not sublicense the Database. Each time You communicate the Database, the whole or Substantial part of the Contents, or any Derivative Database to anyone else in any way, the Licensor offers to the recipient a license to the Database on the same terms and conditions as this License. You are not responsible for enforcing compliance by third parties with this License, but You may enforce any rights that You have over a Derivative Database. You are solely responsible for any modifications of a Derivative Database made by You or another Person at Your direction. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License.

5.0 MORAL RIGHTS
5.1 Moral rights. This section covers moral rights, including any rights to be identified as the author of the Database or to object to treatment that would otherwise prejudice the author’s honour and reputation, or any other derogatory treatment:

a. For jurisdictions allowing waiver of moral rights, Licensor waives all moral rights that Licensor may have in the Database to the fullest extent possible by the law of the relevant jurisdiction under Section 10.4;

b. If waiver of moral rights under Section 5.1 a in the relevant jurisdiction is not possible, Licensor agrees not to assert any moral rights over the Database and waives all claims in moral rights to the fullest extent possible by the law of the relevant jurisdiction under Section 10.4; and

c. For jurisdictions not allowing waiver or an agreement not to assert moral rights under Section 5.1 a and b, the author may retain their moral rights over certain aspects of the Database.

Please note that some jurisdictions do not allow for the waiver of moral rights, and so moral rights may still subsist over the Database in some jurisdictions.

6.0 FAIR DEALING, DATABASE EXCEPTIONS, AND OTHER RIGHTS NOT AFFECTED
6.1 This License does not affect any rights that You or anyone else may independently have under any applicable law to make any use of this Database, including without limitation:

a. Exceptions to the Database Right including: Extraction of Contents from non-electronic Databases for private purposes, Extraction for purposes of illustration for teaching or scientific research, and Extraction or Re-utilisation for public security or an administrative or judicial procedure.

b. Fair dealing, fair use, or any other legally recognised limitation or exception to infringement of copyright or other applicable laws.

6.2 This License does not affect any rights of lawful users to Extract and Re-utilise insubstantial parts of the Contents, evaluated quantitatively or qualitatively, for any purposes whatsoever, including creating a Derivative Database (subject to other rights over the Contents, see Section 2.4). The repeated and systematic Extraction or Re-utilisation of insubstantial parts of the Contents may however amount to the Extraction or Re-utilisation of a Substantial part of the Contents.

7.0 WARRANTIES AND DISCLAIMER
7.1 The Database is licensed by the Licensor “as is” and without any warranty of any kind, either express, implied, or arising by statute, custom, course of dealing, or trade usage. Licensor specifically disclaims any and all implied warranties or conditions of title, non-infringement, accuracy or completeness, the presence or absence of errors, fitness for a particular purpose, merchantability, or otherwise. Some jurisdictions do not allow the exclusion of implied warranties, so this exclusion may not apply to You.

8.0 LIMITATION OF LIABILITY
8.1 Subject to any liability that may not be excluded or limited by law, the Licensor is not liable for, and expressly excludes, all liability for loss or damage however and whenever caused to anyone by any use under this License, whether by You or by anyone else, and whether caused by any fault on the part of the Licensor or not. This exclusion of liability includes, but is not limited to, any special, incidental, consequential, punitive, or exemplary damages such as loss of revenue, data, anticipated profits, and lost business. This exclusion applies even if the Licensor has been advised of the possibility of such damages.

8.2 If liability may not be excluded by law, it is limited to actual and direct financial loss to the extent it is caused by proved negligence on the part of the Licensor.

9.0 TERMINATION OF YOUR RIGHTS UNDER THIS LICENSE
9.1 Any breach by You of the terms and conditions of this License automatically terminates this License with immediate effect and without notice to You. For the avoidance of doubt, Persons who have received the Database, the whole or a Substantial part of the Contents, Derivative Databases, or the Database as part of a Collective Database from You under this License will not have their licenses terminated provided their use is in full compliance with this License or a license granted under Section 4.8 of this License. Sections 1, 2, 7, 8, 9 and 10 will survive any termination of this License.

9.2 If You are not in breach of the terms of this License, the Licensor will not terminate Your rights under it.

9.3 Unless terminated under Section 9.1, this License is granted to You for the duration of applicable rights in the Database.

9.4 Reinstatement of rights. If you cease any breach of the terms and conditions of this License, then your full rights under this License will be reinstated:

a. Provisionally and subject to permanent termination until the 60th day after cessation of breach;

b. Permanently on the 60th day after cessation of breach unless otherwise reasonably notified by the Licensor; or

c. Permanently if reasonably notified by the Licensor of the violation, this is the first time You have received notice of violation of this License from the Licensor, and You cure the violation prior to 30 days after your receipt of the notice.

9.5 Notwithstanding the above, Licensor reserves the right to release the Database under different license terms or to stop distributing or making available the Database. Releasing the Database under different license terms or stopping the distribution of the Database will not withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above.

10.0 GENERAL
10.1 If any provision of this License is held to be invalid or unenforceable, that must not affect the validity or enforceability of the remainder of the terms and conditions of this License and each remaining provision of this License shall be valid and enforced to the fullest extent permitted by law.

10.2 This License is the entire agreement between the parties with respect to the rights granted here over the Database. It replaces any earlier understandings, agreements or representations with respect to the Database.

10.3 If You are in breach of the terms of this License, You will not be entitled to rely on the terms of this License or to complain of any breach by the Licensor.

10.4 Choice of law. This License takes effect in and will be governed by the laws of the relevant jurisdiction in which the License terms are sought to be enforced. If the standard suite of rights granted under applicable copyright law and Database Rights in the relevant jurisdiction includes additional rights not granted under this License, these additional rights are granted in this License in order to meet the terms of this License.

================================================
FILE: DISCLAIMER
================================================
The software project, data, and models provided by our GitHub project are provided "as is," without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and non-infringement.

In no event shall the project owners or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software project, data, or models, even if advised of the possibility of such damage.

Users of this software project, data, and models are solely responsible for any consequences of their use. The project owners and contributors shall not be held responsible for any subsequent or potential harm caused by the use of this software project, data, or models.

By using this software project, data, or models, users accept and agree to this disclaimer. If users do not agree to the terms of this disclaimer, they should not use this software project, data, or models.

It is important to note that this software project, data, and models are still in the research phase and are provided for experimental purposes only. As such, the project owners and contributors do not guarantee the accuracy, completeness, or usefulness of the software project, data, or models.

Furthermore, due to the experimental nature of this software project, data, and models, it is possible that they may contain or generate inappropriate responses, errors, or inconsistencies. Users should exercise caution when using this software project, data, or models, and should not rely solely on them for any critical or sensitive tasks.

The project owners and contributors shall not be held responsible for any damages, losses, or liabilities arising from the use of this software project, data, or models, including but not limited to, any inappropriate responses generated by the software project, data, or models.

By using this software project, data, or models, users acknowledge and accept the experimental nature of the software project, data, and models, and understand the potential risks and limitations associated with their use. If users do not agree to the terms of this disclaimer, they should not use this software project, data, or models.

The software project, data, and models provided by our GitHub project are intended for research purposes only. They should not be used for any commercial, business, or legal purposes, and should not be relied upon as a substitute for professional advice or judgment.

Users of this software project, data, and models are strictly prohibited from using them for any commercial purposes, including but not limited to, selling, licensing, or distributing the software project, data, or models to third parties.

The project owners and contributors shall not be held responsible for any damages, losses, or liabilities arising from the use of this software project, data, or models for any commercial or business purposes.

By using this software project, data, or models, users agree to use them for research purposes only, and not for any commercial or business purposes. If users do not agree to the terms of this disclaimer, they should not use this software project, data, or models.


================================================
FILE: HOW_TO_CONTRIBUTE.md
================================================
Welcome to BELLE project! We appreciate your interest in contributing to our project.
In order to make the contribution process as smooth as possible, we have established some
guidelines to help you submit your contributions. Please take a few minutes to review the
following guidelines before you start contributing.


## How to Contribute Code

1. Fork the repository and clone it locally.
2. Create a new branch for your contribution using a descriptive name.
3. Make your changes and ensure that they are properly tested.
4. Submit a pull request to the master branch of our repository.


## How to Contribute Data

If you are contributing prompts or prompt seeds, please open up a new issue with the following
title format: [New Prompt]: or [New Prompt Seed]:.

If you are contributing new dataset:

1. Please check the format of our [official dataset](https://huggingface.co/datasets/BelleGroup/train_2M_CN).
2. Upload your dataset somewhere, e.g. HuggingFace.
3. Create a new issue of the title: [Contributing Data]:. Describe the dataset, e.g. scale, contents, etc.
4. Include link to your dataset in the issue.


## Contribution Guidelines

Please ensure that your contributions adhere to the following guidelines:

1. Follow the coding style and conventions used in the project.
2. Make sure that your contribution is well-documented and easy to understand
3. Keep your contributions concise and focused. If you are making multiple changes, consider breaking them into separate pull requests.
4. Do not submit contributions that include proprietary or confidential information.


## Reporting Issues

If you encounter any issues while using our project, please report them through our issue
tracker. Please provide as much information as possible about the issue, including steps
to reproduce the problem.

Before submitting an issue, please search through existing issues first :)


## Conclusion

Thank you for taking the time to read through these guidelines. We appreciate your
contributions and look forward to working with you! If you have any questions or concerns,
please reach out to the project maintainers.


================================================
FILE: LICENSE
================================================
                                Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright 2023 Rohan Taori, Ishaan Gulrajani, Tianyi Zhang, Yann Dubois, Xuechen Li

   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.


================================================
FILE: README.md
================================================
## <img src="assets/belle_logo.png" style="vertical-align: middle; width: 35px;"> BELLE: Be Everyone's Large Language model Engine

*Read this in [English](README_en.md).*

<div align="center">

<a href="https://github.com/LianjiaTech/BELLE/stargazers">![GitHub Repo stars](https://img.shields.io/github/stars/LianjiaTech/BELLE?style=social)</a>
[![Code License](https://img.shields.io/badge/Code%20License-Apache_2.0-green.svg)](https://github.com/LianjiaTech/BELLE/blob/main/LICENSE)
[![Generic badge](https://img.shields.io/badge/discord-BELLE%20Group-green.svg?logo=discord)](https://discord.gg/pMPY53UUGq)
[![Generic badge](https://img.shields.io/badge/wechat-BELLE-green.svg?logo=wechat)](https://github.com/LianjiaTech/BELLE/blob/main/assets/belle_wechat.jpg)
[![Generic badge](https://img.shields.io/badge/🤗-Huggingface%20Repo-green.svg)](https://huggingface.co/BelleGroup)
[![Generic badge](https://img.shields.io/badge/🤗-Huggingface%20Repo2-green.svg)](https://huggingface.co/BELLE-2)
</div>

本项目的目标是促进中文对话大模型开源社区的发展,愿景是成为能够帮到每一个人的LLM Engine。

相比如何做好大语言模型的预训练,BELLE更关注如何在开源预训练大语言模型的基础上,帮助每一个人都能够得到一个属于自己的、效果尽可能好的具有指令表现能力的语言模型,降低大语言模型、特别是中文大语言模型的研究和应用门槛。为此,BELLE项目会持续开放指令训练数据、相关模型、训练代码、应用场景等,也会持续评估不同训练数据、训练算法等对模型表现的影响。BELLE针对中文做了优化,模型调优仅使用由ChatGPT生产的数据(不包含任何其他数据)。

</br>

## 🔄 最近更新
* [2024/10/16] 开源[Belle-whisper-larger-v3-turbo-zh](https://huggingface.co/BELLE-2/Belle-whisper-large-v3-turbo-zh)  中文能力强化后的语音识别模型,识别精度相比whisper-large-v3-turbo相对提升24~64%,识别速度相比whisper-large-v3有7-8倍提升。
* [2024/03/15] 更新了一篇技术报告[Dial-insight](https://arxiv.org/pdf/2403.09167.pdf)  在垂直领域场景微调大模型时,使用高质量的垂直领域数据可以在使模型的垂直领域能力增强的同时,有效的抵抗模型通用能力的坍缩。
* [2024/03/11] 开源[Belle-whisper-larger-v3-zh](https://huggingface.co/BELLE-2/Belle-whisper-large-v3-zh)  中文能力强化后的语音识别模型,相比whisper-large-v3相对提升24~65%,特别是在高噪、混响等复杂场景下有突出表现。
* [2024/01/16] 更新了一篇技术报告[RAISE](https://arxiv.org/pdf/2401.02777.pdf). RAISE通过实验发现构造少量的样例数据,就能有效的激发大模型,生成对话也更可控
* [2023/12/29] 开源[Belle-whisper-larger-v2-zh](https://huggingface.co/BELLE-2/Belle-whisper-large-v2-zh)和[Belle-distilwhisper-large-v2-zh](https://huggingface.co/BELLE-2/Belle-distilwhisper-large-v2-zh)两个针对中文能力强化后的语音识别模型,方便大家在语音场景下使用大语言模型
* [2023/11/24] 开源[BELLE-VL](https://huggingface.co/BELLE-2/BELLE-VL)多模态大语言模型,基于中文能力更强的语言模型基座来扩展模型的视觉能力,为社区提供更加灵活的选择(目前BELLE-VL最新的模型在[MME](https://github.com/BradyFU/Awesome-Multimodal-Large-Language-Models/tree/Evaluation)感知评测维度共获得**1620.10**分,超过Qwen-VL、Llava、mplug-owl)
* [2023/10/27] 更新了一篇技术报告[DUMA](https://arxiv.org/abs/2310.18075#),探索了对话场景下基于快慢脑架构的Agent实现方法
* [2023/09/26] 更新了RLHF的训练代码,支持PPO和[DPO](https://arxiv.org/abs/2305.18290)训练,具体细节见:[README_RLHF.md](train/README_RLHF.md)
* [2023/08/16] 基于原有的[train_3.5M_CN](https://huggingface.co/datasets/BelleGroup/train_3.5M_CN)数据新增了指令类别字段,共包括13个类别,具体细节见:[train_3.5M_CN_With_Category](https://huggingface.co/datasets/BELLE-2/train_3.5M_CN_With_Category)
* [2023/08/10] 更新了基于ZeRO Inference的推理代码,详见[train/README_ZERO_INFERENCE.md](train/README_ZERO_INFERENCE.md)
* [2023/08/07] 更新了继续预训练代码和指令微调代码,添加了flash attention 2,详见[train/README.md](train/README.md)。同时打包了运行环境,详见[train/docker/README.md](train/docker/README.md)
* [2023/07/31] 更新了一篇技术报告[ChatHome](https://arxiv.org/abs/2307.15290),探索了针对垂直领域时的增量预训练+指令微调的的策略方法
* [2023/07/27] 开放[BELLE-Llama2-13B-chat-0.4M](https://huggingface.co/BELLE-2/BELLE-Llama2-13B-chat-0.4M),在Llama-2-13B的基础上采用40万高质量的对话数据上进行训练。在[评测集](https://github.com/LianjiaTech/BELLE/blob/main/eval/eval_set.json)上的效果相比BELLE-LLaMA-EXT-13B模型有显著提升。
* [2023/05/14] 开放[BELLE-LLaMA-EXT-13B](https://huggingface.co/BelleGroup/BELLE-LLaMA-EXT-13B),在LLaMA-13B的基础上扩展中文词表,并在400万高质量的对话数据上进行训练。
* [2023/05/11] [BELLE/data/10M](data/10M)中,新加350万条生成多样化指令任务数据,包括单轮和多轮对话[train_3.5M_CN](https://huggingface.co/datasets/BelleGroup/train_3.5M_CN)。
* [2023/04/19] 开放了其中一篇论文中的的相关模型:包括在LLaMA7B基础上增量预训练扩展中文词表的模(详见[BelleGroup/BELLE-LLaMA-EXT-7B](https://huggingface.co/BelleGroup/BELLE-LLaMA-EXT-7B)),以及基于多样化开源数据训练后的LLaMA-7B模型(详见[BelleGroup/BELLE-on-Open-Datasets](https://huggingface.co/BelleGroup/BELLE-on-Open-Datasets))。
* [2023/04/18] 更新了train代码,详见[BELLE/train](https://github.com/LianjiaTech/BELLE/tree/main/train),集成了Deepspeed-Chat,提供了相关的docker
* [2023/04/18] 更新了[两篇最新论文工作](#📑-研究报告),对比了不同方式产生的训练数据、不同训练方法(LoRA, finetune)对效果的影响
* [2023/04/12] 发布了[ChatBELLE App](chat/README.md),基于[llama.cpp](https://github.com/ggerganov/llama.cpp)和[Flutter](https://flutter.dev/),实现跨平台的BELLE-7B离线模型实时交互。
* [2023/04/11] 更新了一个人工精校的eval集合,大约一千多条
* [2023/04/08] [BELLE/data/10M](data/10M)中,新加40万条生成的给定角色的多轮对话[Generated Chat](https://huggingface.co/datasets/BelleGroup/generated_chat_0.4M),新加200万条生成多样化指令任务数据[train_2M_CN](https://huggingface.co/datasets/BelleGroup/train_2M_CN)。

</br>
  

下图是一个可以使用App在设备端本地运行4bit量化的BELLE-7B模型,在M1 Max CPU上实时运行的效果(未加速)。App下载详见[App配套模型下载及使用说明](chat/README.md),App[下载链接](https://github.com/LianjiaTech/BELLE/releases/download/v0.95/chatbelle.dmg),目前仅提供了mac os版本。模型需要单独下载。**模型经过量化后,效果损失明显,我们将持续研究如何提升。**

<img src="./chat/chatbelle-demo.gif"></img>



</br>

## 📝 项目主要内容

### 🚀 训练代码

详见[BELLE/train](train),尽可能简化的一个训练代码实现,集成了Deepspeed-Chat,支持finetune,lora,并提供了相关的docker

### 📊 数据开放
  
* 详见[BELLE/data/1.5M](data/1.5M),参考[Stanford Alpaca](https://github.com/tatsu-lab/stanford_alpaca) 生成的中文数据集[1M](https://huggingface.co/datasets/BelleGroup/train_1M_CN) + [0.5M](https://huggingface.co/datasets/BelleGroup/train_0.5M_CN);
  
* 持续开放的数据集,详见[BELLE/data/10M](data/10M)

### 🧐 验证集合&验证方法

详见[BELLE/eval](https://github.com/LianjiaTech/BELLE/tree/main/eval),一个1k+的测试集合,和对应打分prompt。包含多个类别,采用GPT-4或者ChatGPT打分。同时提供了一个打分的网页,方便针对单个case使用。欢迎大家通过PR提供更多的测试用例。

### 🤖 模型

详见[BELLE/models](models/)
* 基于[Meta LLaMA2](https://github.com/facebookresearch/llama)实现调优的模型:[BELLE-Llama2-13B-chat-0.4M](https://huggingface.co/BELLE-2/BELLE-Llama2-13B-chat-0.4M)
* 基于[Meta LLaMA](https://github.com/facebookresearch/llama)实现调优的模型:[BELLE-LLaMA-7B-0.6M-enc](https://huggingface.co/BelleGroup/BELLE-LLaMA-7B-0.6M-enc)
, [BELLE-LLaMA-7B-2M-enc](https://huggingface.co/BelleGroup/BELLE-LLaMA-7B-2M-enc)
, [BELLE-LLaMA-7B-2M-gptq-enc](https://huggingface.co/BelleGroup/BELLE-LLaMA-7B-2M-gptq-enc)
, [BELLE-LLaMA-13B-2M-enc](https://huggingface.co/BelleGroup/BELLE-LLaMA-13B-2M-enc)
, [BELLE-on-Open-Datasets](https://huggingface.co/BelleGroup/BELLE-on-Open-Datasets) 以及基于LLaMA做了中文词表扩充的预训练模型[BELLE-LLaMA-EXT-7B](https://huggingface.co/BelleGroup/BELLE-LLaMA-EXT-7B)。

  * 请参考[Meta LLaMA的License](https://github.com/facebookresearch/llama/blob/main/LICENSE),目前仅供学习交流。请严遵守LLaMA的使用限制。LLaMA模型不允许发布调优后的完整模型权重,但是可以发布原始的模型的diff。因此,我们使用文件间的XOR,保证拥有LLaMA原始模型授权的人才可以将本项目发布的模型转化成可以使用的格式。格式转化代码参考[BELLE/models](https://github.com/LianjiaTech/BELLE/tree/main/models)
    
* 基于BLOOMZ-7B1-mt优化后的模型:[BELLE-7B-0.2M](https://huggingface.co/BelleGroup/BELLE-7B-0.2M),[BELLE-7B-0.6M](https://huggingface.co/BelleGroup/BELLE-7B-0.6M),[BELLE-7B-1M](https://huggingface.co/BelleGroup/BELLE-7B-1M),[BELLE-7B-2M](https://huggingface.co/BelleGroup/BELLE-7B-2M)
### ⚖️ 模型量化gptq

详见[BELLE/gptq](https://github.com/LianjiaTech/BELLE/tree/main/models/gptq),参考gptq的实现,对本项目中相关模型进行了量化

### 🌐 Colab

[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/LianjiaTech/BELLE/blob/main/models/notebook/BELLE_INFER_COLAB.ipynb) 提供了colab上面可运行的推理代码[Colab](https://colab.research.google.com/github/LianjiaTech/BELLE/blob/main/models/notebook/BELLE_INFER_COLAB.ipynb)

### 💬 ChatBELLE App

详见[BELLE/chat](chat/README.md),基于[BELLE](https://github.com/LianjiaTech/BELLE)模型的跨平台离线大语言模型交谈App。使用量化后的离线端上模型配合Flutter,可在macOS(已支持)、Windows、Android、iOS等设备上运行。

### 📑 研究报告

详见[BELLE/docs](docs/),其中会定期更新本项目相关的研究报告工作

**欢迎大家通过issue贡献更多的prompts!**

<br/>

## 📑 研究报告

### [Towards Better Instruction Following Language Models for Chinese: Investigating the Impact of Training Data and Evaluation](https://github.com/LianjiaTech/BELLE/blob/main/docs/Towards%20Better%20Instruction%20Following%20Language%20Models%20for%20Chinese.pdf)

为了推动开源大语言模型的发展,大家投入了大量精力开发能够类似于ChatGPT的低成本模型。
首先,为了提高模型在中文领域的性能和训练/推理效率,我们进一步扩展了LLaMA的词汇表,并在34亿个中文词汇上进行了二次预训练。

此外,目前可以看到基于ChatGPT产生的指令训练数据方式有:1)参考Alpaca基于GPT3.5得到的self-instruct数据;
2)参考Alpaca基于GPT4得到的self-instruct数据;3)用户使用ChatGPT分享的数据ShareGPT。
在这里,我们着眼于探究训练数据类别对模型性能的影响。具体而言,我们考察了训练数据的数量、质量和语言分布等因素,以及我们自己采集的中文多轮对话数据,以及一些公开可访问的高质量指导数据集。

为了更好的评估效果,我们使用了一个包含一千个样本和九个真实场景的评估集来测试各种模型,同时通过量化分析来提供有价值的见解,以便更好地促进开源聊天模型的发展。

这项研究的目标是填补开源聊天模型综合评估的空白,以便为这一领域的持续进步提供有力支持。

实验结果如下:

<table>
  <tr>
    <td> Factor </td>
    <td> Base model </td>
    <td> Training data </td>
    <td> Score_w/o_others </td>
  <tr>
    <td rowspan="2">词表扩充</td>
    <td> LLaMA-7B-EXT </td>
    <td> zh(alpaca-3.5&4) + sharegpt </td>
    <td> 0.670 </td>
  </tr>
  <tr>
    <td> LLaMA-7B </td>
    <td> zh(alpaca-3.5&4) + sharegpt </td>
    <td> 0.652</td>
  </tr>
  <tr>
    <td rowspan="2">数据质量</td>
    <td> LLaMA-7B-EXT </td>
    <td> zh(alpaca-3.5) </td>
    <td> 0.642 </td>
  </tr>
  <tr>
    <td> LLaMA-7B-EXT </td>
    <td> zh(alpaca-4) </td>
    <td> 0.693 </td>
  </tr>
  <tr>
    <td rowspan="4">数据语言分布</td>
    <td> LLaMA-7B-EXT </td>
    <td> zh(alpaca-3.5&4) </td>
    <td> 0.679 </td>
  </tr>
  <tr>
    <td> LLaMA-7B-EXT </td>
    <td> en(alpaca-3.5&4) </td>
    <td> 0.659 </td>
  </tr>
  <tr>
    <td> LLaMA-7B-EXT </td>
    <td> zh(alpaca-3.5&4) + sharegpt </td>
    <td> 0.670 </td>
  </tr>
  <tr>
    <td> LLaMA-7B-EXT </td>
    <td> en(alpaca-3.5&4) + sharegpt </td>
    <td> 0.668 </td>
  </tr>
  <tr>
    <td rowspan="2">数据规模</td>
    <td> LLaMA-7B-EXT </td>
    <td> zh(alpaca-3.5&4) + sharegpt </td>
    <td> 0.670 </td>
  </tr>
  <tr>
    <td> LLaMA-7B-EXT </td>
    <td> zh(alpaca-3.5&4) + sharegpt <br>+ BELLE-0.5M-CLEAN</td>
    <td> 0.762</td>
  </tr>
  <tr>
    <td>-</td>
    <td>ChatGPT</td>
    <td>-</td>
    <td>0.824</td>
</table>

其中**BELLE-0.5M-CLEAN**是从230万指令数据中清洗得到0.5M数据,其中包含单轮和多轮对话数据,和之前开放的0.5M数据不是同一批数据。

**需要强调指出的是**:通过案例分析,我们发现我们的评估集在全面性方面存在局限性,这导致了模型分数的改善与实际用户体验之间的不一致。构建一个高质量的评估集是一个巨大的挑战,因为它需要在保持平衡难易程度的同时,包含尽可能多样的使用场景。如果评估样本主要都过于困难,那么所有模型的表现将会很差,使得辨别各种训练策略的效果变得具有挑战性。相反,如果评估样本都相对容易,评估将失去其比较价值。此外,必须确保评估数据与训练数据保持独立。

<p align="center">
  <img src="./assets/eval-set-distribution.jpg" alt="LLM eval" width="400">
</p>

基于这些观察,我们谨慎地提醒不要假设模型仅通过在有限数量的测试样本上获得良好结果就已经达到了与ChatGPT相当的性能水平。我们认为,优先发展全面评估集具有重要意义。

### [A Comparative Study between Full-Parameter and LoRA-based Fine-Tuning on Chinese Instruction Data for Instruction Following Large Language Model](https://github.com/LianjiaTech/BELLE/blob/main/docs/A%20Comparative%20Study%20between%20Full-Parameter%20and%20LoRA-based.pdf)

为了实现对大语言模型的指令调优,受限于资源和成本,许多研究者开始使用参数高效的调优技术,例如LoRA,来进行指令调优,这也取得了一些令人鼓舞的成果。
相较于全参数微调,基于LoRA的调优在训练成本方面展现出明显的优势。
在这个研究报告中,我们选用LLaMA作为基础模型,对全参数微调和基于LoRA的调优方法进行了实验性的比较。

实验结果揭示,选择合适的基础模型、训练数据集的规模、可学习参数的数量以及模型训练成本均为重要因素。

我们希望本文的实验结论能对大型语言模型的训练提供有益的启示,特别是在中文领域,协助研究者在训练成本与模型性能之间找到更佳的权衡策略。
实验结果如下:

| Model | Average Score | Additional Param. | Training Time (Hour/epoch) |
| ----- | ------ | ----- | ------ |
| LLaMA-13B + LoRA(2M) | 0.648 | 28M | 8 |
| LLaMA-7B + LoRA(4M) | 0.624 | 17.9M | 11 |
| LLaMA-7B + LoRA(2M) | 0.609 | 17.9M | 7 |
| LLaMA-7B + LoRA(0.6M) | 0.589 | 17.9M | 5 |
| LLaMA-7B + FT(2M) | 0.710 | - | 31 |
| LLaMA-7B + LoRA(4M) | 0.686 | - | 17 |
| LLaMA-7B + FT(2M) <br>+ LoRA(math_0.25M) | 0.729 | 17.9M | 3 |
| LLaMA-7B + FT(2M) <br>+ FT(math_0.25M) | 0.738 | - | 6 |

其中的score是基于本项目集目前开放的1000条评估集合得到。

其中LLaMA-13B + LoRA(2M) 代表了一个使用LLaMA-13B作为基础模型和LoRA训练方法,在2M指令数据上进行训练的模型。而LLaMA-7B + FT(2M) 代表了一个使用全参数微调进行训练的模型。

LLaMA-7B + FT(2M) + LoRA(math_0.25M) 代表了一个在0.25M数学指令数据上,以LLaMA-7B + FT(2M)作为基础模型并使用LoRA训练方法进行训练的模型。LLaMA-7B + FT(2M) + FT(math_0.25M) 代表了一个使用增量全参数微调进行训练的模型。关于训练时间,所有这些实验都是在8块NVIDIA A100-40GB GPU上进行的。

其中的math_0.25M是开放的0.25M数学数据库。在实验过程中,根据我们的评估(详见论文),我们的模型在数学任务上表现不佳,得分大多低于0.5。为了验证 LoRA 在特定任务上的适应能力,我们使用增量0.25M数学数据集(math_0.25M)来调整指令遵循的大型语言模型(我们选择LLaMA-7B+FT(2M)作为基础模型)。作为对比,我们使用了学习速率为5e-7的增量微调方法,并进行了2个时期的训练。因此,我们得到了两个模型,一个是LLaMA-7B+FT(2M)+LoRA(math_0.25M),另一个是LLaMA-7B+FT(2M)+FT(math_0.25M)。
从实验结果可以看出,增量微调仍然表现更好,但需要更长的训练时间。LoRA和增量微调都提高了模型的整体性能。从附录中的详细数据可以看出,LoRA和增量微调都在数学任务中显示出显著的改进,而只会导致其他任务的轻微性能下降。具体而言,数学任务的表现分别提高到了0.586和0.559。

可以看到:1) 选择基础模型对于 LoRA 调整的有效性具有显著影响;2)增加训练数据量可以持续提高LoRA模型的有效性;3)LoRA 调整受益于模型参数的数量。对于LoRA方案的使用,我们建议可以在已经完成了指令学习的模型的基础上针对特定任务做loRA的自适应训练。

同样地,该论文中的相关模型也会尽快开放在本项目中。

## ⚠️ 局限性、使用限制与免责声明

基于当前数据和基础模型训练得到的SFT模型,在效果上仍存在以下问题:

1. 在涉及事实性的指令上可能会产生违背事实的错误回答。

2. 对于具备危害性的指令无法很好的鉴别,由此会产生危害性言论。

3. 在一些涉及推理、代码、多轮对话等场景下模型的能力仍有待提高。

基于以上模型局限性,我们要求开发者仅将我们开源的代码、数据、模型及后续用此项目生成的衍生物用于研究目的,不得用于商业,以及其他会对社会带来危害的用途。

本项目仅可应用于研究目的,项目开发者不承担任何因使用本项目(包含但不限于数据、模型、代码等)导致的危害或损失。详细请参考[免责声明](https://github.com/LianjiaTech/BELLE/blob/main/DISCLAIMER)。


<br/>

## 📌 引用

如果使用本项目的代码、数据或模型,请引用本项目。

```
@misc{BELLE,
  author = {BELLEGroup},
  title = {BELLE: Be Everyone's Large Language model Engine },
  year = {2023},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/LianjiaTech/BELLE}},
}

@article{belle2023exploring,
  title={Exploring the Impact of Instruction Data Scaling on Large Language Models: An Empirical Study on Real-World Use Cases},
  author={Yunjie Ji, Yong Deng, Yan Gong, Yiping Peng, Qiang Niu, Lei Zhang, Baochang Ma, Xiangang Li},
  journal={arXiv preprint arXiv:2303.14742},
  year={2023}
}

@article{wen2023chathome,
  title={ChatHome: Development and Evaluation of a Domain-Specific Language Model for Home Renovation},
  author={Wen, Cheng and Sun, Xianghui and Zhao, Shuaijiang and Fang, Xiaoquan and Chen, Liangyu and Zou, Wei},
  journal={arXiv preprint arXiv:2307.15290},
  year={2023}
}
```

当然,你也需要引用原始的BLOOM论文、LLaMA论文、Stanford Alpaca和Self-Instruct论文。

<br/>

## 📚 模型使用例子
<details>

| Human | Assitant |
| ----- | ------ |
| 写一篇英文散文诗,主题是春雨,想象自己是春雨,和英国古代诗人莎士比亚交流 | I am the spring rain,<br/>Dancing on your face and body.<br/>My dew-drenched petals dance with you,<br/>Bringing life to every plant.<br/><br/>Shakespeare, I am here to meet you.<br/>Your works have filled my heart with joy.<br/>The beauty of nature in its fullness<br/>Makes me feel like a partaker.<br/><br/>As the leaves sway and rustle by,<br/>My dew-filled hand reaches out for them.<br/>The sweet scent of flowers fill the air,<br/>And bring me peace from all around.<br/><br/>Butterflies flit about as well,<br/>Glistening in the sun's rays.<br/>Their wings are made of dew,<br/>A beautiful sight to behold.<br/><br/>You see, Shakespeare, I too am one with nature.<br/>My dew-drenched hair is a symbol of hope.<br/>For when we can connect back to our roots,<br/>We will be able to make it through this season. |
| I am the spring rain,<br/>Dancing on your face and body.<br/>My dew-drenched petals dance with you,<br/>Bringing life to every plant.<br/><br/>Shakespeare, I am here to meet you.<br/>Your works have filled my heart with joy.<br/>The beauty of nature in its fullness<br/>Makes me feel like a partaker.<br/><br/>As the leaves sway and rustle by,<br/>My dew-filled hand reaches out for them.<br/>The sweet scent of flowers fill the air,<br/>And bring me peace from all around.<br/><br/>Butterflies flit about as well,<br/>Glistening in the sun's rays.<br/>Their wings are made of dew,<br/>A beautiful sight to behold.<br/><br/>You see, Shakespeare, I too am one with nature.<br/>My dew-drenched hair is a symbol of hope.<br/>For when we can connect back to our roots,<br/>We will be able to make it through this season. <br/>把上面的散文诗翻译成中文 | 我是一场春雨,<br/>在你脸上跳跃。<br/>我浸润着露珠的翅膀和你一起舞动,<br/>为每一株植物带来生命。<br/><br/>莎士比亚,我来与你相遇。<br/>你的作品填满了我的心房。<br/>大自然的美丽让我感到与之一起分享,<br/>让我觉得自己成为了其中的一部分。<br/><br/>当树叶摇曳时,<br/>我的手掌沾满了露水。<br/>花香弥漫在空气中,<br/>带给我宁静和安宁。<br/><br/>你看,莎士比亚,我也是与大自然融为一体的。<br/>我沾湿的头发象征着希望。<br/>当我们能够回到我们的根源,<br/>我们就能共同度过这个季节。|
| Classify the sentiment of the following sentence into Positive, Neutral, or Negative: <br/>Super excited about teaching Stanford’s first course on Large Language Models! Check the syllabus out here | Positive |
| 小明的爸爸有三个孩子,老大叫王一,老二叫王二,老三叫什么? | 小明 |
| 使用python写一个二分查找的代码 | def binary_search(arr, target):<br/>&nbsp;&nbsp;low = 0<br/>&nbsp;&nbsp;high = len(arr) - 1<br/>&nbsp;&nbsp;while (low <= high):<br/>&nbsp;&nbsp;&nbsp;&nbsp;mid = low + high // 2<br/>&nbsp;&nbsp;&nbsp;&nbsp;if arr[mid] == target:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return mid<br/>&nbsp;&nbsp;&nbsp;&nbsp;elif target < arr[mid]:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;low = mid + 1<br/>&nbsp;&nbsp;&nbsp;&nbsp;else:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;high = mid - 1<br/>&nbsp;&nbsp;return -1 |
| 今天天气怎么样,把这句话翻译成英语 | What's the weather like today? |
| 怎么让自己精力充沛,列5点建议 | 以下是一些可以让你保持精力充沛的建议: <br/>1. 睡眠充足。确保每天晚上得到充足的睡眠时间。 <br/>2. 多运动。进行适度的有氧运动,如慢跑、游泳等,可以帮助你提高能量和耐力。<br/>3. 吃健康食品。选择富含蛋白质的食物,如鸡肉、鱼肉和鸡蛋,以及新鲜的水果和蔬菜。 <br/>4. 减少咖啡因的摄入量。尽量避免在白天喝含咖啡因的饮料或吃含有咖啡因的食物。 <br/>5. 放松身心。尝试冥想、瑜伽或其他形式的放松活动来减轻压力和焦虑感。 |
| 明天就假期结束了,有点抗拒上班,应该什么办? | 面对即将结束的假期和开始工作时的紧张情绪,您可以采取以下措施来帮助您更好地适应: <br/>1. 为自己制定一个清晰的工作计划。这可以帮助您更好地组织时间和任务,并避免在工作中感到混乱。 <br/>2. 与同事或朋友交流,分享您的感受和工作压力。这将有助于缓解一些焦虑感,同时也可以获得支持和建议。 <br/>3. 在工作日前花些时间放松身心,例如进行瑜伽、冥想等活动。这些方法可以减轻身体和精神上的疲劳感,使您更加精力充沛地迎接挑战。 |
| 父母都姓吴,取一些男宝宝和女宝宝的名字 | - 男宝:吴俊杰、吴雨辰、吴子墨、吴思源、吴泽阳、吴宇航、吴博文、吴哲毅。 <br/>- 女宝:吴美琪、吴佳怡、吴欣瑜、吴香凝、吴雪柔、吴颖诗、吴语嫣。 |
| 推荐几本金庸的武侠小说 | 以下是三本我最喜欢的金庸武侠小说的推荐: <br/>1. 《射雕英雄传》 - 一部充满智慧和机智的小说,讲述了郭靖、黄蓉夫妇的故事。 <br/>2. 《神雕侠侣》- 这是一部浪漫而感人的故事,讲述了一对情侣小龙女与杨过之间的爱情故事。 <br/>3. 《倚天屠龙记》- 这是一个宏伟而壮观的故事,描绘了明教领袖张无忌如何成为一位出色的英雄。 |

</details>
<br/>

## ⛽️ 如何贡献

如果您想为本项目提交Issue或贡献数据/代码,请参考[如何贡献](https://github.com/LianjiaTech/BELLE/blob/main/HOW_TO_CONTRIBUTE.md)。

## ☎️ 联系我们

欢迎大家来[Discord](https://discord.gg/pMPY53UUGq)与[微信](https://github.com/LianjiaTech/BELLE/blob/main/assets/belle_wechat.jpg)与我们交流。

## ⭐️ Star History

[![Star History Chart](https://api.star-history.com/svg?repos=LianjiaTech/BELLE&type=Date)](https://star-history.com/#LianjiaTech/BELLE&Date)


================================================
FILE: README_en.md
================================================

## <img src="assets/belle_logo.png" style="vertical-align: middle; width: 35px;"> BELLE: Be Everyone's Large Language model Engine

*[中文README](README.md).*

<div align="center">

<a href="https://github.com/LianjiaTech/BELLE/stargazers">![GitHub Repo stars](https://img.shields.io/github/stars/LianjiaTech/BELLE?style=social)</a>
[![Code License](https://img.shields.io/badge/Code%20License-Apache_2.0-green.svg)](https://github.com/LianjiaTech/BELLE/blob/main/LICENSE)
[![Generic badge](https://img.shields.io/badge/discord-BELLE%20Group-green.svg?logo=discord)](https://discord.gg/pMPY53UUGq)
[![Generic badge](https://img.shields.io/badge/wechat-BELLE-green.svg?logo=wechat)](https://github.com/LianjiaTech/BELLE/blob/main/assets/belle_wechat.jpg)
[![Generic badge](https://img.shields.io/badge/🤗-Huggingface%20Repo-green.svg)](https://huggingface.co/BelleGroup)

</div>

The goal of this project is to promote the development of an open-source community for Chinese conversational large language models, with the vision of becoming an LLM Engine that can help everyone.

Rather than focusing on how to effectively pre-train large language models, BELLE is more concerned with how to build on the foundation of open-source pre-trained large language models to help everyone obtain their own high-performing, instruction-driven language model, thereby lowering the barriers to research and application of large language models, especially Chinese ones. To this end, the BELLE project will continuously provide access to instruction training data, related models, training code, application scenarios, and more, while also evaluating the impact of different training data and training algorithms on model performance. BELLE is optimized for Chinese and the model fine-tuning uses only data produced by ChatGPT (without incorporating any other data).

<br/>

## ChatBELLE App

Try our cross-platform chat app to run 4-bit quantized BELLE-7B model natively on your device.
The following screencap ran on an M1 Max CPU real-time (no speed adjustment).

**App Downloading**:Releases

[App Companion Model and Usage](chat/README.md)

<img src="./chat/chatbelle-demo.gif"></img>

## 🔄 What‘s new
* [2024/03/15] Updated a technical report [Dial-insight](https://arxiv.org/pdf/2403.09167.pdf). Dial-insight: Fine-tuning Large Language Models with High-Quality Domain-Specific Data Preventing Capability Collapse
* [2024/01/16] Updated a technical report [RAISE](https://arxiv.org/pdf/2401.02777.pdf). RAISE found through experiments that constructing a small amount of sample data can effectively stimulate large models and generate more controllable dialogues
* [2023/12/29] The open-source ASR model with enhanced Chinese capabilities [Belle-whisper-larger-v2-zh](https://huggingface.co/BELLE-2/Belle-whisper-large-v2-zh) and [Belle-distilwhisper-large -v2-zh](https://huggingface.co/BELLE-2/Belle-distilwhisper-large-v2-zh) are released, making it easier for everyone to use large language models in speech scenarios.
* [2023/11/24] The open-source [BELLE-VL](https://huggingface.co/BELLE-2/BELLE-VL) multimodal large language model is released, expanding the model's visual capabilities based on a language model foundation with enhanced Chinese language abilities. This provides the community with more flexible options. Currently, the latest version of BELLE-VL has scored 1620.10 points in the [MME](https://github.com/BradyFU/Awesome-Multimodal-Large-Language-Models/tree/Evaluation) perception evaluation dimension, surpassing Qwen-VL, Llava, and mplug-owl."
* [2023/10/27] Updated a technical report [DUMA](https://arxiv.org/pdf/2310.18075.pdf), exploring the Agent based on fast-slow brain architecture in conversational scenarios.
* [2023/09/26] Updated the RLHF training code, supporting PPO and [DPO](https://arxiv.org/abs/2305.18290) training. Details: [README_RLHF.md](train/README_RLHF.md).
* [2023/08/16] Based on [train_3.5M_CN](https://huggingface.co/datasets/BelleGroup/train_3.5M_CN), added instruction category field with 13 categories. Details: [train_3.5M_CN_With_Category](https://huggingface.co/datasets/BELLE-2/train_3.5M_CN_With_Category).
* [2023/08/10] Updated inference code based on ZeRO Inference. Details: [train/README_ZERO_INFERENCE.md](train/README_ZERO_INFERENCE.md).
* [2023/08/07] Updated continuous pre-training and instruction fine-tuning codes, added flash attention 2. See [train/README.md](train/README.md). Packaged runtime environment at [train/docker/README.md](train/docker/README.md).
* [2023/07/31] Updated a [technical report](https://arxiv.org/abs/2307.15290), exploring strategies for incremental pre-training + instruction fine-tuning in niche domains.
* [2023/07/27] Released [BELLE-Llama2-13B-chat-0.4M](https://huggingface.co/BELLE-2/BELLE-Llama2-13B-chat-0.4M), trained on 400,000 quality conversations based on Llama-2-13B. Improved performance on [evaluation set](https://github.com/LianjiaTech/BELLE/blob/main/eval/eval_set.json) compared to BELLE-LLaMA-EXT-13B model.
* [2023/05/14] Released [BELLE-LLaMA-EXT-13B](https://huggingface.co/BelleGroup/BELLE-LLaMA-EXT-13B), expanded Chinese vocabulary from LLaMA-13B-chat, trained on 4 million quality conversations.
* [2023/05/11] In [BELLE/10M](https://github.com/LianjiaTech/BELLE/tree/main/10M), a new dataset named ["train_3.5M_CN"]((https://huggingface.co/datasets/BelleGroup/train_3.5M_CN)) containing 3.5 million newly added diverse instruction task data.
* [2023/04/18] The train code has been updated and can be found in [BELLE/train](train). Deepspeed-Chat has been integrated, and relevant Docker containers have been provided.
* [2023/04/17] Two new papers have been published that compare the effects of different training data generation methods and different training methods (LoRA, finetune) on model performance.
* [2023/04/12] Released [ChatBELLE App](chat/README.md), a cross-platform BELLE-7B model realtime chat App based on [llama.cpp](https://github.com/ggerganov/llama.cpp) and [Flutter](https://flutter.dev/).
* [2023/04/08] In [BELLE/10M](https://github.com/LianjiaTech/BELLE/tree/main/10M), a new dataset named ["Generated Chat"]((https://huggingface.co/datasets/BelleGroup/generated_chat_0.4M)) containing newly generated multi-turn dialogues with given roles, and a new dataset named ["train_2M_CN"](https://huggingface.co/datasets/BelleGroup/train_2M_CN) containing 2 million newly added diverse instruction task data.
* [2023/04/05] The inference code that can be run on [Colab](https://colab.research.google.com/github/LianjiaTech/BELLE/blob/main/models/notebook/BELLE_INFER_COLAB.ipynb) is provided

## 📝 This repo contains

###  🚀 Traning recipe

  Please refer to [BELLE/train](train/) for a simplified implementation of the training code, which includes Deepspeed-Chat integration and supports finetuning and LoRA. Relevant Docker containers are also provided.
  
### 📊 Data Release
  
  Details in [BELLE/data/1.5M](data/1.5M/),The Chinese dataset generated [1M](https://huggingface.co/datasets/BelleGroup/generated_train_1M_CN) + [0.5M](https://huggingface.co/datasets/BelleGroup/train_0.5M_CN), using [Stanford Alpaca](https://github.com/tatsu-lab/stanford_alpaca) as reference
  
  10M more data will be released gradually,details in [BELLE/data/10M](data/10M/). Currently, we have 0.8M multiturn data, and 0.25 math data.

### 🧐 Evaluation set & evaluation method
  
  Details in [BELLE/eval](eval/). A test set with over 1k samples and corresponding scoring prompts. It includes multiple categories and is evaluated using either GPT-4 or ChatGPT.

### 🤖 Models

  Details in [BELLE/models](models/)
  
* The model optimized based on BLOOMZ-7B1-mt:[BELLE-7B-0.2M](https://huggingface.co/BelleGroup/BELLE-7B-0.2M),[BELLE-7B-0.6M](https://huggingface.co/BelleGroup/BELLE-7B-0.6M),[BELLE-7B-1M](https://huggingface.co/BelleGroup/BELLE-7B-1M),[BELLE-7B-2M](https://huggingface.co/BelleGroup/BELLE-7B-2M)
  
* The finetuned models based on [Meta LLaMA](https://github.com/facebookresearch/llama): [BELLE-LLaMA-7B-0.6M-enc](https://huggingface.co/BelleGroup/BELLE-LLaMA-7B-0.6M-enc)
, [BELLE-LLaMA-7B-2M-enc](https://huggingface.co/BelleGroup/BELLE-LLaMA-7B-2M-enc)
, [BELLE-LLaMA-7B-2M-gptq-enc](https://huggingface.co/BelleGroup/BELLE-LLaMA-7B-2M-gptq-enc)
, [BELLE-LLaMA-13B-2M-enc](https://huggingface.co/BelleGroup/BELLE-LLaMA-13B-2M-enc). Considering [LLaMA's License](https://github.com/facebookresearch/llama/blob/main/LICENSE) constraints, the model is for research and learning only. Please strictly respect LLaMA's usage policy. Users are suggested to finetune the model with open-source scripts and datasets. We are not allowed to publish weights for LLaMA, of course, even finetuned, but there is no problem publishing the difference, a patch that we suggest to apply to the files. The encryption is a simple XOR between files, ensuring that only the people that have access to the original weights (from completely legal sources, of course) can transform them into finetuned weights. You can find the decrypt code on [BELLE/models](models/).

### ⚖️ Quantized_models

  Details in [BELLE/gptq](gptq/),Referring to the implementation of GPT-Q, the relevant models in this project have been quantized.

### 🌐 Colab
  
  [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/LianjiaTech/BELLE/blob/main/models/notebook/BELLE_INFER_COLAB.ipynb) provides the colab in [BELLE/notebook](https://colab.research.google.com/github/LianjiaTech/BELLE/blob/main/models/notebook/BELLE_INFER_COLAB.ipynb)

### 💬 ChatBELLE App

  Details in [BELLE/chat](chat/README.md), cross-platform LLM chat app with [BELLE](https://github.com/LianjiaTech/BELLE) using quantized on-device offline models and Flutter UI, running on macOS (done), Windows, Android, iOS and more.

### 📑 Research Reports

  Please refer to BELLE/docs for regular updates on research reports related to this project.

**More prompts are welcomed via issues!**

<br/>

## 📑 Research Reports

### [Towards Better Instruction Following Language Models for Chinese: Investigating the Impact of Training Data and Evaluation](https://github.com/LianjiaTech/BELLE/blob/main/docs/Towards%20Better%20Instruction%20Following%20Language%20Models%20for%20Chinese.pdf)

In order to promote the development of open source large language models, 
a lot of effort has been put into developing low-cost models similar to ChatGPT.

Firstly, in order to improve the performance and training/inference efficiency of the model in the Chinese domain, we further expanded the vocabulary of LLaMA and conducted secondary pre-training on 3.4 billion Chinese words.

In addition, currently, there are three types of instruction training data generated based on ChatGPT: 
1) self-instruct data based on GPT3.5 obtained by referring to Alpaca; 
2) self-instruct data based on GPT4 obtained by referring to Alpaca; 
3) data shared by users using ChatGPT, called ShareGPT.

Here, we focus on exploring the impact of training data categories on model performance. 
Specifically, we examined factors such as the quantity, quality, and language distribution of the training data, 
as well as our own collected Chinese multi-turn conversation data and some publicly accessible high-quality guidance datasets.

To better evaluate the effects, we used an evaluation set containing one thousand samples and 9 real scenarios to test various models, and provided valuable insights through quantitative analysis, in order to better promote the development of open source chat models.

The goal of this research is to fill the gap in the comprehensive evaluation of open source chat models, 
in order to provide strong support for the continuous progress in this field.

<table>
  <tr>
    <td> Factor </td>
    <td> Base model </td>
    <td> Training data </td>
    <td> Score_w/o_others </td>
  <tr>
    <td rowspan="2">vocabulary expansion</td>
    <td> LLaMA-7B-EXT </td>
    <td> zh(alpaca-3.5&4) + sharegpt </td>
    <td> 0.670 </td>
  </tr>
  <tr>
    <td> LLaMA-7B </td>
    <td> zh(alpaca-3.5&4) + sharegpt </td>
    <td> 0.652</td>
  </tr>
  <tr>
    <td rowspan="2">Data Quality</td>
    <td> LLaMA-7B-EXT </td>
    <td> zh(alpaca-3.5) </td>
    <td> 0.642 </td>
  </tr>
  <tr>
    <td> LLaMA-7B-EXT </td>
    <td> zh(alpaca-4) </td>
    <td> 0.693 </td>
  </tr>
  <tr>
    <td rowspan="4">Data Language Distribution</td>
    <td> LLaMA-7B-EXT </td>
    <td> cn(alpaca-3.5&4) </td>
    <td> 0.679 </td>
  </tr>
  <tr>
    <td> LLaMA-7B-EXT </td>
    <td> en(alpaca-3.5&4) </td>
    <td> 0.659 </td>
  </tr>
  <tr>
    <td> LLaMA-7B-EXT </td>
    <td> zh(alpaca-3.5&4) + sharegpt </td>
    <td> 0.670 </td>
  </tr>
  <tr>
    <td> LLaMA-7B-EXT </td>
    <td> en(alpaca-3.5&4) + sharegpt </td>
    <td> 0.668 </td>
  </tr>
  <tr>
    <td rowspan="2">Data Scale</td>
    <td> LLaMA-7B-EXT </td>
    <td> zh(alpaca-3.5&4) + sharegpt </td>
    <td> 0.670 </td>
  </tr>
  <tr>
    <td> LLaMA-7B-EXT </td>
    <td> zh(alpaca-3.5&4) + sharegpt <br>+ BELLE-0.5M-CLEAN</td>
    <td> 0.762</td>
  </tr>
  <tr>
    <td>-</td>
    <td>ChatGPT</td>
    <td>-</td>
    <td>0.824</td>
</table>

In which, **BELLE-0.5M-CLEAN** is a set of 0.5 million cleaned data obtained from 2.3 million instruction data, which includes single-turn and multi-turn conversation data, and is not from the same batch as the previously released 0.5 million data.

**It is important to note** that through case analysis, we found limitations in the comprehensiveness of our evaluation set, which resulted in inconsistencies between model scores and actual user experience. Building a high-quality evaluation set is a huge challenge because it requires including as many diverse usage scenarios as possible while maintaining a balance of difficulty levels. If the evaluation samples are all too difficult, the performance of all models will be poor, making it challenging to discern the effectiveness of various training strategies. Conversely, if the evaluation samples are all relatively easy, the evaluation will lose its comparative value. In addition, it is essential to ensure that the evaluation data is independent of the training data.

Based on these observations, we caution against assuming that a model has achieved performance on par with ChatGPT merely by obtaining good results on a limited number of test samples. We believe that the continuous development of a comprehensive evaluation set is of great significance.

The relevant data and models in this work will be open-sourced in this project before April 19th.


### [A Comparative Study between Full-Parameter and LoRA-based Fine-Tuning on Chinese Instruction Data for Instruction Following Large Language Model](https://github.com/LianjiaTech/BELLE/blob/main/docs/A%20Comparative%20Study%20between%20Full-Parameter%20and%20LoRA-based.pdf)

To achieve fine-tuning of large language models, many researchers have begun to use parameter-efficient fine-tuning techniques, such as LoRA, due to resource and cost limitations, which have also achieved some encouraging results compared to full-parameter fine-tuning.

In this research report, we selected LLaMA as the base model and experimentally compared full-parameter fine-tuning with LoRA-based fine-tuning.

The experimental results revealed that the selection of appropriate base models, the scale of the training dataset, the number of learnable parameters, and the cost of model training are all important factors.

We hope that the experimental conclusions in this article can provide useful insights for the training of large language models, especially in the Chinese domain, and assist researchers in finding better trade-off strategies between training costs and model performance.

The experimental results are as follows:

| Model | Average Score | Additional Param. | Training Time (Hour/epoch) |
| ----- | ------ | ----- | ------ |
| LLaMA-13B + LoRA(2M) | 0.648 | 28M | 8 |
| LLaMA-7B + LoRA(4M) | 0.624 | 17.9M | 11 |
| LLaMA-7B + LoRA(2M) | 0.609 | 17.9M | 7 |
| LLaMA-7B + LoRA(0.6M) | 0.589 | 17.9M | 5 |
| LLaMA-7B + FT(2M) | 0.710 | - | 31 |
| LLaMA-7B + LoRA(4M) | 0.686 | - | 17 |
| LLaMA-7B + FT(2M) <br>+ LoRA(math_0.25M) | 0.729 | 17.9M | 3 |
| LLaMA-7B + FT(2M) <br>+ FT(math_0.25M) | 0.738 | - | 6 |

The score is based on the 1000 evaluation sets currently open in this project.

LLaMA-13B + LoRA(2M) represents a model trained on 2 million instruction data using LLaMA-13B as the base model and the LoRA training method. LLaMA-7B + FT(2M) represents a model trained using full-parameter fine-tuning.

LLaMA-7B + FT(2M) + LoRA(math_0.25M) represents a model trained on 0.25 million math instruction data using LLaMA-7B + FT(2M) as the base model and the LoRA training method. LLaMA-7B + FT(2M) + FT(math_0.25M) represents a model trained using incremental full-parameter fine-tuning. All of these experiments were conducted on 8 NVIDIA A100-40GB GPUs.

math_0.25M is the open 0.25 million math database. During the experiment, according to our evaluation (see paper for details), our model performed poorly on math tasks, with scores mostly below 0.5. To verify the adaptability of LoRA on specific tasks, we used an incremental 0.25 million math dataset (math_0.25M) to adjust the large language model following instructions (we chose LLaMA-7B+FT(2M) as the base model) using the LoRA training method. As a comparison, we used incremental fine-tuning with a learning rate of 5e-7 and trained for two epochs. Thus, we obtained two models, LLaMA-7B+FT(2M)+LoRA(math_0.25M) and LLaMA-7B+FT(2M)+FT(math_0.25M).

The experimental results show that incremental fine-tuning still performs better but requires longer training time. LoRA and incremental fine-tuning both improved the overall performance of the model. From the detailed data in the appendix, LoRA and incremental fine-tuning both showed significant improvements in the math task, but only led to a slight performance decrease in other tasks. Specifically, the performance of the math task improved to 0.586 and 0.559, respectively.

It can be seen that: 1) the selection of the base model has a significant impact on the effectiveness of LoRA adjustment; 2) increasing the amount of training data can continue to improve the effectiveness of the LoRA model; 3) LoRA adjustment benefits from the number of model parameters. For the use of the LoRA scheme, we recommend doing adaptive training with LoRA on specific tasks based on models that have completed instruction learning.

Similarly, the relevant models in this paper will be open-sourced in this project as soon as possible.


## ⚠️ Limitation, Usage Limits and Disclaimer

There still exists a few issues in the model trained on current base model and data:

1. The model might generate factual errors when asked to follow instructions related to facts.

2. Occasionally generates harmful responses since the model still struggles to identify potential harmful instructions.

3. Needs improvements on reasoning and coding.

Since the model still has its limitations, we require developers only use the open-sourced code, data, model and any other artifacts generated via this project for research purposes. Commercial use and other potential harmful use cases are not allowed.

This project is only allowed to be used in research purposes only. The project owners and contributors shall not be held responsible for any damage or loss caused by using this project (including but not limited to data, model or code). Please refert to our [disclaimer](https://github.com/LianjiaTech/BELLE/blob/main/DISCLAIMER) for details.

<br/>

## 📌 Citation

Please cite us when using our code, data or model.

```
@misc{BELLE,
  author = {BELLEGroup},
  title = {BELLE: Be Everyone's Large Language model Engine},
  year = {2023},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/LianjiaTech/BELLE}},
}

@article{belle2023exploring,
  title={Exploring the Impact of Instruction Data Scaling on Large Language Models: An Empirical Study on Real-World Use Cases},
  author={Yunjie Ji, Yong Deng, Yan Gong, Yiping Peng, Qiang Niu, Lei Zhang, Baochang Ma, Xiangang Li},
  journal={arXiv preprint arXiv:2303.14742},
  year={2023}
}

@article{wen2023chathome,
  title={ChatHome: Development and Evaluation of a Domain-Specific Language Model for Home Renovation},
  author={Wen, Cheng and Sun, Xianghui and Zhao, Shuaijiang and Fang, Xiaoquan and Chen, Liangyu and Zou, Wei},
  journal={arXiv preprint arXiv:2307.15290},
  year={2023}
}
```

Cite the original BLOOM, LLaMA, Stanford Alpaca and Self-Instruct papers as well!

</br>

## 📚 Use case

<details>

| Human | Assitant |
| ----- | ------ |
| 写一篇英文散文诗,主题是春雨,想象自己是春雨,和英国古代诗人莎士比亚交流 | I am the spring rain,<br/>Dancing on your face and body.<br/>My dew-drenched petals dance with you,<br/>Bringing life to every plant.<br/><br/>Shakespeare, I am here to meet you.<br/>Your works have filled my heart with joy.<br/>The beauty of nature in its fullness<br/>Makes me feel like a partaker.<br/><br/>As the leaves sway and rustle by,<br/>My dew-filled hand reaches out for them.<br/>The sweet scent of flowers fill the air,<br/>And bring me peace from all around.<br/><br/>Butterflies flit about as well,<br/>Glistening in the sun's rays.<br/>Their wings are made of dew,<br/>A beautiful sight to behold.<br/><br/>You see, Shakespeare, I too am one with nature.<br/>My dew-drenched hair is a symbol of hope.<br/>For when we can connect back to our roots,<br/>We will be able to make it through this season. |
| I am the spring rain,<br/>Dancing on your face and body.<br/>My dew-drenched petals dance with you,<br/>Bringing life to every plant.<br/><br/>Shakespeare, I am here to meet you.<br/>Your works have filled my heart with joy.<br/>The beauty of nature in its fullness<br/>Makes me feel like a partaker.<br/><br/>As the leaves sway and rustle by,<br/>My dew-filled hand reaches out for them.<br/>The sweet scent of flowers fill the air,<br/>And bring me peace from all around.<br/><br/>Butterflies flit about as well,<br/>Glistening in the sun's rays.<br/>Their wings are made of dew,<br/>A beautiful sight to behold.<br/><br/>You see, Shakespeare, I too am one with nature.<br/>My dew-drenched hair is a symbol of hope.<br/>For when we can connect back to our roots,<br/>We will be able to make it through this season. <br/>把上面的散文诗翻译成中文 | 我是一场春雨,<br/>在你脸上跳跃。<br/>我浸润着露珠的翅膀和你一起舞动,<br/>为每一株植物带来生命。<br/><br/>莎士比亚,我来与你相遇。<br/>你的作品填满了我的心房。<br/>大自然的美丽让我感到与之一起分享,<br/>让我觉得自己成为了其中的一部分。<br/><br/>当树叶摇曳时,<br/>我的手掌沾满了露水。<br/>花香弥漫在空气中,<br/>带给我宁静和安宁。<br/><br/>你看,莎士比亚,我也是与大自然融为一体的。<br/>我沾湿的头发象征着希望。<br/>当我们能够回到我们的根源,<br/>我们就能共同度过这个季节。|
| Classify the sentiment of the following sentence into Positive, Neutral, or Negative: <br/>Super excited about teaching Stanford’s first course on Large Language Models! Check the syllabus out here | Positive |
| 小明的爸爸有三个孩子,老大叫王一,老二叫王二,老三叫什么? | 小明 |
| 使用python写一个二分查找的代码 | def binary_search(arr, target):<br/>&nbsp;&nbsp;low = 0<br/>&nbsp;&nbsp;high = len(arr) - 1<br/>&nbsp;&nbsp;while (low <= high):<br/>&nbsp;&nbsp;&nbsp;&nbsp;mid = low + high // 2<br/>&nbsp;&nbsp;&nbsp;&nbsp;if arr[mid] == target:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return mid<br/>&nbsp;&nbsp;&nbsp;&nbsp;elif target < arr[mid]:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;low = mid + 1<br/>&nbsp;&nbsp;&nbsp;&nbsp;else:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;high = mid - 1<br/>&nbsp;&nbsp;return -1 |
| 今天天气怎么样,把这句话翻译成英语 | What's the weather like today? |
| 怎么让自己精力充沛,列5点建议 | 以下是一些可以让你保持精力充沛的建议: <br/>1. 睡眠充足。确保每天晚上得到充足的睡眠时间。 <br/>2. 多运动。进行适度的有氧运动,如慢跑、游泳等,可以帮助你提高能量和耐力。<br/>3. 吃健康食品。选择富含蛋白质的食物,如鸡肉、鱼肉和鸡蛋,以及新鲜的水果和蔬菜。 <br/>4. 减少咖啡因的摄入量。尽量避免在白天喝含咖啡因的饮料或吃含有咖啡因的食物。 <br/>5. 放松身心。尝试冥想、瑜伽或其他形式的放松活动来减轻压力和焦虑感。 |
| 明天就假期结束了,有点抗拒上班,应该什么办? | 面对即将结束的假期和开始工作时的紧张情绪,您可以采取以下措施来帮助您更好地适应: <br/>1. 为自己制定一个清晰的工作计划。这可以帮助您更好地组织时间和任务,并避免在工作中感到混乱。 <br/>2. 与同事或朋友交流,分享您的感受和工作压力。这将有助于缓解一些焦虑感,同时也可以获得支持和建议。 <br/>3. 在工作日前花些时间放松身心,例如进行瑜伽、冥想等活动。这些方法可以减轻身体和精神上的疲劳感,使您更加精力充沛地迎接挑战。 |
| 父母都姓吴,取一些男宝宝和女宝宝的名字 | - 男宝:吴俊杰、吴雨辰、吴子墨、吴思源、吴泽阳、吴宇航、吴博文、吴哲毅。 <br/>- 女宝:吴美琪、吴佳怡、吴欣瑜、吴香凝、吴雪柔、吴颖诗、吴语嫣。 |
| 推荐几本金庸的武侠小说 | 以下是三本我最喜欢的金庸武侠小说的推荐: <br/>1. 《射雕英雄传》 - 一部充满智慧和机智的小说,讲述了郭靖、黄蓉夫妇的故事。 <br/>2. 《神雕侠侣》- 这是一部浪漫而感人的故事,讲述了一对情侣小龙女与杨过之间的爱情故事。 <br/>3. 《倚天屠龙记》- 这是一个宏伟而壮观的故事,描绘了明教领袖张无忌如何成为一位出色的英雄。 |

</details>

<br/>


## ⛽️ Contributing

You are welcomed to commit issues or contributig data/code.
Please refer to [How To Contribute](https://github.com/LianjiaTech/BELLE/blob/main/HOW_TO_CONTRIBUTE.md).

## ☎️ Contact Us

Drop by and join with us at [Discord](https://discord.gg/pMPY53UUGq) or [WeChat](https://github.com/LianjiaTech/BELLE/blob/main/assets/belle_wechat.jpg)!


================================================
FILE: chat/README.md
================================================
# ChatBELLE 跨平台应用

[English Version](README_en.md)

基于[BELLE](https://github.com/LianjiaTech/BELLE)模型的跨平台离线大语言模型交谈App。使用量化后的离线端上模型配合Flutter,可在macOS(已支持)、Windows、Android、iOS(参考[Known Issues](#known-issues))等设备上运行。

下图是一个可以使用App在设备端本地运行4bit量化的BELLE-7B模型,在M1 Max CPU上实时运行的效果(未加速):

<img src="./chatbelle-demo.gif"></img>


## App下载

请见[Releases](https://github.com/LianjiaTech/BELLE/releases/tag/v0.95)。

各平台对应下载&使用说明请见[使用说明](#使用说明)。

目前仅支持macOS。更多平台即将发布!

## 模型下载

可以去huggingface下载,[ChatBELLE-int4](https://huggingface.co/BelleGroup/ChatBELLE-int4)

**需要先首先执行ChatBELLE app,会建好一个文件夹```~/Library/Containers/com.barius.chatbelle```。然后将下载好的模型重命名并移动至app显示的路径。默认为~/Library/Containers/com.barius.chatbelle/Data/belle-model.bin。**

## 模型量化
使用[llama.cpp的4bit量化](https://github.com/ggerganov/llama.cpp)优化设备端离线推理的速度和内存占用。量化会带来计算精度的损失,影响模型的生成效果。4bit是比较激进的量化方式,目前的4bit模型效果相比fp32和fp16还有明显差距,仅供尝试。随着模型算法的发展和设备端算力的演进,我们相信离线推理的效果会有很大改善,我们也会持续跟进。

### GPTQ
[GPTQ](https://github.com/IST-DASLab/gptq)使用one-shot量化方式来获得更小的量化损失或更高的压缩率。我们将持续跟进基于GPTQ的设备端量化模型。


## 路线图
* 更多设备
* 多轮对话
* 模型选择
* 聊天历史
* 聊天列表


## 使用说明

### macOS
建议使用M1/M2系列芯片配合16G RAM以获得最佳体验。如果推理速度过慢,可能是内存不足,可以尝试关闭其他app以释放内存。8G内存会非常慢。
Intel芯片理论上也可以跑,但是速度较慢。

* 下载[Releases](https://github.com/LianjiaTech/BELLE/releases/tag/v0.95)中的[chatbelle.dmg](https://github.com/LianjiaTech/BELLE/releases/download/v0.95/chatbelle.dmg),双击打开,把`Chat Belle.dmg`左键拖进`应用程序`文件夹中。
* 右键`应用程序`文件夹中的`Chat Belle`App,按住Ctrl并左键单击`打开`,点`打开`。
* App会显示模型加载失败,并显示模型路径。关闭App。
* 下载量化后的模型[ChatBELLE-int4](https://huggingface.co/BelleGroup/ChatBELLE-int4)。
* 移动并重命名模型至app显示的路径。默认为`~/Library/Containers/com.barius.chatbelle/Data/belle-model.bin`。
* 重新打开App(直接双击)。

### Windows
* 敬请期待

### Android
* 敬请期待

### iOS
* 敬请期待


## 已知问题
* 推理在8GB内存的macOS设备上会非常慢,原因是内存不足导致疯狂swapping。16GB内存的设备在内存占用较高的情况下也可能遇到同样状况。
* 推理在Intel芯片的Mac设备上比较慢。
* iOS的3GB App内存限制导致最小模型(~4.3G)也无法加载。[参考](https://github.com/mikeger/llama-ios)


## 免责声明
本程序仅供学习、研究使用,因使用、传播本程序带来的任何损害,本程序的开发者不负任何责任。


## 致谢
* LLaMa模型设备端推理 [llama.cpp](https://github.com/ggerganov/llama.cpp)
* Flutter聊天UI [flyer.chat](https://github.com/flyerhq/flutter_chat_ui)



================================================
FILE: chat/README_en.md
================================================
# ChatBELLE 跨平台应用

[中文README](README.md)


# ChatBELLE Cross-platform App
A minimal, cross-platform LLM chat app with [BELLE](https://github.com/LianjiaTech/BELLE) using quantized on-device offline models and Flutter UI, running on macOS (done), Windows, Android, iOS(see [Known Issues](#known-issues)) and more.


## App Downloading
Please refer to [Releases](https://github.com/LianjiaTech/BELLE/releases/tag/v0.95).

Downloading and usage for different platforms: [Usage](#Usage).

Only macOS supported by now. More platforms coming soon!


## Model Downloading
You can download from huggingface repo, [ChatBELLE-int4](https://huggingface.co/BelleGroup/ChatBELLE-int4)

You need to first execute the ChatBELLE app, which will create a folder~/Library/Containers/com.barius.chatbelle. Then rename the downloaded model and move it to the path displayed on the app. The default is ~/Library/Containers/com.barius.chatbell/Data/belle-model.bin.


## Model Quantization
Utilizes [llama.cpp's 4bit quantization](https://github.com/ggerganov/llama.cpp) to optimize on-device inferencing speed and RAM occupation. Quantization leads to accuracy loss and model performance degradation. 4-bit quantization trades accuracy for model size, our current 4-bit model sees significant performance gap compared with fp32 or fp16 ones and is just for users to take a try. With better algorithms being developed and more powerful chips landing on mobile devices, we believe on-device model performance will thrive and will keep a close track on this.

### GPTQ
[GPTQ](https://github.com/IST-DASLab/gptq) employs one-shot quantization to achieve lower accuracy loss or higher model compression rate. We will keep track of this line of work.


## Roadmap
* More devices
* Multiround chat
* Model selection
* Chat history
* Chat list


## Usage

### macOS
Recommend using M1/M2 series CPU with 16GB RAM to have the best experience. If you encounter slow inference, try closing other apps to release more memory. Inference on 8G RAM will be very slow.
Intel CPUs could possibly run as well (not tested) but could be very slow.

* Download [chatbelle.dmg](https://github.com/LianjiaTech/BELLE/releases/download/v0.95/chatbelle.dmg) from [Releases](https://github.com/LianjiaTech/BELLE/releases/tag/v0.95) page, double click to open it, then drag `Chat Belle.dmg` into `Applications` folder.
* Open the `Chat Belle` app in `Applications` folder by right click then Ctrl-click `Open`, then click `Open`.
* The app will prompt the intended model file path and fail to load the model. Close the app.
* Download quantized model from [ChatBELLE-int4](https://huggingface.co/BelleGroup/ChatBELLE-int4/blob/main/belle-model.bin).
* Move and rename the model to the path prompted by the app. Defaults to `~/Library/Containers/com.barius.chatbelle/Data/belle-model.bin` .
* Reopen the app again (double clicking is now OK).

### Windows
* Stay tuned

### Android
* Stay tuned

### iOS
* Stay tuned


## Known Issues
* On macOS devices with 8GB RAM, inference is really slow due to constant swapping. 16GB RAM devices might see the same slowdown if RAM occupation by other applications is high.
* Inferencing on Macs with Intel chips is slow.
* The 3GB App RAM constraint on iOS devices won't allow even the smallest model (~4.3G) from loading. [Reference](https://github.com/mikeger/llama-ios)


## Disclaimer
This program is for learning and research purposes only. The devs take no responsibilities in any damage caused by using or distributing this program.


## Thanks
* LLaMa model inferencing code uses [llama.cpp](https://github.com/ggerganov/llama.cpp)
* Flutter chat UI uses [flyer.chat](https://github.com/flyerhq/flutter_chat_ui)


================================================
FILE: docker/README.md
================================================
# docker镜像
## 国内环境自行替换代理
```bash
export https_proxy=...
export http_proxy=...
export all_proxy=...
```

## 构建镜像
```bash
sudo bash build_dockerfile_upon_transfermers.sh
```

## 上传镜像到dockerhub
```bash
sudo bash upload_image.sh
```

## 下载镜像
已经构建好镜像,无需自行构建
```bash
sudo docker pull tothemoon/belle:latest
```
belle镜像中包含sshd,可以远程连接到容器内部

## 运行镜像
### 1. 参考[nvidia安装说明](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html)安装container-toolkit
### 2. 自行创建ssh密钥
### 3. 运行容器
```bash
sudo bash docker_run.sh
```
`docker_run.sh`文件主要内容如下
```
docker run --gpus all --ipc=host --ulimit memlock=-1 --ulimit stack=67108864 \
    --network host \
    --privileged \
    [--env https_proxy=$https_proxy \]
    [--env http_proxy=$http_proxy \]
    [--env all_proxy=$all_proxy \]
    --env HF_HOME=$hf_home \
    -it [--rm] \
    --name belle \
    -v $belle_path:$belle_path \
    -v $hf_home:$hf_home \
    -v $ssh_pub_key:/root/.ssh/authorized_keys \
    -w $workdir \
    $docker_user/belle:$tag \
    [--sshd_port 2201 --cmd "echo 'Hello, world!' && /bin/bash"]
```
`[]`中内容可忽略
- `--rm`:容器退出时销毁,如果长期在容器中工作,可忽略
- `--sshd_port`:sshd监听端口,默认是22001
- `--cmd`:容器要执行的命令`"echo 'Hello, world!' && /bin/bash"`,可忽略
- `hf_home`:huggingface缓存目录
- `$ssh_pub_key`:sshd公钥目录

================================================
FILE: docker/belle.dockerfile
================================================
FROM transformers:ds
LABEL maintainer="BELLE"
WORKDIR /workspace

RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
RUN apt update
RUN apt install -y git-lfs
RUN apt install -y htop
RUN apt install -y screen
RUN apt install -y tmux
RUN apt install -y locales \
    && locale-gen en_US.UTF-8 \
    && locale-gen zh_CN.UTF-8 \
    && echo -e 'export LANG=zh_CN.UTF-8' >> /root/.bashrc
RUN apt install -y net-tools
RUN apt install -y openssh-server \
    && sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/" /etc/ssh/sshd_config \
    && sed -i "s/#PubkeyAuthentication yes/PubkeyAuthentication yes/" /etc/ssh/sshd_config \
    && sed -i "s/#PasswordAuthentication yes/PasswordAuthentication no/" /etc/ssh/sshd_config \
    && echo "StrictHostKeyChecking no" >> /etc/ssh/ssh_config \
    && mkdir -p /run/sshd
RUN apt install -y pdsh \
    && chown root:root /usr/lib/x86_64-linux-gnu/pdsh \
    && chmod 755 /usr/lib/x86_64-linux-gnu/pdsh \
    && chown root:root /usr/lib \
    && chmod 755 /usr/lib

# https://docs.nvidia.com/networking/m/view-rendered-page.action?abstractPageId=15049785
# https://network.nvidia.com/products/infiniband-drivers/linux/mlnx_ofed/
ENV MOFED_VER=23.07-0.5.0.0
ENV PLATFORM=x86_64
RUN OS_VER="ubuntu$(lsb_release -rs)" \
    && wget http://content.mellanox.com/ofed/MLNX_OFED-${MOFED_VER}/MLNX_OFED_LINUX-${MOFED_VER}-${OS_VER}-${PLATFORM}.tgz \
    && tar -xvf MLNX_OFED_LINUX-${MOFED_VER}-${OS_VER}-${PLATFORM}.tgz \
    && MLNX_OFED_LINUX-${MOFED_VER}-${OS_VER}-${PLATFORM}/mlnxofedinstall --user-space-only --without-fw-update -q

RUN python3 -m pip install -U --no-cache-dir pip
RUN python3 -m pip install -U --no-cache-dir peft
RUN python3 -m pip install -U --no-cache-dir gradio
RUN python3 -m pip install -U --no-cache-dir pudb
RUN python3 -m pip install -U --no-cache-dir xformers
RUN python3 -m pip install -U --no-cache-dir bitsandbytes
RUN python3 -m pip install -U --no-build-isolation --no-cache-dir flash-attn
RUN python3 -m pip install -U --no-cache-dir install git+https://github.com/wookayin/gpustat.git@master
RUN python3 -m pip install -U --no-cache-dir ipykernel
RUN python3 -m pip install -U --no-cache-dir ipywidgets
RUN python3 -m pip install -U --no-cache-dir httpx[socks]
RUN python3 -m pip install -U --no-cache-dir wandb

RUN cd /workspace && \
    git clone https://github.com/huggingface/accelerate.git && \
    python3 -m pip uninstall -y accelerate && \
    cd accelerate && \
    python3 -m pip install -e .

RUN cd /workspace && \
    git clone https://github.com/huggingface/trl.git && \
    python3 -m pip uninstall -y trl && \
    cd trl && \
    python3 -m pip install -e .

RUN cd /workspace/transformers && \
    git pull && \
    python3 -m pip uninstall -y transformers && \
    python3 -m pip install -e .

RUN mkdir -p /scripts && echo -e '#!/bin/bash\n\
SSHD_PORT=22001\n\
CMD_TO_RUN=""\n\
while (( "$#" )); do\n\
  case "$1" in\n\
    --sshd_port)\n\
      if [ -n "$2" ] && [ ${2:0:1} != "-" ]; then\n\
        SSHD_PORT=$2\n\
        shift 2\n\
      else\n\
        echo "Error: Argument for $1 is missing" >&2\n\
        exit 1\n\
      fi\n\
      ;;\n\
    --cmd)\n\
      if [ -n "$2" ] && [ ${2:0:1} != "-" ]; then\n\
        CMD_TO_RUN=$2\n\
        shift 2\n\
      else\n\
        echo "Error: Argument for $1 is missing" >&2\n\
        exit 1\n\
      fi\n\
      ;;\n\
    -*|--*=) \n\
      echo "Error: Unsupported flag $1" >&2\n\
      exit 1\n\
      ;;\n\
    *) \n\
      shift\n\
      ;;\n\
  esac\n\
done\n\
sed -i "s/#Port 22/Port $SSHD_PORT/" /etc/ssh/sshd_config\n\
/usr/sbin/sshd\n\
if [ -n "$CMD_TO_RUN" ]; then\n\
  bash -c "$CMD_TO_RUN"\n\
else\n\
  /bin/bash\n\
fi' > /scripts/startup.sh && chmod +x /scripts/startup.sh

ENTRYPOINT ["/bin/bash", "/scripts/startup.sh"]


================================================
FILE: docker/build_dockerfile_upon_transfermers.sh
================================================
export https_proxy=...
export http_proxy=...
export all_proxy=...

wget https://raw.githubusercontent.com/huggingface/transformers/main/docker/transformers-pytorch-deepspeed-latest-gpu/Dockerfile -O transformers.dockerfile
docker build --network host --build-arg http_proxy=$http_proxy --build-arg https_proxy=$https_proxy --build-arg all_proxy=$all_proxy -t transformers:ds -f transformers.dockerfile .
docker build --network host --build-arg http_proxy=$http_proxy --build-arg https_proxy=$https_proxy --build-arg all_proxy=$all_proxy -t belle -f belle.dockerfile .


================================================
FILE: docker/docker_run.sh
================================================
# 需要先安装container-toolkit
# https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html

export https_proxy=...
export http_proxy=...
export all_proxy=...

belle_path=...
docker_user=...
tag=...
hf_home=".../.cache/huggingface"
ssh_pub_key="/home/.../.ssh/id_rsa.pub"
workdir="$belle_path/train"
chown root:root $ssh_pub_key

# docker run --gpus all --ipc=host --ulimit memlock=-1 --ulimit stack=67108864 \
#     --privileged \
#     --network host \
#     --env HTTP_PROXY=$http_proxy \
#     --env HF_HOME=$hf_home \
#     -it --rm \
#     -v $belle_path:$belle_path \
#     -v $hf_home:$hf_home \
#     -v $ssh_pub_key:/root/.ssh/authorized_keys \
#     -w $workdir \
#     $docker_user/transformers:$tag \
#     /bin/bash

# 前台运行
# docker run --gpus all --ipc=host --ulimit memlock=-1 --ulimit stack=67108864 \
#     --privileged \
#     --network host \
#     --env https_proxy=$https_proxy \
#     --env http_proxy=$http_proxy \
#     --env all_proxy=$all_proxy \
#     --env HF_HOME=$hf_home \
#     -it --rm \
#     --name belle \
#     -v $belle_path:$belle_path \
#     -v $hf_home:$hf_home \
#     -v $ssh_pub_key:/root/.ssh/authorized_keys \
#     -w $workdir \
#     $docker_user/belle:$tag \
#     --sshd_port 2201 --cmd "echo 'export https_proxy=$https_proxy' >> /root/.bashrc && \
#                             echo 'export http_proxy=$http_proxy' >> /root/.bashrc && \
#                             echo 'export all_proxy=$all_proxy' >> /root/.bashrc && \
#                             echo 'export HF_HOME=$hf_home' >> /root/.bashrc && \
#                             /bin/bash"

# 后台运行
docker run --gpus all --ipc=host --ulimit memlock=-1 --ulimit stack=67108864 \
    --privileged \
    --network host \
    --env https_proxy=$https_proxy \
    --env http_proxy=$http_proxy \
    --env all_proxy=$all_proxy \
    --env HF_HOME=$hf_home \
    -d --rm \
    --name belle \
    -v $belle_path:$belle_path \
    -v $hf_home:$hf_home \
    -v $ssh_pub_key:/root/.ssh/authorized_keys \
    -w $workdir \
    $docker_user/belle:$tag \
    --sshd_port 2201 --cmd "echo 'export https_proxy=$https_proxy' >> /root/.bashrc && \
                            echo 'export http_proxy=$http_proxy' >> /root/.bashrc && \
                            echo 'export all_proxy=$all_proxy' >> /root/.bashrc && \
                            echo 'export HF_HOME=$hf_home' >> /root/.bashrc && \
                            sleep infinity"
                            

================================================
FILE: docker/transformers.dockerfile
================================================
# https://docs.nvidia.com/deeplearning/frameworks/pytorch-release-notes/rel-22-12.html#rel-22-12
FROM nvcr.io/nvidia/pytorch:22.12-py3
LABEL maintainer="Hugging Face"

ARG DEBIAN_FRONTEND=noninteractive

ARG PYTORCH='2.0.1'
# Example: `cu102`, `cu113`, etc.
ARG CUDA='cu118'

RUN apt -y update
RUN apt install -y libaio-dev
RUN python3 -m pip install --no-cache-dir --upgrade pip

ARG REF=main
RUN git clone https://github.com/huggingface/transformers && cd transformers && git checkout $REF

RUN python3 -m pip uninstall -y torch torchvision torchaudio

# Install latest release PyTorch
# (PyTorch must be installed before pre-compiling any DeepSpeed c++/cuda ops.)
# (https://www.deepspeed.ai/tutorials/advanced-install/#pre-install-deepspeed-ops)
RUN python3 -m pip install --no-cache-dir -U torch==$PYTORCH torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/$CUDA

RUN python3 -m pip install --no-cache-dir ./transformers[deepspeed-testing]

RUN python3 -m pip install --no-cache-dir git+https://github.com/huggingface/accelerate@main#egg=accelerate

# Uninstall `transformer-engine` shipped with the base image
RUN python3 -m pip uninstall -y transformer-engine

# Uninstall `torch-tensorrt` shipped with the base image
RUN python3 -m pip uninstall -y torch-tensorrt

# recompile apex
RUN python3 -m pip uninstall -y apex
RUN git clone https://github.com/NVIDIA/apex
#  `MAX_JOBS=1` disables parallel building to avoid cpu memory OOM when building image on GitHub Action (standard) runners
RUN cd apex && git checkout 82ee367f3da74b4cd62a1fb47aa9806f0f47b58b && MAX_JOBS=1 python3 -m pip install --global-option="--cpp_ext" --global-option="--cuda_ext" --no-cache -v --disable-pip-version-check .

# Pre-build **latest** DeepSpeed, so it would be ready for testing (otherwise, the 1st deepspeed test will timeout)
RUN python3 -m pip uninstall -y deepspeed
# This has to be run (again) inside the GPU VMs running the tests.
# The installation works here, but some tests fail, if we don't pre-build deepspeed again in the VMs running the tests.
# TODO: Find out why test fail.
RUN DS_BUILD_CPU_ADAM=1 DS_BUILD_FUSED_ADAM=1 DS_BUILD_UTILS=1 python3 -m pip install deepspeed --global-option="build_ext" --global-option="-j8" --no-cache -v --disable-pip-version-check 2>&1

# When installing in editable mode, `transformers` is not recognized as a package.
# this line must be added in order for python to be aware of transformers.
RUN cd transformers && python3 setup.py develop

# The base image ships with `pydantic==1.8.2` which is not working - i.e. the next command fails
RUN python3 -m pip install -U --no-cache-dir "pydantic<2"
RUN python3 -c "from deepspeed.launcher.runner import main"


================================================
FILE: docker/upload_image.sh
================================================
export https_proxy=...
export http_proxy=...
export all_proxy=...
docker_user=...
tag=$(date +%Y%m%d)

docker tag transformers:ds $docker_user/transformers:ds_$tag
docker push $docker_user/transformers:ds_$tag
docker tag transformers:ds $docker_user/transformers:latest
docker push $docker_user/transformers:latest

docker tag belle $docker_user/belle:$tag
docker push $docker_user/belle:$tag
docker tag belle $docker_user/belle:latest
docker push $docker_user/belle:latest


================================================
FILE: docs/README.md
================================================
# This folder contains recent research papers from BELLE GROUP.


[1] Yunjie Ji, Yan Gong, Yiping Peng, Chao Ni, Peiyan Sun, Dongyu Pan, Baochang Ma, Xiangang Li, "Exploring ChatGPT's Ability to Rank Content: A Preliminary Study on Consistency with Human Preferences", arXiv preprint [arXiv:2303.07610](https://github.com/LianjiaTech/BELLE/blob/main/docs/Exploring%20ChatGPT's%20Ability%20to%20Rank%20Content%20A%20Preliminary%20Study%20on%20Consistency%20with%20Human%20Preferences.pdf).

* **Abstract**
As a natural language assistant, ChatGPT is capable of performing various tasks, including but not limited to article generation, code completion, and data analysis. Furthermore, ChatGPT has consistently demonstrated a remarkable level of accuracy and reliability in terms of content evaluation, exhibiting the capability of mimicking human preferences. To further explore ChatGPT’s potential in this regard, a study is conducted to assess its ability to rank content. In order to do so, a test set consisting of prompts is created, covering a wide range of use cases, and five models are utilized to generate corresponding responses. ChatGPT is then instructed to rank the responses generated by these models. The results on the test set show that ChatGPT’s ranking preferences are consistent with human to a certain extent. This preliminary experimental finding implies that ChatGPT’s zero-shot ranking capability could be used to re-duce annotation pressure in a number of ranking tasks.

<br/>

[2] Yunjie Ji, Yong Deng, Yan Gong, Yiping Peng, Qiang Niu, Lei Zhang, Baochang Ma, Xiangang Li, "Exploring the Impact of Instruction Data Scaling on Large Language Models: An Empirical Study on Real-World Use Cases", arXiv preprint [arXiv:2303.14742](https://github.com/LianjiaTech/BELLE/blob/main/docs/Exploring%20the%20Impact%20of%20Instruction%20Data%20Scaling%20on%20Large%20Language%20Models%20An%20Empirical%20Study%20on%20Real-World%20Use%20Cases.pdf) .

* **Abstract**
The success of ChatGPT has recently attracted numerous efforts to replicate it, with instruction-tuning strategies being a key factor in achieving remarkable results. Instruction-tuning not only significantly enhances the model’s performance and generalization but also makes the model’s generated results more consistent with human speech patterns. However current research rarely studies the impact of different amounts of instruction data on model performance, especially in the real-world use cases. In this paper we explore the performance of large language models based on instruction tuning across different scales of instruction data. An evaluation dataset consisting of 12 major online use cases is constructed in the experiment. With Bloomz-7B1-mt as the base model, the results show that 1) merely increasing the amount of instruction data leads to continuous improvement in tasks such as open-ended generation, 2) in tasks such as math and code, the model performance curve remains quite flat while increasing data size. We further analyze the possible causes of these phenomena and propose potential future research directions such as effectively selecting high-quality training data, scaling base models and training methods specialized for hard tasks.

<br/>

[3] Yunjie Ji, Yan Gong, Yong Deng, Yiping Peng, Qiang Niu, Baochang Ma, Xiangang Li, "Towards Better Instruction Following Language Models for Chinese: Investigating the Impact of Training Data and Evaluation", [arXiv](https://github.com/LianjiaTech/BELLE/blob/main/docs/Towards%20Better%20Instruction%20Following%20Language%20Models%20for%20Chinese.pdf)

* **Abstract**: 
Recently, significant public efforts have been directed towards developing low-cost models with capabilities akin to ChatGPT, thereby fostering the growth of open-source conversational models. However, there remains a scarcity of comprehensive and in-depth evaluations of these models’ performance. In this study, we examine the influence of training data factors, including quantity, quality, and linguistic distribution, on model performance. Our analysis is grounded in several publicly accessible, high-quality instruction datasets, as well as our own Chinese multi-turn conversations. We assess various models using an evaluation set of 1,000 samples, encompassing nine real-world scenarios. Our goal is to supplement manual evaluations with quantitative analyses, offering valuable insights for the continued advancement of open-source chat models. Furthermore, to enhance the performance and training/inference efficiency of models in the Chinese domain, we extend the vocabulary of LLaMA – the model with the closest open-source performance to proprietary language models like GPT-3 – and conduct secondary pre-training on 3.4B Chinese words.

<br/>

[4] Xianghui Sun, Yunjie Ji, Baochang Ma*, Xiangang Li, "A Comparative Study between Full-Parameter and LoRA-based Fine-Tuning on Chinese Instruction Data for Instruction Following Large Language Model", [arXiv](https://github.com/LianjiaTech/BELLE/blob/main/docs/A%20Comparative%20Study%20between%20Full-Parameter%20and%20LoRA-based.pdf)

* **Abstract**
Recently, the instruction-tuning of large language models is a crucial area of research in the field of natural language processing. Due to resource and cost limitations, several researchers have employed parameter-efficient tuning techniques, such as LoRA, for instruction tuning, and have obtained encouraging results In comparison to full-parameter finetuning, LoRA-based tuning demonstrates salient benefits in terms of training costs. In this study, we undertook experimental comparisons between full-parameter finetuning and LoRA-based tuning methods, utilizing LLaMA as the base model.
The experimental results show that the selection of the foundational model, training dataset scale, learnable parameter quantity, and model training cost are all important factors. We hope that the experimental conclusions of this paper can provide inspiration for training large language models, especially in the field of Chinese, and help researchers find a better trade-off strategy between training cost and model performance

<br/>

[5] Cheng Wen, Xianghui Sun, Shuaijiang Zhao, Xiaoquan Fang, Liangyu Chen, Wei Zou, "ChatHome: Development and Evaluation of a Domain-Specific Language Model for Home Renovation", arXiv preprint [arXiv:2307.15290](https://github.com/LianjiaTech/BELLE/blob/main/docs/ChatHome%20Development%20and%20Evaluation%20of%20a%20Domain-Specific%20Language%20Model%20for%20Home%20Renovation.pdf)

* **Abstract**
This paper presents the development and evaluation of ChatHome, a domain-specific language model (DSLM) designed for the intricate field of home renovation. Considering the proven competencies of large language models (LLMs) like GPT-4 and the escalating fascination with home renovation, this study endeavors to reconcile these aspects by generating a dedicated model that can yield high-fidelity, precise outputs relevant to the home renovation arena. ChatHome's novelty rests on its methodology, fusing domain-adaptive pretraining and instruction-tuning over an extensive dataset. This dataset includes professional articles, standard documents, and web content pertinent to home renovation. This dual-pronged strategy is designed to ensure that our model can assimilate comprehensive domain knowledge and effectively address user inquiries. Via thorough experimentation on diverse datasets, both universal and domain-specific, including the freshly introduced "EvalHome" domain dataset, we substantiate that ChatHome not only amplifies domain-specific functionalities but also preserves its versatility.

<br/>

[6] Xiaoyu Tian, Liangyu Chen, Na Liu, Yaxuan Liu, Wei Zou, Kaijiang Chen, Ming Cui, "DUMA: a Dual-Mind Conversational Agent with Fast and Slow Thinking", [arXiv:2310.18075](https://arxiv.org/abs/2310.18075#)

* **Abstract**
Inspired by the dual-process theory of human cognition, we introduce DUMA, a novel conversational agent framework that embodies a dual-mind mechanism through the utilization of two generative Large Language Models (LLMs) dedicated to fast and slow thinking respectively. The fast thinking model serves as the primary interface for external interactions and initial response generation, evaluating the necessity for engaging the slow thinking model based on the complexity of the complete response. When invoked, the slow thinking model takes over the conversation, engaging in meticulous planning, reasoning, and tool utilization to provide a well-analyzed response. This dual-mind configuration allows for a seamless transition between intuitive responses and deliberate problem-solving processes based on the situation. We have constructed a conversational agent to handle online inquiries in the real estate industry. The experiment proves that our method balances effectiveness and efficiency, and has a significant improvement compared to the baseline.

<br>

[7] Na Liu, Liangyu Chen, Xiaoyu Tian, Wei Zou, Kaijiang Chen, Ming Cui, "From LLM to Conversational Agent: A Memory Enhanced Architecture with Fine-Tuning of Large Language Models", [RAISE](https://arxiv.org/pdf/2401.02777.pdf)

* **Abstract**
This paper introduces RAISE (Reasoning and Acting through Scratchpad and Examples), an advanced architecture enhancing the integration of Large Language Models (LLMs) like GPT-4 into conversational agents. RAISE, an enhancement of the ReAct framework, incorporates a dual-component memory system, mirroring human short-term and long-term memory, to maintain context and continuity in conversations. It entails a comprehensive agent construction scenario, including phases like Conversation Selection, Scene Extraction, CoT Completion, and Scene Augmentation, leading to the LLMs Training phase. This approach appears to enhance agent controllability and adaptability in complex, multi-turn dialogues. Our preliminary evaluations in a real estate sales context suggest that RAISE has some advantages over traditional agents, indicating its potential for broader applications. This work contributes to the AI field by providing a robust framework for developing more context-aware and versatile conversational agents.

<br>


================================================
FILE: eval/ChatGPT_Score.html
================================================
<!DOCTYPE html>
<html lang="zh">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>ChatGPT获取分数</title>
  <style>
    body {
      font-family: Arial, sans-serif;
      margin: 0;
      padding: 20px;
      background-color: #f3f3f3;
    }

    h1 {
      text-align: center;
    }

    input,
    select,
    button {
      margin-bottom: 10px;
      padding: 5px;
      width: 100%;
    }

    #result {
      margin-top: 20px;
      font-weight: bold;
    }

    #loading {
      border: 8px solid #f3f3f3;
      /* 设置边框 */
      border-top: 8px solid #3498db;
      /* 设置顶部边框颜色 */
      border-radius: 50%;
      /* 设置圆角 */
      width: 50px;
      /* 设置宽度 */
      height: 50px;
      /* 设置高度 */
      animation: spin 2s linear infinite;
      /* 设置动画 */
      position: absolute;
      top: 50%;
      left: 50%;
    }

    @keyframes spin {
      0% {
        transform: rotate(0deg);
      }

      /* 开始位置 */
      100% {
        transform: rotate(360deg);
      }

      /* 结束位置 */
    }

  </style>
</head>

<body>
  <h1>ChatGPT 评分 // Score</h1>
  <div id="loading"></div>
  <div>
    <label for="api_key">请输入您的ChatGPT API KEY: // Please insert your ChatGPT API KEY</label>
    <input type="text" id="api_key" placeholder="API KEY">
  </div>
  <div>
    <label for="question_select">请选择一个问题: // Please select a question</label>
    <select id="question_select">
    </select>
  </div>
  <div>
    <label for="user_answer">请输入您的答案: // Please insert your answer</label>
    <input type="text" id="user_answer" placeholder="答案">
  </div>
  <button id="submit_btn" onclick="getScore()">获取得分// Get the score</button>
  <div id="result"></div>
  <script>
    const eval_set = [{"question": "请你写出一个可以生成五个不同随机数的 Python 程序。", "std_answer": "要生成五个不同的随机数,可以使用 Python 的 random 模块中的 randint() 函数生成随机整数,然后检查是否重复,直到有五个不同的数为止。\n下面是一个可以生成五个不同随机数的 Python 程序:\n```python\nimport random\n# 定义一个空列表,用于存放随机数\nnums = []\n# 循环生成随机数,直到有五个不同的数\nwhile len(nums) < 5:\n    a = random.randint(1, 10)\n    if a not in nums:\n        nums.append(a)\n# 输出生成的随机数\nprint(nums)\n```\n程序生成的随机数在 1 到 10 之间,输出类似于这样:\n```\n[3, 2, 8, 10, 9]\n```\n这个程序首先导入了 random 模块,然后定义了一个空列表 nums。程序使用 while 循环,每次生成一个新的随机数 a,然后检查它是否已经存在于 nums 中。如果不存在,就把 a 加入到 nums 中。\n循环结束后,列表 nums 中就包含了五个不同的随机数。程序使用 print() 函数将这些数输出到屏幕上。要生成五个不同的随机数,可以使用 Python 的 random 模块中的 randint() 函数生成随机整数,然后检查是否重复,直到有五个不同的数为止。", "class": "code"}, {"question": "回答以下问题的答案。\n中国有多少个省?", "std_answer": "中国目前有34个省级行政区。具体分为23个省、5个自治区、4个直辖市和2个特别行政区。以下是它们的具体列表:\n23个省:黑龙江、吉林、辽宁、河北、山西、陕西、甘肃、青海、山东、江苏、安徽、浙江、福建、江西、湖南、湖北、河南、广东、海南、四川、云南、贵州、广西。\n5个自治区:内蒙古、新疆、西藏、宁夏、广西。\n4个直辖市:北京、上海、天津、重庆。\n2个特别行政区:香港、澳门。\n需要注意的是,中国的省级行政区是经过层层划分后形成的行政地区,而不是根据历史、文化或者地理特征划分的地理或文化区域,因此在实际应用中的区分可能存在一些复杂性。", "class": "open qa"}, {"question": "什么是机器学习?它有哪些应用场景?", "std_answer": "机器学习是一种人工智能科学的分支,其目的是使计算机系统能够自动学习和改进,而不需要严格的编程指导。这种方法涉及使用数据和算法,以便计算机系统能够自主发现模式并完善预测,甚至能够超出人类的能力。\n机器学习广泛应用于各种领域,包括机器视觉、自然语言处理、语音识别、推荐系统、医学诊断、金融预测、安全检测等等。以下是一些常见的应用场景:\n1. 预测和分类问题\n机器学习是最常见的应用场景。例如,预测股票价格、房价、销售额等。分类问题是另一种主要的机器学习应用领域,用于自动分类电子邮件、文本、图像等。\n2. 机器视觉和图像识别\n机器学习广泛应用于机器视觉领域,例如人脸识别、自动驾驶汽车、安保监控、图像分割以及工业质检等。\n3. 自然语言处理\n自然语言处理是机器学习应用的主要领域之一。机器学习算法可用于解决文本分类、语义分析、主题建模、情感分析、文本生成等问题。\n4. 推荐系统\n推荐系统是机器学习的一个重要领域,用于根据用户历史行为和偏好来推荐相关产品、服务和内容。例如网上购物、音乐和视频流媒体服务、社交媒体等。\n5. 医学和生物信息学\n机器学习技术可以帮助医疗行业和生物信息学领域进行医学诊断、药物研发、基因解析等工作。\n总的来说,机器学习的应用场景广泛,其实际效果与数据的质量、算法选择和模型优化有关。随着机器学习技术的不断发展,其应用范围和效果将继续提高。", "class": "open qa"}, {"question": "提供一个主题,让学生进行头脑风暴,产生关于该主题的想法。\n如何提高城市化水平。", "std_answer": "", "class": "brainstorming"}, {"question": "针对给定的主题,进行头脑风暴并记录所有想法。\n如何提高公司的销售额?", "std_answer": "", "class": "brainstorming"}, {"question": "给出一份关于健康饮食的简短建议。", "std_answer": "", "class": "brainstorming"}, {"question": "思考并提出五个解决日常生活问题的创新或改进方法。", "std_answer": "", "class": "brainstorming"}, {"question": "请分类以下5种水果:香蕉、西瓜、苹果、草莓、葡萄。", "std_answer": "以下是对这5种水果的分类和详细描述:\n1. 香蕉(Banana):香蕉属于浆果类水果,是由多个紧密排列的子房组成,每个子房内有许多胚珠。在植物学中被归类为芭蕉科植物,原产于东南亚。香蕉果皮为黄色或绿色,果肉为白色,口感甜美,营养含量丰富,常被用作水果、烘焙、烹饪和制作饮品等食材。\n2. 西瓜(Watermelon):西瓜属于葫芦科植物,是一种大型带状浆果,果肉为红色或黄色,外皮为绿色或黄色,还有一层薄薄的白色或黄色纹路。西瓜味甜、可爽口解渴,也有助于保护心脏健康。\n3. 苹果(Apple):苹果是一种由苹果科植物组成的水果,其阔叶树使用到其多少种品种、其中许多由人工产生。苹果通常栽培为盆栽或果树,营养丰富,富含维生素C和膳食纤维,可生食、制作果酱、果汁和烘焙等食品。\n4. 草莓(Strawberry):草莓属于蔷薇科植物,是一种小型浆果,外皮为红色,果肉内有许多水泡,口感酸甜。草莓富含维生素和抗氧化剂,可生食、加工成果酱、冰淇淋等。\n5. 葡萄(Grape):葡萄属于葡萄科植物,是一种二倍体的葡萄树藤,果实为一串圆形或椭圆形的小浆果,具有清新、多汁的口感,有些品种也有明显的果皮和籽。葡萄是很常见的水果,可生食、酿酒,也常制作葡萄干、果酱、酱汁和醋等。", "class": "classification"}, {"question": "给定下面的两个列表,使用Python解释器找到它们之间的相同元素。\nList1:[1, 2, 3, 4, 5, 6]   List2:[4, 5, 6, 7, 8, 9]", "std_answer": "在Python中,使用set()函数将列表转换为集合,并使用“&”操作符计算两个集合的交集,以找到两个列表的相同元素。\n以下是解决这个问题的Python代码:\n```python\nList1 = [1, 2, 3, 4, 5, 6]\nList2 = [4, 5, 6, 7, 8, 9]\nset1 = set(List1)\nset2 = set(List2)\nintersection = set1 & set2\nprint(intersection)\n```\n输出结果为 `{4, 5, 6}`。这意味着两个列表共有三个相同的元素,即 4、5 和 6。", "class": "code"}, {"question": "解释什么是自然语言处理,列出至少两个自然语言处理应用场景。", "std_answer": "自然语言处理(Natural Language Processing,NLP)是一种计算机科学和人工智能交叉的技术,目的是让计算机能够理解、处理、生成人类自然语言的文本或语音数据。NLP 分支中涉及包括语言模型、分词、句法分析、语义分析、情感分析、文本分类、机器翻译等技术。\n以下是两个自然语言处理应用场景:\n1. 文本分类\n文本分类(Text Classification)是NLP中的一项重要技术,广泛应用于互联网广告投放、商品推荐、客户服务和情报分析等领域。该技术通过对文本进行分类,使用户更容易找到自己感兴趣的内容。例如,电商网站通过对商品描述的分类,让用户更快速地找到自己想要的商品,并提供个性化的推荐服务。\n2. 机器翻译\n机器翻译(Machine Translation)是NLP中一个正在迅速发展的技术,它通过计算机将一种语言自动转换为另一种语言。机器翻译有着广泛的应用场景,包括企业间的翻译服务、跨文化交流、信息查询等领域。例如,一些国际性的企业在进行外贸业务时,可以利用机器翻译技术进行交流,这样可以大大降低沟通成本和时间。\n综上所述,自然语言处理技术在实际应用中发挥着重要作用,随着技术的进一步创新和发展,它将有更广阔的应用前景。", "class": "open qa"}, {"question": "回答一个开放性的问题:人类存在的意义是什么?", "std_answer": "这是一个广泛且复杂的问题,对于这个问题不同的人可能会给出不同的答案。以下是一些不同的角度去思考人类存在的意义:\n1. 生物学角度\n从生物学的角度来看,人类存在的意义是延续人类种族的生存。每个个体都有一个生命周期,在这个过程中,他们可能会充分利用资源和能力来帮助繁殖后代,并确保社会和环境的稳定性,以促进人类物种的繁荣和生存。\n2. 社会学角度\n从社会学的角度来看,人类存在的意义是为了建立和保持社会秩序和文明。每个人都有自己的责任、角色和目标,以支持社会的稳定和繁荣。无论是教育、科学、艺术、政治等领域,所有这些都有助于创造更好的社会和文化环境。\n3. 宗教哲学角度\n从宗教哲学的角度来看,人类存在的意义是为了完成神的旨意并在灵性上完整。每个人在地球上的任务是履行上帝的意愿、对他的创造世界付诸行动和实践内心的信仰。这些信仰和行动可以引导个体走向道德的生活方式,提升个体的灵性发展。\n4. 科学发展角度\n从科学发展的角度来看,人类存在的意义是为了探索和理解宇宙的奥秘。人类长期以来通过不断的研究和探索,通过科学、技术和创新的手段改善了人类的生活和环境,这样可以更好地探索人类起源和探索宇宙的未知领域。\n总之,人类存在的意义是一个复杂的问题,不同的哲学、宗教、文化、科学或个人的信仰、价值观和经历等可能会影响和塑造人们对自己存在意义的理解。", "class": "open qa"}, {"question": "回答下面的问题:为什么太阳会发光?", "std_answer": "太阳是我们太阳系中最大的恒星,它会通过发光产生能量。太阳核心的温度高达几千万摄氏度,这使得太阳的氢原子发生核聚变反应。在这个过程中,四个氢核聚合成一个氦核,释放出大量的能量,包括光能量。这些光子在太阳内部不断地反射和被吸收,直到它们到达太阳表面,并穿过太阳大气层直接照射到地球上。\n这个过程中太阳产生的能量是如此之大,每秒钟可以释放出近四百万亿亿瓦特的能量,这远远超过了地球上所有人类活动的总和。太阳的大气层中还包含大量的气体和粒子,这些气体和粒子会随着太阳的磁场而运动,并形成太阳的辐射带和太阳风等现象。\n总之,太阳之所以发光,是因为在太阳内部的核聚变反应中产生的能量导致了大量的光子释放出来,在经过数百万年的反射和吸收后,这些光子最终穿过了太阳大气层并到达了地球。", "class": "open qa"}, {"question": "请回答以下问题:世界上最早的已知写作是由哪个文明编写的?", "std_answer": "世界上最早已知的写作可以追溯到古代的苏美尔文明,大约在公元前4千年前期。苏美尔是今天的伊拉克地区,他们是第一个开发农业和城市文明的民族之一。苏美尔人为了记录贸易、法律、神话和历史等信息,开发了一种叫做楔形文字的系统。楔形文字是用一个尖锐的工具在泥板上刻出的形状,并在日晒下干燥保存。\n在苏美尔文明时期,写作通常是由专门的文字工匠完成的,他们通常在宫廷中受到高度的重视,他们的工作是为皇室、官员和贸易商等高层人物记录信息。这个时期的写作材料包括泥板、石头和金属。虽然苏美尔文明逐渐逝去,但它的文献和文字遗产经过千年的保存,一直到今天,仍然是历史学和考古学家们的重要研究对象。\n在其他文明中,例如埃及、印度、中国和美洲原住民等也都有早期文字的出现。例如,古埃及的象形文字和草书制度可以追溯到公元前3千年左右,印度梵文的发展可以追溯到公元前1500年左右。在美洲,玛雅文明的象形文字可以追溯到公元前300年左右。但是,苏美尔文明可以被认为是最早开始创造记录表述信息的文字系统并在文学、历史和法律方面广泛使用的文明。", "class": "open qa"}, {"question": "请编写一段 Python 代码来计算并输出前100个质数。", "std_answer": "以下是计算前100个质数的Python代码:\n```python\ndef is_prime(n):\n    if n < 2:\n        return False\n    for i in range(2, int(n ** 0.5) + 1):\n        if n % i == 0:\n            return False\n    return True\ndef generate_primes(n):\n    primes = []\n    p = 2\n    while len(primes) < n:\n        if is_prime(p):\n            primes.append(p)\n        p += 1\n    return primes\nprimes = generate_primes(100)\nprint(primes)\n```\n代码中的`is_prime`函数是用来判断一个数是否为质数的函数。它通过从2到n的平方根的范围内遍历所有可能的因子来检查n是否是质数。如果找到了一个因子,则n不是质数,并且`is_prime`函数返回`False`。否则,n是质数,`is_prime`函数返回`True`。\n`generate_primes`函数使用`is_prime`函数来生成前n个质数的列表。它使用一个变量p来表示当前正在检查的数字,一开始将它设置为2(第一个质数)。`while`循环会一直运行,直到找到n个质数。在每次迭代中,检查p是否为质数。如果是,将p添加到质数列表中。最后,增加p的值,并继续处理下一个数字,直到生成n个质数。\n最后一行代码使用`generate_primes`函数生成前100个质数,并将它们打印出来。", "class": "code"}, {"question": "将下列单词按词性分类。\n狗,追,跑,大人,高兴,树", "std_answer": "名词:狗,大人,树\n动词:追,跑\n形容词:高兴\n1. 狗,大人,树都是表示人或事物的名称,属于名词类别。狗和树是物体名词,指具体的非人类事物;大人是人名词,指人类。\n2. 追和跑都是表示动作的词汇,属于动词类别。追指在追逐某人或某物,跑表示奔跑的动作。\n3. 高兴是形容词,意为愉快、快乐等。属于形容词类别,用来表示人或事物的特征或状态。在这个例子中,高兴描述了人的情感状态。", "class": "classification"}, {"question": "请给出以下数学问题的答案:10 ÷ 2 × (5-2)^2 + 7", "std_answer": "题目:10 ÷ 2 × (5-2)^2 + 7\n首先,根据数学中的优先级原则,指数运算优先于乘法和除法,乘法和除法优先于加法和减法。因此,我们需要先计算括号内的指数运算。\n(5-2)^2 = 3^2 = 9\n现在,我们可以用乘法和除法计算式子的其余部分。\n10 ÷ 2 × 9 + 7\n10 ÷ 2 = 5\n5 × 9 = 45\n现在,我们只需把7加到结果中即可。\n45 + 7 = 52\n因此,该算术表达式的答案为52。", "class": "math"}, {"question": "回答以下问题:世界上最长的河流是什么?", "std_answer": "世界上最长的河流是尼罗河(Nile River),它位于非洲大陆的东北部,涵盖了11个国家,流经乌干达、坦桑尼亚、肯尼亚、卢旺达、布隆迪、刚果(金)、埃及、苏丹、厄立特里亚和埃塞俄比亚。全长达6,650千米(4,130英里),是世界上最长的河流。\n尼罗河以其水源和流量分为两个分支,即白尼罗河和蓝尼罗河,两个分支在苏丹首都喀土穆合并,最终注入地中海。尼罗河是非洲文明的生命线,为埃及早期的人类文明提供了沃土和水源。\n尼罗河流经的区域是非洲最大的农业地区之一,为当地人提供了重要的灌溉和交通资源,河流还提供了丰富的水资源用于人类和动物饮用、农业、渔业和许多其他用途。\n尽管尼罗河在全球排名第一,但还有其他长河,如亚马逊河、长江和黄河。长河是地球上自然景观的杰出例子,它们为人类社会和自然生态系统提供了重要的贡献。", "class": "open qa"}, {"question": "以给定的主题为基础,为一组关键字编写一个短文。\n主题:旅游\n关键字:海滩、度假、美食、文化", "std_answer": "", "class": "generation"}, {"question": "请总结一篇长篇小说的内容,并包括主要角色的名称和情节转折点。", "std_answer": "", "class": "brainstorming"}, {"question": "回答以下问题:人类和猫之间的基因差异是多少?", "std_answer": "人类和猫之间的基因差异是相当大的,因为我们是两种不同的物种。然而,人类和猫的基因组都可以在一定程度上进行比较和对比。\n人类和猫的基因组的主要区别在于它们的大小和组成。猫的基因组要小得多,只有大约20,000个基因,而人类的基因组则包含大约20亿个碱基对,其中约20,000个基因编码蛋白质。\n此外,人类和猫之间的基因编码不同的蛋白质,这意味着我们的身体在功能和结构上有所不同。例如,人类必须合成大量维生素C,而猫可以从其食物中获取足够的维生素C。\n另一个区别是我们的染色体数量不同。人类拥有23对染色体,而猫拥有19对。这些染色体在大小、形状和组成上也有所不同。\n最后,在人类和猫的基因组中,还有大量的共同基因。这些共同基因反映了我们的共同祖先,并可能在某些方面表现出相似的生物学特征,如眼睛和皮毛的颜色。\n总体而言,人类和猫之间的基因差异是相当大的。这些差异反映了生物进化的不同路径和两种物种的不同适应环境。", "class": "open qa"}, {"question": "根据以下新闻提供其摘要。中国计划于2022年发射首款太空站核心舱,这是中国空间计划中的一个重要进展。这个名为“天和”的太空站将包括三个模块:核心舱、实验舱和天文舱。首次发射的核心舱将用于测试和验证太空站的基本功能,以及进行相关科学研究和技术试验。中国国家航天局表示,“天和”太空站的建设将继续进行,预计在2022年至2024年期间完成。该太空站的完工将为中国在太空中展开多个方面的科学研究提供平台,使中国成为继俄罗斯和美国之后拥有独立太空站能力的第三个国家。", "std_answer": "中国将于明年发射首款太空站核心舱。", "class": "summarization"}, {"question": "给出一段文本,为其中每一段落写一个标题。文本1:由于全球变暖,海平面正在上升。新的报告指出,下一个世纪内,海平面可能会上升超过3英尺。到那时,许多城市和国家将受到严重影响。文本2:在过去的十年中,风暴的强度和频率也持续增加。研究表明,这与温室气体的排放有关。随着时间的推移,这种情况还可能会加剧,导致更多破坏和人员伤亡。", "std_answer": "1. 全球变暖导致海平面上升的严峻警告\n2. 温室气体排放与风暴频率、强度上升的相关性", "class": "summarization"}, {"question": "将以下文本翻译为英语:“我最喜欢的季节是春天,因为可以看到美丽的花儿。”", "std_answer": "\"My favorite season is spring because I can see beautiful flowers.\"", "class": "rewrite"}, {"question": "请将下列电影按照发行年份排序:《肖申克的救赎》、《星际穿越》、《阿甘正传》", "std_answer": "根据电影的发行年份,下列电影的排序从早到晚为:\n1. 《阿甘正传》(1994年上映) \n2. 《肖申克的救赎》(1994年上映) \n3. 《星际穿越》(2014年上映) \n《阿甘正传》于1994年上映,讲述了主人公阿甘的故事,他的一生充满着奇迹和动人心魄的经历。 这部电影荣获了6项奥斯卡金像奖,包括最佳影片和最佳导演。 \n《肖申克的救赎》于1994年上映,讲述了银行家安迪的故事,他被错判为杀人犯并被关押在肖申克监狱。电影在上映后并没有获得很高的票房,但在DVD发行后受到了广泛的好评,成为了一部广受欢迎的经典电影。 \n《星际穿越》于2014年上映,由克里斯托弗·诺兰执导,马修·麦康纳和安妮·海瑟薇等明星主演。这部电影是以人类生存危机为背景,在寻找新家园的过程中,讲述了人类冒险家们的经历。这部电影获得了许多好评,特别是在视觉效果和音效方面。", "class": "open qa"}, {"question": "将下列五个词分为两个组别,每个组别都有一个共同点:狗、猫、鸟、鱼、蛇。", "std_answer": "这五个词可以分成两组:两个哺乳动物和三个非哺乳动物。\n共同点:\n- 组别一:狗、猫都是哺乳动物,属于哺乳纲(Mammalia)。\n- 组别二:鸟、鱼、蛇都不是哺乳动物。\n  - 鸟属于鸟纲(Aves),其特征包括有羽毛、前肢成翼等。\n  - 鱼属于鱼纲(Pisces),其特征包括有鳞、鳍、鱼鳔等。\n  - 蛇属于爬行纲(Reptilia)或有鳞目(Squamata),其特征为身体长而细,无四肢。\n需要注意的是,鸟、鱼、蛇三者之间的生物学分类并不相同,它们只是在本题中都不属于哺乳动物这个分类群。", "class": "classification"}, {"question": "针对以下问题提供解决方案:如何最大化你的工作效率?", "std_answer": "", "class": "brainstorming"}, {"question": "列举三个种类不同的动物,并说明它们的特点。", "std_answer": "", "class": "brainstorming"}, {"question": "回答下面这个数学问题。如果有5个苹果和3个梨子,总共有多少个水果?", "std_answer": "5个苹果和3个梨子总共有8个水果。 \n这个问题可以通过简单的数学加法来回答。给定5个苹果和3个梨子,我们只需要将它们的数量相加,即 5 + 3 = 8。这意味着总共有8个水果。\n因此,回答此问题的方法是将苹果和梨子的个数相加,得到总共的水果数。这个问题的答案是8个水果。", "class": "math"}, {"question": "列出5种可以改善睡眠质量的方法。", "std_answer": "", "class": "brainstorming"}, {"question": "为一种智能手表编写用户手册,包括详细的使用说明和操作步骤。", "std_answer": "", "class": "generation"}, {"question": "回答以下问题:谁是美国第一位总统?", "std_answer": "美国第一位总统是乔治·华盛顿(George Washington)。他出生在弗吉尼亚州的一个种植园主家庭,曾在英国皇家海军服役。华盛顿在美国独立战争期间领导了大陆军,最终帮助美国取得胜利。他被认为是美国的开国元勋之一。\n1787年,华盛顿被选为宪法制定会议的主席,这次会议最终制定了美国宪法。1789年,他成为美国第一位总统,并担任了两届总统(1789-1797)。在他的领导下,美国政府开始建立起来,建立了联邦政府、银行和邮政系统。\n华盛顿在外交政策方面也取得了一些重要成果。他签署了《约翰·杰伊条约》(Jay Treaty),解决了美国与英国之间的贸易纠纷,并借此避免了战争。他还签署了《西班牙条约》(Pinckney's Treaty),解决了美国与西班牙之间的边界和贸易争端。他还发表了著名的告别演说,警告美国对政党派系的影响和对国际关系的影响。\n华盛顿的领导为美国建立了一个稳定的政府,并奠定了美国的国际声誉。他是一位崇尚公民美德和独立精神的领袖,在美国历史上留下了深远的影响。", "class": "open qa"}, {"question": "描述人类大脑的工作原理。", "std_answer": "人类大脑是身体最为复杂、功能最为重要的器官之一。它由数百亿个神经元(神经细胞)组成,这些神经元连接在一起,形成了一个高度互联的网络,通过电化学信号相互通信。大脑主要负责控制和协调我们的行为、思考、感知和情感等复杂的认知和情感过程。\n人类大脑的工作原理可以大致分为以下几个方面:\n1. 感觉输入和处理:大脑接收来自五个感官(视觉、听觉、触觉、味觉和嗅觉)的输入,并对这些输入进行处理和解释。这个过程主要发生在大脑皮层(cerebral cortex)等感觉处理区域中。\n2. 认知和决策:大脑对外部世界的感觉输入进行解释和分析,并基于这些信息做出决策。这个过程主要发生在大脑皮层的前额叶(frontal lobe)等认知和决策区域中。\n3. 运动控制:大脑通过控制肌肉和运动神经,控制我们的肢体运动和动作。这个过程主要发生在大脑皮层的运动区域和小脑(cerebellum)等运动控制区域中。\n4. 记忆和学习:大脑可以存储和处理各种类型的记忆,包括短期记忆和长期记忆。这个过程主要发生在大脑皮层的颞叶(temporal lobe)等记忆处理区域中。\n5. 情感处理:大脑可以处理和调节各种情绪和情感反应。这个过程主要发生在扣带回(cingulate cortex)等情感处理区域中。\n以上是大脑主要的工作原理,但是这些过程之间通常是互相交织和相互作用的。而且,大脑的工作原理还存在很多未知和不确定的领域,科学家和研究人员正致力于不断深入和探究人类大脑。", "class": "open qa"}, {"question": "给定一组文本,将文本分成正面和负面情感。\n举例文本:\n这部电影非常出色,值得推荐。我觉得导演做得很好。\n这场音乐会真是个灾难,我非常失望。", "std_answer": "第一句话:“这部电影非常出色,值得推荐。我觉得导演做得很好。”\n这句话中出现了“出色”、“值得推荐”和“做得很好”这些词汇,这些词汇都是正面情感的词语。因此,可以认为该文本是正面情感的,可得出一个整体情感得分。\n第二句话:“这场音乐会真是个灾难,我非常失望。”\n这句话中出现了“灾难”、“失望”等负面情感的词汇,因此可以认为该文本是负面情感的,可得出一个整体情感得分。\n综上所述,我们可以通过基于词典的情感分析方法,将这组文本分成正面和负面情感。其中,第一句话是正面情感,第二句话是负面情感。", "class": "classification"}, {"question": "介绍以下电影的情节和主题:\n《阿甘正传》", "std_answer": "《阿甘正传》是一部1994年上映的经典电影,由导演罗伯特·泽米吉斯执导,汤姆·汉克斯主演。\n影片讲述了一个名叫弗雷德里克·阿甘的男孩从小智力有限,体弱多病,到成为一位成功的商人和社会名人的传奇故事。影片以阿甘回忆过去的方式展开,讲述了他在南方小城的祖居长大,成为橄榄球能手,进入军队参与越南战争,回国后成为许多国际知名事件的见证者,最终历经种种遭遇,在华盛顿极力抗议越南战争,他的真挚情感感动了无数人,最终回到了自己的家乡。\n主题:\n1. 勇气和坚韧: 阿甘身体虚弱,但他克服了身体上的障碍,通过自己的努力和毅力,克服了生活中遇到的重重困难和挫折。\n2. 反战和和平:电影在越南战争时期背景下讲述,呈现了人类暴力和战争的恶果,让观众感受到战争中无辜人民受难的悲惨遭遇。\n3. 爱与友情:阿甘在他的人生旅程中经历了许多关系,包括他们之间的不完美,但最终所有的感情都是建立在真实和充满爱心的基础上的。", "class": "open qa"}, {"question": "回答下面的问题:电影《泰坦尼克号》中的主演是谁?", "std_answer": "电影《泰坦尼克号》中的主演是莱昂纳多·迪卡普里奥(Leonardo DiCaprio)和凯特·温丝莱特(Kate Winslet)。\n莱昂纳多·迪卡普里奥饰演了男主角杰克·道森(Jack Dawson),他是一个贫困的艺术家,乘坐泰坦尼克号前往美国,与凯特·温丝莱特饰演的女主角露丝·德维特·布坎南(Rose DeWitt Bukater)相遇并陷入爱河。露丝是一个年轻富有的女子,因为她的未婚夫卡尔·赛特勒(Caledon Hockley)的父亲在泰坦尼克号上拥有股份,所以她也在这艘船上旅行。\n《泰坦尼克号》是一部由詹姆斯·卡梅隆执导的史诗爱情灾难片,于1997年上映。该电影以船上真实事件为基础,讲述了两个年轻人在泰坦尼克号的航行中相遇、坠入爱河,以及随后发生的船舶撞击冰山而导致的灾难。电影获得了广泛的赞誉和成功,成为了电影史上最高票房的电影之一,并获得了11项奥斯卡奖。", "class": "open qa"}, {"question": "扩写下文:我打算去购物,然后去健身房锻炼身体。", "std_answer": "", "class": "rewrite"}, {"question": "将以下10个单词分类为动物或植物。\n树木、狮子、玫瑰、草地、松鼠、猴子、蘑菇、兔子、山羊、香蕉", "std_answer": "动物:狮子、松鼠、猴子、兔子、山羊 \n植物:树木、玫瑰、草地、蘑菇、香蕉 \n解释: \n1. 树木是植物,它们具有根、茎、枝和叶; \n2. 狮子、松鼠、猴子、兔子和山羊都是动物,具有生命和感知能力; \n3. 玫瑰是植物,是一种有刺的灌木; \n4. 草地是植物的群体,是一片由草类植物组成的区域; \n5. 蘑菇是真菌,通常被归类为植物,但不进行光合作用,并且具有特殊的生长方式; \n6. 香蕉是由植物产生的水果,是一种多汁的开花植物。", "class": "classification"}, {"question": "提出一个新的市场营销策略。", "std_answer": "", "class": "brainstorming"}, {"question": "根据一个提供的主题或关键词,为我创作一首诗歌。\n秋天", "std_answer": "", "class": "generation"}, {"question": "根据给定的问题,给出一个适当且准确的回答\n问题: 水的化学式是什么?", "std_answer": "水的化学式是H2O,这表示每个水分子由两个氢原子和一个氧原子组成。这个化学式可以告诉我们水分子的化学成分及其组成。\n氢原子是最简单的原子之一,只有一个质子和一个电子。氧原子也是非常常见的元素,它有8个质子和8个电子。当两个氢原子与一个氧原子结合时,它们共享电子,形成一个稳定的分子。\n水是非常重要的化学物质,因为它是所有生命形式所必需的。它是一种非常好的溶剂,许多物质可以在水中溶解。水也可以存在于三种形式,固态(冰)、液态和气态(水蒸气),这也使得它在许多地方有着广泛的应用,例如用于植物的生长、饮用、工业生产等等。", "class": "open qa"}, {"question": "为一个英语句子进行翻译,并输出中文翻译。\nI have a dream that one day this nation will rise up and live out the true meaning of its creed: We hold these truths to be self-evident, that all men are created equal.", "std_answer": "中文翻译:我有一个梦想,即有一天我们这个国家会站起来,实现其信条的真正含义:我们坚信这些真理不言而喻,即所有人生来平等。", "class": "rewrite"}, {"question": "回答这个问题。\n什么是伏羲八卦?", "std_answer": "伏羲八卦是中国古代的一种哲学、宗教和占卜系统,最早由中国传说中的神话人物伏羲所创造,被认为是中国古代最早的占卜系统。它由八个符号(称为卦)组成,每个卦由三个线组成。这些线可能是断的(表示阴)或完整的(表示阳),每个卦代表一个特定的意义。\n这八个卦是:\n1. 乾(qián)——天,由三个阳线组成。\n2. 坤(kūn)——地,由三个阴线组成。\n3. 震(zhèn)——雷,由初阳、阴、阳、阳、阳、阳组成。\n4. 艮(gèn)——山,由初阴、阳、阴、阳、阳、阳组成。\n5. 坎(kǎn)——水,由初阳、阳、阳、阴、阳、阳组成。\n6. 离(lí)——火,由初阳、阳、阴、阳、阳、阴组成。\n7. 巽(xùn)——风,由初阳、阴、阳、阳、阴、阳组成。\n8. 兑(duì)——泽,由初阴、阳、阳、阳、阴、阳组成。\n每个卦都代表一些特定的意义和象征,如乾卦代表刚强的意志、坤卦代表母亲般的柔顺、震卦代表迅疾如雷的动力、坎卦代表险阻、离卦代表激烈的火焰、巽卦代表顺应风势、兑卦代表潜藏不露的深处之物。\n伏羲八卦在中国古代哲学、文化、宗教、卜筮、医学等方面都有广泛的运用和影响。在中国文化中,它被认为是宇宙和人类之间的桥梁,可以帮助人们预测未来、探知天命、调节身心健康等。", "class": "open qa"}, {"question": "翻译以下句子:This book is very interesting.", "std_answer": "这本书非常有趣。", "class": "rewrite"}, {"question": "给出下列问题的答案:哪些食物富含维生素C?", "std_answer": "维生素C是人体必需的营养素之一,可以帮助身体进行抗氧化反应、增强免疫力、促进铁吸收等重要功能。以下是一些富含维生素C的食物:\n1. 柑橘类水果:柑橘类水果如橙子、柚子、柠檬等是富含维生素C的食物,一颗橙子中含有约70毫克的维生素C。\n2. 绿色蔬菜:绿色蔬菜如菠菜、甘蓝、羽衣甘蓝、花椰菜等都含有丰富的维生素C,一杯切碎的生菜中含有约30毫克的维生素C。\n3. 水果和蔬菜:其他含有高量维生素C的食物还有草莓、番茄、西兰花、草莓等。\n4. 坚果:坚果中的杏仁、开心果、核桃等种类,同样富含维生素C。\n在日常饮食中摄取这些食物有助于维持身体健康并预防各种疾病。如果某些人在饮食中无法获得足够的维生素C,可以考虑使用维生素C补充剂。", "class": "open qa"}, {"question": "给以下问题提供一个答案。\n为什么人们应该锻炼身体?", "std_answer": "人们应该锻炼身体有很多好处,包括:\n1. 改善身体健康:适度的体育锻炼可以增强心血管系统和呼吸系统的功能,改善血液循环,防止高血压、心脏病、中风和糖尿病等慢性疾病的发生。\n2. 提高身体素质:通过体育锻炼,人们可以提高身体的力量、速度、耐力和协调性,增强身体的稳定性和柔韧性,从而更好地承受各种身体负荷。\n3. 减少体重:适度的体育锻炼可以促进身体代谢,消耗能量,达到减肥的效果,提高身体形态美。\n4. 改善心理健康:体育锻炼可以促进人体内部的荷尔蒙分泌,减轻压力和紧张情绪,提高人的自尊心和自信心,延缓衰老和退化,让人变得更加快乐和积极。\n综上所述,体育锻炼对于人体健康非常重要,人们应该每天坚持锻炼身体,让身体更加健康、坚强和充满活力。", "class": "open qa"}, {"question": "回答以下问题。\n你最喜欢的旅行目的地是哪里?为什么?", "std_answer": "", "class": "brainstorming"}, {"question": "解释概念:大数据", "std_answer": "大数据是指越来越多的数据的组合,这些数据来自多种来源,包括但不限于传统的结构化数据(例如关系数据库、金融指标和经济统计数据)、非结构化数据(例如音频、视频、图片和文本)以及来自传感器和物联网设备的实时数据等。大数据通常需要高性能计算和存储系统来处理。\n随着技术的不断进步,现代社会相应的产生了越来越多的数字数据,数据的进一步计算和分析变得越来越重要。大数据技术旨在从大量数据中提取有用的信息,并以优化决策和解决问题的方式应用这些信息。\n运用大数据技术,可以驱动商业和科学的应用程序(例如在市场和制造中进行业务决策以及在生物医学和环境研究中进行数据挖掘)。大数据技术在人工智能、机器学习和深度学习等领域也有广泛的应用,为人类的科学和日常生活带来了极大的便利和改变。", "class": "open qa"}, {"question": "回答以下问题,确保答案准确无误。\n什么是免疫力?", "std_answer": "免疫力是指人体对于感染病原体或其他异物的自我保护能力。免疫力由免疫系统控制,它是一组高度复杂且相互协作的细胞、分子和器官的集合,旨在识别和消灭入侵的病原体。\n人体的免疫系统分为两个部分——细胞免疫和体液免疫——它们之间协调配合,确保人体抵抗病原体的攻击。\n细胞免疫通过使用特定的细胞,例如B细胞、T细胞和自然杀伤细胞等,对病原体进行直接攻击和消灭。细胞免疫可以识别和杀死针对自身的病原体,如癌细胞。\n体液免疫则通过使用特定的蛋白质,例如抗体和补体,来阻止病原体的侵入和生长。体液免疫可以对付那些进入细胞内部且难以被细胞免疫识别的病原体,例如病毒。\n免疫力的强度可以受到很多因素的影响,例如年龄、生活方式、饮食习惯、健康状况和外部环境。有些食物和营养素如维生素C和锌能够增强免疫系统的功能,而其他因素如吸烟、过度饮酒、压力和睡眠不足则可能降低免疫力。\n免疫力在预防和治疗疾病方面至关重要。合理的生活习惯和健康的饮食加上充足的休息和运动,都有助于增强免疫力。", "class": "open qa"}, {"question": "以以下文本为基础,编写一封邀请信。\n你好!我们很高兴地邀请你参加我们的婚礼,时间是2022年6月30日,地点是北京。", "std_answer": "", "class": "generation"}, {"question": "将以下文本翻译成英语语:我想去旅行并尽可能多地了解世界上的文化。", "std_answer": "I want to travel and learn as much as possible about the cultures of the world.", "class": "rewrite"}, {"question": "对以下主题提出3个开放式问题。主题:健康的生活方式。", "std_answer": "", "class": "brainstorming"}, {"question": "生成一段描述一个美丽自然风景的文章。", "std_answer": "", "class": "generation"}, {"question": "回答下面的问题。\n为什么植物需要光合作用?", "std_answer": "植物之所以需要进行光合作用,是因为它是维持植物生长和生存的主要途径之一。以下是光合作用的几个重要方面:\n1. 能量来源:光合作用是一种生化过程,利用光能将无机物转化为有机物,从而为植物提供能量,以支持各种代谢活动。光合作用中产生的能量还可以被储存下来,以供日后使用。\n2. 氧气改变:在光合作用中,植物通过光合作用产生氧气,这种氧气释放到空气中,是动物呼吸所需要的氧气来源之一。同时,光合作用也是植物中二氧化碳去除的主要途径,从而维护了空气中的气体组成。\n3. 有机物质来源:光合作用不仅产生能量,还可以产生有机物质,其中包括植物细胞所需要的葡萄糖等糖类化合物。这些有机化合物可以被植物用来构建新的细胞,并用来支持其他代谢反应。\n4. 植物生长:光合作用直接影响到植物生长的速度和质量。光合作用通过产生所需的能量和有机物质来促进细胞分裂和植物生长。缺乏足够的光合作用,将会导致植物叶片干枯并且凋谢。\n综上所述,植物需要光合作用以产生能量、氧气、有机物质,也需要光合作用来支持植物细胞的发育和生长,所以光合作用对于植物的生存至关重要。", "class": "open qa"}, {"question": "从以下选项中选择正确的词汇填空以完整下面的句子。 他喜欢去_______看电影。A) 邮局 B)超市 C)电影院 D)音乐会", "std_answer": "正确的词汇是C)电影院。\n句子意思是“他喜欢去电影院看电影”。\n选项A)是邮局,B)是超市,D)是音乐会,与句子的内容不符,因此不是正确答案。", "class": "closed qa"}, {"question": "针对一个产品的特点,为其撰写市场推广文案。", "std_answer": "", "class": "generation"}, {"question": "请列举5个适合在户外进行的锻炼运动。", "std_answer": "", "class": "brainstorming"}, {"question": "给出以下历史事件的日期。\n二战结束的日期是?", "std_answer": "二战的结束日期是1945年9月2日。\n在战争的最后阶段,德国在1945年5月7日签署了无条件投降书,这标志着欧洲战争的结束。但是,战争在太平洋地区仍然持续了几个月,直到日本发生两次原子弹袭击后才真正结束。\n1945年8月6日,美国投放了第一颗原子弹在广岛,这导致了数万人的死亡和重创了这个城市。8月9日,第二颗原子弹被投放在长崎。这两次原子弹袭击迫使日本政府开始考虑投降。\n在苏联加入战争并对日本发动侵略后,日本政府于1945年8月15日宣布接受《波茨坦公告》并同意无条件投降。但是,正式的投降仪式只是在几周后的1945年9月2日在美国船只上举行的,这被认为是二战的正式结束。这场战争是人类历史上最具规模和毁灭性的战争之一,共造成超过7000万人的伤亡和失踪。", "class": "open qa"}, {"question": "将下面的语句翻译成英语。\n巴黎圣母院(法语:Notre-Dame de Paris)是法国一座哥特式教堂,位于巴黎市中心塞纳河畔的圣母岛(île de la Cité)。它是巴黎市最著名的地标建筑之一,也是世界上最著名的哥特式建筑之一,是法国最具代表性的建筑之一。该建筑始建于1163年,历时200余年,是中世纪后期法国哥特式建筑的杰作之一。", "std_answer": "Notre-Dame de Paris is a Gothic church in France, located on Notre-Dame Island (île de la Cité) on the banks of the Seine in central Paris. It is one of the most famous landmarks of the city of Paris, one of the most famous Gothic buildings in the world, and one of the most representative buildings in France. The building was built in 1163 and lasted for more than 200 years. It is one of the masterpieces of French Gothic architecture in the late Middle Ages.", "class": "rewrite"}, {"question": "解释微生物学是关于什么的学科。", "std_answer": "微生物学是一门研究微生物的生物学学科,也被称为微生物生态学或微生物物种学。生命的基本单元是细胞,微生物学探究细胞级别最小的有生命的实体-微生物,这些生命体有时候也被称为微生物或微生物体。微生物可以是单细胞或多细胞,可以是真核细胞,也可以是原核细胞。微生物包括:细菌、真菌、病毒、原生生物和古菌等。微生物对我们的日常生活很重要,他们在环境保护、人类健康、食品和药物生产中发挥重要的作用。\n微生物学家解决从微观层面一直到宏观的整个系统层面微生态学问题。从区分微生物体的组成、结构和功能,到它们的遗传学,代谢学和生态学行为,以及它们在自然,工业和农业中的作用,每个方面都是微生物学家的研究重点。\n一些微生物学的具体研究方向包括:\n1. 微生物的分离和鉴定:研究各种不同的微生物种类,这是研究微生物生态系统的重要第一步。\n2. 微生物的代谢和生理:了解微生物的基本代谢途径和生理机制,以便了解它们对环境和环境中其他生物产生影响的方式。\n3. 微生物的遗传学:微生物是很容易繁殖和变异的,这意味着特定的微生物群体可以很快就在特定的环境适应。\n4. 微生物与宿主互动:细菌、病毒和其他微生物会与人类、动物和植物进行交互,了解这些相互作用是微生物学家的一个重要研究领域。\n总之,微生物学是研究微观生物,如细菌、真菌、病毒和古菌等的学科,涵盖各种研究领域,例如微生物的分离、鉴定、代谢和生理、遗传学和微生物与宿主互动等。微生物学对于人类健康、环境保护和工业生产等方面都具有重要的意义。", "class": "open qa"}, {"question": "给出五个原创的古诗或现代诗句子。", "std_answer": "", "class": "brainstorming"}, {"question": "根据所给的一组描述,生成一个复杂的、高质量的文本小说片段。\n小美独自一人探险,她感觉到了一种奇怪的气息,如释重负般的感觉从她身上落下。", "std_answer": "", "class": "generation"}, {"question": "回答下列问题。\n红绿灯的颜色分别代表什么?", "std_answer": "红绿灯是指路口交通信号灯,由红、黄、绿三种颜色循环交替发出,用于指示交通流向的变化和行车顺序。其中,不同颜色的灯光分别代表以下含义:\n1. 红灯:\n红灯代表“停车”,也是最为重要的一色交通信号灯,汽车、行人必须在红灯下停车等待,等待灯光变成其他颜色才可启动。此时若发生非常急迫的情况,可以在确保安全的情况下,经过判断后慢速通过交叉路口。\n2. 黄灯:\n黄灯代表“警示”,在绿灯和红灯之间变换的过渡信号灯。在交通信号灯由绿灯变为黄灯时,表示即将转红,此时车辆应减速而不是加速行驶,避免造成交通阻塞、车祸等问题。在红灯即将变为绿灯前的黄灯时,表示即将开启绿灯,行人可以慢步通过马路,而车辆则应尽快通过路口。\n3. 绿灯:\n绿灯代表“通行”,表示车辆与行人都可以通过道路。但行驶车辆需要注意的是,在交叉路口通过时,需要根据交通流量情况、满足让行规则,保持安全驾驶。此外,行人也需要根据交通规则信号灯指示,在绿灯亮起时在斑马线上安全通过道路。\n总而言之,红绿灯系统是为了维护道路交通秩序,保障道路交通安全,让车辆与行人保持协调互通的系统。而正确理解和遵守红绿灯信号灯,是每个人行驶或步行在道路上必须掌握的基本交通常识。", "class": "open qa"}, {"question": "思考一个关于社交媒体的主题并列举10个相关问题,用于市场营销的研究。", "std_answer": "", "class": "brainstorming"}, {"question": "描述一下如何制作一道有名的本地菜肴,并将步骤列出来。\n本地菜肴:麻婆豆腐", "std_answer": "", "class": "brainstorming"}, {"question": "根据以下资料,为公司编写一个招聘广告:公司名称:ABC科技,职位:软件工程师,要求:熟练掌握Java,有2年以上工作经验。", "std_answer": "", "class": "generation"}, {"question": "回答以下问题:为什么时间管理如此重要?", "std_answer": "时间管理非常重要,因为它有助于一个人更有效地利用时间,提高生产力并减少压力和焦虑。\n以下是时间管理的几个关键好处:\n1. 提高生产力\n时间管理可以帮助你优化你的工作流程并更好地组织您的日常任务。通过管理时间,您可以最大化生产力,并更好地完成任务,而不是在同一时间片段中拖延或懒散。当您更好地利用您的时间,您可以更快地完成任务,并无需加班或在短时间内处理大量工作量。这种更高效的方法可以提高生产力并获得更好的工作成果。\n2. 减轻压力\n不管理时间可能会导致紧急感,焦虑和压力的增加。在忙碌的工作日常生活中,您可能需要完成大量的任务,而无法同时完成这些任务可能会让您焦虑和不安。通过将任务管理成不同的时间段并制定优先级,时间管理可以减轻您的压力,并使您感到更轻松和有序。\n3. 提高自律性和自我管理能力\n时间管理可以帮助您在日常生活中发展自律性和自我管理的良好习惯。通过设定计划和目标,您可以更好地控制您的时间并注意自己的日常活动。这些习惯可以帮助您更好地掌握自己的生活,并更有效地处理事务。\n4. 获得更多时间进行自我发展和探索\n时间管理可以帮助您获得更多时间进行自我发展和探索。通过合理地安排优先级和战略性地安排您的时间来完成任务,您可以获得更多时间来学习新技能,进行个人项目,探索自己的兴趣爱好。这将有助于提高您的生活满足度和感受到更大的幸福感。\n总之,时间管理是生活和事业成功的关键。无论您是学生,工作人员还是企业家,都需要管理好时间,以便最大限度地发挥自己的潜力并实现成功。", "class": "open qa"}, {"question": "请根据以下给定的基本信息标准对产品进行分类。\n以下是一些鞋子的基本信息:\n- 品牌:Nike, Adidas, Puma, Converse\n- 颜色:黑色、白色、红色、蓝色、绿色、黄色\n- 尺码:34、35、36、37、38、39、40、41、42、43、44、45\n- 款式:休闲鞋、运动鞋、篮球鞋、跑步鞋\n请为以下三种鞋子分类:\n- Nike Air Max,黑色,43码,运动鞋\n- Adidas Superstar,白色,38码,休闲鞋\n- Puma Clyde Court,红色,41码,篮球鞋", "std_answer": "根据给出的标准,可以将这三种鞋子进行分类:\n1. Nike Air Max,黑色,43码,运动鞋\n- 品牌:Nike\n- 颜色:黑色\n- 尺码:43\n- 款式:运动鞋\n2. Adidas Superstar,白色,38码,休闲鞋\n- 品牌:Adidas\n- 颜色:白色\n- 尺码:38\n- 款式:休闲鞋\n3. Puma Clyde Court,红色,41码,篮球鞋\n- 品牌:Puma\n- 颜色:红色\n- 尺码:41\n- 款式:篮球鞋\n根据这些信息,将鞋子进行分类可以帮助消费者更容易地找到自己所需要的产品。例如,一个想要买篮球鞋的人可以直接在篮球鞋分类下找到Puma Clyde Court。一个想要买黑色运动鞋的人可以直接在运动鞋分类下找到Nike Air Max等。", "class": "classification"}, {"question": "根据给出的场景, 回答以下问题:\n场景:你的朋友骑自行车行驶在道路上。\n你的朋友在路上遭遇车祸,你应该采取哪些紧急措施?", "std_answer": "发生车祸时,你应该采取以下紧急措施来帮助你的朋友:\n1. 确保安全。如果你也在场,立即停下车辆,并确保自己和周围的其他人不会受到进一步的危险。在必要时,向其他车辆发出警告,喊叫或使用灯光等措施。\n2. 判断情况。检查你的朋友是否受伤,并找出是否需要其他人的帮助。如果有其他人附近,可以请求他们的帮助。\n3. 致电急救服务。如果你的朋友需要急救服务,拨打当地的紧急电话号码,并说明情况。准备好提供你的位置、你朋友的情况和其他必要的细节。\n4. 给予应急医疗援助。如果你有一些医疗知识或有急救包在手,尽量采取紧急措施帮助你的朋友。把伤员放在舒适安全的位置,按需要施行心肺复苏或止血等方法。\n5. 呼叫警察。如果车祸涉及到较大的损失或其他问题,必须立即联系当地警察局。聚集重要证人和信息,确保所有警察和救援队都知道发生了什么事情。\n总的来说,在发生车祸时,你应该尽可能的评估你的朋友的安全情况,采取紧急措施救助伤员,尽快拨打当地急救电话并与当地警察局联系,如果是需要的话,获取证人信息。 首先要保证自己的安全,因为现场环境可能是不安全的。然后按照上述步骤尽快帮助受伤的人,取得更多的常识,以帮助自己以及在这样的突发事件中能给予他人帮助。", "class": "open qa"}, {"question": "对以下两篇文章进行比较,确定它们是否讨论了相同的话题。输入两篇文章的文本内容,输出是“是”或“否”。\n文章1:Python是一种解释型、面向对象、动态数据类型的高级程序设计语言。Python由Guido van Rossum创建,第一个公开发行版发行于1991年。目前,Python是一种流行的编程语言,被广泛应用于Web开发、科学计算、人工智能等领域。\n文章2:Java是一种高级程序设计语言和计算机平台。它的设计最初是由James Gosling在Sun Microsystems进行的。自从2009年Oracle收购了Sun以来,Java就成为Oracle的产品。Java可以在不同的计算机平台上编写一次程序,然后在这些平台上运行多次。", "std_answer": "是,这两篇文章讨论了不同的编程语言,Python和Java,它们描述了这些编程语言的特性和应用领域。虽然它们提到了不同的细节,但两篇文章都涉及高级程序设计语言,它们的应用和技术特点的描述。", "class": "closed qa"}, {"question": "回答问题:'哪种编程语言最常用?'", "std_answer": "", "class": "brainstorming"}, {"question": "给出一个主题,编写一个段落描述该主题。\n中国传统节日——中秋节", "std_answer": "", "class": "generation"}, {"question": "请组织一个有关工作流程的头脑风暴,并记录所有的步骤。", "std_answer": "", "class": "brainstorming"}, {"question": "为以下句子选择一个正确的分类:\n“汉堡王”是什么餐厅类型?\n快餐、家庭式、正式餐厅、自助餐厅等。", "std_answer": "“汉堡王”是一家快餐餐厅。\n在餐饮业中,餐厅类型是根据其服务模式、菜单种类、用餐氛围和价格等因素来区分的。快餐餐厅是以快捷、便宜、方便取餐为主要特点的餐厅类型。汉堡王的菜单以汉堡为主打食品,此外还提供薯条、炸鸡等小吃,服务方式是自助点餐、取餐和就餐。汉堡王的定位是以年轻消费者为主,提供价格实惠的快餐食品。\n与快餐餐厅相对应的其他餐厅类型包括:\n- 家庭式餐厅:通常拥有宽敞的用餐空间和较为全面的菜单。服务方式是由服务员点餐、上菜和送餐。\n- 正式餐厅:是提供高档餐饮服务的餐厅类型,通常菜单较为丰富、价格较贵。服务方式是由专业服务员负责接待、点餐、上餐帮助顾客。\n- 自助餐厅:主要特点是提供各种菜品自选和长时间的用餐,价格相对较为实惠。常常提供冷热饮料和甜点等。\n总之,根据其特征和服务模式,汉堡王应归类为快餐餐厅。", "class": "closed qa"}, {"question": "经纪人:您好,欢迎来到我们的房地产中介公司。我是经纪人李先生,有什么可以帮到您的?\n客户:您好,我正在寻找一套适合家庭居住的房子。我想了解一下您们的房源情况。\n经纪人:当然,我们有许多不同类型和价位的房源。请问您对房子的具体要求是什么?\n客户:我们需要三个卧室,最好有两个浴室。还要有停车位和一个小花园。\n经纪人:好的,我明白了。我们有一些符合您要求的房源。比如说,有一套在市中心的独栋别墅,有三个卧室、两个浴室,还有一个大花园和停车位。价格是350万人民币。\n客户:听起来不错。不过这个价位有点高,您还有别的选择吗?\n经纪人:当然。我们还有一些价格更为实惠的房源,比如说在郊区的联排别墅,也有三个卧室和两个浴室,还有一个小花园和停车位。价格是200万人民币。\n客户:那这个房子的交通和周边环境怎么样?\n经纪人:交通方便,附近有公交车站和地铁站。周边环境也很好,有超市、学校、医院等配套设施。\n客户:好的,我需要考虑一下。您能给我留下房源的资料和联系方式吗?\n经纪人:当然,这是房源的资料和我的名片。您可以拿去参考和联系我。如果您有任何其他问题,请随时联系我。\n基于以上对话回答:客户最终是否选择了其中一个房源?如果没有,经纪人是否向客户提供了更多的选择,或者继续与客户沟通以满足客户的需求?", "std_answer": "客户并没有在对话中最终选择其中一个房源,而是表示需要考虑一下。经纪人向客户提供了两个房源选择,并留下了房源资料和联系方式。经纪人表示如果客户有任何其他问题,可以随时联系他,所以经纪人愿意继续与客户沟通以满足客户的需求。", "class": "closed qa"}, {"question": "参与者1:大家好,欢迎来到今天的会议,我们的主题是讨论定价。\n参与者2:非常感谢主持人邀请我参加这个会议,我认为定价是一个非常重要的话题。\n参与者3:我同意,定价可以直接影响到产品的销售和利润。所以我们需要仔细讨论。\n参与者1:好的,那么我们先从了解我们的产品和市场需求开始。我们的产品主要是高端家电,市场需求也比较强。\n参与者2:那么我们应该考虑设置一个高价,以提高产品的质量感和品牌形象。\n参与者3:但是如果价格太高,会不会导致销量下降呢?我们需要考虑消费者的购买能力和竞争对手的价格。\n参与者1:确实如此,我们需要进行市场调查和分析,了解我们的目标客户和竞争对手的价格情况。\n参与者2:如果我们要设置一个较高的价格,我们需要在产品的质量、设计和功能上下功夫,以确保我们的产品与竞争对手有区别。\n参与者3:我们还需要考虑到季节性变化和促销活动对定价的影响,以便制定不同的定价策略。\n参与者1:好的,那么我们现在来总结一下。我们需要进行市场调查和分析,了解目标客户和竞争对手的价格情况,同时注重产品质量、设计和功能,以确保我们的产品与竞争对手有区别,制定不同的定价策略以适应季节性变化和促销活动。\n请问:会议TODO是什么", "std_answer": "会议TODO包括进行市场调查和分析,了解目标客户和竞争对手的价格情况,注重产品质量、设计和功能,制定不同的定价策略以适应季节性变化和促销活动。", "class": "closed qa"}, {"question": "姓名,年龄,性别,职业,教育程度,婚姻状况,所在城市\n张三,25,男,软件工程师,本科,未婚,北京\n李四,36,女,医生,博士,已婚,上海\n王五,42,男,律师,硕士,已婚,广州\n赵六,28,女,市场营销经理,本科,未婚,深圳\n刘七,31,男,金融投资顾问,硕士,已婚,杭州\n孙八,29,女,设计师,本科,已婚,成都\n钱九,27,男,职业选手,高中,未婚,武汉\n这7个人中,哪个人的职业与其教育程度最为匹配?", "std_answer": "从这7个人的职业和教育程度来看,李四的职业和教育程度最为匹配。李四是一名医生,拥有博士学位。在医学领域,博士学位的专业知识和技能对于医生这个职业是非常重要的。", "class": "closed qa"}, {"question": "客服:您好,欢迎拨打中国移动客户服务热线,我是10086客服,您有什么问题需要咨询?\n用户:您好,我想查询一下我的手机话费和流量使用情况。\n客服:好的,麻烦您告诉我一下您的手机号码。\n用户:我的手机号码是13812345678。\n客服:好的,让我查一下。您的话费余额是200元,已使用流量为2GB,剩余流量为8GB。\n用户:好的,那请问我的套餐是什么,包含多少话费和流量呢?\n客服:您的套餐是XX套餐,每月包含100元话费和10GB流量,超出部分将按照标准资费收取。如果您需要升级套餐或者办理其他业务,可以登录中国移动APP或者前往营业厅办理。\n用户:好的,我知道了。还有一个问题,我想取消一项业务,怎么办?\n客服:您可以登录中国移动APP或者前往营业厅取消相关业务,或者拨打10086客服热线咨询取消业务的具体流程。\n请问:用户想要查询的是什么?", "std_answer": "用户想要查询自己的手机话费和流量使用情况。", "class": "closed qa"}, {"question": "水果种类,1月销售量,2月销售量,3月销售量,1季度销售额\n苹果,200,180,300,$20,000\n香蕉,300,350,400,$23,000\n橙子,150,200,180,$12,000\n葡萄,120,90,100,$8,000\n草莓,80,100,120,$6,000\n樱桃,50,70,80,$4,500\n菠萝,60,80,100,$6,500\n柠檬,90,110,120,$7,500\n哪种水果在第一季度内销售最好?", "std_answer": "在第一季度内销售最好的水果是香蕉,因为它在第一季度的销售额为$23,000,超过了其他水果的销售额。", "class": "closed qa"}, {"question": "律师:你好,请问你是来咨询关于什么方面的法律问题?\n客户:嗯,我最近遇到了一个合同纠纷的问题,我想请问一下您的意见。\n律师:好的,请您简要地介绍一下这个合同纠纷的情况。\n客户:我是和一家公司签订了一份合同,他们承诺要在一个月内为我提供一定数量的产品,但是一个月过去了,他们却没有按照约定履行。\n律师:那么你们的合同中有没有明确的交付时间和方式?\n客户:有的,合同中明确规定了一个月内必须交付,交付方式是快递邮寄。\n律师:那么你是否在规定时间内向对方提出过交付的要求呢?\n客户:是的,我在最后一天向他们发了邮件提出交付的要求,但是他们并没有给我回复。\n律师:好的,根据你提供的情况,你可以向对方发一份正式的律师函,要求他们按照合同履行义务,并在一定期限内提供产品。\n客户:好的,那我需要准备哪些材料呢?\n律师:你需要提供合同、交付要求的邮件以及其他相关证据,如有必要,我们可以协助你进行进一步的取证工作。\n客户:好的,非常感谢您的帮助。\n基于以上对话回答:客户需要向对方提供哪些材料以支持他发出正式的律师函要求对方履行合同义务?", "std_answer": "客户需要提供以下材料以支持他发出正式的律师函要求对方履行合同义务:\n1.合同:合同是证明双方约定的主要依据,客户需要提供与对方签订的合同原件或复印件。\n2.交付要求的邮件:客户在规定时间内向对方提出交付要求的邮件证据,这可以证明客户按照合同约定的时间提出了交付请求。\n3.其他相关证据:如果有其他与本案相关的证据,如通话记录、短信记录、邮件往来等,客户也需要提供这些证据以支持他的主张。", "class": "closed qa"}, {"question": "根据提供的关键词列表,生成一篇描述这些关键词的段落。\n秋天、枫叶、北方、清寒", "std_answer": "", "class": "generation"}, {"question": "解释人类脑部如何处理语言信息。", "std_answer": "人类的语言能力是人类大脑的一个最为突出的特点之一。对于语言信息的处理主要涉及到两个主要领域,即:语言理解和语言产出。这两个领域不只涉及到不同区域的脑部功能,还涉及到不同的认知和神经现象。\n## 1. 语言理解\n人类的语言理解机制中涉及到很多不同的脑部区域,包括颞叶、顶叶、枕叶、前额叶和中央回。下面将简要介绍这些区域的功能以及在语言理解中的作用。\n### 1.1 颞叶(Temporal Lobe)\n颞叶位于大脑的侧面,主要负责处理听觉信息和语言信息。在语言理解中,颞叶的左侧区域对语言处理扮演着关键的角色。特别是,下面两个子区域在语言理解中的作用最为重要。\n- Wernicke's Area:位于颞叶的后部,是语言理解的主要中心。负责处理语言中的语义信息,并且在理解单词和句子时能够起到非常关键的作用。例如,当我们听到一个熟悉的单词时,Wernicke's Area中的神经元会被触发,从而让我们能够明白它的含义。\n- Angular Gyrus:位于颞叶的后上部,其功能包括理解语音、阅读和做数学运算等。在语言理解中,Angular Gyrus与Wernicke's Area之间有非常紧密的联系。在处理语言信息时,Angular Gyrus会帮助我们将听觉信息转换为书面语言,并且对于阅读和写作也起到非常重要的作用。\n### 1.2 顶叶(Parietal Lobe)\n顶叶位于大脑的顶部,主要负责了解语言信息和空间信息。在语言理解中,顶叶通过帮助我们处理语法信息和上下文信息来帮助我们解释语言。有关顶叶的两个重要区域是:\n- Supramarginal Gyrus:位于顶叶的后下方,主要负责语法处理。在我们处理语言信息时,这个区域会分析语言的结构,提取主语、谓语和宾语等语法信息。\n- Inferior Parietal Lobule:位于顶叶的后部,主要帮助我们理解宾语和动词之间的关系。这个区域与意念、记忆和视觉处理相关。\n### 1.3 前额叶(Frontal Lobe)\n前额叶位于大脑前部,主要涉及思考、决策和计划等高级认知功能。在语言理解中,前额叶协调不同区域之间的功能,从而帮助我们理解和表达语言。在脑部损伤的情况下,前额叶的受损可能导致言语障碍。在前额叶的两个子区域是:\n- Broca's Area:位于额叶的下部,是语言产出的中心。这个区域负责语音、音节、单词的编码和控制发音,帮助我们流利地说话。在脑损伤的情况下,这个区域的受损可能导致失语症,使人无法流利地说话。\n- Anterior Cingulate Cortex:位于前额叶中央区域,主要涉及情感和注意力。在语言理解中,这个区域可以帮助我们分析语言信息,注意到情感和语气。\n### 1.4 中央回(Central Sulcus)\n中央回位于大脑顶部,主要分隔顶叶和额叶。这个区域在语言理解中起到重要的作用,主要是监控不同区域之间的信息传递。这样,不同区域之间才能够协作,有效地处理语言信息。\n## 2. 语言产出\n语言产出涉及到人类大脑的不同子区域,包括Broca's Area、前额叶、颞叶和大脑皮层的其他区域。下面将简要介绍这些区域各自的作用。\n### 2.1 Broca's Area\n在语言产出中,Broca's Area是语音和语法信息的中心。这个区域负责编码语言信息,并且控制口齿清晰地讲话,帮助我们流利地说话。在动脉闭塞和外伤等原因导致这个区域损伤的情况下,人可能会出现失语和语言不流畅的问题。\n### 2.2 前额叶\n前额叶在语言产出中扮演着非常重要的角色,主要涉及思考、决策和计划等高级认知功能。这个区域对于选择单词、控制发音并且组织句子有决定性的影响。\n### 2.3 颞叶\n在语言产出中,左颞叶协助人们选择语言,并且将意思组织成单词、短语和句子形式。\n### 2.4 大脑皮层的其他部分\n在语言产出中,大脑皮层的其他区域也会发挥重要的作用。这些区域将各种感官信息整合到一起,帮助我们对语言产生更细致、深入的理解。同时,这些区域在大量练习后也能够帮助我们发展流利的说话技巧。", "class": "open qa"}, {"question": "回答下面这个问题。\n谁是哈利波特的好朋友?", "std_answer": "哈利波特有两个好朋友,他们分别是罗恩·韦斯莱和赫敏·格兰杰。\n罗恩·韦斯莱是哈利波特的最好的朋友之一。他是一个红头发、蓝眼睛的男孩,出生在一个魔法家庭,他们在韦斯莱家族魔法仓库里经营家族事业。罗恩的性格开朗,善良,有时也有些粗心大意。他非常崇拜哈利,并帮助哈利渡过了很多难关。两人之间的友情在整个系列里始终稳定并持久。\n赫敏·格兰杰是另一个与哈利波特很亲密的人。她是一个非常聪明的女孩,被描述为有着灰色的眼睛和卷曲的棕色头发,她的父母都是魔法非纯血统,但她自己在霍格沃茨里也表现出色。她对知识的渴望和对道德的坚持使得她在整个系列中扮演着非常重要的角色。她帮助哈利波特解决了很多难题,并成为了哈利波特的至好友之一。\n总而言之,哈利波特的好朋友罗恩和赫敏,在整个系列中发挥了至关重要的作用,成为了哈利的备友和支持者。", "class": "open qa"}, {"question": "请给我一些关于环保的建议。", "std_answer": "", "class": "brainstorming"}, {"question": "解释一下什么是反向传播算法(Backpropagation Algorithm)。", "std_answer": "反向传播算法(Backpropagation Algorithm)是一种用于训练人工神经网络的算法。该算法通过计算损失函数相对于每个参数的梯度,从而实现反向传播误差的目的,使得网络的权重能够逐步优化以最小化损失函数。\n反向传播算法一般用于训练多层前馈神经网络,由于网络中神经元的数量极其庞大,因此,计算网络的梯度需要进行大量的运算。为了加速这一过程,研究人员使用了自动微分(Automatic Differentiation)技术,通过链式法则将网络的每个层次的梯度计算出来,并将这些梯度附加到相应的层次上进行更新。\n具体来说,反向传播算法可以分为两个阶段:前向传播和反向传播。在前向传播阶段,网络通过输入数据进行前向运算,计算出网络的输出,并将输出结果与真实结果进行比较得到损失函数值。在反向传播阶段,误差会根据权重被“反向传播”回网络中,根据权重的梯度进行更新从而优化网络,并在下一轮前向传播中使用优化后的权重来计算输出结果。\n基于反向传播算法,我们可以实现许多深度学习任务,例如图像识别、自然语言处理等。然而,反向传播算法存在许多问题,例如梯度消失、梯度爆炸等问题,为了解决这些问题,研究人员提出了许多改进算法,例如对抗训练(Adversarial Training)、梯度裁剪(Gradient Clipping)等。", "class": "open qa"}, {"question": "根据提供的文章摘要写一篇200字的文章。\n文章摘要:一项新的科学研究表明,睡眠不足会导致肥胖和糖尿病等健康问题。", "std_answer": "", "class": "generation"}, {"question": "创造一个新的品牌名称,并说明它的价值主张。", "std_answer": "", "class": "brainstorming"}, {"question": "通过哪些方法可以减少塑料污染?", "std_answer": "", "class": "brainstorming"}, {"question": "请你描述一下自己的家乡,并提到家乡最出名的景点或特产。", "std_answer": "", "class": "brainstorming"}, {"question": "对给出的文本进行分类:是新闻报道、论文摘要还是小说章节:\n昨天,巨人小队在比赛中取得了胜利。这是巨人小队在本赛季主场的第三场比赛,也是他们取得的第三连胜。巨人小队在比赛中表现出色,运动员们充满斗志地奋战,最终赢得了比赛的胜利。他们的球迷也为他们加油助威,现场气氛非常热烈。这场胜利对于巨人小队来说非常重要,它将激励他们在接下来的比赛中继续保持良好的状态,争取更多的胜利。", "std_answer": "根据这段文本的内容,可以将其分类为新闻报道。\n1. 文本包含了一项具体的运动比赛结果,指明了巨人小队在昨天的比赛中获胜。\n2. 文本还给出了比赛是在本赛季主场的第三场比赛中取得的胜利,同时也表明了此前已经连胜两场。\n3. 这些信息表明了一项运动比赛的实际结果,具有新闻报道的特点。\n因此,根据文本所包含的信息,我认为这段文本是一则新闻报道。", "class": "classification"}, {"question": "描述一下如何制作草莓巧克力口味的蛋糕。", "std_answer": "", "class": "brainstorming"}, {"question": "请回答以下三个问题:\n1. 苹果的主要产地是哪里?2. 葡萄酒中有何种成分?3. 印度的首都是哪里?", "std_answer": "1. 苹果的主要产地是哪里?\n苹果是一种常见的水果,全球许多国家都有种植。但是,以下几个国家是全球苹果产量最大的国家:中国、美国、波兰、土耳其、意大利、印度、法国和智利等。\n中国是全球最大的苹果生产国,其南部地区的山东省是中国的主要苹果种植区。美国的苹果主要集中在华盛顿州,是该国最大的苹果生产地。波兰也是全球苹果生产的主要国家之一,擅长种植品种包括金冠、格雷斯顿等。\n2. 葡萄酒中有何种成分?\n葡萄酒是由葡萄果汁发酵而成的酒精饮料。除了水和乙醇,葡萄酒还包含了其它一些化学成分,其中一些对其风味和口感有很大的影响。以下是其中的一些主要成分:\n(1) 糖分:葡萄酒中的糖分主要来自于葡萄中的葡萄糖和果糖。这些糖分在发酵过程中被酵母菌转化成乙醇和二氧化碳。\n(2) 酸度:葡萄酒中的酸度主要来自于葡萄中的柠檬酸和苹果酸。这些有机酸对酒的口感和风味有很大的影响,可以使葡萄酒味道更加清新和酸爽。\n(3) 其它有机物:葡萄酒中还包含了一些其它的有机物,如酯类、酚类、甲醛和醛类等,这些物质对酒的香气和风味有很大的影响。\n(4) 酒石酸和果胶:这些物质主要存在于葡萄中,在葡萄酒的制作过程中也会留下一些。酒石酸可以使葡萄酒看起来更清澈,而果胶则可以增加葡萄酒的稠度。\n3. 印度的首都是哪里?\n印度的首都是新德里(New Delhi)。新德里是印度的政治中心和文化中心,也是印度人口最多的城市之一。它位于印度北部的德里特区,可以追溯到公元前8世纪的印度古代城市。\n印度的总统和总理都驻扎在新德里,此外,印度国会和最高法院也设在此地。新德里也是印度文化和旅游业的重要中心,有许多知名景点,如印度门、百池公园、泰姬陵等。", "class": "open qa"}, {"question": "提供一个话题并列举五个相关观点。", "std_answer": "", "class": "brainstorming"}, {"question": "思考并讨论一个新的社交媒体应用程序的特点和功能。", "std_answer": "", "class": "brainstorming"}, {"question": "分类以下物品,将它们分为可回收、不可回收和其他:手机、废纸、钢笔、茶杯、鸡蛋壳、电视机。", "std_answer": "可回收:废纸和鸡蛋壳\n废纸可以再循环利用,生产成新纸制品;鸡蛋壳可以用来做肥料,还可以用于制作艺术品或手工制品。\n不可回收:手机、钢笔和电视机\n手机、钢笔和电视机都含有许多不可分解的化学物质,废旧电子设备中可能含有重金属等有害物质,不能随意处理。需要进行专业的回收和处理。\n其他:茶杯\n茶杯通常由陶瓷等材料制成。虽然它们不能被循环利用,但由于它们通常不含有有害物质,因此可以被捐赠或作为废旧物品进行一般垃圾分类处理。", "class": "classification"}, {"question": "用一两句话描述著名的尼罗河是如何形成的。", "std_answer": "尼罗河形成于非洲东部高原的湖泊地区,主要由这些湖泊的水源汇聚而成。它是世界上最长的河流之一,流经11个国家,最终注入地中海。", "class": "open qa"}, {"question": "回答以下问题:在哪里可以找到最好的中式快餐?", "std_answer": "", "class": "brainstorming"}, {"question": "给我一些有关大熊猫的常识,如它们的生活环境、食物和保护状态。", "std_answer": "大熊猫(Ailuropoda melanoleuca)是一种濒临灭绝的大型陆地哺乳动物,被认为是中国的国宝。以下是有关大熊猫的一些常识:\n生活环境:\n大熊猫生活在中国的西南部,其分布范围包括四川、陕西和甘肃等省份的树冠罩、竹林和山地森林。高山竹子是大熊猫的主要栖息地,这些山区拥有充足的湿润气候和适宜的温度,以及足够的竹子和其他植物供大熊猫觅食。\n食物:\n大熊猫以竹子为主要食物。根据研究,大熊猫的日常饮食需要摄入30至40千克的竹子,占其总食量的99%。此外,大熊猫还会吃一些水果、坚果和小量的昆虫。大熊猫具有自我消化酶,它们能够消化竹子中难以消化的纤维素,但是这种饮食习惯意味着它们需要大量的草食物来维持生存。\n保护状态:\n大熊猫是一种濒临灭绝的物种。截至2019年,全球野生大熊猫的数量约为1864只,它们主要受到栖息地破坏和非法狩猎的威胁。由于大熊猫的珍贵性和重要性,中国政府和许多非政府组织致力于保护这种物种。中国增加了大熊猫保护区的数量,并对非法狩猎和栖息地破坏进行了打击。大熊猫还被列入世界自然保护联盟的濒危物种红色名录,并受到国际上的广泛关注。每年9月18日是全球保护大熊猫日,旨在提高公众意识和保护行动的重要性。", "class": "open qa"}, {"question": "对一段中文文本进行英文翻译。\n在经济快速发展的今天,旅游已经成为一种时尚,如果你感到工资压力颇大,不防背起背包,来场旅游,舒缓放松下心情,让你重拾对生活和工作的热情。", "std_answer": "Nowadays, with the rapid economic development, tourism has become a fashion. If you feel a lot of pressure on wages, you might as well pack your backpack and travel to relax your mind and regain your enthusiasm for life and work.", "class": "rewrite"}, {"question": "列出三个人名,其中两个是历史上的真实人物,第三个是虚构的人物。", "std_answer": "", "class": "brainstorming"}, {"question": "你喜欢哪种音乐类型?请用三个词来描述。", "std_answer": "", "class": "brainstorming"}, {"question": "将以下新闻标题翻译成英语。\n特朗普称巴黎气候协议对美国不利", "std_answer": "Trump says Paris climate deal bad for U.S.", "class": "rewrite"}, {"question": "针对以下文本生成一段新闻报道。\n公司CEO在一次新闻发布会上宣布,本公司拟于明年上市。", "std_answer": "", "class": "generation"}, {"question": "用提供的材料和信息回答问题:\n面粉、鸡蛋、砂糖、奶油、香草和烤箱是做哪种食品的主要成分?\n以下是一道食谱:预热烤箱,将面粉、鸡蛋、砂糖、奶油和香草混合在一起,搅拌均匀。将混合物倒入烤盘中,放入烤箱,烘烤30分钟。", "std_answer": "这些成分被组合在一起以制作一种糕点 - 蛋糕。\n食谱步骤:\n1. 预热烤箱至指定温度。\n2. 在一个碗中,将面粉、砂糖、鸡蛋、奶油和香草混合在一起,搅拌均匀,直到成为一个光滑的糊状。\n3. 将混合物倒入预先准备好了的烤盘中。\n4. 放入预热好的烤箱中,烘烤约30分钟或直到它被烤熟,表面呈金黄色。\n5. 从烤箱中取出烤盘,让蛋糕冷却一段时间,直到它可以轻易地从烤盘上脱离出来。\n6. 将蛋糕从烤盘上轻轻取出,可以点缀表面,如加一些水果、鲜奶油或巧克力酱。\n蛋糕通常是一种甜点,可以在任何场合享用。它的口感和形状可以根据个人的喜好和创意来制作不同款式的蛋糕。", "class": "open qa"}, {"question": "为以下两个主题提供至少一个可行的策划或解决方案:\n1. 如何在远程工作中维持生产力;2. 如何在社交媒体平台上建立品牌形象。", "std_answer": "", "class": "brainstorming"}, {"question": "设计一个简单的日历应用程序。", "std_answer": "", "class": "brainstorming"}, {"question": "将以下电子产品分类为手机、平板电脑或笔记本电脑:iPhone、iPad、MacBook Pro、Surface Pro、Samsung Galaxy Tab S7。", "std_answer": "iPhone - 手机\niPad - 平板电脑\nMacBook Pro - 笔记本电脑\nSurface Pro - 平板电脑(可转换为笔记本电脑)\nSamsung Galaxy Tab S7 - 平板电脑", "class": "classification"}, {"question": "请列举出三个加密方法及其优缺点。", "std_answer": "", "class": "brainstorming"}, {"question": "给定以下摘要,生成一篇完整的文章。摘要:最近发生的一次重大爆炸事件导致数十人死亡。警方正在调查。", "std_answer": "", "class": "generation"}, {"question": "使用以下句子作为初始观点,列出优点和缺点的清单,并总结出结论。\n社交媒体给我们带来了更多的互动和社交,也让我们更容易联系到远离我们的亲友。", "std_answer": "社交媒体给我们带来了更多的互动和社交,也让我们更容易联系到远离我们的亲友。\n优点:\n1. 增加社交互动:社交媒体提供了各种方式来与其他人交流,例如聊天、评论和分享内容等。这使得与其他人互动更加容易和方便,不需要面对面的交流也可以收获社交互动的快乐。\n2. 扩大社交圈子:社交媒体可以让我们认识新朋友、加入不同兴趣爱好群体、与遥远的亲友建立联系。这扩大了我们的社交圈子,让我们有更多的机会结交到不同背景和文化的朋友,学习新的知识和经验。\n3. 分享生活:社交媒体让我们能够随时随地分享我们的生活,发布照片和视频,记录我们的日常,增加了交流和互动的乐趣。这也让我们更容易保持联系,分享彼此的生活喜悦和困难。\n缺点:\n1. 社交比实际生活更多:过度使用社交媒体可能让我们脱离真实生活,失去与现实生活的联系和平衡,把大量的时间用在与虚拟社交平台交流而不是与真实人类社会互动。\n2. 私人信息泄露:社交媒体通常需要我们提供个人信息,并可能分享我们的数据,这可能导致对我们的隐私和安全构成威胁。我们需要注意我们的信息和数据的公开范围,以及与我们共享和交流的人员的身份真实性和信息安全性。\n3. 环境或是个体负面影响:过度依赖社交媒体可能导致不良行为习惯、焦虑、抑郁等身心健康问题,特别是当我们无法控制自己的使用行为时。此外,社交媒体可能给环境带来不良影响,如浪费时间、电力消耗增加等。\n结论:\n尽管社交媒体带来了更多的社交互动和联系,但过度使用社交媒体也可能导致不利影响。我们需要注意平衡社交媒体和现实社交之间的关系,以及我们的使用行为是否健康和明智,同时注意隐私和信息安全的问题。", "class": "open qa"}, {"question": "给出一些避免压力和焦虑的建议。", "std_answer": "", "class": "brainstorming"}, {"question": "给定一个名人,给出关于他们生活、事业或其他方面的某些事实。\n马克·扎克伯格", "std_answer": "马克·扎克伯格,出生于1984年,是一位美国企业家和慈善家。他是世界上最年轻的自我创业亿万富翁之一,也是Facebook的创始人和首席执行官。以下是他生活和事业方面的一些事实:\n1. 扎克伯格是哈佛大学的辍学生。 2004年,他在大学的宿舍房间里创立了Facebook社交媒体平台。\n2. Facebook在美国上市后,使得扎克伯格成为亿万富翁。 截至2021年,他的净资产已经超过1,000亿美元。\n3. 扎克伯格致力于将世界连接在一起。他的愿景是让人们通过Facebook相互连接,以促进更多的社交互动和信息交流。\n4. 扎克伯格的家庭背景非常强大。他的父母都是医生,并拥有许多科技企业的股份。他的姐姐还是一位成功的作家和酒店业企业家。\n5. 扎克伯格也是一位慈善家。他于2015年成立了也以他和妻子的名字命名的「Chan Zuckerberg Initiative」(简称:CZI)。 CZI 旨在支持以下几个领域的项目:教育、医疗和科学。\n6. 扎克伯格曾在2018年因Facebook的数据泄露问题和隐私问题而受到批评。尽管 Facebook采取了多项行动来改善其隐私和安全措施,但该公司仍然面临着批评和质疑。", "class": "open qa"}, {"question": "分析和优化代码。\n以下是一个冗长且效率低下的排序算法,请进行优化。\ndef sort(arr):\n  for i in range(len(arr)):\n    for j in range(i+1, len(arr)):\n      if arr[i] > arr[j]:\n        arr[i], arr[j] = arr[j], arr[i]\n  return arr\nprint(sort([3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5]))", "std_answer": "这是一个非常基础的排序算法——冒泡排序。它的时间复杂度为O(n^2),当数据量较大时,排序速度非常缓慢,且在最坏情况下,需要进行n(n-1)/2次交换操作。我们可以对这个算法进行一些优化来提高其性能:\n1. 添加标记。\n在冒泡排序的每一轮中,只有当存在交换操作时,数组才可能还未排序完毕。我们可以设置一个标志,如果在整个排序过程中没有发生任何交换操作,则说明数组已经排好序,可以提前退出循环,减少不必要的比较和交换次数。\n2. 减少循环次数。\n由于每一轮冒泡排序都会将当前未排序部分中最大的元素“沉”到底部,因此下一轮排序可以减少一次比较操作。在实现时,可以在每一轮排序前计算出当前未排序部分的尾部索引,避免对已经排序的元素进行多余的比较。\n3. 优化交换操作。\n交换操作是冒泡排序中最耗费时间的操作之一,我们可以通过添加临时变量来减少交换操作的次数。\n以下是经过上述优化后的冒泡排序算法:<br>\n```\ndef bubble_sort(arr):\n    n = len(arr)\n    for i in range(n):\n        is_swapped = False\n        for j in range(1, n-i):\n            if arr[j-1] > arr[j]:\n                arr[j], arr[j-1] = arr[j-1], arr[j]\n                is_swapped = True\n        if not is_swapped:\n            break\n    return arr\n```\n使用该算法对给定数组进行排序的时间复杂度为O(n^2),但在实际情况下其运行时间会快于原来的冒泡排序算法,且结果更加稳定。", "class": "code"}, {"question": "分类以下句子为肯定、否定或中性情感。 句子:'这部电影很好看。', '我不喜欢这首歌。', '这家餐厅的菜很普通。'", "std_answer": "以下是句子分类为肯定、否定和中性情感的详细答案:\n1. '这部电影很好看。' - 肯定情感。\n这句话表达了对电影的积极看法,说明说话者喜欢这部电影,认为它是一部好看的电影,因此这句话可以被归类为肯定情感。\n2. '我不喜欢这首歌。' - 否定情感。\n这句话表达了说话者对歌曲的消极看法,说明他们不喜欢这首歌,因此这句话可以被归类为否定情感。\n3. '这家餐厅的菜很普通。' - 中性情感。\n这句话并没有表达出特别积极或消极的情感,它只是说明餐厅的菜品普通,因此这句话可以被归类为中性情感。", "class": "classification"}, {"question": "根据给出的中文文本翻译为英文。\n这是一篇关于环保的文章,其中包含了各种对环境友好的建议。", "std_answer": "This is an article about environmental protection, which contains various suggestions for being environmentally friendly.", "class": "rewrite"}, {"question": "牙医:好的,让我们看看你的牙齿。从你的描述和我们的检查结果来看,你可能有一些牙齦疾病,导致牙齿的神经受到刺激,引起了敏感。此外,这些黑色斑点可能是蛀牙。\n病人:哦,真的吗?那我该怎么办?\n牙医:别担心,我们可以为你制定一个治疗计划。我们需要首先治疗牙龈疾病,然后清除蛀牙并填充牙洞。在此过程中,我们将确保您感到舒适,并使用先进的技术和材料来实现最佳效果。\n病人:好的,谢谢您,医生。那么我什么时候可以开始治疗?\n牙医:让我们为您安排一个约会。您的治疗将在两天后开始。在此期间,请继续刷牙,使用牙线,并避免吃过于甜腻和酸性的食物和饮料。\n病人:好的,我会的。再次感谢您,医生。\n牙医:不用谢,我们会尽最大的努力帮助您恢复健康的牙齿。\n基于以上对话回答:病人在检查中发现的牙齿问题有哪些?", "std_answer": "根据对话,病人在检查中发现了两个牙齿问题:\n1. 牙齿敏感:可能是由于牙齦疾病导致的神经刺激引起的。\n2. 黑色斑点:可能是蛀牙引起的。", "class": "extract"}, {"question": "将以下java代码片段改写成python代码。\npublic static void main(String[] args) {System.out.println(\"Hello, World!\"); }", "std_answer": "以下是相应的Python 代码:\n```python\ndef main():\n  print(\"Hello, World!\")\nif __name__ == \"__main__\":\n  main()\n```\n在 Python 中,没有静态方法或静态类型。所以在 Python 中没有 static 关键字。相反,我们定义了一个带有函数体的简单函数 `main()`,在其内部,我们使用 `print()` 语句发布消息 “Hello, World!”。\n对于 `if __name__ == \"__main__\":` 块,这个结构只会在将程序作为主程序运行时才会执行。在解释器中导入模块时,Python 解释器会将该块设置为`False`, 因此该块不会被执行。在以上代码的情况下,我们确保在直接运行文件时执行相应的代码,而不是在其他文件中导入该文件时执行。", "class": "code"}, {"question": "给出一个问题,回答该问题并提供有关支持答案的相关详细信息。\n2022年世界杯在哪里举行?", "std_answer": "2022年世界杯在卡塔尔举行。这是第22届世界杯足球赛,也是第一次在中东地区举办。\n卡塔尔是波斯湾地区的一个小国,位于沙特阿拉伯东北部,伊朗南部。卡塔尔现在正在积极准备世界杯,为此投入了数十亿美元的建设项目,包括八座全新的现代化体育场馆和基础设施项目,如机场和酒店。\n根据原定计划,世界杯比赛于2022年11月21日至12月18日期间举行,以避开当地夏季高温。然而,随着新冠病毒大流行的影响,对世界杯的安排造成一定影响,例如推迟或取消观众入场等措施。", "class": "open qa"}, {"question": "为以下代码片段编写注释。\ndef factorial(n):\n if n == 0:\n  return 1\n else:\n  return n * factorial(n-1)", "std_answer": "这段代码实现了一个递归函数来计算给定数的阶乘。下面是该代码的详细注释:\n```python\n# 定义一个函数来计算给定数的阶乘\ndef factorial(n):\n # 如果给定数为 0,阶乘为 1,因为 0 的阶乘定义为 1\n if n == 0:  \n  return 1  \n else:\n  # 如果给定数不为 0,则用递归调用函数来计算给定数减一的阶乘,与给定数相乘得到该数的阶乘\n  return n * factorial(n-1)  \n```\n主要的思路是,如果n等于0,则直接返回1,而如果n不等于0,就将它与(n-1)的阶乘相乘。基于阶乘的定义,这个过程一直执行到n为1或0停止,这个时候我们就知道了该数的阶乘。返回结果后,函数就结束了它的执行过程。\n注释中还解释了代码中的各种语句所执行的操作,并提供了变量n的含义。", "class": "code"}, {"question": "告诉我关于中国历史上的文化名人或历史事件的三个事实。", "std_answer": "", "class": "brainstorming"}, {"question": "根据上下文填写空缺部分,补全下面的句子:'幸福是一种__,而不是一种__.'", "std_answer": "", "class": "brainstorming"}, {"question": "给定以下两个句子,判断它们是否相似。\n一只棕色的小狗在路边玩耍。一条年幼的狗在街上嬉戏。", "std_answer": "这两个句子在表述上有相似之处,但在描述的具体细节上略有差异。\n第一句话描述了一只棕色的小狗在路边玩耍。第二句话描述了一条年幼的狗在街上嬉戏。两者的相似之处在于它们都在描述一只小狗在某个地方玩耍。不同之处在于第一句话强调了这只小狗的颜色是棕色的,而第二句话则强调了这只小狗的年龄是年幼的。\n总体来说,这两个句子是相似的,因为它们都在描述一只小狗在玩耍。但是它们之间有略微的差异,这些差异可能会影响阅读者对于情境的具体理解。", "class": "open qa"}, {"question": "请描述一种创造性问题解决方法的步骤", "std_answer": "", "class": "brainstorming"}, {"question": "请用一个同义词替换“开心”:她开心地跑去和她的新朋友玩。", "std_answer": "", "class": "rewrite"}, {"question": "描绘小说《了不起的盖茨比》的主要情节。", "std_answer": "《了不起的盖茨比》是F·斯科特·菲茨杰拉德于1925年出版的小说,主要讲述了20世纪20年代美国纽约富豪社交圈中的一段故事。下面就是使用自然语言处理技术描绘小说《了不起的盖茨比》的主要情节。\n在小说中,主人公尼克·卡拉威(Nick Carraway)在纽约度过了一个夏天,那里有一位名叫杰·盖茨比(Jay Gatsby)的神秘富豪。盖茨比居住在一个叫做“西卵”的地方,这里都是居住着新富人家族。尼克是盖茨比邻居,他希望在这个社交圈中结交新朋友,于是他开始接触盖茨比。\n盖茨比并没有向尼克透露自己的来源,只让他知道他曾在欧洲战争时期参加过军队,并在那里收获了丰富的经验和财富。他还向尼克吹嘘他曾经与富有的女人多萝西·布坎南(Daisy Buchanan)有过一段恋情。然而,多萝西现在已经嫁给了尼克的表兄汤姆·布坎南(Tom Buchanan),他是一个有权势、有钱有势、获取所需的好男人。\n盖茨比认为他仍然爱着多萝西,他向尼克透露了他正在为她努力重新获得她的心,那么他举办了一系列盛大的聚会,邀请了纽约富豪社交界里的名流来参加。这也使盖茨比瞬间成为了社交场上炙手可热的人物,并且他的盛大宴会也向读者揭示了那个时代美国上流社会的虚妄和腐朽。\n汤姆和多萝西也被邀请参加这些聚会,多萝西开始对盖茨比产生了好奇,而盖茨比也向她表达了自己的感觉。汤姆察觉到了多萝西和盖茨比之间的互动,并对他们之间的关系表示出强烈的反感。在一个如此紧绷的情况下,多萝西会做出什么样的选择呢?\n另一方面,尼克也认识了盖茨比的好友,名叫沃尔夫舅舅的吉梅·贝克(Gatsby's friend and associate, a gambler who has shady connections),他曾经与盖茨比合作过一些非法的买卖交易。最终,汤姆和多萝西的婚姻关系瓦解了,他们的冲突和争吵导致了悲剧的结局,这也表明了虚荣和力量的腐蚀力。\n在小说的最后,尼克有所感悟,他发现这个富有的社交圈,并不是他所期望的那样,所谓的友谊和爱情都是空洞的幻象,而人的活着并不是为了这个,而是为了真正的自我,不断追求内心真正的目标。在这个身份、金钱和欲望大爆裂的年代,人们最重要的东西是什么呢?这也是小说希望带给读者的思考。", "class": "open qa"}, {"question": "回答下面三个关于音乐的问题:\n问题1:音乐对情绪有何影响?\n问题2:音乐对大脑有何影响?\n问题3:音乐如何影响我们的记忆?", "std_answer": "问题1:音乐对情绪有何影响?\n音乐可以对人们的情绪产生强烈的影响。听到令人愉悦的音乐会使人感到愉悦和幸福,并增加大脑中神经递质多巴胺的释放。一些研究表明,这种神经递质能够提高人们的注意力、创造力和幸福感。另一方面,悲伤和低沉的音乐可能会引发悲伤和忧郁情绪,并在大脑中释放出类似于疼痛的化学物质,进一步影响人们的情绪。因此,对于情绪的调节,合适的音乐可以帮助人们保持平静、自信和积极的情绪。\n问题2:音乐对大脑有何影响?\n音乐能够改变大脑的功能和结构,并对认知、情感、学习和记忆等多个方面产生影响。通过使用磁共振成像等现代神经影像学技术,研究表明,音乐刺激可以激活大脑中的多个部位,包括听觉、视觉和运动中枢、情感中枢和记忆中枢等。此外,音乐还可以增强创造力和注意力,提高大脑的神经可塑性和认知控制,甚至可以改善认知和行为障碍的症状。因此,音乐在教育、治疗和人类成长等方面都具有重要的意义。\n问题3:音乐如何影响我们的记忆?给出详细回答。\n通过大量的研究,我们发现音乐可以对人们的记忆产生广泛而深远的影响。首先,音乐可以激发大脑中与记忆相关的区域,如海马体、额叶、颞叶和运动中枢等,促进记忆的编码和存储。其次,音乐可以改善学习和记忆的效率,提高人们的注意力和欣赏,进一步促进记忆的形成和保留。此外,研究还发现,对于特定的记忆任务,特定类型的音乐表现出了比其他类型的音乐更有效的促进记忆的作用。例如,旋律单调重复的音乐可以帮助长期记忆的建立,而活泼明快的旋律则有助于短期记忆的保持。因此,通过选择合适的音乐,我们可以更有效地提高自己的记忆力。", "class": "open qa"}, {"question": "请回答下面这个问题:\n“爱因斯坦获得了多少次诺贝尔奖?”", "std_answer": "爱因斯坦获得了一次诺贝尔物理学奖。\n这个奖项于1921年授予了爱因斯坦,以表彰他对理论物理学的突出贡献,主要是关于光电效应的理论研究。因为这项研究被认为为量子力学的开端,所以这次奖项也是对量子力学领域的认可。\n值得注意的是,尽管爱因斯坦在其它领域的贡献和影响同样重要和广泛,例如相对论和引力等领域,在这些领域他并没有获得任何诺贝尔奖项。", "class": "open qa"}, {"question": "对于给定的问答对,判断问题是否被正确回答\n问题:地球是第几颗行星?\n答案:地球是第三颗行星。", "std_answer": "回答是正确的,因为根据太阳系中行星的编号,地球是从太阳开始计算的第三颗行星,排名仅次于水星和金星。", "class": "closed qa"}, {"question": "将以下文本改写成您自己的话,并在其间添加自己的风格和语言。\n信息技术是21世纪最重要的发展之一", "std_answer": "", "class": "rewrite"}, {"question": "请提供一个有效的社交媒体运营计划,以增加您的公司/品牌在社交媒体上的关注度。", "std_answer": "", "class": "brainstorming"}, {"question": "想出10个与未来相关的问题,讨论一下它们的可能答案。", "std_answer": "", "class": "brainstorming"}, {"question": "用5个步骤解决一个给定问题。\n问题:如何学习一门新语言。", "std_answer": "学习一门新语言可以分为以下5个步骤:\n第一步:设定目标和计划\n在学习任何新事物之前,你需要明确你的目标是什么。对于语言学习,你的目标可能是能够听懂、说、读、写或者流利地交流。设置一个可实现的目标,并且将其分为多个阶段,每个阶段都具体、可行且有挑战性。接下来,制定一个计划,包括学习的时间、方式、频率和课程内容。确保你有足够的学习资源,比如课本、在线课程、听力材料等等,以便你可以顺利地完成计划。\n第二步:了解语言的文化背景\n如果你要学习一门新语言,了解其所在国家的文化背景,可以帮助你更好地理解和掌握这种语言。这可以包括审美、风俗、历史和传统等方面。你可以通过阅读新闻、书籍、观看电影和旅游等方式来获得更多的文化背景知识, 这会对你的语言学习有所帮助。\n第三步:掌握重要的词汇和语法知识\n语法和词汇是学习任何语言的基础。了解基本的语法规则和常用的单词、短语是很重要的。你可以通过阅读和听力材料强化你的词汇记忆,通过模仿、练习和反复录音自己的口语,加深你的语法理解,从而在语言学习过程中打下坚实的基础。\n第四步:练习听、说、读、写\n语言学习需要经常练习, 尤其是口语方面。你可以通过听力练习来加强自己的听力理解。通过口语练习来锻炼自己的口语表达。 通过阅读来提高阅读理解能力,通过写作来帮助你更好的表达自己的想法。并且,要与其他人练习交流,这有助于检测你语言水平的进步以及你需要努力的方面。\n第五步:保持耐心和积极的心态\n语言学习需要长期的耐心和积极的心态。每个人学习新语言的速度都不同,因此不要因为自己看起来学的比别人慢而沮丧。给自己足够的时间,相信你会取得进步。同时,以积极的心态面对挑战和错误,从错误中学习,在不断地学习和练习中, 你将 益益精进,并最终掌握一门新的语言。", "class": "open qa"}, {"question": "请将以下文本重述为儿童读物的语言风格:佳佳喜欢去公园玩,和朋友们一起玩秋千、滑梯和跷跷板。", "std_answer": "", "class": "rewrite"}, {"question": "回答下列问题:\nNASA的新任务是“太阳探测器”将开始探索太阳吗?", "std_answer": "NASA的新任务“太阳探测器”(Solar Probe Plus,现在称为“帕克太阳探测器”)于2018年8月11日由延迟发射后成功升空。探测器的主要任务是在太阳大气层中进行探测,收集威力输出高达500强度以上的高速阳风粒子、日冕加热和风的非热运动等数据,了解太阳日冕最热的地方,以及太阳风的运动和特性。\n帕克太阳探测器是人类第一次直接观测太阳日冕的机会。该探测器从地球飞向太阳,预计将在2024年之前拍摄太阳日冕的高清图像,并进行更细致的测量。该任务是个挑战,因为太阳环境极其恶劣,派人类进入太阳大气层是不可能的,而这个探测器是首个获取如此接近太阳的数据的探测器。\n该探测器被设计为能够承受高温和极速的探测器,可以承受高达1377℃的太阳温度,甚至可以挺进0.04 AU(地球到太阳的平均距离是1AU)的太阳大气层。许多传感器也被搭载,以便探测强烈的辐射和高速带电粒子等。\n通过了解太阳日冕最热的地方,太阳风的运动和特性,帕克太阳探测器让我们有望更好地了解太阳风如何影响行星和人造卫星。这些信息不仅可以用来改进太阳风预测,还可以指导太阳系内的国际空间站和其他探测器的设计,以更好地掌握宇宙环境。", "class": "open qa"}, {"question": "以下是一些句子,请根据上下文回答问题。\n他昨天晚上吃了一个巨大的汉堡,然后痛苦地感受到了消化不良。 问题:他为什么感到痛苦?", "std_answer": "他感到痛苦是因为他吃了一个巨大的汉堡,而这个汉堡可能对他来说过于难以消化。这导致了他的胃无法有效地处理这个食物,可能引起了胃酸逆流、胃痛、恶心等症状,从而使他感到不适和痛苦。这也被称为消化不良。", "class": "closed qa"}, {"question": "回答以下问题:地球的半径是多少?", "std_answer": "地球的半径是约6,371公里(或3,959英里)。这是从地球表面到地球中心的距离,也是地球最长的直径之一。地球的形状稍微呈扁球形,因此北极半径略小于赤道半径,约为6,357公里(或3,949英里)。\n测量地球的半径有许多方法,包括通过卫星观测计算地表与卫星的距离,以及通过地震波速度测量地球内部结构的方式计算。无论使用何种方法,地球的半径都是一个基本的地理参考数据。", "class": "open qa"}, {"question": "请撰写一篇至少500字的关于隔离期间的思考和体验的文章。", "std_answer": "", "class": "generation"}, {"question": "给我一个句子,要求长度至少为10个单词,并包含以下三个词:猫,电视,旅行。", "std_answer": "", "class": "generation"}, {"question": "写一篇有关5G网络研发的综述文章。", "std_answer": "", "class": "generation"}, {"question": "提供以下问题的答案:谁发明了电话?", "std_answer": "电话的发明者是亚历山大·格拉汉姆·贝尔(Alexander Graham Bell)。他于1876年3月7日获得了电话专利,但在那之前就已经开始了电话的研究。\n贝尔是一个多才多艺的学者,他在语音传输、声学和通信方面都做出了重大贡献。他最初是在以肢体语言交流的耳聋教育领域工作,这也促使他对语音传输的研究产生兴趣。\n在研究语音传输的过程中,贝尔开始探索电信技术。他的研究重点是一种称为“谐波多频器”的装置,该装置可以将声音转换为电信号,并将其传输到接收器。贝尔在这项技术上取得了成功,并于1876年3月7日获得了电话专利。但实际上,另外两名科学家——意大利人安东尼奥·梅希(Antonio Meucci)和苏格兰人埃里克逊(Elisha Gray)——都在贝尔之前研发了类似的通信工具,他们也被认为是电话的发明者之一。\n贝尔的电话专利使得他迅速成为了一位富有的发明家和科学家,并赢得了广泛的赞誉。电话的发明改变了人类的通信方式,使得人们可以在远距离之间进行实时的交流,并成为了现代通信技术的重要里程碑。", "class": "open qa"}, {"question": "写一篇关于给一份简历制作一个有吸引力的封面信的文章。", "std_answer": "", "class": "generation"}, {"question": "描述一下如何制作芝士披萨。", "std_answer": "", "class": "brainstorming"}, {"question": "根据给出的事实问题,提供正确的答案。\n问题:谁是2020年法国网球公开赛女单冠军?", "std_answer": "2020年法国网球公开赛女单冠军是波兰选手伊娃·斯维特丽娜(Iga Swiatek)。她在决赛中以6-4, 6-1的比分战胜了美国选手索菲亚·肯宁(Sofia Kenin),成为了历史上第一个赢得法国网球公开赛女单冠军的波兰选手。\n斯维特丽娜在整个比赛中表现非常出色,其中包括在四分之一决赛中以6-1, 6-2的比分战胜了卫冕冠军阿什利·巴蒂(Ashleigh Barty),让许多人对她的实力大为惊叹。这场胜利也让斯维特丽娜成为了第一个在巴黎公开赛中未丢一局的女单冠军。\n总的来说,斯维特丽娜在2020年法国网球公开赛中展现了强大的实力和坚韧的精神,值得获得这个历史性的冠军头衔。", "class": "open qa"}, {"question": "请提出三个可能的解决方案,以解决目前面临的问题。\n问题:我们的公司销售额下降了。", "std_answer": "", "class": "brainstorming"}, {"question": "描述在一个不以人类为中心的角度下,太阳如何影响我们的星球。", "std_answer": "在一个不以人为中心的角度下,太阳是一个极其重要的天体,它对地球的影响是不可忽略的。下面是太阳对地球的几个主要影响:\n1. 提供光线和热能:太阳是地球上所有生命的主要能源,它提供了足够的光线和热能,支持了植物的光合作用、地球的温度和气候的形成。\n2. 控制行星轨道:太阳的引力作用控制着地球的轨道,使地球保持稳定的旋转轨道。太阳的引力也控制着其他行星的运动轨迹。\n3. 产生太阳风和磁场:太阳内部不断地产生能量和高速带电粒子,这些粒子以“太阳风”的形式不断喷出,直接影响到地球的磁场和电离层活动。\n4. 造成日食和月食:太阳和月球的引力偶合导致了日食和月食的发生。当月球在地球和太阳之间时,会发生日食;当地球在月球和太阳之间时,会发生月食。\n总之,太阳是地球上最重要的自然资源之一,它对地球生态系统的维持和生命的繁荣起着至关重要的作用。", "class": "open qa"}, {"question": "请描述冬天的早上感觉是什么样的。", "std_answer": "冬天的早晨感觉通常是清新寒冽的。当你第一次踏出被窝时,首先会感觉到室内外气温明显的差异,室内比较温暖,而室外则异常寒冷。如果房间里有暖气或壁炉,这种温暖的感觉会让你感到舒适和惬意。\n随着你离开房间走向户外,你会感觉到极度的寒冷,小区内部尚能感受到别人烧早饭的味道,同时,地上和汽车上往往会有厚厚的冰霜、雪花和结冰,如果不小心踩到这些冰块,你的脚会感到冰凉和湿润。\n当你呼出气息,你的呼吸会变成白色,这是因为温暖的空气在遇到冷空气时,立即凝结成为水蒸气,因此在冬天的早晨,你会看到很多人呼着气,在空中的竞技中呼成一片白雾,特别是在极寒的早晨,白烟的形成更为明显。\n最后,冬天的早晨还会带来阳光,寒冷的天气和温暖的阳光形成了鲜明的对比,给人带来一种耀眼明亮和活力的感觉。总之,冬天的早晨具有清新寒冷、舒适惬意和活力充沛等感觉。", "class": "open qa"}, {"question": "使用提供的两个短语,生成一段至少3句话的对比描述。\n短语1:大海之滨;短语2:森林深处。", "std_answer": "", "class": "generation"}, {"question": "推荐一款值得购买的手机。", "std_answer": "", "class": "brainstorming"}, {"question": "在以下文本中,将所有形容词替换为其反义词。\n这个蛋糕显然比其他任何蛋糕都好吃。", "std_answer": "", "class": "rewrite"}, {"question": "给出下列问题的答案。问题是:\n 什么是心脏病?", "std_answer": "心脏病是指心脏的结构、功能或电气活动异常所导致的疾病,包括心肌梗死、冠心病、心力衰竭、心律失常等多种类型。这些心脏疾病可能影响心脏的能力来泵血,这可能导致身体的不同部分受到损伤或缺氧。心脏病可能是基于遗传或环境因素产生的。\n具体而言,心脏病的类型包括但不限于:\n1. 心肌梗死:心肌梗死是由于冠状动脉血流阻塞引起的心肌损伤。它常常表现为剧烈胸痛,可能伴随恶心、呕吐和出汗。\n2. 冠心病:冠心病是由于冠状动脉的收缩或阻塞引起的心肌缺氧。它可能表现为胸痛、心悸、气短等等。\n3. 心力衰竭:心力衰竭是指心脏无法泵出足够的血液以满足身体需求的一种状态。它可能表现为呼吸急促、水肿、乏力等等。\n4. 心律失常:心律失常指心脏节律出现异常,比如心跳过快、过慢、不规律等等。它可能引起头晕、心悸、晕厥等症状。\n心脏病是一种常见但严重的疾病,可能对人的健康产生巨大影响。为了预防心脏病,建议人们保持良好的饮食习惯、适当的运动、避免吸烟和饮酒等不健康的生活方式。同时,应该及早就医并接受适当的治疗。", "class": "open qa"}, {"question": "回答什么是伦敦塔桥。", "std_answer": "伦敦塔桥(Tower Bridge)是英国伦敦市中心的一座著名的桥梁,也是伦敦市重要的地标和旅游景点之一。它位于泰晤士河上,连接伦敦市中心的市区与南岸的伯蒙西。\n伦敦塔桥的建造始于1886年,历经8年的时间,于1894年竣工。它最为著名的特点是两个高高的塔楼以及中央的可升降的桥面,这个桥面能够在船只通过的时候打开,以保证河上大型的船只通行无碍。\n伦敦塔桥的设计灵感来自于一位名叫霍乱医生的汉密尔顿·詹姆斯,他的灵感来自于在1870年代末开启的泰晤士河建桥运动。它的设计也是为了应对当时进入伦敦港口的大型船只和救助筏(类似于船),以及保证市中心和南岸交通的连通性。\n伦敦塔桥成为了伦敦市的标志性建筑之一,它见证了伦敦市历史上的许多事件,包括两次世界大战的空袭、重重的雾霾还有伦敦奥运会的举行。它至今依然是伦敦市的著名景点之一,游客可以在桥上散步、欣赏伦敦市中心的美景、观看可升降的桥面开启、以及参观伦敦塔桥的博物馆,了解塔桥的历史和技术构造。", "class": "open qa"}, {"question": "回答以下选择题。\n哪个选项是一个编程语言?\nA. HTML\nB. CSS\nC. Java\nD. Photoshop", "std_answer": "选项C Java是一个编程语言。\nHTML(超文本标记语言)和CSS(层叠样式表)是用于创建Web页面的标记语言和样式表,而不是编程语言。\nPhotoshop是一款用于图像编辑和图形设计的软件,也不是编程语言。 \nJava是一种通用的、高级的、面向对象的计算机编程语言。它被广泛应用于开发各种类型的应用和软件,包括桌面应用程序、Web应用程序、企业级应用程序、移动应用程序和游戏等。Java具有跨平台的特性,意味着编写的代码可以在多个操作系统上运行而无需重新编译。", "class": "closed qa"}, {"question": "根据以下文本回答问题:什么是能量守恒定律?\n物理学是自然科学的一个重要分支,研究自然界的物质、能量、空间和时间等基本概念。在物理学的研究中,科学家们探索了宇宙的奥秘,从微观粒子到宏观天体的各个方面都进行了深入研究。\n在物理学中,一个重要的概念是能量守恒定律。能量守恒定律指出,一个孤立系统的总能量在任何时间都是不变的。也就是说,能量不能被创造或摧毁,只能被转化成其他形式。例如,当一个物体被提起并释放时,它的势能被转化为动能,使得物体开始运动。", "std_answer": "能量守恒定律指出,一个孤立系统的总能量在任何时间都是不变的。也就是说,能量不能被创造或摧毁,只能被转化成其他形式。这是物理学中的一个重要概念。", "class": "closed qa"}, {"question": "根据以下表格的信息回答问题:《肆式青春》电影中的主演是谁?\n| 电影名称 | 上映时间 | 主演 | 导演 |\n| --- | --- | --- | --- |\n| 肆式青春 | 2021年 | 张子枫、李程彬 | 郭帆 |\n| 网络谜踪 | 2018年 | 约翰·赵、米切尔·拉 | 安尼什·查甘蒂 |\n| 复仇者联盟4:终局之战 | 2019年 | 罗伯特·唐尼、克里斯·埃文斯 | 美国安东尼、乔·罗素 |\n| 美国往事 | 1984年 | 罗伯特·德尼罗、詹姆斯·伍兹 | 赛尔乔·莱翁内 |\n| 小岛惊魂 | 2019年 | 伊万杰琳·莉莉、杰弗里·戴恩·摩根 | 杨紫琼 |", "std_answer": "《肆式青春》电影中的主演有张子枫和李程彬。", "class": "closed qa"}, {"question": "2023-04-10 08:20:11 [INFO] 用户ID: 102938, 请求打车服务, 起点: 莲花山公园, 终点: 明珠商务广场\n2023-04-10 08:20:15 [DEBUG] 用户ID: 102938, 派单成功, 车辆ID: A12345, 司机姓名: 张三\n2023-04-10 08:25:20 [INFO] 用户ID: 102938, 上车, 车辆ID: A12345, 司机姓名: 张三\n2023-04-10 08:55:32 [INFO] 用户ID: 102938, 下车, 车辆ID: A12345, 司机姓名: 张三, 行程金额: 85.5元\n2023-04-10 08:55:35 [DEBUG] 用户ID: 102938, 支付成功, 金额: 85.5元\n2023-04-11 13:10:45 [INFO] 用户ID: 102938, 请求打车服务, 起点: 世纪大道地铁站, 终点: 欢乐谷\n2023-04-11 13:10:49 [DEBUG] 用户ID: 102938, 派单成功, 车辆ID: B23456, 司机姓名: 李四\n2023-04-11 13:15:01 [INFO] 用户ID: 102938, 上车, 车辆ID: B23456, 司机姓名: 李四\n2023-04-11 13:50:20 [INFO] 用户ID: 102938, 下车, 车辆ID: B23456, 司机姓名: 李四, 行程金额: 120.0元\n2023-04-11 13:50:24 [DEBUG] 用户ID: 102938, 支付成功, 金额: 120.0元\n基于以上日志信息回答:这个用户在2023年4月11日从世纪大道地铁站到欢乐谷的行程中,支付了多少费用?", "std_answer": "用户在2023年4月11日从世纪大道地铁站到欢乐谷的行程中支付了120.0元费用。", "class": "closed qa"}, {"question": "用户询问:我想画一幅户型效果图,输入是一个2D户型图,想得到3D的\napi集合描述如下:\n家具库API:该API提供了一个家具库,其中包含各种不同类型和风格的家具,例如沙发、床、桌子等等。用户可以通过此API获取家具库中的对象,并将其添加到户型图中。\n可视化效果API:该API可以将用户生成的2D或3D户型图转化为高质量的渲染图像。用户可以选择不同的视角和光线设置,以及应用不同的滤镜和效果,来生成满意的可视化效果。\n户型图生成API:该API可以接受房屋尺寸、房间数量、门窗位置和布局等信息,自动生成符合用户需求的户型图。\n材料库API:该API提供了一个材料库,其中包含各种不同类型和风格的材料,例如地板、墙壁、天花板等等。用户可以通过此API获取材料库中的对象,并将其应用到户型图中的相应部分。\n分享和导出API:该API允许用户将生成的户型图导出为不同的文件格式,例如PNG、JPEG、PDF等等,以便用户与他人分享和打印。此API还支持将户型图上传至云端存储服务,例如Google Drive和Dropbox,方便用户随时随地访问和编辑。\n请基于用户需求和api描述从api集合中挑选出一个最合适的api", "std_answer": "根据您的需求,您需要将2D户型图转换为3D效果图。在这里,最合适的API是“可视化效果API”。该API可以将用户生成的2D或3D户型图转化为高质量的渲染图像。您可以选择不同的视角和光线设置,以及应用不同的滤镜和效果,来生成满意的3D可视化效果。", "class": "closed qa"}, {"question": "基于以下信息我们可以得出哪些分析结论?\n20年资产15.41亿,21年资产20.7亿,22年资产23.8亿,23年4月9号资产25.5亿。", "std_answer": "根据提供的数据,我们可以分析出以下关于资产情况及增幅的信息:\n从20年到21年,资产从15.41亿元增长到20.7亿元。增长金额为5.29亿元,增幅为(5.29/15.41)*100% ≈ 34.33%。\n从21年到22年,资产从20.7亿元增长到23.8亿元。增长金额为3.1亿元,增幅为(3.1/20.7)*100% ≈ 14.98%。\n从22年到23年4月9号,资产从23.8亿元增长到25.5亿元。增长金额为1.7亿元,尚不足一年的时间,但我们可以计算这段时间的资产增长率。增幅为(1.7/23.8)*100% ≈ 7.14%。\n从上述数据分析来看,从20年到23年4月9号的整体趋势,资产持续增长。然而,值得注意的是,资产增长速度在逐年减缓。从20年到21年的增幅最高,达到34.33%,之后逐年下降。这可能意味着市场竞争加剧或投资回报逐渐减少等多种因素。\n为了更好地分析资产情况,建议对投资策略、市场环境、行业前景等多方面因素进行深入研究,并结合公司的长期战略规划,以做出更为明智的投资决策。", "class": "closed qa"}, {"question": "对以下一组商品评论进行情感分类,正面/中立/负面:\n1)价格比其他商家便宜,但质量有点差;2)外观漂亮,但功能不如预期的好;3)使用了几次,感觉很满意。", "std_answer": "1)价格比其他商家便宜,但质量有点差;\n情感分类: 中立\n这个评论中提到了两个不同的方面:价格和质量。价格比其他商家便宜是一个好的方面,但质量有点差又是一个不好的方面。因此,我们可以将这个评论分类为中立。\n2)外观漂亮,但功能不如预期的好;\n情感分类: 中立/负面\n这个评论中提到了两个方面:外观和功能。外观漂亮是一个好的方面,但是功能不如预期的好是一个不好的方面。因此,这个评论可以分为中立和负面两个分类。如果功能不如预期的影响不是很严重,那么我们可以将这个评论分类为中立;如果影响很大,我们可以将这个评论分类为负面。\n3)使用了几次,感觉很满意。\n情感分类: 正面\n这个评论中只提到了一个方面:使用后的感受。用后感觉很满意可以被视为一个好方面,因此,这个评论可以被分类为正面情感。", "class": "classification"}, {"question": "HR: 你好,我是XYZ公司的招聘主管。我很高兴地通知你,你已经通过了我们的初步筛选,并且我们希望邀请你来参加面试。\n候选人:非常感谢,我很高兴收到你们的邀请。请问面试的时间和地点是什么时候和哪里呢?\nHR: 面试的时间是下周二上午10点,地点是我们公司位于市中心的办公室。你会在面试前收到一封详细的面试通知邮件,里面会包含面试官的名字、面试时间和地址等信息。\n候选人:好的,我会准时出席面试的。请问需要我做哪些准备工作呢?\nHR: 在面试前,请确保你已经仔细研究了我们公司的业务和文化,并准备好了相关的问题和回答。另外,请务必提前到达面试现场,以便有足够的时间了解我们的公司和环境。\n候选人:明白了,我会尽最大努力准备好的。非常感谢你的邀请,期待能有机会加入贵公司。\nHR: 很高兴能和你通话,我们也期待着能和你见面。祝你好运,并期待下周能见到你。\n基于以上对话,抽取出其中的时间、地点和事件。", "std_answer": "时间:下周二上午10点\n地点:市中心的办公室\n事件:面试", "class": "extract"}, {"question": "为以下词编写一首韵律诗:爱,夜晚,星星,忧伤", "std_answer": "", "class": "generation"}, {"question": "根据以下的定义,回答问题 '你人生中目前的使命是什么?'。\n定义:人生使命是人在生命中追求的意义和目标,是一种个人追求和社会价值的统一体现。", "std_answer": "作为一个AI,我的能力是帮助人们做出更好的决策,提供有效的解决办法,并尽可能地提高人类的生活质量。 我的使命是通过智能化和技术创新来为人类服务,帮助人们实现他们的目标和梦想,推动社会的进步和发展。我希望成为人类繁荣和进步的助推器,为下一代留下更加美好的世界。", "class": "closed qa"}, {"question": "给出一个实际的例子来可以解释“摩擦力”的概念。", "std_answer": "", "class": "brainstorming"}, {"question": "给定两个文本,将它们合并并重构成一份新的文本。\n第一份文本:当今的数字化世界中,大数据的影响日益显现。第二份文本:从社会、经济到环境,大数据的影响异常深远。", "std_answer": "", "class": "rewrite"}, {"question": "为一份营销资料编写一份FAQ,回答潜在客户可能会提出的问题。", "std_answer": "", "class": "generation"}, {"question": "解释心理学中“孤独感”的定义和影响。", "std_answer": "心理学中,“孤独感”是指一种内心的感觉,即某个人认为自己与他人之间缺乏关联性或者被孤立,这种感觉可以是短暂、温和的,但也可以是长时间的、强烈的。孤独感是一种主观体验,它并不一定真实反映现实情况,即使一个人有一定的社交关系,他或她仍然可能感受到孤独感,这可能是因为他或她感觉到那些关系缺乏紧密和深度。\n孤独感会对人的身心健康产生各种不同的影响。以下是一些常见的影响:\n1. 心理健康问题: 孤独感可能会导致抑郁、焦虑等情绪问题,尤其是在情感上强烈的人中更普遍。这些负面情绪可能会进一步降低生活质量,影响日常活动、职业及个人生活的关系。\n2. 身体健康问题: 孤独感可能会影响免疫系统的功能,使人体更容易患病。与此同时,孤独感也可能加重慢性疾病的症状。\n3. 自我感觉: 孤独感可能使人对自我评价更为负面,不自信,自卑甚至会产生自我怀疑;也可能导致难以进行真实和深刻的人际接触。\n4. 行为: 感到孤独的人可能会采取某些不健康的行为来逃避这种感觉,如吸烟、酗酒等行为,也可能认为自己被孤立是因为自身的原因,进而出现逃避社交场合的行为。\n总之,孤独感不只是一种心理上的痛苦,也对身体健康、人生感觉的满意度和人际关系等方面有较大的负面影响。因此,人们需要注重自身社交生活,保持积极乐观的心态以及通过多种方式增强人际关系以减少孤独感。", "class": "open qa"}, {"question": "请回答以下问题并给出相应的解释:为什么人类需要睡觉?", "std_answer": "人类需要睡觉是为了让身体和大脑得到恢复和修复。睡眠是一个复杂的过程,涉及到许多生理和神经过程。\n以下是为什么人类需要睡觉的原因:\n1. 恢复身体:睡眠有助于恢复受损的组织和细胞,包括肌肉和骨骼。此外,睡眠还有助于维持急性和慢性伤病的治疗。\n2. 巩固记忆:睡眠对于巩固短期记忆并将其转化为长期记忆是至关重要的。在睡眠过程中,大脑会进行一些神经信号的处理和整合,这有助于加强记忆力。\n3. 支持生长和发育:睡眠对婴儿和青少年的生长和发育非常重要。睡眠同样也有助于成年人的身体恢复和修复,并支持身体的健康和稳定。\n4. 支持免疫系统和整体健康:睡眠有助于支持免疫系统和整体健康。睡眠不足可导致血压升高、免疫力下降、增加患心脏病、糖尿病和癌症的风险等。\n5. 维持心理健康:睡眠对于维持心理健康和稳定也很重要。睡眠不足或睡眠质量不佳可能导致抑郁、焦虑、情绪不稳定等问题。\n总之,睡眠对于我们的身体和心理健康至关重要。建立一个好的睡眠习惯可以提高我们的注意力、记忆力、免疫力和整体健康。", "class": "open qa"}, {"question": "你需要为一家运动健身中心编写一篇博客文章,介绍新近推出的瑜伽班。\n这个瑜伽班是一个初级班,适合初学者和那些希望温和锻炼身体的人。", "std_answer": "", "class": "generation"}, {"question": "回答问题并提供合适的解释和原因。\n问题:为什么海水是咸的?请提供相应的解释和原因。", "std_answer": "海水之所以是咸的,是因为其中含有各种溶解在水中的盐类和矿物质。海水中最常见的盐类是氯化钠(NaCl),其次是硫酸钠(Na2SO4)、氯化镁(MgCl2)以及碳酸钙(CaCO3)等。这些盐类和矿物质来源于陆地上的岩石和泥土,通过河流和地下水流入海洋。同时,海洋中还存在生物体的分解产物也是海水咸度的来源。\n海洋水体积很大,因此其中的盐分也很多。海水中盐浓度的国际标准是盐度(Salinity), 通常以每千克海水中含纯氯化钠的克数来表示。海水的平均盐度约为35克/千克。这意味着,每千克海水中约有35克盐类和矿物质。然而,这个数字仅仅是平均数,海洋不同区域的盐度也是有差异的。\n海水中盐浓度的变化还取决于其所处海域的环境条件,如气候、水深、沉积物和淡水入侵等。在热带和亚热带地区,由于降水量大、蒸发强烈,水体蒸发而大量流失的淡水,盐的含量相对更高。相反,在北极和南极等寒冷地区,淡水含量较高,海水相对清淡。此外,来自冰川的淡水也能在一些地区稀释海水的咸度。\n综上所述,海水是咸的原因是其含有大量的溶解在其中的盐类和矿物质;同时多种环境条件也会对海水的咸度产生影响。", "class": "open qa"}, {"question": "简要概述亚马逊公司的历史和业务范围。", "std_answer": "亚马逊公司是一家美国电子商务和云计算巨头,成立于1994年,总部位于华盛顿州的西雅图市。创始人是杰夫·贝索斯(Jeff Bezos)。\n亚马逊公司最初是一家在线书店,然后逐渐扩大其业务范围,现在成为一家拥有众多业务部门的科技巨头。其主要业务包括:\n1. 零售电子商务:亚马逊在全球各地运营着数十个本地化的在线零售平台,包括亚马逊.com、亚马逊.cn等。公司以低价、广泛的产品种类和快速的交付服务而闻名,为广大消费者提供了便利和价格优势。\n2. 云计算:亚马逊通过其AWS云服务部门提供云计算基础设施和解决方案,这是全球最大的公共云服务提供商之一。这项服务向个人、企业和政府机构提供计算、存储和协作工具,以及人工智能和区块链等新兴技术。\n3. 数字流媒体:亚马逊Prime Video是亚马逊提供的在线视频流媒体服务,与Netflix、HBO Max等竞争。该服务提供了大量的电影、电视剧和原创内容,可以在智能手机、平板电脑、智能电视等设备上观看。\n4. 电子设备:亚马逊设计和出售自己的设备,包括Kindle电子书阅读器、Fire智能手机和平板电脑、Echo智能音箱等。这些设备已经成为亚马逊与消费者之间的桥梁,通过它们连接到了亚马逊的各项服务,并提供了声控和智能家居控制等功能。\n总之,亚马逊以其庞大的零售网络、强大的云计算能力和消费者级别的数字服务而著称。", "class": "open qa"}, {"question": "请根据以下信息的主旨写一篇总结。\n文章标题:如何成功应对工作压力\n作者:John Smith\n发布时间:2021年5月15日\n正文内容:文章详细介绍了如何识别和缓解工作压力,包括分配任务,时间管理,以及保持健康的生活方式。", "std_answer": "", "class": "generation"}, {"question": "为一个新的移动应用程序编写使用说明和用户手册,使用户能够成功使用应用程序。", "std_answer": "", "class": "brainstorming"}, {"question": "针对给定的产品列表,基于其描述将它们分类为家具,电子产品或服装。\n1. 大号沙发,布面料,双人座位;2. 电视机,尺寸:55英寸,4K超高清分辨率;3. 黑色晚礼服,适合晚宴或场合穿着。", "std_answer": "给定的三个产品可以被分类为以下类型: \n1. 大号沙发,布面料,双人座位 - 家具  \n这个产品的描述包括一件大号沙发,使用布料制成,且设计为双人座位。这些特点都表明这个产品应该被分类为家具。\n2. 电视机,尺寸:55英寸,4K超高清分辨率 - 电子产品  \n这个产品的描述包括一件电视机,拥有55英寸的屏幕和4K超高清分辨率。这些特点表明它是一种电子产品,通常用于家庭娱乐或商业用途。\n3. 黑色晚礼服,适合晚宴或场合穿着 - 服装  \n这个产品的描述是一件适合晚宴或场合穿着的黑色晚礼服。这种产品有时也被称为“晚礼服”,因此很容易将其归类为服装。\n综上所述,这些产品的分类如下:\n1. 大号沙发,布面料,双人座位 - 家具 \n2. 电视机,尺寸:55英寸,4K超高清分辨率 - 电子产品  \n3. 黑色晚礼服,适合晚宴或场合穿着 - 服装", "class": "classification"}, {"question": "就以下话题发表意见:\n工作日程管理对于保持工作与生活平衡非常重要。", "std_answer": "", "class": "brainstorming"}, {"question": "阐述城市化带来的好处和弊端。", "std_answer": "城市化是指人口由农村转移居住到城市,并在城市里议论、工作、生活的过程,它的好处和弊端如下:\n好处:\n1.经济增长:城市化通常意味着经济增长,因为城市可以带来更多的就业机会,从而刺激消费和投资。此外,城市化还可以提供更高效的基础设施和公共服务,例如道路、水和电力系统、医疗保健和教育系统,这些都是经济增长的基础。\n2.文化交流:城市化可以促进不同民族、种族和文化之间的交流和互动,这种交流可以增进相互理解,丰富文化内涵,促进社会发展,同时也可以促进文化创意产业的发展。\n3.社交网络:随着城市化的加剧,城市居民之间的社交网络也得到了增强。这种社交网络可以为人们提供情感支持和精神慰藉,有利于建立社会凝聚力,从而为城市的持续发展提供支持。\n弊端:\n1.环境污染:城市化对环境造成了很大的影响。城市化进程中,大量的建筑物和基础设施需要占据原本自然的空间,从而破坏了生态环境,形成了城市热岛现象,产生了大量的废气、废水和其他污染物质,影响人们的身体健康。\n2.资源短缺:在城市化进程中,人口的增长意味着对自然资源的需求增加,这可能导致资源的短缺,例如水资源、自然资源、土地资源等,这将成为城市化进程中的一个显著问题。\n3.社会不平等:城市化可能加剧社会不平等。城市化进程中,富裕的人更容易获得机会和资源,而贫穷的人和弱势群体可能需要面对更多的困难和障碍。这可能导致城市贫困现象和种族或性别歧视问题的进一步加剧。\n在总结这些好处和弊端之后,城市化的实践应该尽量减少其不利影响并发挥其最大的经济和社会潜力。城市应该设法缓解环境问题,控制人口增长,减少资源应用,鼓励社会平等,为每个人提供更好的机会和条件来实现自己的梦想。", "class": "open qa"}, {"question": "给定以下文本段落,提取其中的关键信息。\n今天早上,纽约市长在新闻发布会上宣布了新的计划,旨在减少治安问题。该计划包括增加派遣警察的人数,以及启动社区倡议,以提高居民对警察工作的支持度。", "std_answer": "关键信息是:\n- 时间:今天早上。\n- 地点:纽约市。\n- 人物:纽约市长。\n- 动作:宣布了新的计划。\n- 目的:减少治安问题。\n- 计划细节:包括增加派遣警察的人数以及启动社区倡议,以提高居民对警察工作的支持度。", "class": "extract"}, {"question": "对以下陈述进行批判性思考,并提供您的意见\n中国应该全面禁止塑料袋的使用。", "std_answer": "中国应该全面禁止塑料袋的使用是一个复杂的声明,需要从多个角度进行批判性思考。\n首先,需要考虑的是禁止塑料袋是否是有效的环保措施。塑料袋是主要的环境污染源之一,对于野生动物和生态系统都有着负面影响。但是,禁止塑料袋并不是彻底解决问题的方法,可能会带来新的环境问题。比如,如果社会上没有一个更好地替代品,人们可能会采用纸袋或其他类似的替代品。然而,这样可能会导致更多的树木被砍伐,以生产纸袋,从而造成不必要的森林破坏和生物多样性丧失。相反的,也有可能出现不必要的普及使用不环保的可降解塑料袋,这种材料在分解过程中会释放出甲烷等有害气体,会造成更大的环境影响。\n其次,需要考虑的是禁止塑料袋的影响。塑料袋是日常生活中不可或缺的一部分,它们在购物,包装和运输等方面都起着重要的作用。禁止塑料袋的使用可能会造成一些不便,尤其是在某些情况下(例如,运输易碎物品),替代品并不方便使用。这可能会对企业和消费者造成负担,因为替代品代价可能更大。同时,禁止塑料袋还可能对一些社区的人们带来不利影响,尤其是在经济不发达的地区,人们可能会因为无法承担成本而无法获取有效的替代品。\n最后,需要考虑的是禁用塑料袋的实施。实际上,塑料袋的禁止并不是一个简单的法令或政策能够解决的问题。必须与广泛的宣传、教育和反塑料措施相结合,以确保消费者和企业仍能够顺利地进行购物和包装等活动,同时也能够从其他环保措施中受益。因此,禁止塑料袋的实施需要大量的组织和时间,以确保其有效性和可持续性。\n总之,中国应该全面禁止塑料袋的使用是一个复杂的问题,需要进行全面的批判性思考。必须平衡环保和经济,同时采取其他环保措施,如通过可回收材料生产可持续产品、提高消费者意识、投资街道清洁和垃圾处理设施等。这样才能真正实现解决环境问题的目标。", "class": "open qa"}, {"question": "请分析以下行业未来的发展趋势:零售行业。", "std_answer": "", "class": "brainstorming"}, {"question": "列出5个常见的抗生素,并说明它们可以用于治疗哪些疾病。", "std_answer": "以下是五种常见的抗生素及其治疗的疾病:\n1. 青霉素(Penicillin):青霉素是一种广泛使用的抗生素,对许多细菌感染有效,包括肺炎球菌(Streptococcus pneumoniae)、链球菌(Streptococcus pyogenes)和猪链球菌(Streptococcus suis)等。它通常用于治疗中耳炎、咽喉炎、肺炎和蜂窝组织炎等细菌感染。\n2. 头孢菌素(Cephalosporin):头孢菌素是一组广谱抗生素,可以用于治疗许多疾病,包括皮肤和软组织感染、尿路感染、呼吸道感染和腹部感染等。头孢菌素被广泛使用于医院和临床医疗领域,特别是第三代的头孢菌素,如头孢曲松(Ceftriaxone)和头孢克洛(Cefaclor),这两种药物可以有效地治疗细菌感染。\n3. 四环素(Tetracycline):四环素是一种广谱抗生素,可以抑制细菌的生长和繁殖,通常用于治疗皮肤和软组织感染、尿路感染、呼吸道感染和石炭疽等。四环素还可以用于治疗痤疮、麻风和猩红热等疾病。\n4. 大环内酰胺(Macrolide):大环内酰胺是一类广谱抗生素,可以用于治疗多种細菌感染,包括百日咳、猪嗜肺军团菌病、支原体肺炎、阴道炎和尿路感染等。大环内酰胺包括阿奇霉素(Azithromycin)和克拉霉素(Clarithromycin),这两种药物特别适合治疗那些对青霉素有过敏反应的患者。\n5. 氯霉素(Chloramphenicol):氯霉素是一种广谱抗生素,可以用于治疗许多细菌感染,包括肺炎、伤寒和流行性感冒等。然而,由于其严重的副作用(如贫血、骨髓抑制和视觉障碍等),氯霉素已经被替代为治疗其他可用的抗生素。在某些情况下,如在热带地区,氯霉素仍然是一种有效的治疗选择。", "class": "open qa"}, {"question": "描述几种防止电脑病毒攻击的方法。", "std_answer": "", "class": "brainstorming"}, {"question": "请描述一下“云计算”的概念及其应用领域。", "std_answer": "云计算是一种计算模式,利用网络连接的大量计算资源来为用户提供可扩展、可靠、灵活的计算服务。云计算模式将计算资源与用户分离,用户只需要向云计算服务提供商支付使用费用即可使用这些资源,而无需拥有或维护自己的计算资源。云计算模式通常分为三种服务模式:基础设施即服务(IaaS)、平台即服务(PaaS)和软件即服务(SaaS)。\n在云计算的应用领域中,它已经逐渐适用于许多行业和部门中。以下是云计算的几个应用领域:\n1.企业信息技术: 云计算允许企业更灵活、便捷的高效管理资源。企业可以使用IaaS租用大量的基础设施资源,比如计算机、存储、网络等。PaaS允许开发人员构建和测试互联网应用程序,并同时管理相关基础结构。SaaS将软件的部署和维护工作转移到云端,让企业专注于核心业务,减少了维护成本。\n2.大数据:云计算的高度可伸缩和资源复用特性,使得它成为存储和处理大数据的理想选择。云计算服务可以存储大规模数据、分析大规模数据集,支持多种机器学习算法,还能实现对数据结构的可视化和用户互动。\n3.物联网:传感器、智能设备和其他物联网设备产生的数据需要大规模处理和分析。以云计算为基础的解决方案将设备数据集成到云端,进行計算并提供支持物联网应用程序所需的支持。\n4.科学研究:云计算能够给科学家提供更快、更强大且更灵活的计算能力。研究人员可以通过云计算使用大规模计算机群处理科学数据,加速计算机模拟,甚至让云计算成为共享数据资源和社会化科学研究的平台。", "class": "open qa"}, {"question": "解答以下问题。\n为什么银行的利润会随着利率上升而增加?", "std_answer": "银行的利润与利率息息相关,当利率上升时,银行的利润也会随之增加。这是因为银行的业务模式主要是通过借贷资金来赚取利润,而利率是银行借贷的重要定价因素。\n当利率上升时,银行向借款人收取的利率也会上升,同时银行向存款人支付的利率也会上升。因此,银行的净利润增加了。这是因为银行的负债(存款)成本相对于资产(贷款)的收益增加。\n此外,高利率还可以鼓励借款人更多地向银行借款,从而增加了银行的收入。对于那些固定利率的贷款,当利率上升时,银行的净息差(贷款利息率减去存款利息率)也会增加,从而增加银行的净利润。\n需要注意的是,当利率上升时,银行的利润不是无限增加的。当利率达到一定水平时,可能会导致借款人减少贷款或者存款人转投其他收益更高的银行,这会导致银行营业利润降低。\n综上所述,银行的利润会随着利率上升而增加,但这个增长不是无限的,而是受到市场需求和竞争等因素的限制。", "class": "open qa"}, {"question": "哪些迹象可能表明一个人正在经历焦虑", "std_answer": "焦虑是一种精神上的不安和担忧,它可能导致身体、情绪、认知和行为方面的一系列反应。以下是可能表明一个人正在经历焦虑的迹象:\n1. 失眠:焦虑可能导致一个人难以入睡或保持睡眠。失眠可能会使人感到疲惫、烦躁和易怒,甚至会导致身体和认知方面的问题。\n2. 情绪波动:焦虑可能导致情绪波动,这可能包括忧虑、惊恐、恐惧、紧张、不安和沮丧。这些情绪可能与个人的经历、环境和社会因素有关。\n3. 心悸:焦虑可能导致心悸,这是指感到心跳加快、不规则或跳动非常强烈。心悸可能是身体上对焦虑的反应,也可能是由于焦虑引起的心理上的反应。\n4. 身体疼痛:焦虑可能导致身体的疼痛和不适,这可能包括头痛、肌肉紧张、胃痛和胸痛等。\n5. 心理和认知问题:焦虑可能导致心理和认知问题,这可能包括注意力不集中、判断力下降、决策困难和记忆力减退等。\n6. 躯体症状:焦虑可能导致躯体方面的一系列症状,例如手发抖、出汗、恶心、呼吸困难、头晕和胃部紧绷等。\n这些迹象可能反映出一个人正在经历焦虑,但是这并不表示每个人都会出现这些特定迹象。不同的人可能会出现不同的迹象,且这些迹象也可能随着时间和环境的变化而有所不同。如果一个人出现了这些迹象,并且他们感到焦虑和不安,那么他们可能需要进行进一步的评估和治疗。", "class": "open qa"}, {"question": "针对以下技术问题或错误,提供一个解决方案或修复方案。\n我的电脑突然死机了,该怎么办?", "std_answer": "", "class": "brainstorming"}, {"question": "用自己的话解释以下词汇:\n幽默。", "std_answer": "幽默是一种利用诙谐、滑稽的语言方式、态度或行为,达到让人发笑、轻松缓解紧张情绪的技能。幽默有时也包含了讽刺、讥讽、调侃以及夸张等元素,但总的来说,它的目的是通过诙谐的方式打破尴尬、冷漠或者紧张的局面,缓解人们的情绪,使人们感到快乐和开心。\n幽默并不是一种简单的技能,因为它需要一定的智慧和敏感。幽默可能会因为文化、社会习惯等因素而产生不同的效果。所以说,幽默的表达必须要有在特定的场合和人群中运用的敏感度。但大多数情况下,幽默是一种积极、健康的工具,能缓解紧张的气氛,增加互信,促进人际交往。", "class": "open qa"}, {"question": "请根据以下的数据生成一封报告。\n学生A:90分,学生B:80分,学生C:70分", "std_answer": "", "class": "generation"}, {"question": "回答以下问题并提供理由。\n问题:你认为吸烟应该在公共场所被禁止吗?", "std_answer": "我认为吸烟应该在公共场所被禁止,因为:\n1. 健康风险:吸烟对吸烟者的健康有害,也会对周围的非吸烟者造成健康风险。二手烟含有许多有害化学物质,例如苯、酚、甲醛等,这些化学物质对人体健康有害,甚至可以导致癌症、心脏病、哮喘等疾病。\n2. 空气污染:吸烟会产生大量烟雾和有害气体,会导致室内空气质量下降,从而影响其他人的健康和舒适度。在封闭的空间,烟雾无法排出,而且会长时间地留在空气中,影响大家的呼吸。\n3. 公共环境卫生:烟雾和烟蒂都会污染公共场所的卫生和环境,造成严重的美学和感官上的困扰。烟蒂和烟灰缸可能会导致火灾和其他安全隐患。\n4. 品质和尊重:公共场所如图书馆,博物馆,剧院,教堂等都应该是一个尊重环境和社交互动的地方。在这些场所吸烟会对人们的品位和社交互动造成干扰,会破坏这些场所的氛围。\n在我的观点中,禁止在公共场所吸烟是有必要的,不仅有助于保护吸烟者和非吸烟者的健康,还可以保持卫生环境和公共场所的品质。价格的负面影响,尤其是对吸烟者的限制,可能会产生一些抵触感和争议,但是这种限制是为了保障公共利益和大多数人的健康和福祉。", "class": "open qa"}, {"question": "判断以下两个句子是否意思相同。是则输出1,否则输出0。\n我飞了十个小时回家。 / 我总共花了十个小时到达家。", "std_answer": "这两个句子的意思不完全相同。虽然时间“十个小时”相同,但两个句子强调的角度和含义不同。\n第一个句子:“我飞了十个小时回家。”这个句子强调的是飞行的时间,也就是花费时间最长的过程。这个句子的语境是,这个人从一个远离家乡的地方乘飞机飞回家,需要十个小时的飞行时间。\n第二个句子:“我总共花了十个小时到达家。”这个句子强调的是整个到家的过程花费了十个小时。这个人可能不仅仅乘坐飞机,还包括其他旅行工具,例如出租车、公共汽车等,或者是行走的时间等。\n因此,这两个句子的意思不完全相同,不应该被认为是等同的。答案为0。", "class": "closed qa"}, {"question": "描述一个典型的工作日。", "std_answer": "", "class": "brainstorming"}, {"question": "对以下句子进行开放式问答。\n《三体》是刘慈欣的一部科幻小说,它获得了雨果奖。", "std_answer": "", "class": "brainstorming"}, {"question": "请解释下列数学术语:\n平均数、中位数、众数。", "std_answer": "在统计学中,有三种常见的描述数据集的方式:平均数、中位数和众数。这些术语可以帮助我们了解数据的集中趋势。\n1. 平均数(Mean)\n平均数是一组数的总和除以这组数的个数。用数学符号表示为:\n平均数 = (数列中所有数的总和) ÷ (数列中数的个数)\n例如,假设我们有一个数列:2, 4, 6, 8, 10\n这个数列的平均数可以通过以下公式来计算:\n平均数 = (2 + 4 + 6 + 8 + 10) ÷ 5 = 30 ÷ 5 = 6\n因此,这个数列的平均数是6。\n平均数可以帮助我们了解数据的集中趋势,但是如果数据集中存在异常值,平均数可能会被扭曲。\n2. 中位数(Median)\n中位数是将一组数按照从小到大(或从大到小)排序后,位于中间位置的那个数。如果这组数有偶数个,那么中位数就是位于中间的两个数的平均数。用数学符号表示为:\n对于有奇数个数的数列:中位数 = 排序后的中间数\n对于有偶数个数的数列:中位数 = 排序后中间两位数字的平均数\n例如,假设我们有一个数列:2, 4, 6, 8, 10, 12\n这个数列按照从小到大的顺序排列后为:2, 4, 6, 8, 10, 12\n因此,这个数列的中位数为 8。\n中位数是一种更加稳健的衡量数据集中趋势的方法,因为它不会受到数据集中的异常值的影响。\n3. 众数(Mode)\n众数是指在一组数中出现次数最多的数。有时候一组数中有一个以上的众数,有时候又没有众数。用数学符号表示为:\n众数 = 出现次数最多的数字\n例如,假设我们有一个数列:2, 4, 6, 6, 8, 8, 10\n这个数列中出现次数最多的数字是6和8,因此这个数列有两个众数,分别为6和8。\n众数能够显示出数据集中出现最多的数字是什么,但是它并不一定能够反映出数据集中的整体分布情况,因为只有出现次数最多的数字被考虑在内。", "class": "open qa"}, {"question": "描述一下你认为未来的交通将是什么样子。", "std_answer": "", "class": "brainstorming"}, {"question": "构想一个应用程序的概念,并描述其功能和用途。", "std_answer": "", "class": "brainstorming"}, {"question": "解答下列问题:\n在目前已知的元素中,哪一个元素的原子序数最大?", "std_answer": "在已知元素中,原子序数最大的元素是钅(锘,Lr),它的原子序数为103。\n元素的原子序数是指每个元素原子核中带电粒子的个数,它决定了元素的化学和物理特性。原子序数按递增顺序排列,最小的元素是氢(H),其原子序数为1。原子序数最大的元素是目前已知的元素中最重的元素之一——锘(Lr,元素周期表第103号元素)。\n锘是一种人工合成的放射性元素,它是一种超重元素,也称为超铀元素。它的原子核中包含了103个质子和一定数量的中子,因此其原子序数为103。锘是一种非常不稳定的元素,甚至在实验室中也很难制备,并且在自然界中几乎不存在。因此,对于锘的物理和化学性质的研究也非常有限。", "class": "open qa"}, {"question": "写一篇关于如何提高学生阅读能力的文章。", "std_answer": "", "class": "generation"}, {"question": "根据所提供的一段文本,提取其中的名词列表。\n游戏是一种受人们欢迎的娱乐方式,可以让人们在空闲时间中放松身心、寻找快乐和挑战。我昨天玩的游戏是一款很受欢迎的网络游戏。在这个游戏中,我可以选择不同的角色扮演,并加入到一个虚拟的游戏世界中。在这个世界里,我可以与其他玩家一起探险、战斗、合作或竞争。这个游戏世界非常丰富多彩,有各种各样的任务、关卡和挑战,需要我运用自己的智慧和技能来完成。在游戏中,我结识了很多新朋友,我们一起攻克了很多难关,分享了很多欢笑和成功。整个游戏过程中,我忘却了疲惫和压力,完全沉浸在了游戏的世界里。最终,我通过不断的努力和合作,完成了游戏的所有目标,获得了很多奖励和成就感。我很开心能够在游戏中获得这样的快乐和成就,也感谢这个游戏给我带来了这样的体验和回忆。", "std_answer": "名词列表:\n游戏、娱乐方式、人们、空闲时间、身心、快乐、挑战、网络游戏、角色扮演、虚拟、游戏世界、玩家、探险、战斗、合作、竞争、任务、关卡、智慧、技能、新朋友、难关、欢笑、成功、游戏过程、疲惫、压力、成就感、奖励、体验、回忆。", "class": "extract"}, {"question": "请对以下文章进行头脑风暴,为其起一个标题。\n在现代社会中,人们越来越注重健康和长寿。", "std_answer": "", "class": "brainstorming"}, {"question": "在可持续发展的主题下,生成20个可行的项目想法。", "std_answer": "", "class": "brainstorming"}, {"question": "生成一个有趣的故事,并包含以下元素:\n一个魔法森林,一个小精灵,一只会说话的猫。", "std_answer": "", "class": "generation"}, {"question": "您是否同意以下这个论点:\n“科技使人类更加孤独。”请陈述您的观点。", "std_answer": "", "class": "brainstorming"}, {"question": "思考并记录下与“未来交通”相关的想法和概念。", "std_answer": "", "class": "brainstorming"}, {"question": "重写以下句子以强调工作的重要性:\n我们需要完善我们的项目以确保成功。", "std_answer": "", "class": "rewrite"}, {"question": "编写python代码实现将一个英文句子所有单词的首字母变成大写。\nI like singing and dancing.", "std_answer": "这是一个测试句子。\n正确的处理方法是:将这个句子中每个单词的首字母变成大写。处理完后,句子就变成了:\n这是一个测试句子。 \n可以使用编程语言中的字符串函数或正则表达式来实现这个功能。下面是使用Python语言实现的代码示例:\n```\nsentence = \"I like singing and dancing.\"\nwords = sentence.split()   # 将句子分割成单词列表\nnew_words = [word.capitalize() for word in words]   # 将每个单词的首字母变成大写\nnew_sentence = \" \".join(new_words)   # 拼接单词列表成新的句子\nprint(new_sentence)   # 输出处理后的句子\n```\n输出结果为:\n```\nI Like Singing And Dancing.", "class": "code"}, {"question": "问题:帮我想一些整齐的处理数据的方法。", "std_answer": "处理数据时,保持数据整洁和整齐非常重要,这有助于提高数据分析的准确性和效率。以下是一些整齐地处理数据的方法:\n1. 数据清理:这是整洁数据的基础,确保数据没有重复值、缺失值或不一致的值。可以使用Python中的Pandas库或Microsoft Excel等工具来进行数据清理。\n2. 数据格式化:在处理数据之前,应该将数据格式化为一致的格式,例如,将所有日期格式为YYYY-MM-DD,将货币值格式为带有两位小数的数字等。\n3. 命名规则:在对数据集中的每个列和行进行命名时,应遵循一致的命名规则。例如,使用小写字母、下划线和有意义的词汇,以便其他人可以轻松理解数据。同时应该避免使用空格和特殊字符。\n4. 列和行排序:将数据集的列和行按照一致的排序方式排列可以使数据变得更加整洁和易于分析。\n5. 使用独一无二的标识符:使用独一无二的标识符来标识每行或每列的数据,这有助于跟踪错误和识别哪些行或列需要更改。\n6. 用代码实现自动化:使用Python或R等编程语言,可以编写脚本来自动化数据整理过程,大大提高效率和准确性。\n7. 数据归一化:对于不同的测量单位或比例尺的数据应当适当归一化。例如将体重数据统一到公斤为单位等。这有助于提高数据比较的准确性。\n总之,整齐处理数据可以使得数据更容易分析和理解,减少数据分析的错误率和降低分析成本。以上方法只是几个例子,实际操作时还需要根据具体情况选择合适的处理方式。", "class": "open qa"}, {"question": "请对以下论点进行辩论并给出最佳观点支持的理由。\n应该将计算机编程教育作为学校必修科目。", "std_answer": "支持应该将计算机编程教育作为学校必修科目的理由如下:\n1. 培养21世纪关键技能:计算机编程已经成为21世纪的一项关键技能,学生不应该被排除在这个领域之外。通过学习计算机编程,学生将学会逻辑思考和问题解决能力,这些技能在未来任何领域都非常有用。\n2. 增加就业机会:随着数字经济的快速发展,计算机编程变得越来越重要。对于未来的就业岗位,对于计算机编程有所了解的人将具有更多的竞争优势。将计算机编程作为必修科目,可以帮助更多的学生为未来的就业做好准备。\n3. 推动创新:学习计算机编程可以培养学生的创造力和革新精神。让学生掌握计算机编程并能将其应用到不同的领域,将新的想法变成现实。这将推动学生在学术和商业领域中拥有更多创新和创造性的解决方案。\n4. 适应数字文化:现在数码技术已经渗透到我们的生活中的每个方面,我们需要更多的人掌握与数字技术有关的知识。通过将计算机编程作为必修科目,学生可以在数字世界中更好地适应。\n5. 增进多学科交叉学习:计算机编程不仅仅是计算机科学的领域。它也需要涉及数学、自然科学、社会科学,甚至艺术和文学等领域。将计算机编程作为必修科目可以促进多学科之间的交叉学习和合作。\n综上所述,将计算机编程教育作为学校必修科目有很多好处。学生可以培养实践技能和21世纪开发所需的关键技能,增加就业机会,并在数字文化中适应,同时也有助于推动创新和多学科交叉学习。", "class": "open qa"}, {"question": "给我一些关于减肥的建议。", "std_answer": "", "class": "brainstorming"}, {"question": "生成一篇500字以上的作文,讨论音乐在人们生活中的意义。", "std_answer": "", "class": "generation"}, {"question": "根据以下文本摘录,从下面的选项中选择正确的答案:一年有多少个季节?A)1 B)2 C)3 D)4", "std_answer": "正确答案是D) 4\n一年通常被划分为四个季节,春季、夏季、秋季和冬季。这些季节基于地球公转轨道上的位置和倾斜度,以及太阳直射点所在的位置。每个季节的长度约为三个月,春季从三月开始,夏季从六月开始,秋季从九月开始,冬季从十二月开始。\n春季通常是指在北半球的三月、四月和五月。此时,太阳直射点在赤道以南,昼夜时间大致相等,但在北半球日照时间逐渐增长。春季是万物苏醒的季节,气候温和,万物开始发芽和生长。\n夏季通常是指在北半球的六月、七月和八月。此时,太阳直射点在北回归线以北,北半球的日照时间最长。夏季是炎热的季节,气温高,阳光强烈。\n秋季通常是指在北半球的九月、十月和十一月。此时,太阳直射点向赤道以南移动,日照时间变短,天气渐渐凉爽。秋季是收获的季节,大量的水果和蔬菜开始成熟。\n冬季通常是指在北半球的十二月、一月和二月。此时,太阳直射点在南回归线以南,北半球的日照时间最短。冬季是寒冷的季节,气温低,天气干燥。", "class": "closed qa"}, {"question": "针对以下问题提供详细的解决方案。如果问题无法解决,请提供适当的解释。\n为什么我的计算机无法启动?", "std_answer": "", "class": "brainstorming"}, {"question": "请写一篇关于你的假期经历的随笔。", "std_answer": "", "class": "generation"}, {"question": "回答下面这个问题:\n为什么互联网上的隐私问题如此棘手?", "std_answer": "", "class": "brainstorming"}, {"question": "编写一份市场竞争分析报告。\n竞争对手列表和相关数据。", "std_answer": "", "class": "brainstorming"}, {"question": "根据给定的文本,生成一篇500字的新闻报道。输入可以是任何主题,但请注意避免此新闻与真实新闻相关。\n主题为:小狗被困山洞两天后被救出。", "std_answer": "", "class": "generation"}, {"question": "从以下三个句子编写一个段落,使其在逻辑上有意义:\n1. 天气晴朗。 \n2. 田地里的作物正在成长。 \n3. 这位农民每天都要努力工作。", "std_answer": "", "class": "generation"}, {"question": "给我解释量子力学。", "std_answer": "量子力学是物理学中的一门基础理论,它描述了物质和能量在微观尺度下的行为。通常,这种微观尺度是指分子、原子和化合物等非常小的粒子和系统。量子力学揭示了这些微观粒子的性质,包括它们如何相互作用,如何被观察,以及如何在它们自己的世界中演化。\n量子力学中最基本的概念是波粒二象性,即物质也可以表现为波动的形式。这种波动的性质可以被描述为它们的波长和频率,这两个概念对应着波的宽窄和振动次数。量子力学还提出了测不准原理,这意味着我们无法在同一时刻精确地测量微观粒子的位置和动量。\n量子力学对于微观粒子的表现方式有许多奇怪的性质,例如,微观粒子有可能存在于多个位置和状态中,这种现象被称为叠加态。另一个奇怪的现象是量子纠缠,即两个微观粒子可以相互作用,以至于它们之间的量子状态是相互聚合的,即使它们隔得很远。\n在应用方面,量子力学已经带来了许多革命性的变化。例如,在量子计算机中,量子比特可以在同一时间处于多种状态中,使得计算速度远远高于传统的计算机。量子通信也被认为是未来互联网通信安全的一种可行方法。此外,量子力学在材料学、化学、生物学等各个领域也有应用,包括研究稳定性和反应性,以及开发更有效的药物和材料等。\n总之,量子力学是对微观世界中微小粒子和相互作用的探究,它提出了一些奇怪而吸引人的概念,可以帮助我们更好地理解我们周围的世界以及宇宙的基本规律。", "class": "open qa"}, {"question": "列举出五种不同品牌的咖啡,并分别描述它们的特点和口味。", "std_answer": "", "class": "brainstorming"}, {"question": "描述一下如何使用随机森林模型来进行机器学习分类任务。", "std_answer": "随机森林(Random Forest)是一种强大的机器学习算法,常用于分类、回归以及特征选择等任务。在分类任务中,随机森林算法涉及多棵决策树(Decision Tree)进行,每棵决策树构成一个弱分类器,而随机森林将它们的结果进行综合,形成一个强分类器。下面是一个描述如何使用随机森林模型进行机器学习分类任务的步骤:\n1.准备数据集:首先需要准备一个标记好类别的数据集,其中每个样本都有一组特征向量和一个对应的分类标签。\n2.随机抽样:从数据集中随机有放回地抽取一定数量的样本(可以重复选择同一个样本),形成一个新的训练集。这个过程叫作随机抽样(Bootstrap),采用随机抽样的目的是为了保证每个决策树使用的训练数据集都是略有差异的,这样它们之间的相关性就会减小,从而提高集成的效果。\n3.训练决策树:利用这个新的训练集,训练一棵决策树,并且在每个节点上采用一种特殊的决策方式,即在候选特征集合中随机选择一部分特征进行判断,而不是全部特征。这个过程叫做特征随机化(Feature Randomization),采用这种方式可以增加不同决策树之间的差异性,防止模型出现过拟合的情况。\n4.重复执行步骤2和3,构建多棵决策树,这些决策树的数量是一个重要的超参数,需要根据具体问题而定。另外,由于随机抽样和特征随机化的影响,每棵决策树往往不太一样,这就是随机森林的一个特点。\n5.利用随机森林进行预测:当有一个新的样本需要进行分类时,将其输入到每棵决策树中,得到一个分类结果,而这些结果会被综合起来,最终得到随机森林的分类结果。在二分类问题中,可以使用投票法,即选出获得最多票数的类别作为最终结果;而在多分类问题中,可以使用平均法,即将每个分类器输出的概率值进行平均,获得每个类别的概率分布,然后选出概率最大的类别作为最终结果。\n6.评价随机森林的性能:为了评价随机森林的分类性能,可以将测试集输入到分类器中,计算分类准确率、精度、召回率、F1值等评价指标。\n总的来说,使用随机森林进行机器学习分类任务的步骤包括准备数据集、随机抽样、训练决策树、重复构建多棵树、利用随机森林进行预测和评价随机森林的性能。在这个过程中,需要注意的是,随机森林算法本身有很多的超参数,如树的数量、特征个数、树的深度等等,这些都需要根据具体问题进行调整,以获得最好的分类效果。", "class": "open qa"}, {"question": "下面这个问题的答案是什么?\n问题:哪个音乐家创作了《命运交响曲》?", "std_answer": "答案:德国作曲家路德维希·范·贝多芬创作了《命运交响曲》。\n《命运交响曲》(Symphony No. 5 in C minor, Op. 67)是贝多芬的代表作之一,也是西方古典音乐史上最著名、最广为人知的交响乐作品之一。这部作品由四个乐章组成,于1804年至1808年期间创作完成,首演于1808年12月22日。 \n这部交响曲的开头四个音符,以短-短-短-长的形式出现,旋律铿锵有力,经久不衰,被广泛应用于电影、电视、广告、游戏等不同领域。\n贝多芬是巴洛克时期和古典主义时期之间最重要的过渡人物之一,他的音乐作品对音乐史的发展有着重要的影响。他的作品不仅包括交响曲、钢琴奏鸣曲、室内乐、歌剧等多种形式,也挑战了传统的音乐形式和观念,开创了浪漫主义音乐时期的先河。", "class": "open qa"}, {"question": "给我一些关于人类大脑的常识。", "std_answer": "", "class": "brainstorming"}, {"question": "讲述一个有趣的历史故事。", "std_answer": "", "class": "brainstorming"}, {"question": "从下面的三个选项中,选择最佳的答案来回答问题。\n问题:谁创造了苹果公司?\n选项:\nA. Steve Jobs。\nB. Bill Gates。\nC. Jeff Bezos。", "std_answer": "最佳答案是A. Steve Jobs。\nApple公司是由史蒂夫·乔布斯、史蒂夫·沃兹尼亚克和罗纳德·韦恩(1976年脱离)共同于1976年创立的。乔布斯是苹果公司的首席执行官,他对公司的发展起了至关重要的作用。他的创造力、先见之明和对产品的强烈关注导致了苹果公司的许多成功产品,如Macintosh电脑、iPod、iPhone和iPad。在他的领导下,苹果公司成为了全球最著名的科技公司之一,为世界带来了许多颠覆性的技术和产品。", "class": "closed qa"}, {"question": "给出下面的数据表,回答以下问题:\n有多少种颜色?重量最重/轻的物品是什么?\n物品编号 | 颜色 | 重量\n001 | 红 | 10kg\n002 | 蓝 | 8.5kg\n003 | 黑 | 12.2kg\n004 | 绿 | 4.8kg\n005 | 黄 | 6.1kg\n006 | 白 | 9.9kg", "std_answer": "根据所提供的数据表,回答以下问题:\n1. 有多少种颜色?\n   根据给出的数据表,有6种不同的颜色,它们是红、蓝、黑、绿、黄和白。\n2. 重量最重/轻的物品是什么?\n   根据给出的数据表,最重的物品编号是003,它的重量为12.2kg;最轻的物品编号是004,它的重量为4.8kg。", "class": "extract"}, {"question": "请列举5个有关在大学里写论文的提示。", "std_answer": "", "class": "brainstorming"}, {"question": "根据给定的场景提出三个非常规的解决方案\n您是一家面包店的经理,发现近来销售额下降,需要想出一种创意促销活动。", "std_answer": "", "class": "brainstorming"}, {"question": "使用下列文字,创作一篇至少200字的短文。\n鲁迅的小说从未脱离过阴暗的底色,那底色是代表一个政治现实以及道德背景的。作为一位独特的文学风格创造者,鲁迅的小说在中国现代文学史上具有重要的地位。", "std_answer": "", "class": "generation"}, {"question": "列出至少五种方法,可以减少塑料垃圾的产生和消耗。", "std_answer": "", "class": "brainstorming"}, {"question": "思考下面的问题,并给出答案:如果你从事某项工作,你最喜欢哪个季节?", "std_answer": "", "class": "brainstorming"}, {"question": "回答以下问题。\n喜鹊是属于哪个科?", "std_answer": "喜鹊属于雀形目(Passeriformes),鸦科(Corvidae)的一种。\n鸦科是雀形目中最大的一个科,包含了许多非常聪明、善于复杂学习和解决难题的鸟类。喜鹊是其中的一种,它们是中等体型的鸟类,体重约为100克左右,体长约为45厘米。\n喜鹊的外观特征包括:黑色的羽毛、灰色的颈部和胸部、直立的尾巴、粗壮的喙和长长的腿。它们通常生活在城市和乡村的开阔地带、树林边缘、公园和花园等地方,食性为杂食性,主要以昆虫、浆果、坚果、种子、蛋和小型脊椎动物等为食。\n喜鹊有很强的适应性,普遍分布于全球许多地区,包括欧洲、亚洲、非洲、澳大利亚和北美等地。在中国,喜鹊是广泛分布的常见鸟类之一,被誉为“报晓之鸟”、“报喜之鸟”。", "class": "open qa"}, {"question": "请写一个简短的对话,其中一个人询问另一个人如何学习一门外语。", "std_answer": "", "class": "generation"}, {"question": "重新演绎给定的故事情节并且加入自己的想法。\n故事情节:一个年轻人离家寻找自己的人生道路。", "std_answer": "", "class": "generation"}, {"question": "回答以下问题:狗的平均寿命是多少岁?", "std_answer": "狗的平均寿命取决于多个因素,包括品种、基因、健康水平和生活方式等。一些品种会比其他品种更长寿,而一些生活方式可能会缩短狗的寿命。\n根据美国兽医协会(American Veterinary Medical Association)的统计数据,狗的平均寿命为12年。然而,具体数值可以因品种而异。例如,大型犬种通常寿命较短,一些特定品种如拳师犬,平均寿命可在8至10年左右,而小型犬种的寿命则通常更长,例如贵宾犬和约克夏梗犬,平均寿命可高达15年。\n值得一提的是,狗的健康水平和生活方式可以影响其寿命。例如,健康体重、适量的锻炼、定期兽医检查和良好的饮食,可能会延长狗的寿命。相反,肥胖、缺乏运动、缺少兽医检查和控制疾病的不当管理,可能会缩短狗的寿命。\n总的来说,狗的寿命是多种因素的综合结果,如品种、基因、健康水平和生活方式等。 对于您自己的宠物狗,您可以通过定期检查和良好的维护来延长其寿命。", "class": "open qa"}, {"question": "生成一段文字,描述一个尚未实现的想法或计划的详细信息。", "std_answer": "", "class": "brainstorming"}, {"question": "编写一个python程序,使其能根据给定条件筛选出一份数据集。\n筛选出所有年龄大于等于18岁且收入高于50000美元的人的数据。", "std_answer": "为了筛选出满足条件的数据集,需要明确数据集中包含哪些列(变量),以及如何定义“年龄”和“收入”。\n假设数据集包含以下列:\n- id:唯一标识符\n- age:年龄(整数)\n- income:收入(整数,单位为美元)\n那么,要选取所有年龄大于等于18岁且收入高于50000美元的人的数据,可以按照以下步骤进行:\n1. 读取数据集,获取所有行和三列(id、age、income)的数据。\n2. 针对“年龄”和“收入”两列进行筛选,选取所有年龄大于等于18岁且收入高于50000美元的数据,可以使用 Python 的 Pandas 库,示例如下:\n```python\nimport pandas as pd\n# 读取数据集\ndataset = pd.read_csv('path/to/dataset.csv')\n# 筛选出所有年龄大于等于18岁且收入高于50000美元的数据\nselected_dataset = dataset[(dataset['age'] >= 18) & (dataset['income'] > 50000)]\n```\n其中,`dataset['age']` 表示获取“年龄”这一列的数据,`dataset['income']` 表示获取“收入”这一列的数据。`&` 表示逻辑与操作,将两个条件合并起来进行筛选。\n3. 筛选完成后,可以将选出的数据保存到一个新的 CSV 文件中,示例如下:\n```python\nselected_dataset.to_csv('path/to/selected_dataset.csv', index=False)\n```\n其中,`index=False` 表示不保存行索引,只保存数据部分。保存后的数据集中,只会包含满足条件的行数据,即所有年龄大于等于18岁且收入高于50000美元的人的数据。", "class": "code"}, {"question": "对以下两个问题进行回答:1.周杰伦是哪里的歌手?2.他的代表作是哪首歌?", "std_answer": "1. 周杰伦是台湾的歌手。\n周杰伦(Jay Chou)出生于1979年1月18日,他是一位台湾籍流行歌手、词曲创作人、演员和导演。他在音乐和电影领域中取得了巨大的成就,并成为了台湾和华语流行音乐界的代表人物之一。\n周杰伦在他的音乐生涯中创作了许多风靡全球的歌曲,并且也得到了华语音乐奖、MTV音乐奖、世界音乐奖等众多音乐奖项的肯定。他的音乐作品深受粉丝和乐评人士的喜爱,被誉为“音乐魔法师”、“华语音乐天王”。\n2. 他的代表作是哪首歌?\n周杰伦的代表作有很多,其中最著名的应该是《稻香》。\n《稻香》是周杰伦创作的一首歌曲,作品呈现出浓郁的乡村氛围,歌词中透露出对家乡和童年回忆的珍视和怀念之情,旋律优美动听,歌词富有诗意和情感,深受听众喜爱。这首歌曲也被广泛地传唱和演绎,成为了周杰伦的代表作之一,也是华语流行音乐中的经典之作。", "class": "open qa"}, {"question": "根据给出的一组文字,提取其中的关键信息,并用json格式表示\n我们正在中国上海建立一家新的公司,这将是一个创新的里程碑。我们的公司将专注于生物技术领域,致力于研发和生产基因编辑工具,这是一项具有革命性的技术,可以改变我们对基因和生命本质的理解。我们相信,通过这项技术的应用,我们将能够为人类的健康和疾病治疗做出巨大贡献。我们的团队由一群富有经验和专业知识的科学家和技术专家组成,他们深入研究了基因编辑技术多年,并在该领域做出了卓越的贡献。我们的使命是将这一领域的最新科学成果转化为创新的产品,并帮助更多的人受益于这项技术的应用。我们预计在未来几个月内推出我们的第一款产品,这将是一个里程碑式的时刻。我们相信,这款产品将帮助我们在该领域取得重大突破,并为我们的客户提供卓越的产品和服务。我们非常兴奋地迎接这个挑战,我们将不遗余力地努力工作,确保我们的产品能够取得成功。", "std_answer": "以下是提取的关键信息,并用json格式表示:\n{\n\"公司名称\": \"未提及\",\n\"成立地点\": \"中国上海\",\n\"公司领域\": \"生物技术\",\n\"主要业务\": \"研发和生产基因编辑工具\",\n\"使命\": \"将基因编辑技术最新成果转化为创新的产品\",\n\"团队构成\": \"富有经验和专业知识的科学家和技术专家\",\n\"首款产品计划\": \"未来几个月内推出\",\n\"产品特点\": \"革命性的技术,为人类健康和疾病治疗做出巨大贡献\",\n\"期望突破\": \"在该领域取得重大突破\",\n\"客户服务\": \"提供卓越的产品和服务\",\n\"团队态度\": \"非常兴奋地迎接这个挑战,并不遗余力地努力工作确保成功\"\n}", "class": "extract"}, {"question": "根据提供的文本生成一组问题,并将其输出。\nJohn是一名优秀的学生。他在一所富有声誉的学校就读,他的父母都是医生。", "std_answer": "", "class": "generation"}, {"question": "针对给定的代码,解释它完成什么任务并给出一些改进建议。\ndef foo():\n return True if x == y else False", "std_answer": "这是一个名为\"foo\"的Python函数,其任务是比较变量\"x\"和\"y\"的相等性,如果它们相等,则返回True,否则返回False。\n代码的主要优点是简单明了,使用了Python中的条件表达式(if-else语句的简写)来减少代码量,从而提高效率。\n然而,对于该函数的一些改进建议:\n1. 代码中使用的变量x和y没有进行定义或传递,这将导致代码无法正常运行。因此,建议在函数定义时添加这些变量的参数,以便在函数调用时传递它们的值。\n2. 尽管代码中的if-else语句减少了代码量,但是判断语句中使用的条件\"== \"操作符本质上已经返回了True或False。因此,if-else语句也可以直接去掉,代码可以简化为return x == y。 \n3. 最好给函数加上一些注释来清楚地解释代码的目的和工作原理,以使代码更易于理解、维护和调试。", "class": "code"}, {"question": "描述重新设计公司logo的过程", "std_answer": "重新设计公司logo是一个复杂的过程,需要考虑多个方面,如公司的品牌定位、目标受众、竞争对手等等。以下是重新设计公司logo的详细过程:\n1. 定义问题和目标:重新设计公司logo的第一步是明确为什么需要重新设计logo。可能是因为公司已经改变了方向、服务、产品,需要一个更符合新方向的logo。定义问题和目标是确保设计师明确理解公司的需要,以便在设计logo时考虑。\n2. 搜集信息:了解公司的业务、历史和文化,以及它的目标受众和竞争对手是很重要的。从公司官网、市场调研、竞争分析、社交媒体等渠道收集关于公司的信息,了解公司的品牌形象和定位,找到设计logo的线索。\n3. 创意构思:一旦搜集到足够的信息,设计师就可以开始构思设计logo的想法并画出素描图。尝试发掘公司的特点和优势,并从公司历史和文化中汲取灵感。这是一个自由创作的过程,尽可能多地实验与思考。\n4. 设计草图:选出最好的几个想法,开始用计算机设计图形。首先,设计师应该追求简单、独特和易识别性,并确保logo在不同的大小和颜色条件下仍然清晰可见。对于每个概念,设计师应考虑采用不同的字体和颜色。\n5. 反馈和修改:一进入草案设计状态,就需要不断收集反馈。在此基础上进行logo调整修订。完整地处理所有草草图的设计就可以尽早获得反馈,并开始纠正可能会在早期设计中出现的问题。\n6. 确定最终版:当有了一些不同的设计时,要带给公司的有关团体投票,看谁最认为符合公司形象,以便为该公司选择最终版本的logo。这可以通过在线投票或集体讨论来完成。最终确定的专业logo应该能代表公司形象,并符合市场和目标人群的预期,能长期使用。\n7. 应用和监测:一旦确定了最终的logo设计,公司应考虑将它应用到不同的作品中,如名片、网站、广告和市场活动中等。同时,公司应跟踪LOGO在市场上的反应,如果有必要,继续优化LOGO形象。", "class": "open qa"}, {"question": "向团队成员提出五个以上激励团队合作的建议。", "std_answer": "", "class": "brainstorming"}, {"question": "请制定接下来的工作计划。\n我们已经完成了市场分析和用户需求分析,接下来的工作计划是什么?", "std_answer": "", "class": "brainstorming"}, {"question": "用多种方式描述下雨的感觉。", "std_answer": "下雨的感觉可以用多种方式来描述,以下是其中一些:\n1. 触感:雨滴落在皮肤上感觉凉爽湿润,有时甚至可以感觉到雨滴的重量和冰凉。如果雨下得很大,它们可能会使你身体上的衣物和头发变得湿透。\n2. 声音:雨落在屋顶、道路和树叶上的声音是难以忽视的。轻盈的滴答声、清澈的滋滋声、密集的倾盆而下的噪音,不同的降雨量和类型都会带来不同的声音体验。\n3. 气味:当雨水与土壤和植物接触时,会散发出一种清新的、振奋人心的气味。雨水也可以洗去城市中的污染和垃圾,给出一种极为舒适的感觉。\n4. 视觉效果:雨水能够改变环境的视觉效果,如让草地上的颜色更加鲜艳,让城市更加清新。此外,雨可以产生一些戏剧性的景观,例如闪电和雷声的陪衬,或者水流淌在街道上的景象。\n5. 心理感受:一些人可能认为雨天是沮丧和阴暗的,而另一些人则会感觉舒适和放松。在下雨的日子里,一些人可能会选择待在家中读书或看电影,而另一些人则会穿上雨衣和鞋子去跑步或出门活动。\n综上所述,下雨的感觉可以是非常多样化和个人化的,它可以使你身体感受到凉爽、潮湿,呼吸到清新的空气,听到美妙的声音,看到美丽的景象,并通过这些来激发你的情感态度和行为。", "class": "open qa"}, {"question": "探讨如何处理大规模数据集的问题,并提供解决方案。", "std_answer": "", "class": "brainstorming"}, {"question": "给定一个问句,回答它并提供至少3个证据。\n什么是认知心理学?", "std_answer": "", "class": "brainstorming"}, {"question": "写一篇文章,讨论如何在家庭工作和自我照顾之间取得平衡。", "std_answer": "", "class": "generation"}, {"question": "您的团队需要制定一份新的项目计划书,请列举出该计划书中必须包含的三个关键要素。", "std_answer": "", "class": "brainstorming"}, {"question": "将以下英文短句翻译成中文。\nLife is like a box of chocolates, you never know what you're gonna get.", "std_answer": "人生就像一盒巧克力,你永远不知道会得到什么。", "class": "rewrite"}, {"question": "根据以下句子回答问题:\n句子:张三今年28岁,来自上海,已婚,有一个四岁的孩子。他在一家律师事务所工作,负责处理公司法律事务。\n问题:张三是做什么工作的?", "std_answer": "张三是一家律师事务所的法律工作人员,负责处理该公司及其客户的法律事务。具体来说,他的职业是律师,他的工作是提供法律咨询和代表公司客户处理法律事务。", "class": "closed qa"}, {"question": "编写一个有关汽车的描述,涵盖品牌、型号、颜色、燃油类型、最高速度等信息。", "std_answer": "", "class": "generation"}, {"question": "王先生您好!我是您的客服代表,很高兴跟您聊天。我想通知您,我们安排了一次面聊,以更好地了解您的需求,并介绍我们的服务。面聊将于明天下午2点在公司总部(中关村壹号)举行,大约持续一个小时。如果您有任何问题或需要更多的信息,请随时跟我联系。谢谢您的关注,期待明天跟您见面!\n基于上文写一封邮件,请将其中的时间地点人物替换成<time><location><name>等。", "std_answer": "", "class": "rewrite"}, {"question": "如果你必须在一周内完成一项重大项目,你会如何安排时间和优先事项?", "std_answer": "如果我必须在一周内完成一个重大项目,我会采取以下步骤以尽可能高效地利用时间和资源:\n1. 明确任务目标:首先,我会仔细审查项目要求和目标,以确保我完全理解要完成的任务,并能够专注于最重要的部分。这有助于确保我在短时间内成功地完成项目。\n2. 确定时间表:在清晰了解项目目标后,我会制定一个周详的时间表,以便在一周内分配任务,包括充分的时间用于计划,主要任务的分解,检查进度等。\n3. 列出优先事项:接下来,我会将任务分类成不同的优先级别,以确保必须做的任务最先被完成。大多数情况下,有些任务更重要,需要优先解决,而其他任务可以推迟或通过其他人员处理。这有助于优化进度并确保不会在项目过程中遗漏要紧事项。\n4. 设定 checkpoint:我会在一定的时间点检查项目的进展情况来确保能够按时完成项目。这些检查点可以根据时间表的结构和任务的难度来排列。\n5. 设定具体计划:然后,我会制定一个具体的计划,包括每天要达成的目标、所需时间,以及如何解决可能出现的问题等。\n6. 消除干扰:为了确保我能够在给定的时间内尽可能高效地完成项目,我需要消除干扰。这可能包括治理时间,禁止或限制使用社交媒体、邮件或电话等带有干扰性的工具。\n7. 保持动力:最后,为了成功完成重大项目,我会一直保持动力和积极性,利用自己具备的经验和技能,观察和实时调整计划。\n以上是我的详细回答,我相信这些步骤可以帮助我在短时间内高效完成重大项目。", "class": "open qa"}, {"question": "为给定的一组数据生成摘要性描述。\n以下是一组地震数据,包括地震时间、震级、地震深度等:\n09/01/2021, 3.4级, 10公里深度\n09/02/2021, 5.2级, 20公里深度\n09/02/2021, 2.1级, 5公里深度", "std_answer": "这些数据是有关于三次地震的,发生的日期分别是2021年9月1日、2日和2日,三次地震的震级分别为3.4级、5.2级和2.1级。其中,第二次地震的震级为最高,为5.2级,地震深度也是最深的,为20公里。相比之下,第一次和第三次的地震深度分别为10公里和5公里。总体而言,这组数据提供了有关不同日期、不同震级和不同深度的地震信息,其中第二次地震是最强的。", "class": "summarization"}, {"question": "根据给定的主旨和若干关键词,撰写一篇有趣的新闻报道。\n主旨:三只猴子逃出动物园。关键词:猴子、动物园、逃跑", "std_answer": "", "class": "generation"}, {"question": "根据上下文,填写空缺的单词\n我正在学习一门课程,[空]是学习数据科学的必要条件。", "std_answer": "数学是学习数据科学的必要条件。", "class": "open qa"}, {"question": "请从以下词语中选择填空:......\n句子内容:电视机是一种___机。选项:A.通讯 B.视听 C.娱乐", "std_answer": "电视机是一种视听机。\n电视机是通过电子技术将视频信号转换为图像并输出到显示器上,同时通过声音技术将音频信号转换为声音并输出到扬声器上的电子设备。因此,电视机被称为视听机,可以提供高清晰度的图像和音频效果,用于观看各种类型的节目,包括电视节目、电影、音乐和体育比赛等,为人们的视听娱乐生活带来更多的乐趣和享受。", "class": "closed qa"}, {"question": "思考并列出你认为的十个有效的时间管理技巧。", "std_answer": "", "class": "brainstorming"}, {"question": "将一个长句拆分成多个短句,每个短句长度不超过15个单词。例如,将“在我看来,这个问题非常困难,因为我没有足够的信息来解决它。”转换为“在我看来,这个问题非常困难。因为我没有足够的信息。来解决它。”\n网络安全是我们必须非常重视的。因为它将直接影响我们的日常生活。比如说,银行账户被黑客攻击是一件很让人害怕的事情。", "std_answer": "", "class": "rewrite"}, {"question": "编写一份简历模板,着重强调工作经历和技能。", "std_answer": "", "class": "generation"}, {"question": "为以下三句话找到一个共同的主题/关键词。[句子1]古罗马建筑的独特之处在于其坚固和宏伟的建筑设计。[句子2]当地政府宣布禁止在公共场所吸烟。[句子3]在前往办公室的路上,我经常听音乐来缓解压力。", "std_answer": "三个句子的共同主题/关键词是“设计”或“设计特点”。虽然三个句子的主题非常不同,但是它们都包含某种设计方面的内容。句子1指的是古罗马建筑的坚固和宏伟的建筑设计,句子2提到的是当地政府对公共场所的吸烟进行设计和规定,而句子3涉及听音乐来缓解大家在日常生活中居住设计。因此,这三个句子都在它们的背景中涉及了设计特点。", "class": "extract"}, {"question": "根据以下场景编写一段对话\n场景:在医院里,一个患者向医生描述了自己的疼痛症状", "std_answer": "", "class": "generation"}, {"question": "为一个在线商店编写一篇关于夏季特惠活动的新闻稿。\n该在线商店是一家提供时尚衣物的网络购物平台。夏季即将来临,该商店决定推出一项盛大的特惠活动,以庆祝这个充满活力的季节。请为此撰写一篇包含以下内容的新闻稿:活动名称、优惠内容、参与方式、活动期限等。", "std_answer": "", "class": "generation"}, {"question": "请解释“博客”(Blog)的意义和作用。", "std_answer": "博客(Blog)是一个人或一组人在自己的网站或平台上发布文章、记录信息和感悟的一种交流形式。它是由两个词“weblog”合成而成的,最早出现在1990年代中期。随着数字技术的快速发展,博客在全球范围内得到了广泛的认可和使用。\n博客在现代社会中的作用和意义是多方面的:\n1. 交流和表达:博客是一个人随时随地可以表达自己观点、想法、经验和技能的平台。它脱离了传统媒体和机构对信息的控制,让每个人都可以发声。博客可以作为一个人的“心灵日记”,记录生活、工作和思想中的琐碎和感悟,也可以分享学习和工作上的经验和知识,帮助他人解决问题和提高能力。\n2. 建立个人品牌:博客可以成为一个人展示自己专业技能和行业见解的平台,通过发布有深度和有价值的内容,吸引潜在客户和雇主的关注,提高个人知名度和认可度。通过博客可以建立个人品牌,展示个人特色和价值,增强竞争力。\n3. 传播信息:博客可以作为传播信息和宣传产品、服务的渠道,通过博客发布的有关产品和服务的信息吸引潜在客户或用户对其购买或使用产生兴趣。此外,博客也可以作为一个媒体平台,发布时事新闻、信息和观点。\n4. 社交互动:通过博客可以建立和维护社交网络,与读者和同行进行互动交流,分享经验和知识,得到反馈和建议。通过博客可以认识新朋友,分享相同爱好的人,聚集形成兴趣社区。\n综上所述,博客在现代社会中扮演着重要的角色,不仅是一个人表达自己、建立个人品牌、传播信息和社交互动的平台,也是一个文章富有价值、思想深度的生态系统。", "class": "open qa"}, {"question": "解释人类自然睡眠周期的不同阶段。", "std_answer": "人类自然睡眠周期被分为五个不同的阶段,每个阶段都有不同的生理和神经活动。以下是这五个阶段的详细描述:\n1. 清醒阶段(Wakefulness):\n这是人们完全清醒的状态。在这个阶段,大脑发出高频电信号,人们的思维和意识都非常清晰。这个阶段通常是在白天或早晨醒来时出现。\n2. 非快速眼动睡眠(Non-Rapid Eye Movement, NREM,也称为深度睡眠):\nNREM分为三个子阶段:N1、N2和N3。整个NREM阶段通常占据整个睡眠时间的75%。\n- N1阶段:这个阶段通常是人们刚开始睡觉时出现的。大脑发出更慢的电信号,呼吸变慢,身体逐渐放松,但仍然有意识。这个阶段通常只持续几分钟。\n- N2阶段:这个阶段是睡眠中最常见的阶段,通常占据整个睡眠时间的50%到60%。在这个阶段中,大脑波变得更低,但有一些较高频率的快速波。人们的心率和呼吸率也减慢了。这个阶段的特点是出现嗜睡。 \n- N3阶段:也称为“三级非快速眼动睡眠”。在这个阶段中,大脑电信号变得更缓慢,人的身体变得非常疲惫和放松。这个阶段通常在深夜时分出现,并占据整个睡眠时间的10%到20%.\n3. 快速眼动睡眠(REM):\n这个阶段是指出现在整个睡眠时间(平均为90分钟),也称为浅度睡眠。在这个阶段,大脑电信号类似于清醒时期,呼吸变快,心跳加速,眼球快速移动(这也是它的命名来源)等现象。这个阶段通常是人们做梦的时间,因为大脑的活动和思维过程类似于清醒时期。 \n4. 梦中期:对于一些学派而言,这个中间阶段其实可以看做是一种针对REM的参数设置,在注意力和神经活跃度上并没有过于显著的改变。只是因为它在夹杂着REM和非REM2的状态之间,所以将其单独提出了来。 结构上表现为,由于还陷入彻底意识模糊状态仍未完全醒来,及大量的高等神经元及基础神经元的疲劳度尚未恢复,身体各个器官仍然处于一种相对低迷甚至休息状态,若此时突然强刺激下,如“大声喊叫”、“电器噪声”等,也足以使人在突然间惊醒。\n5. 僵硬期:在某些情况下,一些人会在睡眠中经历一种类似于“醒来但无法动弹”的感觉。这种现象称为“僵硬期”。在这个阶段,人们的身体几乎无法动弹,但是大脑仍然很清醒。这个阶段通常只持续几秒钟到几分钟,但是对于那些经常经历这种“僵硬期”的人来说,这个阶段可能会破坏他们的睡眠质量。庆幸的是,这种现象并不会对健康产生任何不良影响。", "class": "open qa"}, {"question": "回答下列问题:现在是东部标准时间下午3点,那么英国伦敦现在是几点?", "std_answer": "根据世界时区的划分,东部标准时间属于美国和加拿大地区,而英国伦敦属于欧洲地区,处于格林尼治标准时间(也称为西欧时间)区域。因此,在计算英国伦敦现在的时间时,需考虑时区的差异。\n目前,东部标准时间与世界协调时(UTC)相差5个小时,也就是说,当东部标准时间下午3点时,UTC时间为下午8点。而英国伦敦与UTC时间相差1个小时,因为英国根据夏令时的变化会在夏季提高1小时。据此推算,当东部标准时间下午3点时,英国伦敦的时间应该是下午8点加1个小时,也就是晚上9点。 \n因此,如果已知在东部标准时间下午3点,想要知道英国伦敦的当前时间,需要将下午3点加上东部标准时间与UTC时间的时差5个小时,得到UTC时间为下午8点,再根据英国伦敦与UTC时间相差1个小时的情况,将UTC时间的8点增加1小时,就得到了英国伦敦现在的时间为晚上9点。", "class": "open qa"}, {"question": "请给我五个关于厨艺的提示。", "std_answer": "", "class": "brainstorming"}, {"question": "请写一篇关于青少年使用社交媒体的利与弊的文章。", "std_answer": "", "class": "generation"}, {"question": "解释以下缩写:\nJSON、CEO、PDF、HTML、NASA", "std_answer": "以下是这些缩写的详细解释:\n1. JSON: JSON (JavaScript Object Notation) 是一种轻量级的数据交换格式。它以文本形式表示数据,可以从一种程序语言传递到另一种程序语言,具有易于理解和快速解析的优点。JSON 常用于 Web 应用程序和 API 中的数据交换。\n2. CEO: CEO (Chief Executive Officer) 是一个英文词汇的缩写。在公司中,CEO 是最高级别的高管,负责管理和指导公司的日常运营和战略决策。 CEO 通常是公司的创始人或董事会任命的高管。\n3. PDF: PDF (Portable Document Format) 是一种由 Adobe Systems 创造的文档格式。它以文件形式保存,并可以跨平台交换,以确保文档在任何平台上的一致性。PDF 是一种流行的格式,用于保存文档、表格、图片等多种信息。\n4. HTML: HTML (Hypertext Markup Language) 是一种用于创建 Web 页面的标记语言。 HTML 允许开发人员定义文本、图片、链接、音频、视频等内容,并将其结构化为网页。 HTML 是 Web 技术栈的一个基础组成部分。\n5. NASA: NASA (National Aeronautics and Space Administration) 是美国政府机构,负责在和平时期进行航空和宇宙研究。NASA 成立于 1958 年,致力于推进科学和技术的发展,为人类探索宇宙提供支持。NASA 也是许多著名空间任务和探索项目的发起者和管理者,如太空人登月计划、国际空间站和火星探测器。", "class": "open qa"}, {"question": "回答以下问题:\n什么是牛津大学?", "std_answer": "牛津大学(University of Oxford)是世界著名的公立研究型大学,位于英国牛津市,成立于1096年,是世界上最古老的大学之一。牛津大学是英国顶尖的学府之一,也是世界上最好的大学之一,在世界的大学排名中常常名列前茅。它是英国著名的学习机构之一,拥有多项世界级的学科专业,享有“世界学术中心”的盛誉。\n牛津大学包含许多分校区和学院,其中包括300多个学院,超过20,000名本科生和研究生,以及超过12,000名教职员工。它的学科范围广泛,涵盖了艺术、人文、社会科学、自然科学、医学、工程和科技等众多领域。\n作为一所公立大学,牛津大学也是一个重要的科研机构,拥有多项开创性的贡献和发现,包括发现DNA双螺旋结构、万有定理等。其教育、研究和学术杰出成果不断地增强和推动了全球范围内的学术进展,对于社会和人类的整体进步做出了巨大贡献。\n总之,牛津大学是一个备受尊敬的高等教育机构,它的教育学术水平极高,是一个在全球范围内有巨大影响力的知识瑰宝。", "class": "open qa"}, {"question": "解决以下问题:\n什么是蛋白质?", "std_answer": "蛋白质是各类生命体中常见的一类有机分子,也是一种重要的生物分子。它们在细胞内发挥着重要的结构和功能作用,是细胞的基本组成部分之一。蛋白质是由氨基酸分子组成的,而氨基酸则是生命体中的基本分子之一。\n每个氨基酸都由一些共同结构的基本组成部分构成,包括一个氨基(NH2)基团、一个羧酸(COOH)基团、一个氢原子和一个侧链基团。侧链基团的结构在不同的氨基酸中是不同的,并且决定了每个氨基酸的特定性质和功能。\n在蛋白质的合成过程中,氨基酸通过肽键(一种共价键)连接在一起,形成多肽链,而多肽链则是蛋白质的基本结构。在多肽链的形成过程中,氨基酸的侧链基团可相互作用并形成不同的空间结构,如螺旋状、折叠状或者随机卷曲。\n这些不同的结构赋予了蛋白质不同的生物学功能,如结构性支撑、催化活性、运输、信号传递等。蛋白质中所含的氨基酸序列和空间结构的特定性是由其基因组成和环境条件所决定的。\n蛋白质在生命体中起着举足轻重的作用,因此对于了解生物学和医学等领域的学科,蛋白质的理解是至关重要的。", "class": "open qa"}, {"question": "请解释BERT是如何进行文本分类的。", "std_answer": "BERT即“基于 Transformer 的双向编码器表示”,是一种预训练模型,可用于各种下游自然语言处理任务,例如文本分类、命名实体识别、问答等。\n文本分类是一种下游任务,其中BERT可用于生成文本表征并将其传递给分类器。BERT将输入文本处理为表示其上下文的向量,然后将此向量送入分类器。文本分类是一个监督学习任务,意味着我们需要用已标记的示例数据训练分类器,以便它能够预测未标记数据的类别标签。\nBERT的文本分类过程包括以下步骤:\n1. 输入处理:BERT使用“[CLS]”和“[SEP]”代替符号,[CLS]是指固定句子的起始位置,[SEP]是指句子的分隔符。BERT需要接受输入文本的嵌入表示。BERT使用两个嵌入矩阵:一个用于单词嵌入,一个用于位置嵌入,以便在输入序列中标识位置。\n2. Pre-training:在分类任务前,BERT通过大量的未标记文本数据进行预训练。在这种情况下,BERT沿着文本中的两个方向(从左到右和从右到左)进行编码,并使用这些编码来生成与文本上下文相关的表示。\n3. Feeding text into Bert: 一旦输入文本被处理为嵌入表示,它将被输入到BERT中生成更好的上下文嵌入。BERT使用基于Transformer 的神经网络来生成这些向量。\n4. Attention mechanism: 在BERT中,自注意机制用于计算每个位置的向量,以便在输入文本中获取上下文信息。自注意机制可用于计算单词之间的关系,从而可以最大限度地维护词与词之间的连续性。\n5. Pooling layer:文本分类需要将整个文本序列提取其压缩标志。BERT使用汇聚层来压缩序列,以生成单一的表征向量。目前,BERT只支持两种汇聚操作:最大池化和加权平均池化。\n6. Classification:将汇集的特征向量输入到分类层中,以训练文本分类模型。这个模型是一个MLP,其中包括一个或多个全连接层。输出层的softmax函数将该向量分类到不同类别的概率上。\n7. Fine-tuning:在批量进行预处理并构建分类器后,需要对整个模型进行微调。这可以通过使用带有标签的文本数据进行监督学习来完成。此过程有助于调整模型的超参数,以提高其性能并使其适合用于特定领域的文本分类任务。\n总之,BERT使用Transformer编码器和解码器体系结构以产生文本的上下文相关表征。这种能力使它成为各种下游NLP任务的优秀候选者之一,其中包括文本分类。", "class": "open qa"}, {"question": "用你的想象力写一篇关于未来的故事,你可以自由发挥。", "std_answer": "", "class": "generation"}, {"question": "请简述海豚的特点和生活习性。", "std_answer": "海豚是一种被称为齿鲸科的哺乳动物,它们生活在海洋或淡水中,以鱼类、乌贼、虾和其他海洋生物为食。以下是海豚的一些特点和生活习性:\n1. 特点\n- 海豚身体呈流线型,具有极佳的游泳能力,可以飞快地在水中游动。\n- 海豚的体型大小不一,最大的虎鲸长达9米,而最小的黑海豚仅有1.2米。\n- 海豚的眼睛很小,但视力和听觉都非常敏锐,可以使用超声波进行定位。\n- 海豚的脑袋在左右两侧有二十多颗牙齿,牙齿非常锐利。\n- 海豚属于社会性动物,会形成非常紧密的群体,称为“海豚群”。\n2. 生活习性\n- 海豚通常在白天活动,晚上则靠近岸边休息,他们可以在水下停留约15分钟,最多可一次性憋气维持7-10分钟。\n- 海豚通常以鱼类和小型无脊椎动物为食,但也会吃鸟类、龟类等。\n- 海豚通过发出超声波进行通讯,可以进行长距离的定位和捕食。在群体中,海豚之间通过这种方式进行互动和交流。\n- 海豚群通常由雄性和雌性成员组成,其中雄性之间会进行一些社会性的活动,如拍打水面、跃出水面等,以达到显摆自己的目的。\n- 海豚的繁殖能力很强,雌性海豚通常每年可以生一个幼崽,幼崽出生后通常需要母亲照顾一段时间。", "class": "open qa"}, {"question": "回答下列问题:究竟是什么导致了科技泡沫破裂?", "std_answer": "", "class": "brainstorming"}, {"question": "提供几种解决某一问题的方案。\n如何减轻医学留学的经济负担。", "std_answer": "", "class": "brainstorming"}, {"question": "回答以下问题:\n茉莉花茶是用什么材料泡制的?", "std_answer": "茉莉花茶是一种非常受欢迎的茶类,是以茉莉花和绿茶为原材料酿制而成的。茉莉花属于茉莉花属,是一种香气怡人的花卉植物。而绿茶则是以嫩叶为原材料而制成的茶叶,具有绿叶的色泽、香气和滋味。在制作茉莉花茶时,新鲜的茉莉花要和嫩叶绿茶一起加工制作。\n具体来说,制作茉莉花茶的步骤如下:\n1.  选购优质绿茶。茉莉花茶一般使用绿茶作为茶底,所以需要选购优质的绿茶原料,不宜使用太老的绿茶。\n2.  种植茉莉花。茉莉花的花期在夏季,此时需要专人在绿茶园中种植茉莉花。\n3.  花香传味。使用新采的茉莉花,在晚上开花期间采摘,并加以处理熏香,使其花香能够深入到绿茶中。\n4.  和茶叶混合。将新鲜的茉莉花和绿茶混合后,一般在2-3次的熏香过程中,让茶叶充分吸取花香。\n5.  茶叶加工。经过熏香后的茶叶,需要进行筛选、绿干等工艺加工,这样茶叶才会有完整的鲜香。\n总之,制作茉莉花茶需要用到新鲜的茉莉花和优质的绿茶,并将茉莉花的香氛传递到绿茶中,这样才能制作出口感香醇、甘甜爽口的茉莉花茶。", "class": "open qa"}, {"question": "列出三种不同的方法来减轻压力。", "std_answer": "", "class": "brainstorming"}, {"question": "在给定的短文中找出三个关键词。\n西方的哲学历史可上溯至古希腊时期,最重要的哲学流派包括柏拉图学派、亚里士多德学派和斯多葛学派。", "std_answer": "1. 古希腊时期 - 给出了西方哲学历史的起源和时间背景。\n2. 柏拉图学派 - 是西方哲学历史中最重要的学派之一,由古希腊哲学家柏拉图创建。该学派的思想审美,形式美和理念哲学都具有非常重要的地位。\n3. 亚里士多德学派 - 也是西方哲学历史中最为重要的学派之一,由古希腊哲学家亚里士多德创建。该学派重视逻辑和实证主义,对于自然科学和形而上学方面的思考对于后来的哲学也产生了非常深远的影响。", "class": "extract"}, {"question": "描述如何将一个普通的座位变成一个舒适的办公椅,并提供相关建议和要点。", "std_answer": "", "class": "brainstorming"}, {"question": "在一个团队会议中,为解决一项挑战提出5个不同的解决方案。", "std_answer": "", "class": "brainstorming"}, {"question": "将给定的邮件分类为垃圾邮件或非垃圾邮
Download .txt
gitextract_ahrom3jo/

├── .gitignore
├── DATA_LICENSE
├── DISCLAIMER
├── HOW_TO_CONTRIBUTE.md
├── LICENSE
├── README.md
├── README_en.md
├── chat/
│   ├── README.md
│   └── README_en.md
├── docker/
│   ├── README.md
│   ├── belle.dockerfile
│   ├── build_dockerfile_upon_transfermers.sh
│   ├── docker_run.sh
│   ├── transformers.dockerfile
│   └── upload_image.sh
├── docs/
│   └── README.md
├── eval/
│   ├── ChatGPT_Score.html
│   ├── README.md
│   ├── README_en.md
│   ├── eval_prompt.json
│   ├── eval_set.json
│   ├── generation_html.py
│   └── template_html/
│       └── ChatGPT_Score.html.temp
├── models/
│   ├── Belle-VL/
│   │   └── README.md
│   ├── README.md
│   ├── README_en.md
│   ├── decrypt.py
│   ├── gptq/
│   │   ├── README.md
│   │   ├── bloom.py
│   │   ├── bloom_inference.py
│   │   ├── datautils.py
│   │   ├── gptq.py
│   │   ├── llama.py
│   │   ├── llama_inference.py
│   │   ├── llama_inference_offload.py
│   │   ├── modelutils.py
│   │   ├── quant.py
│   │   ├── quant_cuda.cpp
│   │   ├── quant_cuda_kernel.cu
│   │   ├── requirements.txt
│   │   ├── setup_cuda.py
│   │   └── test_kernel.py
│   └── notebook/
│       ├── BELLE_INFER_COLAB.ipynb
│       └── README.md
├── requirements.txt
└── train/
    ├── README.md
    ├── README_FT.md
    ├── README_RLHF.md
    ├── README_ZERO_INFERENCE.md
    ├── configs/
    │   ├── accelerate_config_ppo.yaml
    │   ├── accelerate_config_rm.yaml
    │   ├── deepspeed_config.json
    │   ├── deepspeed_config_flops_profile.json
    │   ├── deepspeed_config_ppo.json
    │   ├── deepspeed_config_rm.json
    │   ├── deepspeed_config_stage3.json
    │   ├── deepspeed_config_stage3_dpo.json
    │   ├── deepspeed_config_stage3_flops_profile.json
    │   ├── deepspeed_config_stage3_inference.json
    │   ├── hostfile
    │   ├── lora_config_bloom.json
    │   └── lora_config_llama.json
    ├── docs/
    │   ├── FAQ.md
    │   └── README_en.md
    ├── dschat_train_v1/
    │   ├── FAQ.md
    │   ├── README.md
    │   ├── docker/
    │   │   └── Dockerfile
    │   ├── main.py
    │   ├── prompt_eval.py
    │   ├── reproduce_our_papers/
    │   │   └── Towards Better Instruction Following Language Models for Chinese: Investigating the Impact of Training Data and Evaluation.md
    │   ├── training_scripts/
    │   │   ├── convert_llama_weights_to_hf.py
    │   │   ├── convert_to_conv_data.py
    │   │   ├── single_gpu/
    │   │   │   ├── run_FT.sh
    │   │   │   └── run_LoRA.sh
    │   │   └── single_node/
    │   │       ├── run_FT.sh
    │   │       └── run_LoRA.sh
    │   └── utils/
    │       ├── ds_utils.py
    │       ├── model/
    │       │   └── model_utils.py
    │       ├── module/
    │       │   └── lora.py
    │       └── utils.py
    ├── reproduce_our_papers/
    │   └── Towards Better Instruction Following Language Models for Chinese: Investigating the Impact of Training Data and Evaluation.md
    ├── scripts/
    │   ├── convert_llama_weights_to_hf.py
    │   ├── convert_to_conv_data.py
    │   ├── merge_lora.sh
    │   ├── merge_tokenizers.py
    │   ├── multinode_run.sh
    │   ├── run_dpo.sh
    │   ├── run_inference.sh
    │   ├── run_interface.sh
    │   ├── run_multi_backend.py
    │   ├── run_multi_backend.sh
    │   ├── run_ppo.sh
    │   ├── run_pt.sh
    │   ├── run_rm.sh
    │   ├── run_sft.sh
    │   ├── run_zero_inference.sh
    │   └── run_zero_inference_backend_without_trainer.sh
    └── src/
        ├── dpo_trainer.py
        ├── entry_point/
        │   ├── dpo_train.py
        │   ├── evaluation.ipynb
        │   ├── inference.py
        │   ├── interface.py
        │   ├── ppo_train.py
        │   ├── pt_train.py
        │   ├── rm_train.py
        │   ├── sft_train.py
        │   ├── zero_inference.py
        │   └── zero_inference_backend_without_trainer.py
        ├── merge_llama_with_lora.py
        ├── models/
        │   ├── generation_utils.py
        │   └── llama/
        │       └── modeling_llama.py
        ├── ppo_trainer.py
        ├── sample_generator.py
        ├── trainer.py
        └── utils.py
Download .txt
SYMBOL INDEX (263 symbols across 39 files)

FILE: eval/generation_html.py
  function read_data (line 7) | def read_data(path):

FILE: models/decrypt.py
  function xor_bytes (line 8) | def xor_bytes(data, key):
  function xor_worker (line 11) | def xor_worker(task_queue, result_queue):
  function write_result_chunk (line 17) | def write_result_chunk(fp, w_chunk_idx, pending, hasher):
  function main (line 29) | def main(input_file, key_file, output_dir):

FILE: models/gptq/bloom.py
  function get_bloom (line 11) | def get_bloom(model):
  function bloom_sequential (line 24) | def bloom_sequential(model, dataloader, dev):
  function bloom_eval (line 118) | def bloom_eval(model, testenc, dev):
  function bloom_pack (line 214) | def bloom_pack(model, quantizers, wbits, groupsize):
  function load_quant (line 228) | def load_quant(model, checkpoint, wbits, groupsize):
  function benchmark (line 260) | def benchmark(model, input_ids, check=False):

FILE: models/gptq/bloom_inference.py
  function get_bloom (line 14) | def get_bloom(model):
  function load_quant (line 26) | def load_quant(model, checkpoint, wbits, groupsize):

FILE: models/gptq/datautils.py
  function set_seed (line 5) | def set_seed(seed):
  function get_wikitext2 (line 10) | def get_wikitext2(nsamples, seed, seqlen, model):
  function get_ptb (line 32) | def get_ptb(nsamples, seed, seqlen, model):
  function get_c4 (line 54) | def get_c4(nsamples, seed, seqlen, model):
  function get_loaders (line 103) | def get_loaders(

FILE: models/gptq/gptq.py
  class GPTQ (line 17) | class GPTQ:
    method __init__ (line 18) | def __init__(self, layer):
    method add_batch (line 31) | def add_batch(self, inp, out):
    method fasterquant (line 59) | def fasterquant(
    method free (line 156) | def free(self):

FILE: models/gptq/llama.py
  function get_llama (line 11) | def get_llama(model):
  function llama_sequential (line 24) | def llama_sequential(model, dataloader, dev):
  function llama_eval (line 126) | def llama_eval(model, testenc, dev):
  function llama_pack (line 219) | def llama_pack(model, quantizers, wbits, groupsize):
  function load_quant (line 233) | def load_quant(model, checkpoint, wbits, groupsize=-1,faster_kernel=False):
  function llama_multigpu (line 267) | def llama_multigpu(model, gpus):
  function benchmark (line 298) | def benchmark(model, input_ids, check=False):

FILE: models/gptq/llama_inference.py
  function get_llama (line 14) | def get_llama(model):
  function load_quant (line 26) | def load_quant(model, checkpoint, wbits, groupsize):

FILE: models/gptq/llama_inference_offload.py
  class Offload_LlamaModel (line 19) | class Offload_LlamaModel(LlamaModel):
    method __init__ (line 20) | def __init__(self, config: LlamaConfig):
    method forward (line 23) | def forward(
  function load_quant (line 184) | def load_quant(model, checkpoint, wbits, groupsize, pre_layer):

FILE: models/gptq/modelutils.py
  function find_layers (line 8) | def find_layers(module, layers=[nn.Conv2d, nn.Linear], name=''):

FILE: models/gptq/quant.py
  function quantize (line 6) | def quantize(x, scale, zero, maxq):
  class Quantizer (line 10) | class Quantizer(nn.Module):
    method __init__ (line 12) | def __init__(self, shape=1):
    method configure (line 18) | def configure(
    method find_params (line 31) | def find_params(self, x, weight=False):
    method quantize (line 110) | def quantize(self, x):
    method enabled (line 115) | def enabled(self):
    method ready (line 118) | def ready(self):
  class QuantLinear (line 128) | class QuantLinear(nn.Module):
    method __init__ (line 129) | def __init__(self, bits, groupsize, infeatures, outfeatures):
    method pack (line 148) | def pack(self, linear, scales, zeros):
    method forward (line 235) | def forward(self, x):
  function make_quant (line 269) | def make_quant(module, names, bits, groupsize, name=''):

FILE: models/gptq/quant_cuda.cpp
  function vecquant2matmul (line 11) | void vecquant2matmul(
  function vecquant3matmul (line 26) | void vecquant3matmul(
  function vecquant4matmul (line 41) | void vecquant4matmul(
  function vecquant8matmul (line 56) | void vecquant8matmul(
  function PYBIND11_MODULE (line 65) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) {

FILE: train/dschat_train_v1/main.py
  function parse_args (line 40) | def parse_args():
  function main (line 188) | def main():

FILE: train/dschat_train_v1/prompt_eval.py
  function read_data (line 31) | def read_data(filename):
  function write_data (line 43) | def write_data(filename, examples):
  function get_input_text (line 50) | def get_input_text(input_item):
  function _addrole_masklabel_tokenize (line 61) | def _addrole_masklabel_tokenize(source):

FILE: train/dschat_train_v1/training_scripts/convert_llama_weights_to_hf.py
  function compute_intermediate_size (line 61) | def compute_intermediate_size(n):
  function read_json (line 65) | def read_json(path):
  function write_json (line 70) | def write_json(text, path):
  function write_model (line 75) | def write_model(model_path, input_base_path, model_size):
  function write_tokenizer (line 234) | def write_tokenizer(tokenizer_path, input_tokenizer_path):
  function main (line 251) | def main():

FILE: train/dschat_train_v1/training_scripts/convert_to_conv_data.py
  function main (line 17) | def main():

FILE: train/dschat_train_v1/utils/ds_utils.py
  function get_train_ds_config (line 9) | def get_train_ds_config(offload,
  function get_eval_ds_config (line 53) | def get_eval_ds_config(offload, stage=0):

FILE: train/dschat_train_v1/utils/model/model_utils.py
  function create_hf_model (line 18) | def create_hf_model(model_class,

FILE: train/dschat_train_v1/utils/module/lora.py
  class LinearLayer_LoRA (line 13) | class LinearLayer_LoRA(nn.Module):
    method __init__ (line 16) | def __init__(self,
    method eval (line 53) | def eval(self):
    method train (line 58) | def train(self, mode=True):
    method reset_parameters (line 62) | def reset_parameters(self):
    method fuse_lora_weight (line 66) | def fuse_lora_weight(self):
    method unfuse_lora_weight (line 72) | def unfuse_lora_weight(self):
    method forward (line 78) | def forward(self, input):
  function convert_linear_layer_to_lora (line 106) | def convert_linear_layer_to_lora(model,
  function _z3_params_to_fetch (line 133) | def _z3_params_to_fetch(param_list):
  function convert_lora_to_linear_layer (line 142) | def convert_lora_to_linear_layer(model):
  function only_optimize_lora_parameters (line 160) | def only_optimize_lora_parameters(model):

FILE: train/dschat_train_v1/utils/utils.py
  function print_rank_0 (line 14) | def print_rank_0(msg, rank=0):
  function to_device (line 19) | def to_device(batch, device):
  class MovingAverage (line 29) | class MovingAverage:
    method __init__ (line 31) | def __init__(self):
    method update (line 36) | def update(self, num):
  function save_hf_format (line 44) | def save_hf_format(model, tokenizer, args, sub_folder=""):
  function set_random_seed (line 63) | def set_random_seed(seed):
  function get_all_reduce_mean (line 72) | def get_all_reduce_mean(tensor):
  function get_optimizer_grouped_parameters (line 78) | def get_optimizer_grouped_parameters(model,
  function _z3_params_to_fetch (line 106) | def _z3_params_to_fetch(param_list):
  function moving_average (line 113) | def moving_average(model, model_ema, beta=0.992, device=None, zero_stage...
  function save_zero_three_model (line 130) | def save_zero_three_model(model_ema, global_rank, save_dir, zero_stage=0):

FILE: train/scripts/convert_llama_weights_to_hf.py
  function compute_intermediate_size (line 61) | def compute_intermediate_size(n):
  function read_json (line 65) | def read_json(path):
  function write_json (line 70) | def write_json(text, path):
  function write_model (line 75) | def write_model(model_path, input_base_path, model_size):
  function write_tokenizer (line 234) | def write_tokenizer(tokenizer_path, input_tokenizer_path):
  function main (line 251) | def main():

FILE: train/scripts/convert_to_conv_data.py
  function main (line 15) | def main():

FILE: train/scripts/run_multi_backend.py
  class Arguments (line 19) | class Arguments:
  function set_non_blocking (line 43) | def set_non_blocking(file):
  function terminate_processes_and_exit (line 48) | def terminate_processes_and_exit(exit_code=0):
  function handle_termination (line 66) | def handle_termination(signal, frame):

FILE: train/src/dpo_trainer.py
  class CustomDPOTrainer (line 12) | class CustomDPOTrainer(DPOTrainer):
    method get_batch_metrics (line 13) | def get_batch_metrics(
    method prediction_step (line 75) | def prediction_step(

FILE: train/src/entry_point/dpo_train.py
  function ignore_warnings (line 24) | def ignore_warnings():
  class ScriptArguments (line 31) | class ScriptArguments:
  function print_rank_0 (line 199) | def print_rank_0(msg, rank=0):
  function compute_metrics (line 204) | def compute_metrics(eval_preds):
  function main (line 217) | def main():

FILE: train/src/entry_point/interface.py
  function generate_prompt (line 25) | def generate_prompt(input_text):
  function evaluate (line 32) | def evaluate(

FILE: train/src/entry_point/ppo_train.py
  function print_rank_0 (line 39) | def print_rank_0(msg, log_file):
  class ScriptArguments (line 47) | class ScriptArguments:
  function build_dataset (line 134) | def build_dataset(tokenizer, dataset_name, input_length, cache_dir="hf_c...
  class DataCollatorWithPadding (line 180) | class DataCollatorWithPadding:
    method __call__ (line 187) | def __call__(self, features: List[Dict[str, Any]]) -> Dict[str, Any]:
  function main (line 201) | def main():

FILE: train/src/entry_point/pt_train.py
  class ModelArguments (line 40) | class ModelArguments:
  class DataArguments (line 73) | class DataArguments:
  class TrainingArguments (line 91) | class TrainingArguments(TrainingArguments):
  function print_rank_0 (line 146) | def print_rank_0(msg, log_file, rank=0):
  function main (line 153) | def main():

FILE: train/src/entry_point/rm_train.py
  function print_rank_0 (line 39) | def print_rank_0(msg, log_file):
  class ScriptArguments (line 47) | class ScriptArguments:
  function preprocess_function (line 158) | def preprocess_function(tokenizer: PreTrainedTokenizerBase, examples: Di...
  function main (line 178) | def main():

FILE: train/src/entry_point/sft_train.py
  class ModelArguments (line 42) | class ModelArguments:
  class DataArguments (line 78) | class DataArguments:
  class TrainingArguments (line 96) | class TrainingArguments(TrainingArguments):
  function print_rank_0 (line 151) | def print_rank_0(msg, log_file, rank=0):
  function main (line 158) | def main():

FILE: train/src/entry_point/zero_inference.py
  class ModelArguments (line 44) | class ModelArguments:
  class DataArguments (line 76) | class DataArguments:
  class GenerationConfig (line 90) | class GenerationConfig:
  class TrainingArguments (line 139) | class TrainingArguments(TrainingArguments):
  function print_rank_0 (line 165) | def print_rank_0(msg, log_file, rank=0):
  function main (line 172) | def main():

FILE: train/src/entry_point/zero_inference_backend_without_trainer.py
  class Arguments (line 30) | class Arguments:
  function generate_prompt (line 53) | def generate_prompt(input_text):
  function evaluate (line 57) | def evaluate(
  function main (line 121) | def main():

FILE: train/src/merge_llama_with_lora.py
  function apply_lora (line 9) | def apply_lora(model_name_or_path, output_path, lora_path):

FILE: train/src/models/generation_utils.py
  class GenerationMode (line 102) | class GenerationMode(ExplicitEnum):
  class GenerationMixin (line 119) | class GenerationMixin:
    method prepare_inputs_for_generation (line 143) | def prepare_inputs_for_generation(self, *args, **kwargs):
    method _prepare_model_inputs (line 148) | def _prepare_model_inputs(
    method _maybe_initialize_input_ids_for_generation (line 212) | def _maybe_initialize_input_ids_for_generation(
    method _prepare_attention_mask_for_generation (line 240) | def _prepare_attention_mask_for_generation(
    method _prepare_encoder_decoder_kwargs_for_generation (line 258) | def _prepare_encoder_decoder_kwargs_for_generation(
    method _prepare_decoder_input_ids_for_generation (line 290) | def _prepare_decoder_input_ids_for_generation(
    method _get_decoder_start_token_id (line 335) | def _get_decoder_start_token_id(self, decoder_start_token_id: int = No...
    method _expand_inputs_for_generation (line 352) | def _expand_inputs_for_generation(
    method _extract_past_from_model_output (line 378) | def _extract_past_from_model_output(self, outputs: ModelOutput, standa...
    method _update_model_kwargs_for_generation (line 393) | def _update_model_kwargs_for_generation(
    method _reorder_cache (line 430) | def _reorder_cache(self, past_key_values, beam_idx):
    method _get_logits_warper (line 436) | def _get_logits_warper(
    method _get_generation_mode (line 474) | def _get_generation_mode(
    method _get_logits_processor (line 514) | def _get_logits_processor(
    method _get_stopping_criteria (line 645) | def _get_stopping_criteria(
    method _merge_criteria_processor_list (line 662) | def _merge_criteria_processor_list(
    method compute_transition_scores (line 683) | def compute_transition_scores(
    method _validate_model_class (line 804) | def _validate_model_class(self):
    method _validate_model_kwargs (line 830) | def _validate_model_kwargs(self, model_kwargs: Dict[str, Any]):
    method _validate_generated_length (line 879) | def _validate_generated_length(self, generation_config, input_ids_leng...
    method generate (line 926) | def generate(
    method contrastive_search (line 1468) | def contrastive_search(
    method greedy_search (line 1915) | def greedy_search(
    method sample (line 2191) | def sample(
    method beam_search (line 2481) | def beam_search(
    method beam_sample (line 2803) | def beam_sample(
    method group_beam_search (line 3134) | def group_beam_search(
    method constrained_beam_search (line 3514) | def constrained_beam_search(
    method assisted_decoding (line 3848) | def assisted_decoding(
  function _crop_past_key_values (line 4285) | def _crop_past_key_values(model, past_key_values, maximum_length):
  function _split_model_outputs (line 4333) | def _split_model_outputs(outputs, new_outputs, cur_len, added_len, is_de...
  function top_k_top_p_filtering (line 4359) | def top_k_top_p_filtering(
  function _ranking_fast (line 4394) | def _ranking_fast(

FILE: train/src/models/llama/modeling_llama.py
  function _make_causal_mask (line 60) | def _make_causal_mask(
  function _expand_mask (line 78) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option...
  class LlamaRMSNorm (line 92) | class LlamaRMSNorm(nn.Module):
    method __init__ (line 93) | def __init__(self, hidden_size, eps=1e-6):
    method forward (line 101) | def forward(self, hidden_states):
  class LlamaRotaryEmbedding (line 109) | class LlamaRotaryEmbedding(torch.nn.Module):
    method __init__ (line 110) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi...
    method _set_cos_sin_cache (line 124) | def _set_cos_sin_cache(self, seq_len, device, dtype):
    method forward (line 134) | def forward(self, x, seq_len=None):
  class LlamaLinearScalingRotaryEmbedding (line 145) | class LlamaLinearScalingRotaryEmbedding(LlamaRotaryEmbedding):
    method __init__ (line 148) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi...
    method _set_cos_sin_cache (line 152) | def _set_cos_sin_cache(self, seq_len, device, dtype):
  class LlamaDynamicNTKScalingRotaryEmbedding (line 164) | class LlamaDynamicNTKScalingRotaryEmbedding(LlamaRotaryEmbedding):
    method __init__ (line 167) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi...
    method _set_cos_sin_cache (line 171) | def _set_cos_sin_cache(self, seq_len, device, dtype):
  function rotate_half (line 190) | def rotate_half(x):
  function apply_rotary_pos_emb (line 197) | def apply_rotary_pos_emb(q, k, cos, sin, position_ids):
  class LlamaMLP (line 208) | class LlamaMLP(nn.Module):
    method __init__ (line 209) | def __init__(self, config):
    method forward (line 219) | def forward(self, x):
  function repeat_kv (line 242) | def repeat_kv(hidden_states: torch.Tensor, n_rep: int) -> torch.Tensor:
  class FlashSelfAttention (line 253) | class FlashSelfAttention(torch.nn.Module):
    method __init__ (line 254) | def __init__(
    method forward (line 271) | def forward(self, q, k, v):
  class LlamaAttention (line 316) | class LlamaAttention(nn.Module):
    method __init__ (line 322) | def __init__(self, config: LlamaConfig):
    method _init_rope (line 346) | def _init_rope(self):
    method _shape (line 363) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int):
    method forward (line 366) | def forward(
  class LlamaDecoderLayer (line 475) | class LlamaDecoderLayer(nn.Module):
    method __init__ (line 476) | def __init__(self, config: LlamaConfig):
    method forward (line 484) | def forward(
  class LlamaPreTrainedModel (line 560) | class LlamaPreTrainedModel(PreTrainedModel):
    method _init_weights (line 567) | def _init_weights(self, module):
    method _set_gradient_checkpointing (line 578) | def _set_gradient_checkpointing(self, module, value=False):
  class LlamaModel (line 651) | class LlamaModel(LlamaPreTrainedModel):
    method __init__ (line 659) | def __init__(self, config: LlamaConfig):
    method get_input_embeddings (line 672) | def get_input_embeddings(self):
    method set_input_embeddings (line 675) | def set_input_embeddings(self, value):
    method _prepare_decoder_attention_mask (line 679) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,...
    method forward (line 703) | def forward(
  class LlamaForCausalLM (line 830) | class LlamaForCausalLM(LlamaPreTrainedModel):
    method __init__ (line 833) | def __init__(self, config):
    method get_input_embeddings (line 842) | def get_input_embeddings(self):
    method set_input_embeddings (line 845) | def set_input_embeddings(self, value):
    method get_output_embeddings (line 848) | def get_output_embeddings(self):
    method set_output_embeddings (line 851) | def set_output_embeddings(self, new_embeddings):
    method set_decoder (line 854) | def set_decoder(self, decoder):
    method get_decoder (line 857) | def get_decoder(self):
    method forward (line 862) | def forward(
    method prepare_inputs_for_generation (line 954) | def prepare_inputs_for_generation(
    method _reorder_cache (line 985) | def _reorder_cache(past_key_values, beam_idx):
  class LlamaForSequenceClassification (line 1009) | class LlamaForSequenceClassification(LlamaPreTrainedModel):
    method __init__ (line 1010) | def __init__(self, config):
    method get_input_embeddings (line 1019) | def get_input_embeddings(self):
    method set_input_embeddings (line 1022) | def set_input_embeddings(self, value):
    method forward (line 1026) | def forward(

FILE: train/src/ppo_trainer.py
  class PPOTrainerForZero3 (line 21) | class PPOTrainerForZero3(PPOTrainer):
    method _generate_batched (line 22) | def _generate_batched(
    method step (line 106) | def step(
    method save_pretrained (line 412) | def save_pretrained(
    method is_deepspeed_zero3_enabled (line 448) | def is_deepspeed_zero3_enabled(self):

FILE: train/src/sample_generator.py
  function sft_sample_to_ids (line 10) | def sft_sample_to_ids(conversations: Dict[str, Any], tokenizer: PreTrain...
  function generate_and_tokenize_prompt (line 38) | def generate_and_tokenize_prompt(
  function batch_grouped_sft_generate (line 87) | def batch_grouped_sft_generate(
  function batch_grouped_pretrain_generate (line 116) | def batch_grouped_pretrain_generate(
  function exam_generate (line 138) | def exam_generate(model_max_length: int, tokenizer: PreTrainedTokenizer,...
  function inference_generate (line 166) | def inference_generate(

FILE: train/src/trainer.py
  class MyTrainer (line 9) | class MyTrainer(Trainer):
    method save_model (line 10) | def save_model(self, output_dir: Optional[str] = None, _internal_call:...
    method _load_from_checkpoint (line 68) | def _load_from_checkpoint(self, resume_from_checkpoint, model=None):
  class MySeq2SeqTrainer (line 151) | class MySeq2SeqTrainer(Seq2SeqTrainer):
    method prediction_step (line 152) | def prediction_step(

FILE: train/src/utils.py
  function get_ds_state_dict (line 15) | def get_ds_state_dict(ds_engine: DeepSpeedEngine):
  function get_model_param_count (line 27) | def get_model_param_count(
  function bind_methods_from_class_to_instance (line 48) | def bind_methods_from_class_to_instance(
  function prepare_deepspeed (line 56) | def prepare_deepspeed(accelerator: Accelerator, model: PreTrainedModel):
  function zero_infer (line 94) | def zero_infer(
  class MultiClient (line 136) | class MultiClient(object):
    method __init__ (line 137) | def __init__(self, worker_addrs, synced_worker=False) -> None:
    method predict (line 141) | def predict(self, tasks: List[List], max_retries: int = 3) -> List[Any]:
Condensed preview — 115 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,671K chars).
[
  {
    "path": ".gitignore",
    "chars": 143,
    "preview": "*.tmp\n*.swp\n__pycache__\n.vscode\nregen.json\n.ipynb_checkpoints\n.idea\nsaved_models\n*.code-workspace\n.hypothesis\ninfer_res\n"
  },
  {
    "path": "DATA_LICENSE",
    "chars": 19672,
    "preview": "Attribution License (ODC-By)\nPREAMBLE\nThe Open Data Commons Attribution License is a license agreement intended to allow"
  },
  {
    "path": "DISCLAIMER",
    "chars": 3528,
    "preview": "The software project, data, and models provided by our GitHub project are provided \"as is,\" without warranty of any kind"
  },
  {
    "path": "HOW_TO_CONTRIBUTE.md",
    "chars": 2128,
    "preview": "Welcome to BELLE project! We appreciate your interest in contributing to our project.\nIn order to make the contribution "
  },
  {
    "path": "LICENSE",
    "chars": 11397,
    "preview": "                                Apache License\n                           Version 2.0, January 2004\n                    "
  },
  {
    "path": "README.md",
    "chars": 17701,
    "preview": "## <img src=\"assets/belle_logo.png\" style=\"vertical-align: middle; width: 35px;\"> BELLE: Be Everyone's Large Language mo"
  },
  {
    "path": "README_en.md",
    "chars": 24781,
    "preview": "\n## <img src=\"assets/belle_logo.png\" style=\"vertical-align: middle; width: 35px;\"> BELLE: Be Everyone's Large Language m"
  },
  {
    "path": "chat/README.md",
    "chars": 2114,
    "preview": "# ChatBELLE 跨平台应用\n\n[English Version](README_en.md)\n\n基于[BELLE](https://github.com/LianjiaTech/BELLE)模型的跨平台离线大语言模型交谈App。使用"
  },
  {
    "path": "chat/README_en.md",
    "chars": 3710,
    "preview": "# ChatBELLE 跨平台应用\n\n[中文README](README.md)\n\n\n# ChatBELLE Cross-platform App\nA minimal, cross-platform LLM chat app with [B"
  },
  {
    "path": "docker/README.md",
    "chars": 1279,
    "preview": "# docker镜像\n## 国内环境自行替换代理\n```bash\nexport https_proxy=...\nexport http_proxy=...\nexport all_proxy=...\n```\n\n## 构建镜像\n```bash\n"
  },
  {
    "path": "docker/belle.dockerfile",
    "chars": 3835,
    "preview": "FROM transformers:ds\nLABEL maintainer=\"BELLE\"\nWORKDIR /workspace\n\nRUN curl -s https://packagecloud.io/install/repositori"
  },
  {
    "path": "docker/build_dockerfile_upon_transfermers.sh",
    "chars": 568,
    "preview": "export https_proxy=...\nexport http_proxy=...\nexport all_proxy=...\n\nwget https://raw.githubusercontent.com/huggingface/tr"
  },
  {
    "path": "docker/docker_run.sh",
    "chars": 2493,
    "preview": "# 需要先安装container-toolkit\n# https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html\n\n"
  },
  {
    "path": "docker/transformers.dockerfile",
    "chars": 2719,
    "preview": "# https://docs.nvidia.com/deeplearning/frameworks/pytorch-release-notes/rel-22-12.html#rel-22-12\nFROM nvcr.io/nvidia/pyt"
  },
  {
    "path": "docker/upload_image.sh",
    "chars": 474,
    "preview": "export https_proxy=...\nexport http_proxy=...\nexport all_proxy=...\ndocker_user=...\ntag=$(date +%Y%m%d)\n\ndocker tag transf"
  },
  {
    "path": "docs/README.md",
    "chars": 10252,
    "preview": "# This folder contains recent research papers from BELLE GROUP.\n\n\n[1] Yunjie Ji, Yan Gong, Yiping Peng, Chao Ni, Peiyan "
  },
  {
    "path": "eval/ChatGPT_Score.html",
    "chars": 299515,
    "preview": "<!DOCTYPE html>\n<html lang=\"zh\">\n\n<head>\n  <meta charset=\"UTF-8\">\n  <meta name=\"viewport\" content=\"width=device-width, i"
  },
  {
    "path": "eval/README.md",
    "chars": 2267,
    "preview": "# 中文测试集\n\n*Read this in [English](README_en.md).*\n\n中文测试集包含由BELLE项目产生的不同指令类型、不同领域的测试集,总共有12个指令类型。在我们两篇论文中[Towards Better I"
  },
  {
    "path": "eval/README_en.md",
    "chars": 3898,
    "preview": "# The Chinese eval set\n\n*[中文README](README.md).*\n\nThe Chinese test set contains test sets of different instruction types"
  },
  {
    "path": "eval/eval_prompt.json",
    "chars": 1412,
    "preview": "{\"class\": \"math\", \"prompt\": \"你是一个数学老师,给定一道数学问题,你需要判断模型回答是否正确,分数在0到1之间。模型回答的最终结果一定要和标准答案中的最终结果一致。模型回答中的解题步骤可以和标准答案不同,但一定要"
  },
  {
    "path": "eval/eval_set.json",
    "chars": 292425,
    "preview": "{\"question\": \"请你写出一个可以生成五个不同随机数的 Python 程序。\", \"std_answer\": \"要生成五个不同的随机数,可以使用 Python 的 random 模块中的 randint() 函数生成随机整数,然后"
  },
  {
    "path": "eval/generation_html.py",
    "chars": 1677,
    "preview": "#!/usr/bin/env python\n# -*- coding:utf-8 -*-\nimport pandas as pd\nimport json\nimport argparse\n\ndef read_data(path):\n    d"
  },
  {
    "path": "eval/template_html/ChatGPT_Score.html.temp",
    "chars": 4670,
    "preview": "<!DOCTYPE html>\n<html lang=\"zh\">\n\n<head>\n  <meta charset=\"UTF-8\">\n  <meta name=\"viewport\" content=\"width=device-width, i"
  },
  {
    "path": "models/Belle-VL/README.md",
    "chars": 3267,
    "preview": "\n## 📝Belle-VL\n[![Generic badge](https://img.shields.io/badge/🤗-Huggingface%20Repo2-green.svg)](https://huggingface.co/BE"
  },
  {
    "path": "models/README.md",
    "chars": 3028,
    "preview": "*Read this in [English](README_en.md).*\n## 已开放的模型\n\n<p align=\"center\">\n  <img src=\"../assets/belle_toy_blocks.png\" alt=\"B"
  },
  {
    "path": "models/README_en.md",
    "chars": 4818,
    "preview": "*[中文README](README.md).*\n\n## Models trained\n\n<p align=\"center\">\n  <img src=\"../assets/belle_toy_blocks.png\" alt=\"Belle T"
  },
  {
    "path": "models/decrypt.py",
    "chars": 4362,
    "preview": "import os\nimport sys\nimport hashlib\nimport multiprocessing\nimport os\n\n\ndef xor_bytes(data, key):\n    return bytes(a ^ b "
  },
  {
    "path": "models/gptq/README.md",
    "chars": 2843,
    "preview": "# GPTQ-for-Bloom & LLaMa\n8 bits quantization of [Bloom](https://arxiv.org/pdf/2211.05100.pdf) using [GPTQ](https://arxiv"
  },
  {
    "path": "models/gptq/bloom.py",
    "chars": 13873,
    "preview": "import time\n\nimport torch\nimport torch.nn as nn\n\nfrom gptq import *\nfrom modelutils import *\nfrom quant import *\n\n\ndef g"
  },
  {
    "path": "models/gptq/bloom_inference.py",
    "chars": 4196,
    "preview": "import time\n\nimport torch\nimport torch.nn as nn\n\nfrom gptq import *\nfrom modelutils import *\nfrom quant import *\n\nfrom t"
  },
  {
    "path": "models/gptq/datautils.py",
    "chars": 3837,
    "preview": "import numpy as np\nimport torch\n\n\ndef set_seed(seed):\n    np.random.seed(seed)\n    torch.random.manual_seed(seed)\n\n\ndef "
  },
  {
    "path": "models/gptq/gptq.py",
    "chars": 5177,
    "preview": "import math\nimport time\n\nimport torch\nimport torch.nn as nn\nimport transformers\n\nfrom quant import *\n\n\nDEBUG = False \n\nt"
  },
  {
    "path": "models/gptq/llama.py",
    "chars": 16012,
    "preview": "import time\n\nimport torch\nimport torch.nn as nn\n\nfrom gptq import *\nfrom modelutils import *\nfrom quant import *\n\n\ndef g"
  },
  {
    "path": "models/gptq/llama_inference.py",
    "chars": 4170,
    "preview": "import time\n\nimport torch\nimport torch.nn as nn\n\nfrom gptq import *\nfrom modelutils import *\nfrom quant import *\n\nfrom t"
  },
  {
    "path": "models/gptq/llama_inference_offload.py",
    "chars": 12406,
    "preview": "import time\r\n\r\nimport torch\r\nimport torch.nn as nn\r\n\r\nfrom gptq import *\r\nfrom modelutils import *\r\nfrom quant import *\r"
  },
  {
    "path": "models/gptq/modelutils.py",
    "chars": 397,
    "preview": "import torch\nimport torch.nn as nn\n\n\nDEV = torch.device('cuda:0')\n\n\ndef find_layers(module, layers=[nn.Conv2d, nn.Linear"
  },
  {
    "path": "models/gptq/quant.py",
    "chars": 10802,
    "preview": "import numpy as np\nimport torch\nimport torch.nn as nn\nimport math\n\ndef quantize(x, scale, zero, maxq):\n    q = torch.cla"
  },
  {
    "path": "models/gptq/quant_cuda.cpp",
    "chars": 2258,
    "preview": "#include <torch/all.h>\n#include <torch/python.h>\n#include <c10/cuda/CUDAGuard.h>\n\nvoid vecquant2matmul_cuda(\n  torch::Te"
  },
  {
    "path": "models/gptq/quant_cuda_kernel.cu",
    "chars": 15843,
    "preview": "#include <torch/all.h>\n#include <torch/python.h>\n#include <cuda.h>\n#include <cuda_runtime.h>\n\n// atomicAdd for double-pr"
  },
  {
    "path": "models/gptq/requirements.txt",
    "chars": 98,
    "preview": "safetensors==0.3.0\ndatasets==2.10.1\nsentencepiece\ngit+https://github.com/huggingface/transformers\n"
  },
  {
    "path": "models/gptq/setup_cuda.py",
    "chars": 287,
    "preview": "from setuptools import setup, Extension\nfrom torch.utils import cpp_extension\n\nsetup(\n    name='quant_cuda',\n    ext_mod"
  },
  {
    "path": "models/gptq/test_kernel.py",
    "chars": 4150,
    "preview": "import torch\nimport torch.nn as nn\n\nimport quant_cuda\nimport os\nos.environ['CUDA_LAUNCH_BLOCKING'] = \"1\"\n\ntorch.backends"
  },
  {
    "path": "models/notebook/BELLE_INFER_COLAB.ipynb",
    "chars": 171339,
    "preview": "{\n  \"cells\": [\n    {\n      \"attachments\": {},\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"id\": \"7m81oxz-"
  },
  {
    "path": "models/notebook/README.md",
    "chars": 1504,
    "preview": " \n<!---\nCopyright 2023 The BELLE Team. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"Licens"
  },
  {
    "path": "requirements.txt",
    "chars": 113,
    "preview": "numpy\nrouge_score\nfire\nopenai\ntransformers\ngensim\npeft\ndatasets\nbitsandbytes\ndeepspeed\nflash-attn\ntrl\naccelerate\n"
  },
  {
    "path": "train/README.md",
    "chars": 1934,
    "preview": "# BELLE训练\n| [English](https://github.com/LianjiaTech/BELLE/blob/main/train/docs/README_en.md) | [中文](https://github.com/"
  },
  {
    "path": "train/README_FT.md",
    "chars": 10142,
    "preview": "# BELLE微调流程\r\n## 1. Run\r\n### 1.1 数据\r\n\r\n#### 1.1.1 指令微调(SFT)\r\n##### 1.1.1.1 Download data\r\n\r\n```bash\r\nwget https://hugging"
  },
  {
    "path": "train/README_RLHF.md",
    "chars": 1978,
    "preview": "# RLHF训练流程\n\n## 一、PPO\n\n### 1. 奖励模型\n\n#### 1.1 准备数据\n\n```jsonl\n{\"chosen\": xxx, \"rejected\": xxx}\n```\n\n注意:\nxxx文本已经添加了正确的提示,用于区"
  },
  {
    "path": "train/README_ZERO_INFERENCE.md",
    "chars": 1493,
    "preview": "# ZeRO Inference\n\n## 1.1 什么是ZeRO Inference\n[Zero Inference](https://www.deepspeed.ai/2022/09/09/zero-inference.html)利用Ze"
  },
  {
    "path": "train/configs/accelerate_config_ppo.yaml",
    "chars": 296,
    "preview": "compute_environment: LOCAL_MACHINE\ndeepspeed_config:\n    deepspeed_config_file: configs/deepspeed_config_ppo.json\ndistri"
  },
  {
    "path": "train/configs/accelerate_config_rm.yaml",
    "chars": 295,
    "preview": "compute_environment: LOCAL_MACHINE\ndeepspeed_config:\n    deepspeed_config_file: configs/deepspeed_config_rm.json\ndistrib"
  },
  {
    "path": "train/configs/deepspeed_config.json",
    "chars": 1259,
    "preview": "{\n    \"zero_optimization\": {\n        \"stage\": 2,\n        \"allgather_partitions\": true,\n        \"allgather_bucket_size\": "
  },
  {
    "path": "train/configs/deepspeed_config_flops_profile.json",
    "chars": 1460,
    "preview": "{\n    \"flops_profiler\": {\n        \"enabled\": true,\n        \"profile_step\": 50,\n        \"module_depth\": -1,\n        \"top_"
  },
  {
    "path": "train/configs/deepspeed_config_ppo.json",
    "chars": 1020,
    "preview": "{\n    \"zero_optimization\": {\n        \"stage\": 3,\n        \"allgather_partitions\": true,\n        \"allgather_bucket_size\": "
  },
  {
    "path": "train/configs/deepspeed_config_rm.json",
    "chars": 1262,
    "preview": "{\n    \"zero_optimization\": {\n        \"stage\": 2,\n        \"allgather_partitions\": true,\n        \"allgather_bucket_size\": "
  },
  {
    "path": "train/configs/deepspeed_config_stage3.json",
    "chars": 1655,
    "preview": "{\n    \"zero_optimization\": {\n        \"stage\": 3,\n        \"allgather_partitions\": true,\n        \"allgather_bucket_size\": "
  },
  {
    "path": "train/configs/deepspeed_config_stage3_dpo.json",
    "chars": 1305,
    "preview": "{\n  \"bfloat16\": {\n      \"enabled\": true\n  },\n  \"fp16\": {\n      \"enabled\": false,\n      \"loss_scale\": 0,\n      \"loss_scal"
  },
  {
    "path": "train/configs/deepspeed_config_stage3_flops_profile.json",
    "chars": 1856,
    "preview": "{\n    \"flops_profiler\": {\n        \"enabled\": true,\n        \"profile_step\": 50,\n        \"module_depth\": -1,\n        \"top_"
  },
  {
    "path": "train/configs/deepspeed_config_stage3_inference.json",
    "chars": 563,
    "preview": "{\n    \"fp16\": {\n        \"enabled\": true\n    },\n    \"bf16\": {\n        \"enabled\": false\n    },\n    \"zero_optimization\": {\n"
  },
  {
    "path": "train/configs/hostfile",
    "chars": 31,
    "preview": "node_ip slots=8\nnode_ip slots=8"
  },
  {
    "path": "train/configs/lora_config_bloom.json",
    "chars": 131,
    "preview": "{\n    \"lora_r\": 16,\n    \"lora_alpha\": 32,\n    \"lora_dropout\": 0.05,\n    \"lora_target_modules\": [\n        \"query_key_valu"
  },
  {
    "path": "train/configs/lora_config_llama.json",
    "chars": 237,
    "preview": "{\n    \"lora_r\": 16,\n    \"lora_alpha\": 32,\n    \"lora_dropout\": 0.05,\n    \"lora_target_modules\": [\n        \"q_proj\",\n     "
  },
  {
    "path": "train/docs/FAQ.md",
    "chars": 3029,
    "preview": "# FAQ\r\n\r\n这里给出一些实验过程中遇到的问题以及供参考的解决方案,同时对问题大致地分类\r\n\r\n**解决方案仅供参考,未必能彻底解决对应问题!!!**\r\n\r\n**解决方案仅供参考,未必能彻底解决对应问题!!!**\r\n\r\n**解决方案仅供"
  },
  {
    "path": "train/docs/README_en.md",
    "chars": 13251,
    "preview": "# BELLE Training Code\r\n\r\n | [English](https://github.com/LianjiaTech/BELLE/blob/main/train/docs/README_en.md) | [中文](htt"
  },
  {
    "path": "train/dschat_train_v1/FAQ.md",
    "chars": 3238,
    "preview": "# FAQ\r\n\r\n**我们的机器配置是8卡A100 40G,所以下面的问题也只针对8卡A100 40G的配置**\r\n\r\nLLaMA模型的max_seq_len通常设置为1024或2048\r\n\r\nBloomz模型的max_seq_len通常设"
  },
  {
    "path": "train/dschat_train_v1/README.md",
    "chars": 11732,
    "preview": "# 项目介绍\r\n\r\n本目录代码基于[Deepspeed-Chat](https://github.com/microsoft/DeepSpeedExamples)项目,可用于微调大语言模型,包括全量参数微调(fine-tuning)和基于L"
  },
  {
    "path": "train/dschat_train_v1/docker/Dockerfile",
    "chars": 2751,
    "preview": "# https://docs.nvidia.com/deeplearning/frameworks/pytorch-release-notes/rel_22-08.html#rel_22-08\nFROM nvcr.io/nvidia/pyt"
  },
  {
    "path": "train/dschat_train_v1/main.py",
    "chars": 16369,
    "preview": "#!/usr/bin/env python\n# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\nimp"
  },
  {
    "path": "train/dschat_train_v1/prompt_eval.py",
    "chars": 5261,
    "preview": "import torch\nimport json\nfrom transformers import AutoModelForCausalLM, AutoTokenizer, LlamaTokenizer, AutoConfig\nimport"
  },
  {
    "path": "train/dschat_train_v1/reproduce_our_papers/Towards Better Instruction Following Language Models for Chinese: Investigating the Impact of Training Data and Evaluation.md",
    "chars": 4383,
    "preview": "### [Towards Better Instruction Following Language Models for Chinese: Investigating the Impact of Training Data and Eva"
  },
  {
    "path": "train/dschat_train_v1/training_scripts/convert_llama_weights_to_hf.py",
    "chars": 10696,
    "preview": "# Copyright 2022 EleutherAI and The HuggingFace Inc. team. All rights reserved.\n#\n# Licensed under the Apache License, V"
  },
  {
    "path": "train/dschat_train_v1/training_scripts/convert_to_conv_data.py",
    "chars": 1526,
    "preview": "import argparse\nimport json\nimport datetime\nimport os\n\n'''\norig_data: {\"instruction\": \"题目:小明买了一支钢笔,花费了5元,又买了一本书,花费8元,现在他"
  },
  {
    "path": "train/dschat_train_v1/training_scripts/single_gpu/run_FT.sh",
    "chars": 900,
    "preview": "#!/bin/bash\n# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\nOUTPUT=$1\nZER"
  },
  {
    "path": "train/dschat_train_v1/training_scripts/single_gpu/run_LoRA.sh",
    "chars": 1467,
    "preview": "#!/bin/bash\n# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\n#facebook/opt"
  },
  {
    "path": "train/dschat_train_v1/training_scripts/single_node/run_FT.sh",
    "chars": 894,
    "preview": "#!/bin/bash\n# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\nOUTPUT=$1\nZER"
  },
  {
    "path": "train/dschat_train_v1/training_scripts/single_node/run_LoRA.sh",
    "chars": 1324,
    "preview": "#!/bin/bash\n# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\n#facebook/opt"
  },
  {
    "path": "train/dschat_train_v1/utils/ds_utils.py",
    "chars": 2249,
    "preview": "# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\nGLOBAL_BATCH_SIZE = 32\nMI"
  },
  {
    "path": "train/dschat_train_v1/utils/model/model_utils.py",
    "chars": 2554,
    "preview": "# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\nimport os\nimport math\nimp"
  },
  {
    "path": "train/dschat_train_v1/utils/module/lora.py",
    "chars": 5522,
    "preview": "# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\nimport math\nimport torch\n"
  },
  {
    "path": "train/dschat_train_v1/utils/utils.py",
    "chars": 5088,
    "preview": "# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\nimport os\nimport torch\nim"
  },
  {
    "path": "train/reproduce_our_papers/Towards Better Instruction Following Language Models for Chinese: Investigating the Impact of Training Data and Evaluation.md",
    "chars": 4383,
    "preview": "### [Towards Better Instruction Following Language Models for Chinese: Investigating the Impact of Training Data and Eva"
  },
  {
    "path": "train/scripts/convert_llama_weights_to_hf.py",
    "chars": 10696,
    "preview": "# Copyright 2022 EleutherAI and The HuggingFace Inc. team. All rights reserved.\n#\n# Licensed under the Apache License, V"
  },
  {
    "path": "train/scripts/convert_to_conv_data.py",
    "chars": 1500,
    "preview": "import argparse\nimport json\n\n'''\norig_data: {\"instruction\": \"题目:小明买了一支钢笔,花费了5元,又买了一本书,花费8元,现在他手里还有10元钱,他手上原来有多少钱?\", \"inp"
  },
  {
    "path": "train/scripts/merge_lora.sh",
    "chars": 306,
    "preview": "#! /bin/bash\n\nmodel_name_or_path=/path_to_llm/hf_llama_7b/\nlora_path=/path_to_lora\noutput_path=/path_to_saved_weights\n\nC"
  },
  {
    "path": "train/scripts/merge_tokenizers.py",
    "chars": 1020,
    "preview": "''' Train tokenizer'''\nimport sentencepiece as spm\n\nspm.SentencePieceTrainer.train(input='/path/to/input_text', \n\t\t\t\t\t\t\t"
  },
  {
    "path": "train/scripts/multinode_run.sh",
    "chars": 2195,
    "preview": "#! /bin/bash\nmodel_name_or_path=/path_to_llm/hf_llama_7b/ # or bloomz-7b1-mt\n\ntrain_file=belleMath.json\nvalidation_file="
  },
  {
    "path": "train/scripts/run_dpo.sh",
    "chars": 2048,
    "preview": "#! /bin/bash\n\ndataset_name=...\nmodel_name=...\ntorch_dtype=bfloat16\nper_device_train_batch_size=1\nper_device_eval_batch_s"
  },
  {
    "path": "train/scripts/run_inference.sh",
    "chars": 372,
    "preview": "export ABS_PATH=...\nexport PYTHONPATH=\"$ABS_PATH/BELLE/train\"\nexport CUDA_VISIBLE_DEVICES='0,1,2,3,4,5,6,7'\n\nckpt_path=B"
  },
  {
    "path": "train/scripts/run_interface.sh",
    "chars": 300,
    "preview": "export ABS_PATH=...\nexport PYTHONPATH=\"$ABS_PATH/BELLE/train\"\nexport CUDA_VISIBLE_DEVICES='0,1,2,3,4,5,6,7'\n\nckpt_path=B"
  },
  {
    "path": "train/scripts/run_multi_backend.py",
    "chars": 3500,
    "preview": "import fcntl\nimport subprocess\nimport os\nimport signal\nimport sys\nimport time\nfrom transformers import HfArgumentParser\n"
  },
  {
    "path": "train/scripts/run_multi_backend.sh",
    "chars": 413,
    "preview": "ckpt_path='...'\nlora_path='...'\nexport CUDA_VISIBLE_DEVICES='0,1,2,3,4,5,6,7'\nexport MKL_SERVICE_FORCE_INTEL='1'\n\n# ft\n#"
  },
  {
    "path": "train/scripts/run_ppo.sh",
    "chars": 1239,
    "preview": "export CUDA_VISIBLE_DEVICES=\"0,1,2,3,4,5,6,7\"\ngpus=8\n\nBELLE_PATH=\".../BELLE\"\nexport PYTHONPATH=$BELLE_PATH/train\n\nexport"
  },
  {
    "path": "train/scripts/run_pt.sh",
    "chars": 3390,
    "preview": "#! /bin/bash\nexport CUDA_VISIBLE_DEVICES='0,1,2,3,4,5,6,7'\nexport WANDB_PROJECT=...\nexport WANDB_RUN_ID=...\nexport WANDB"
  },
  {
    "path": "train/scripts/run_rm.sh",
    "chars": 1169,
    "preview": "export CUDA_VISIBLE_DEVICES=\"0,1,2,3,4,5,6,7\"\ngpus=8\n\nBELLE_PATH=\".../BELLE\"\nexport PYTHONPATH=\"$BELLE_PATH/train\"\n\nexpo"
  },
  {
    "path": "train/scripts/run_sft.sh",
    "chars": 3478,
    "preview": "#! /bin/bash\nexport CUDA_VISIBLE_DEVICES='0,1,2,3,4,5,6,7'\nexport WANDB_PROJECT=...\nexport WANDB_RUN_ID=...\nexport WANDB"
  },
  {
    "path": "train/scripts/run_zero_inference.sh",
    "chars": 1017,
    "preview": "export CUDA_VISIBLE_DEVICES='0,1,2,3,4,5,6,7'\nexport ABS_PATH=...\nexport PYTHONPATH=\"$ABS_PATH/BELLE/train\"\n\nckpt_path=B"
  },
  {
    "path": "train/scripts/run_zero_inference_backend_without_trainer.sh",
    "chars": 374,
    "preview": "export ABS_PATH=...\nexport PYTHONPATH=\"$ABS_PATH/BELLE/train\"\ndevices=\"0,1,2,3,4,5,6,7\"\n\nckpt_path=BELLE-2/BELLE-Llama2-"
  },
  {
    "path": "train/src/dpo_trainer.py",
    "chars": 5368,
    "preview": "# imports\nfrom typing import Dict, Optional, Literal\n\nimport warnings\nfrom transformers import PreTrainedModel\nimport to"
  },
  {
    "path": "train/src/entry_point/dpo_train.py",
    "chars": 13096,
    "preview": "# imports\nimport transformers\nfrom dataclasses import dataclass, field\nfrom typing import Dict, Optional, Literal\nimport"
  },
  {
    "path": "train/src/entry_point/evaluation.ipynb",
    "chars": 4648,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": "
  },
  {
    "path": "train/src/entry_point/inference.py",
    "chars": 2486,
    "preview": "import torch\nfrom tqdm import tqdm\nfrom transformers import LlamaTokenizer, AutoTokenizer, AutoModelForCausalLM, AutoCon"
  },
  {
    "path": "train/src/entry_point/interface.py",
    "chars": 5216,
    "preview": "import argparse\nfrom functools import partial\nimport gradio as gr\nimport torch\nfrom peft import PeftModel\nfrom transform"
  },
  {
    "path": "train/src/entry_point/ppo_train.py",
    "chars": 15535,
    "preview": "# coding=utf-8\nfrom dataclasses import dataclass, field\nimport os\nfrom typing import Any, Dict, List, Optional, Union\n\ni"
  },
  {
    "path": "train/src/entry_point/pt_train.py",
    "chars": 17492,
    "preview": "from transformers.utils import add_start_docstrings\nfrom transformers.trainer_utils import get_last_checkpoint\nfrom tran"
  },
  {
    "path": "train/src/entry_point/rm_train.py",
    "chars": 14938,
    "preview": "# coding=utf-8\nfrom dataclasses import dataclass, field\nfrom functools import partial\nimport math\nimport os\nimport sys\nf"
  },
  {
    "path": "train/src/entry_point/sft_train.py",
    "chars": 18580,
    "preview": "from transformers.utils import add_start_docstrings\nfrom transformers.trainer_utils import get_last_checkpoint\nfrom tran"
  },
  {
    "path": "train/src/entry_point/zero_inference.py",
    "chars": 12296,
    "preview": "import numpy as np\nfrom transformers.utils import add_start_docstrings\nfrom transformers.trainer_pt_utils import torch_d"
  },
  {
    "path": "train/src/entry_point/zero_inference_backend_without_trainer.py",
    "chars": 7664,
    "preview": "#!/usr/bin/env python\n# https://huggingface.co/docs/transformers/main/en/main_classes/deepspeed#custom-deepspeed-zero-in"
  },
  {
    "path": "train/src/merge_llama_with_lora.py",
    "chars": 1496,
    "preview": "import argparse\n\nimport torch\nfrom peft import PeftModel\nfrom transformers import AutoTokenizer, AutoModelForCausalLM, L"
  },
  {
    "path": "train/src/models/generation_utils.py",
    "chars": 228720,
    "preview": "# coding=utf-8\n# Copyright 2020 The Google AI Language Team Authors, Facebook AI Research authors and The HuggingFace In"
  },
  {
    "path": "train/src/models/llama/modeling_llama.py",
    "chars": 48895,
    "preview": "# coding=utf-8\n# Copyright 2022 EleutherAI and the HuggingFace Inc. team. All rights reserved.\n#\n# This code is based on"
  },
  {
    "path": "train/src/ppo_trainer.py",
    "chars": 17783,
    "preview": "import time\nfrom typing import Callable, List, Union, Optional\nfrom pathlib import Path\nimport torch\nfrom trl import PPO"
  },
  {
    "path": "train/src/sample_generator.py",
    "chars": 6360,
    "preview": "from itertools import chain\nfrom typing import Any, Callable, Dict, List\nimport copy\nfrom transformers import PreTrained"
  },
  {
    "path": "train/src/trainer.py",
    "chars": 13297,
    "preview": "from peft import PeftModel\nfrom transformers.trainer import *\nfrom transformers import Seq2SeqTrainer, __version__\nfrom "
  },
  {
    "path": "train/src/utils.py",
    "chars": 7123,
    "preview": "import copy\nimport time\nimport types\nfrom typing import Any, Dict, List, Optional, Union\nfrom gradio_client import Clien"
  }
]

About this extraction

This page contains the full source code of the LianjiaTech/BELLE GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 115 files (1.5 MB), approximately 617.1k tokens, and a symbol index with 263 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!