[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-71158":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":22,"hasPages":22,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":28,"readmeContent":29,"aiSummary":30,"trendingCount":16,"starSnapshotCount":16,"syncStatus":17,"lastSyncTime":31,"discoverSource":32},71158,"openchat","imoneoi\u002Fopenchat","imoneoi","OpenChat: Advancing Open-source Language Models with Imperfect Data","https:\u002F\u002Fopenchat.team",null,"Python",5483,431,48,131,0,2,4,6,69.31,"Apache License 2.0",false,"master",[25,26,27],"large-language-models","open-source","transformers","2026-06-12 04:00:59","# OpenChat: Advancing Open-source Language Models with Mixed-Quality Data\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"assets\u002Flogo_new.png\" style=\"width: 65%\">\n\u003C\u002Fdiv>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fopenchat.team\">💻Online Demo\u003C\u002Fa> |\n  \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fopenchat\">🤗Huggingface\u003C\u002Fa> |\n  \u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fpdf\u002F2309.11235.pdf\">📃Paper\u003C\u002Fa> |\n  \u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002FpQjnXvNKHY\">💭Discord\u003C\u002Fa> \n\u003C\u002Fp>\n\n- OpenChat is an innovative library of **open-source language models**, fine-tuned with [**C-RLFT**](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2309.11235.pdf) - a strategy inspired by offline reinforcement learning.\n- Our models learn from mixed-quality data without preference labels, delivering exceptional performance on par with `ChatGPT`, even with a `7B` model which can be run on a **consumer GPU (e.g. RTX 3090)**.\n- Despite our simple approach, we are committed to developing a high-performance, commercially viable, open-source large language model, and we continue to make significant strides toward this vision.\n\n[![DOI](https:\u002F\u002Fzenodo.org\u002Fbadge\u002F645397533.svg)](https:\u002F\u002Fzenodo.org\u002Fbadge\u002Flatestdoi\u002F645397533)\n\n# ✨ News\n\n - [2024\u002F05\u002F22] We released the Llama-3 based version [OpenChat 3.6 20240522](https:\u002F\u002Fhuggingface.co\u002Fopenchat\u002Fopenchat-3.6-8b-20240522), outperforming official Llama 3 8B Instruct and open-source finetunes\u002Fmerges.\n\n- [2024\u002F01\u002F06] We released the second update, [OpenChat 3.5 0106](openchat\u002Fopenchat-3.5-0106), further improved coding and overall performance 🏆.\n\n- [2023\u002F12\u002F10] We released the first update, [OpenChat 3.5 1210](openchat\u002Fopenchat-3.5-1210), improved coding by 15 points 🚀.\n\n- [2023\u002F11\u002F01] We released the [OpenChat-3.5-7B](https:\u002F\u002Fhuggingface.co\u002Fopenchat\u002Fopenchat_3.5) model, surpassing ChatGPT on various benchmarks 🔥.\n\n- [2023\u002F09\u002F21] We released our paper [OpenChat: Advancing Open-source Language Models with Mixed-Quality Data](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2309.11235.pdf).\n  \n\u003Cdetails>\n  \u003Csummary>Read more\u003C\u002Fsummary>\n  \n- [2023\u002F09\u002F03] We released the [OpenChat V3.2 SUPER]([#models](https:\u002F\u002Fhuggingface.co\u002Fopenchat\u002Fopenchat_v3.2_super)) model.\n\n- [2023\u002F08\u002F04] We have launched an [Online Demo](https:\u002F\u002Fopenchat.team) featuring the latest version, OpenChat 3.2.\n\n- [2023\u002F07\u002F30] We are thrilled to introduce the [OpenChat V3 model series](#models), based on Llama 2, and now available for free for commercial use!\n\n- [2023\u002F07\u002F07] We released the [OpenChat V2 model series](#legacy-models).\n\n- [2023\u002F07\u002F01] We released the [OpenChat V1 model series](#legacy-models).\n\u003C\u002Fdetails>\n\n# 🏷️ Benchmarks - OpenChat 3.6\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fimoneoi\u002Fopenchat\u002Fmaster\u002Fassets\u002Fbenchmarks-openchat-3.6-20240522.svg\" style=\"width: 95%;\">\n\u003C\u002Fdiv>\n\n\u003Cdetails>\n  \u003Csummary>Reproducing benchmarks\u003C\u002Fsummary>\n\nNote: Please run the following commands at the base directory of this repository.\n\n```bash\npython -m ochat.evaluation.run_eval --condition \"GPT4 Correct\" --model openchat\u002Fopenchat-3.6-8b-20240522 --eval_sets fs_cothub\u002Fmmlu fs_cothub\u002Fgsm8k fs_cothub\u002Fmath\npython -m ochat.evaluation.run_eval --condition \"GPT4\" --model openchat\u002Fopenchat-3.6-8b-20240522 --eval_sets zs\u002Fgpqa\n```\n\nHumanEval is run using the official [EvalPlus repository](https:\u002F\u002Fgithub.com\u002Fevalplus\u002Fevalplus).\n\u003C\u002Fdetails>\n\n# 🏷️ Benchmarks - OpenChat 3.5\n\n| Model                 | # Params | Average  | MT-Bench     | HumanEval       | BBH MC   | AGIEval  | TruthfulQA    | MMLU         | GSM8K        | BBH CoT     |\n|-----------------------|----------|----------|--------------|-----------------|----------|----------|---------------|--------------|--------------|-------------|\n| **OpenChat-3.5-0106** | **7B**   | **64.5** | 7.8          | **71.3**        | **51.5** | **49.1** | 61.0          | 65.8         | **77.4**     | 62.2        |\n| ChatGPT (March)*      | ???B     | 61.5     | **7.94**     | 48.1            | 47.6     | 47.1     | 57.7          | **67.3**     | 74.9         | **70.1**    |\n|                       |          |          |              |                 |          |          |               |              |              |             |\n| OpenHermes 2.5        | 7B       | 59.3     | 7.54         | 48.2            | 49.4     | 46.5     | 57.5          | 63.8         | 73.5         | 59.9        |\n| OpenOrca Mistral      | 7B       | 52.7     | 6.86         | 38.4            | 49.4     | 42.9     | 45.9          | 59.3         | 59.1         | 58.1        |\n| Zephyr-β^             | 7B       | 34.6     | 7.34         | 22.0            | 40.6     | 39.0     | 40.8          | 39.8         | 5.1          | 16.0        |\n| Mistral               | 7B       | -        | 6.84         | 30.5            | 39.0     | 38.0     | -             | 60.1         | 52.2         | -           |\n| Open-source SOTA**    | 13B-70B  | 61.4     | 7.71         | 73.2            | 49.7     | 41.7     | 62.3          | 63.7         | 82.3         | 41.4        |\n|                       |          |          | WizardLM 70B | WizardCoder 34B | Orca 13B | Orca 13B | Platypus2 70B | WizardLM 70B | MetaMath 70B | Flan-T5 11B |\n\n🔥 OpenChat-3.5-0106 (7B) now outperforms Grok-0 (33B) on **all 4 benchmarks** and Grok-1 (314B) on average and **3\u002F4 benchmarks**.\n\n|                       | License     | # Param | Average  | MMLU   | HumanEval | MATH     | GSM8k    |\n|-----------------------|-------------|---------|----------|--------|-----------|----------|----------|\n| **OpenChat-3.5-0106** | Apache-2.0  | **7B**  | **61.0** | 65.8   | **71.3**  | **29.3** | **77.4** |\n| Grok-0                | Proprietary | 33B     | 44.5     | 65.7   | 39.7      | 15.7     | 56.8     |\n| Grok-1                | Proprietary | 314B    | 55.8     | **73** | 63.2      | 23.9     | 62.9     |\n\n\u003Cdetails>\n  \u003Csummary>Evaluation details\u003C\u002Fsummary>\n*: ChatGPT (March) results are from GPT-4 Technical Report, Chain-of-Thought Hub, and our evaluation.\n\n^: Zephyr-β often fails to follow few-shot CoT instructions, likely because it was aligned with only chat data but not trained on few-shot data.\n\n **: Mistral and Open-source SOTA results are taken from reported results in instruction-tuned model papers and official repositories.\n\nAll models are evaluated in chat mode (e.g. with the respective conversation template applied). All zero-shot benchmarks follow the same setting as in the AGIEval paper and Orca paper. CoT tasks use the same configuration as Chain-of-Thought Hub, HumanEval is evaluated with EvalPlus, and MT-bench is run using FastChat. To reproduce our results, follow the instructions below.\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n  \u003Csummary>Reproducing benchmarks\u003C\u002Fsummary>\n\nReasoning and Coding:\n\nNote: Please run the following commands at the base directory of this repository.\n\n```bash\npython -m ochat.evaluation.run_eval --condition \"GPT4 Correct\" --model openchat\u002Fopenchat-3.5-0106 --eval_sets coding fs_cothub\u002Fbbh fs_cothub\u002Fmmlu zs\u002Fagieval zs\u002Fbbh_mc_orca zs\u002Ftruthfulqa_orca\npython ochat\u002Fevaluation\u002Fview_results.py\npython ochat\u002Fevaluation\u002Fconvert_to_evalplus.py\n```\n\nThen all humaneval code samples are placed in `ochat\u002Fevaluation\u002Fevalplus_codegen`. Use the following command to evaluate an individual code sample named `samples.jsonl` using Docker as a sandbox.\n\n```bash\ndocker run -v $(pwd):\u002Fapp ganler\u002Fevalplus:latest --dataset humaneval --samples samples.jsonl\n```\n\nMathematical Reasoning:\n\nNote: Please run the following commands at the base directory of this repository.\n\n```bash\npython -m ochat.evaluation.run_eval --condition \"Math Correct\" --model openchat\u002Fopenchat-3.5-0106 --eval_sets fs_cothub\u002Fgsm8k zs\u002Fmath\npython ochat\u002Fevaluation\u002Fview_results.py\n```\n\nMT-Bench:\n\nPlease first launch a local API server, then download FastChat and run the following commands.\n\nNote: Due to non-zero temperature and GPT-4 API changes over time, there might be variations in the results.\n\n```bash\ncd fastchat\u002Fllm_judge\npython gen_api_answer.py --model openchat-3.5-0106 --max-tokens 4096 --parallel 128 --openai-api-base http:\u002F\u002Flocalhost:18888\u002Fv1\npython gen_judgment.py --model-list openchat-3.5-0106 --parallel 8 --mode single\n```\n\n\u003C\u002Fdetails>\n\n# ⬇️ Installation\n> [!NOTE]\n> Need [`pytorch`](https:\u002F\u002Fpytorch.org\u002Fget-started\u002Flocally\u002F#start-locally) and [CUDA](https:\u002F\u002Fdeveloper.nvidia.com\u002Fcuda-toolkit-archive) to run OpenChat\n\n## pip\n\n```bash\npip3 install ochat\n```\n> [!IMPORTANT]\n> If you are facing package compatibility issues with pip, try the conda method below or check [this issue](https:\u002F\u002Fgithub.com\u002Fimoneoi\u002Fopenchat\u002Fissues\u002F41)\n\n## conda\n\n```bash\nconda create -y --name openchat python=3.11\nconda activate openchat\n\npip3 install ochat\n```\n\n## Windows (WSL 1.x, Ubuntu-22.04)\n\n```bash\nsudo apt update\nsudo apt install build-essential\n\nsudo apt install -y curl\ncurl -o miniconda.sh https:\u002F\u002Frepo.anaconda.com\u002Fminiconda\u002FMiniconda3-latest-Linux-x86_64.sh\nbash miniconda.sh\n\n# Restart WSL terminal if the following conda command does not work\n\nconda create -y --name openchat python=3.11\nconda activate openchat\n\npip3 install ochat\n```\n\n## From source\n\n\u003Cdetails>\n  \u003Csummary>Clone this repo and install openchat from source in editable mode\u003C\u002Fsummary>\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fimoneoi\u002Fopenchat\ncd openchat\n\npip3 install --upgrade pip  # enable PEP 660 support\npip3 install -e .  # Editable mode, you can make changes in this cloned repo\n```\n\u003C\u002Fdetails>\n\n# 🚀 Deploying API server\n\n⚡ Our API server is ready for production use and compatible with the OpenAI API protocol. It is highly optimized with vLLM and can dynamically batch requests.\n\n📎 Note: For 20 series or older GPUs that do not support `bfloat16`, add `--dtype float16` to the server args.\n\n### List of currently supported models\n\n| MODEL_TYPE   | MODEL_REPO                                                                                    | License    |\n|--------------|-----------------------------------------------------------------------------------------------|------------|\n| openchat_3.6 | [openchat\u002Fopenchat-3.6-8b-20240522](https:\u002F\u002Fhuggingface.co\u002Fopenchat\u002Fopenchat-3.6-8b-20240522) | Llama 3    |\n| openchat_3.5 | [openchat\u002Fopenchat-3.5-0106](https:\u002F\u002Fhuggingface.co\u002Fopenchat\u002Fopenchat-3.5-0106)               | Apache 2.0 |\n\n### For a single GPU (e.g. RTX 3090, 4090)\n\n```bash\npython -m ochat.serving.openai_api_server --model MODEL_REPO\n```\n\n### For multiple GPUs (tensor parallel)\n\n```bash\n# N is the number of tensor parallel GPUs\npython -m ochat.serving.openai_api_server --model MODEL_REPO --engine-use-ray --worker-use-ray --tensor-parallel-size N\n```\n\nuse `-h` to see more settings\n```bash\npython -m ochat.serving.openai_api_server --model MODEL_REPO -h\n```\n\n\u003Cdetails>\n  \u003Csummary>Deploy as online service\u003C\u002Fsummary>\n\nIf you want to deploy the server as an online service, you can use `--api-keys sk-KEY1 sk-KEY2 ...` to specify allowed API keys and `--disable-log-requests --disable-log-stats --log-file openchat.log` for logging only to a file. For security purposes, we recommend using an [HTTPS gateway](https:\u002F\u002Ffastapi.tiangolo.com\u002Fes\u002Fdeployment\u002Fconcepts\u002F#security-https) in front of the server.\n\n\u003C\u002Fdetails>\n\n## Request example\n\nOnce started, the server listens at `localhost:18888` for requests and is compatible with the [OpenAI ChatCompletion API specifications](https:\u002F\u002Fplatform.openai.com\u002Fdocs\u002Fapi-reference\u002Fchat). \n\n💡 **Default Mode (GPT4 Correct)**: Best for coding, chat and general tasks\n\n```bash\ncurl http:\u002F\u002Flocalhost:18888\u002Fv1\u002Fchat\u002Fcompletions \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"model\": \"MODEL_TYPE\",\n    \"messages\": [{\"role\": \"user\", \"content\": \"You are a large language model named OpenChat. Write a poem to describe yourself\"}]\n  }'\n```\n\n🧮 **Mathematical Reasoning Mode**: Tailored for solving math problems\n\n```bash\ncurl http:\u002F\u002Flocalhost:18888\u002Fv1\u002Fchat\u002Fcompletions \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"model\": \"MODEL_TYPE\",\n    \"condition\": \"Math Correct\",\n    \"messages\": [{\"role\": \"user\", \"content\": \"10.3 − 7988.8133 = \"}]\n  }'\n```\n\n# \u003Ca id=\"web-ui\">\u003C\u002Fa> 🌐 Web UI - [OpenChat-UI](https:\u002F\u002Fgithub.com\u002Fimoneoi\u002Fopenchat-ui)\n\nAfter launching the API server, OpenChat provide user interface that easy to interact with. [Click here to check Web UI](https:\u002F\u002Fgithub.com\u002Fimoneoi\u002Fopenchat-ui)\n\n# 🤗 Inference with Transformers\n\n> [!WARNING]\n> It's recommended to use our optimized API server for deployment. Inferencing with Transformers will be slower.\n\n💡 **Default Mode (GPT4 Correct)**: Best for coding, chat and general tasks\n\n```\nGPT4 Correct User: Hello\u003C|end_of_turn|>GPT4 Correct Assistant: Hi\u003C|end_of_turn|>GPT4 Correct User: How are you today?\u003C|end_of_turn|>GPT4 Correct Assistant:\n```\n\n🧮 **Mathematical Reasoning Mode**: Tailored for solving math problems\n\n```\nMath Correct User: 10.3 − 7988.8133=\u003C|end_of_turn|>Math Correct Assistant:\n```\n\n⚠️ **Notice:** Remember to set `\u003C|end_of_turn|>` as end of generation token.\n\nThe default (GPT4 Correct) template is also available as the integrated `tokenizer.chat_template`, which can be used instead of manually specifying the template.\n\n# \u003Ca id=\"training\">\u003C\u002Fa> 🛠️ Training\n\nThe OpenChat training system utilizes padding-free training and the [Multipack Sampler](https:\u002F\u002Fgithub.com\u002Fimoneoi\u002Fmultipack_sampler), achieving a **3~10x** speedup compared to the conventional padded training.\n\n## Choose a base model\n\nOpenChat supports Llama 3 and Mistral models. Please first choose a base model to fit your needs. Each base model has a corresponding weight repo, model type, and recommended batch size as listed below, they should be filled into `BASE_REPO`, `MODEL_TYPE`, and `BATCH_SIZE` in the following instructions.\n\n| Base Model | Size | Weights (with EOT token)                   | Model Type              | Recommended Batch Size per GPU (8xA100 80GB) |\n|------------|------|--------------------------------------------|-------------------------|----------------------------------------------|\n| Llama 3    | 8B   | `imone\u002FLlama-3-8B-fixed-special-embedding` | `openchat_3.6`          | 40960                                        |\n| Mistral    | 7B   | `imone\u002FMistral_7B_with_EOT_token`          | `openchat_v3.2_mistral` | 77824                                        |\n\nNote: The OpenChat conversation template requires `\u003C|eot_id|>, \u003C|start_header_id|>, \u003C|end_header_id|>` (Llama 3) `\u003C|end_of_turn|>` (Mistral) special tokens. The base model specified must include these tokens with initialized embeddings. Our provided weights are the original base weights with this token added and embeddings initialized. If you want to add them manually, use the `init_special_embedding_llama3.py` or `mistral_add_tokens.py` in the `scripts` directory.\n\n## Installing DeepSpeed and Flash Attention\n\nFirst, ensure that the CUDA `nvcc` compiler is available in your environment. If it is not, install the CUDA toolkit that matches the version used by PyTorch.\n\nNext, install building dependencies:\n\n```bash\npip install packaging ninja\n```\n\nFinally, install the packages:\n\n```bash\npip install deepspeed flash-attn\n```\n\n### Preparing Your Data\n\nTo utilize the OpenChat trainer, prepare your SFT data into a JSON Lines format where each line corresponds to a `Conversation` object:\n\n```python\nclass Message(BaseModel):\n    role: str     # Must be \"user\" or \"assistant\"\n    content: str  # Message content\n    weight: Optional[float] = None  # Loss weight for this message. Typically 0 for user and 1 for assistant to supervise assistant's responses only\n\n\nclass Conversation(BaseModel):\n    items: List[Message]  # All messages within the conversation\n    condition: str = \"\"  # C-RLFT condition, can be any string or empty.\n    system: str = \"\"  # System message for this conversation\n```\n\nFor basic SFT, assign `weight` as `0` for human messages and `1` for assistant responses.\n\nSFT example:\n\n```json\n{\"items\":[{\"role\":\"user\",\"content\":\"Hello\",\"weight\":0.0},{\"role\":\"assistant\",\"content\":\"Hi\",\"weight\":1.0},{\"role\":\"user\",\"content\":\"How are you today?\",\"weight\":0.0},{\"role\":\"assistant\",\"content\":\"I'm fine.\",\"weight\":1.0}],\"system\":\"\"}\n{\"items\":[{\"role\":\"user\",\"content\":\"Who are you?\",\"weight\":0.0},{\"role\":\"assistant\",\"content\":\"I'm OpenChat.\",\"weight\":1.0}],\"system\":\"You are a helpful assistant named OpenChat.\"}\n```\n\nFor C-RLFT, `condition` should be set as the class the conversation belongs to (e.g. `GPT3` or `GPT4`). The `weight` is assigned as `0` for human messages and `w` for assistant responses, where `w` is the weight of the class (e.g. `0.1` for `GPT3` and `1` for `GPT4`, as found in our C-RLFT paper).\n\nC-RLFT example:\n\n```json\n{\"items\":[{\"role\":\"user\",\"content\":\"What is C-RLFT?\",\"weight\":0.0},{\"role\":\"assistant\",\"content\":\"C-RLFT is a method for improving open-source LLMs with mixed-quality data.\",\"weight\":1.0}],\"condition\":\"GPT4\",\"system\":\"\"}\n{\"items\":[{\"role\":\"user\",\"content\":\"What is C-RLFT?\",\"weight\":0.0},{\"role\":\"assistant\",\"content\":\"I don't know.\",\"weight\":0.1}],\"condition\":\"GPT3\",\"system\":\"\"}\n```\n\n### Pre-tokenizing the Dataset\n\nYou'll then need to pre-tokenize the dataset using the command (please specify a filename as `PRETOKENIZED_DATA_OUTPUT_PATH` to store the pretokenized dataset):\n\n```bash\npython -m ochat.data.generate_dataset --model-type MODEL_TYPE --model-path BASE_REPO --in-files data.jsonl --out-prefix PRETOKENIZED_DATA_OUTPUT_PATH\n```\n\n### Launching the OpenChat Trainer\n\nYou can now launch the OpenChat trainer using the command below.\n- 13B model requires eight `A\u002FH100s` with 80GB VRAM\n- 7B model can be trained with four `A\u002FH100s` with 80GB VRAM or eight `A\u002FH100s` with 40GB VRAM.\n\nFor hyperparameters, we recommend first setting the batch size to the recommended batch size. If OOM occurs, try setting it to the exact maximum that VRAM can hold and as a multiple of `2048`.\nOther hyperparameters have been carefully selected as the default. Furthermore, the learning rate is automatically determined based on the [inverse square-root rule](https:\u002F\u002Farxiv.org\u002Fabs\u002F2006.09092).\n\n\u003Cdetails>\n\n\u003Csummary>Training Commands (click to expand)\u003C\u002Fsummary>\n\n```bash\nNUM_GPUS=8\n\ndeepspeed --num_gpus=$NUM_GPUS --module ochat.training_deepspeed.train \\\n          --model_path BASE_REPO \\\n          --data_prefix PRETOKENIZED_DATA_OUTPUT_PATH \\\n          --save_path PATH_TO_SAVE_MODEL \\\n          --batch_max_len BATCH_SIZE \\\n          --epochs 5 \\\n          --save_every 1 \\\n          --deepspeed \\\n          --deepspeed_config ochat\u002Ftraining_deepspeed\u002Fdeepspeed_config.json\n```\n\n\u003C\u002Fdetails>\n\nYou can find checkpoints of all epochs in `PATH_TO_SAVE_MODEL`. Then you may evaluate each epoch and choose the best one.\n\n# Limitations\n\n**Foundation Model Limitations**: Despite its advanced capabilities, OpenChat is still bound by the limitations inherent in its foundation models. These limitations may impact the model's performance in areas such as:\n\n - Complex reasoning\n - Mathematical and arithmetic tasks\n - Programming and coding challenges\n\n**Hallucination of Non-existent Information:** OpenChat may sometimes generate information that does not exist or is not accurate, also known as \"hallucination\". Users should be aware of this possibility and verify any critical information obtained the model.\n\n**Safety:** OpenChat may sometimes generate harmful, hate speech, biased responses, or answer unsafe questions. It's crucial to apply additional AI safety measures in use cases that require safe and moderated responses.\n\n# License\n\nCode is distributed under the **Apache License 2.0**.\n\n# Citation\n\n```\n@article{wang2023openchat,\n  title={OpenChat: Advancing Open-source Language Models with Mixed-Quality Data},\n  author={Wang, Guan and Cheng, Sijie and Zhan, Xianyuan and Li, Xiangang and Song, Sen and Liu, Yang},\n  journal={arXiv preprint arXiv:2309.11235},\n  year={2023}\n}\n```\n\n# 💌Contact\n\n**Project Lead:**\n- Guan Wang [imonenext at gmail dot com]\n- [Alpay Ariyak](https:\u002F\u002Fgithub.com\u002Falpayariyak) [aariyak at wpi dot edu]\n\n**Main Contributors:**\n- [Xianyuan Zhan](https:\u002F\u002Fscholar.google.com.hk\u002Fcitations?user=pDMnGloAAAAJ) (Tsinghua University)\n- Qiying Yu (Tsinghua University)\n- Changling Liu (GPT Desk Pte. Ltd.)\n- LDJ\n- AutoMeta (Alignment Lab AI)\n\n**Sponsors:**\n- [Sen Song](https:\u002F\u002Fscholar.google.com\u002Fcitations?user=cYgtRP4AAAAJ) (Tsinghua University)\n- [Yang Liu](https:\u002F\u002Fnlp.csai.tsinghua.edu.cn\u002F~ly\u002F) (Tsinghua University)\n- [01.AI Company](https:\u002F\u002Fwww.lingyiwanwu.com\u002Fen)\n- [RunPod](https:\u002F\u002Fwww.runpod.io\u002F)\n\n**Special Thanks:**\n - [Mistral](https:\u002F\u002Fmistral.ai\u002F)\n - [Chain-of-Thought Hub](https:\u002F\u002Fgithub.com\u002FFranxYao\u002Fchain-of-thought-hub)\n - [Llama 2](https:\u002F\u002Fai.meta.com\u002Fllama\u002F)\n - [Self-Instruct](https:\u002F\u002Farxiv.org\u002Fabs\u002F2212.10560)\n - [FastChat (Vicuna)](https:\u002F\u002Fgithub.com\u002Flm-sys\u002FFastChat)\n - [Alpaca](https:\u002F\u002Fgithub.com\u002Ftatsu-lab\u002Fstanford_alpaca.git)\n - [StarCoder](https:\u002F\u002Fgithub.com\u002Fbigcode-project\u002Fstarcoder)\n","OpenChat是一个开源语言模型库，使用C-RLFT策略（一种受离线强化学习启发的方法）进行微调。该项目的核心功能在于能够利用混合质量的数据进行训练，并且无需偏好标签，即使在7B规模的模型上也能达到与ChatGPT相媲美的性能，同时该模型可以在消费级GPU（如RTX 3090）上运行。技术特点包括高效处理非优质数据的能力以及持续更新优化以提升编码及整体表现。适用于需要高性能、低成本解决方案的自然语言处理场景，特别是对于那些希望基于现有硬件资源开发或研究大语言模型的研究者和开发者来说非常合适。","2026-06-11 03:36:09","high_star"]